@blogmcp/mdx-render-vue 0.1.0
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/dist/_virtual/_plugin-vue_export-helper.js +10 -0
- package/dist/_virtual/constants.js +4 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/composables/index.d.ts +11 -0
- package/dist/composables/index.js +24 -0
- package/dist/composables/useAudioPlayer.d.ts +22 -0
- package/dist/composables/useAudioPlayer.js +58 -0
- package/dist/composables/useCallout.d.ts +43 -0
- package/dist/composables/useCallout.js +71 -0
- package/dist/composables/useCodeBlock.d.ts +23 -0
- package/dist/composables/useCodeBlock.js +67 -0
- package/dist/composables/useGallery.d.ts +37 -0
- package/dist/composables/useGallery.js +84 -0
- package/dist/composables/useMedia.d.ts +18 -0
- package/dist/composables/useMedia.js +9 -0
- package/dist/composables/useYouTube.d.ts +31 -0
- package/dist/composables/useYouTube.js +32 -0
- package/dist/edit/AlertEdit.vue.d.ts +12 -0
- package/dist/edit/AlertEdit.vue.js +4 -0
- package/dist/edit/AlertEdit.vue2.js +18 -0
- package/dist/edit/AudioPlayerEdit.vue.d.ts +3 -0
- package/dist/edit/AudioPlayerEdit.vue.js +117 -0
- package/dist/edit/AudioPlayerEdit.vue2.js +4 -0
- package/dist/edit/BadgeEdit.vue.d.ts +2 -0
- package/dist/edit/BadgeEdit.vue.js +4 -0
- package/dist/edit/BadgeEdit.vue2.js +13 -0
- package/dist/edit/ButtonEdit.vue.d.ts +2 -0
- package/dist/edit/ButtonEdit.vue.js +4 -0
- package/dist/edit/ButtonEdit.vue2.js +13 -0
- package/dist/edit/CalloutEdit.vue.d.ts +13 -0
- package/dist/edit/CalloutEdit.vue.js +85 -0
- package/dist/edit/CalloutEdit.vue2.js +4 -0
- package/dist/edit/CardEdit.vue.d.ts +12 -0
- package/dist/edit/CardEdit.vue.js +4 -0
- package/dist/edit/CardEdit.vue2.js +18 -0
- package/dist/edit/CodeBlockEdit.vue.d.ts +12 -0
- package/dist/edit/CodeBlockEdit.vue.js +7 -0
- package/dist/edit/CodeBlockEdit.vue2.js +89 -0
- package/dist/edit/GalleryEdit.vue.d.ts +3 -0
- package/dist/edit/GalleryEdit.vue.js +64 -0
- package/dist/edit/GalleryEdit.vue2.js +4 -0
- package/dist/edit/IconEdit.vue.d.ts +2 -0
- package/dist/edit/IconEdit.vue.js +4 -0
- package/dist/edit/IconEdit.vue2.js +13 -0
- package/dist/edit/TooltipEdit.vue.d.ts +16 -0
- package/dist/edit/TooltipEdit.vue.js +4 -0
- package/dist/edit/TooltipEdit.vue2.js +24 -0
- package/dist/edit/YouTubeEdit.vue.d.ts +3 -0
- package/dist/edit/YouTubeEdit.vue.js +41 -0
- package/dist/edit/YouTubeEdit.vue2.js +4 -0
- package/dist/edit/index.d.ts +29 -0
- package/dist/edit/index.js +35 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +75 -0
- package/dist/mdx-render-vue.css +31 -0
- package/dist/node_modules/@ark-ui/vue/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/factory.js +35 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/presence/use-presence-context.js +6 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/presence/use-presence.js +40 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow-tip.js +5 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow-tip.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow.js +5 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-content.js +5 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-content.vue_vue_type_script_setup_true_lang.js +25 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-context.js +5 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-context.vue_vue_type_script_setup_true_lang.js +14 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-positioner.js +5 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-positioner.vue_vue_type_script_setup_true_lang.js +23 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root-provider.js +5 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root-provider.vue_vue_type_script_setup_true_lang.js +38 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root.js +5 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root.vue_vue_type_script_setup_true_lang.js +68 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-trigger.js +5 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-trigger.vue_vue_type_script_setup_true_lang.js +25 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip.js +22 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/use-tooltip-context.js +6 -0
- package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/use-tooltip.js +36 -0
- package/dist/node_modules/@ark-ui/vue/dist/providers/environment/use-environment-context.js +13 -0
- package/dist/node_modules/@ark-ui/vue/dist/providers/locale/use-locale-context.js +12 -0
- package/dist/node_modules/@ark-ui/vue/dist/utils/clean-props.js +8 -0
- package/dist/node_modules/@ark-ui/vue/dist/utils/create-context.js +14 -0
- package/dist/node_modules/@ark-ui/vue/dist/utils/dynamic.js +34 -0
- package/dist/node_modules/@ark-ui/vue/dist/utils/unref-element.js +8 -0
- package/dist/node_modules/@ark-ui/vue/dist/utils/use-forward-expose.js +46 -0
- package/dist/node_modules/@ark-ui/vue/dist/utils/use-render-strategy.js +5 -0
- package/dist/node_modules/@braintree/sanitize-url/dist/constants.js +20 -0
- package/dist/node_modules/@braintree/sanitize-url/dist/index.js +75 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +728 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +629 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +176 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +151 -0
- package/dist/node_modules/@iconify/vue/dist/iconify.js +1691 -0
- package/dist/node_modules/@zag-js/anatomy/dist/create-anatomy.js +29 -0
- package/dist/node_modules/@zag-js/core/dist/create-machine.js +28 -0
- package/dist/node_modules/@zag-js/core/dist/merge-props.js +55 -0
- package/dist/node_modules/@zag-js/core/dist/scope.js +20 -0
- package/dist/node_modules/@zag-js/core/dist/state.js +176 -0
- package/dist/node_modules/@zag-js/core/dist/types.js +11 -0
- package/dist/node_modules/@zag-js/dom-query/dist/chunk-QZ7TP4HQ.js +6 -0
- package/dist/node_modules/@zag-js/dom-query/dist/computed-style.js +11 -0
- package/dist/node_modules/@zag-js/dom-query/dist/event.js +37 -0
- package/dist/node_modules/@zag-js/dom-query/dist/node.js +64 -0
- package/dist/node_modules/@zag-js/dom-query/dist/overflow.js +28 -0
- package/dist/node_modules/@zag-js/dom-query/dist/platform.js +23 -0
- package/dist/node_modules/@zag-js/dom-query/dist/query.js +6 -0
- package/dist/node_modules/@zag-js/dom-query/dist/raf.js +52 -0
- package/dist/node_modules/@zag-js/dom-query/dist/set.js +22 -0
- package/dist/node_modules/@zag-js/dom-query/dist/shared.js +8 -0
- package/dist/node_modules/@zag-js/focus-visible/dist/index.js +159 -0
- package/dist/node_modules/@zag-js/popper/dist/get-anchor.js +39 -0
- package/dist/node_modules/@zag-js/popper/dist/get-placement.js +296 -0
- package/dist/node_modules/@zag-js/popper/dist/get-styles.js +47 -0
- package/dist/node_modules/@zag-js/popper/dist/middleware.js +79 -0
- package/dist/node_modules/@zag-js/popper/dist/placement.js +7 -0
- package/dist/node_modules/@zag-js/presence/dist/presence.connect.js +18 -0
- package/dist/node_modules/@zag-js/presence/dist/presence.machine.js +175 -0
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.anatomy.js +7 -0
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.connect.js +155 -0
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.dom.js +24 -0
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.machine.js +416 -0
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.store.js +9 -0
- package/dist/node_modules/@zag-js/types/dist/prop-types.js +14 -0
- package/dist/node_modules/@zag-js/utils/dist/array.js +7 -0
- package/dist/node_modules/@zag-js/utils/dist/equal.js +36 -0
- package/dist/node_modules/@zag-js/utils/dist/functions.js +11 -0
- package/dist/node_modules/@zag-js/utils/dist/guard.js +26 -0
- package/dist/node_modules/@zag-js/utils/dist/object.js +16 -0
- package/dist/node_modules/@zag-js/utils/dist/store.js +44 -0
- package/dist/node_modules/@zag-js/utils/dist/warning.js +31 -0
- package/dist/node_modules/@zag-js/vue/dist/bindable.js +48 -0
- package/dist/node_modules/@zag-js/vue/dist/machine.js +258 -0
- package/dist/node_modules/@zag-js/vue/dist/normalize-props.js +42 -0
- package/dist/node_modules/@zag-js/vue/dist/refs.js +14 -0
- package/dist/node_modules/@zag-js/vue/dist/track.js +22 -0
- package/dist/node_modules/dompurify/dist/purify.es.js +1190 -0
- package/dist/registry.d.ts +76 -0
- package/dist/registry.js +164 -0
- package/dist/render/alert/Alert.vue.d.ts +18 -0
- package/dist/render/alert/Alert.vue.js +4 -0
- package/dist/render/alert/Alert.vue2.js +43 -0
- package/dist/render/alert/index.d.ts +2 -0
- package/dist/render/audioplayer/AudioPlayerDefault.vue.d.ts +3 -0
- package/dist/render/audioplayer/AudioPlayerDefault.vue.js +116 -0
- package/dist/render/audioplayer/AudioPlayerDefault.vue2.js +4 -0
- package/dist/render/audioplayer/index.d.ts +5 -0
- package/dist/render/audioplayer/index.js +5 -0
- package/dist/render/badge/Badge.vue.d.ts +10 -0
- package/dist/render/badge/Badge.vue.js +4 -0
- package/dist/render/badge/Badge.vue2.js +28 -0
- package/dist/render/badge/index.d.ts +2 -0
- package/dist/render/button/Button.vue.d.ts +13 -0
- package/dist/render/button/Button.vue.js +4 -0
- package/dist/render/button/Button.vue2.js +42 -0
- package/dist/render/button/index.d.ts +2 -0
- package/dist/render/callout/CalloutDefault.vue.d.ts +13 -0
- package/dist/render/callout/CalloutDefault.vue.js +86 -0
- package/dist/render/callout/CalloutDefault.vue2.js +4 -0
- package/dist/render/callout/CalloutMinimal.vue.d.ts +13 -0
- package/dist/render/callout/CalloutMinimal.vue.js +27 -0
- package/dist/render/callout/CalloutMinimal.vue2.js +4 -0
- package/dist/render/callout/index.d.ts +6 -0
- package/dist/render/callout/index.js +7 -0
- package/dist/render/card/Card.vue.d.ts +15 -0
- package/dist/render/card/Card.vue.js +4 -0
- package/dist/render/card/Card.vue2.js +29 -0
- package/dist/render/card/index.d.ts +2 -0
- package/dist/render/codeblock/CodeBlockDefault.vue.d.ts +12 -0
- package/dist/render/codeblock/CodeBlockDefault.vue.js +7 -0
- package/dist/render/codeblock/CodeBlockDefault.vue2.js +92 -0
- package/dist/render/codeblock/index.d.ts +5 -0
- package/dist/render/codeblock/index.js +5 -0
- package/dist/render/gallery/GalleryGrid.vue.d.ts +3 -0
- package/dist/render/gallery/GalleryGrid.vue.js +125 -0
- package/dist/render/gallery/GalleryGrid.vue2.js +4 -0
- package/dist/render/gallery/GalleryLightbox.vue.d.ts +16 -0
- package/dist/render/gallery/GalleryLightbox.vue.js +7 -0
- package/dist/render/gallery/GalleryLightbox.vue2.js +170 -0
- package/dist/render/gallery/index.d.ts +6 -0
- package/dist/render/gallery/index.js +7 -0
- package/dist/render/icon/Icon.vue.d.ts +9 -0
- package/dist/render/icon/Icon.vue.js +4 -0
- package/dist/render/icon/Icon.vue2.js +25 -0
- package/dist/render/icon/index.d.ts +2 -0
- package/dist/render/index.d.ts +40 -0
- package/dist/render/index.js +63 -0
- package/dist/render/tooltip/Tooltip.vue.d.ts +18 -0
- package/dist/render/tooltip/Tooltip.vue.js +4 -0
- package/dist/render/tooltip/Tooltip.vue2.js +58 -0
- package/dist/render/tooltip/index.d.ts +2 -0
- package/dist/render/youtube/YouTubeDefault.vue.d.ts +3 -0
- package/dist/render/youtube/YouTubeDefault.vue.js +79 -0
- package/dist/render/youtube/YouTubeDefault.vue2.js +4 -0
- package/dist/render/youtube/index.d.ts +5 -0
- package/dist/render/youtube/index.js +5 -0
- package/dist/useAudioPlayer.d.ts +22 -0
- package/dist/useCallout.d.ts +46 -0
- package/dist/useCodeBlock.d.ts +25 -0
- package/dist/useGallery.d.ts +44 -0
- package/dist/useMedia.d.ts +16 -0
- package/dist/useYouTube.d.ts +32 -0
- package/package.json +125 -0
- package/src/composables/index.ts +16 -0
- package/src/composables/useAudioPlayer.ts +84 -0
- package/src/composables/useCallout.ts +103 -0
- package/src/composables/useCodeBlock.ts +90 -0
- package/src/composables/useGallery.ts +143 -0
- package/src/composables/useMedia.ts +23 -0
- package/src/composables/useYouTube.ts +58 -0
- package/src/edit/AlertEdit.vue +9 -0
- package/src/edit/AudioPlayerEdit.vue +92 -0
- package/src/edit/BadgeEdit.vue +7 -0
- package/src/edit/ButtonEdit.vue +10 -0
- package/src/edit/CalloutEdit.vue +107 -0
- package/src/edit/CardEdit.vue +9 -0
- package/src/edit/CodeBlockEdit.vue +76 -0
- package/src/edit/GalleryEdit.vue +65 -0
- package/src/edit/IconEdit.vue +7 -0
- package/src/edit/TooltipEdit.vue +15 -0
- package/src/edit/YouTubeEdit.vue +33 -0
- package/src/edit/index.ts +32 -0
- package/src/index.ts +62 -0
- package/src/registry.ts +272 -0
- package/src/render/alert/Alert.vue +32 -0
- package/src/render/alert/index.ts +2 -0
- package/src/render/audioplayer/AudioPlayerDefault.vue +89 -0
- package/src/render/audioplayer/index.ts +8 -0
- package/src/render/badge/Badge.vue +25 -0
- package/src/render/badge/index.ts +2 -0
- package/src/render/button/Button.vue +41 -0
- package/src/render/button/index.ts +2 -0
- package/src/render/callout/CalloutDefault.vue +101 -0
- package/src/render/callout/CalloutMinimal.vue +31 -0
- package/src/render/callout/index.ts +9 -0
- package/src/render/card/Card.vue +15 -0
- package/src/render/card/index.ts +2 -0
- package/src/render/codeblock/CodeBlockDefault.vue +76 -0
- package/src/render/codeblock/index.ts +8 -0
- package/src/render/gallery/GalleryGrid.vue +162 -0
- package/src/render/gallery/GalleryLightbox.vue +162 -0
- package/src/render/gallery/index.ts +9 -0
- package/src/render/icon/Icon.vue +22 -0
- package/src/render/icon/index.ts +2 -0
- package/src/render/index.ts +76 -0
- package/src/render/tooltip/Tooltip.vue +35 -0
- package/src/render/tooltip/index.ts +2 -0
- package/src/render/youtube/YouTubeDefault.vue +72 -0
- package/src/render/youtube/index.ts +8 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createCommentVNode, renderSlot } from "vue";
|
|
2
|
+
import { calloutStyles } from "@blogmcp/mdx-schema/styles";
|
|
3
|
+
const _hoisted_1 = { class: "flex items-start gap-3" };
|
|
4
|
+
const _hoisted_2 = { class: "flex-shrink-0 mt-0.5" };
|
|
5
|
+
const _hoisted_3 = { class: "flex-1 text-sm leading-relaxed" };
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "CalloutDefault",
|
|
8
|
+
props: {
|
|
9
|
+
type: {}
|
|
10
|
+
},
|
|
11
|
+
setup(__props) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const effectiveType = computed(() => props.type || "info");
|
|
14
|
+
const colorClasses = computed(() => calloutStyles.default.type[effectiveType.value]);
|
|
15
|
+
return (_ctx, _cache) => {
|
|
16
|
+
return openBlock(), createElementBlock("div", {
|
|
17
|
+
class: normalizeClass([unref(calloutStyles).default.base, colorClasses.value.bg, colorClasses.value.border, colorClasses.value.text]),
|
|
18
|
+
"data-mdx-component": "Callout"
|
|
19
|
+
}, [
|
|
20
|
+
createElementVNode("div", _hoisted_1, [
|
|
21
|
+
createElementVNode("div", _hoisted_2, [
|
|
22
|
+
effectiveType.value === "info" ? (openBlock(), createElementBlock("svg", {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: normalizeClass(["w-5 h-5", colorClasses.value.iconColor]),
|
|
25
|
+
fill: "none",
|
|
26
|
+
stroke: "currentColor",
|
|
27
|
+
viewBox: "0 0 24 24"
|
|
28
|
+
}, [..._cache[0] || (_cache[0] = [
|
|
29
|
+
createElementVNode("path", {
|
|
30
|
+
"stroke-linecap": "round",
|
|
31
|
+
"stroke-linejoin": "round",
|
|
32
|
+
"stroke-width": "2",
|
|
33
|
+
d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
34
|
+
}, null, -1)
|
|
35
|
+
])], 2)) : effectiveType.value === "warning" ? (openBlock(), createElementBlock("svg", {
|
|
36
|
+
key: 1,
|
|
37
|
+
class: normalizeClass(["w-5 h-5", colorClasses.value.iconColor]),
|
|
38
|
+
fill: "none",
|
|
39
|
+
stroke: "currentColor",
|
|
40
|
+
viewBox: "0 0 24 24"
|
|
41
|
+
}, [..._cache[1] || (_cache[1] = [
|
|
42
|
+
createElementVNode("path", {
|
|
43
|
+
"stroke-linecap": "round",
|
|
44
|
+
"stroke-linejoin": "round",
|
|
45
|
+
"stroke-width": "2",
|
|
46
|
+
d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
|
|
47
|
+
}, null, -1)
|
|
48
|
+
])], 2)) : effectiveType.value === "tip" ? (openBlock(), createElementBlock("svg", {
|
|
49
|
+
key: 2,
|
|
50
|
+
class: normalizeClass(["w-5 h-5", colorClasses.value.iconColor]),
|
|
51
|
+
fill: "none",
|
|
52
|
+
stroke: "currentColor",
|
|
53
|
+
viewBox: "0 0 24 24"
|
|
54
|
+
}, [..._cache[2] || (_cache[2] = [
|
|
55
|
+
createElementVNode("path", {
|
|
56
|
+
"stroke-linecap": "round",
|
|
57
|
+
"stroke-linejoin": "round",
|
|
58
|
+
"stroke-width": "2",
|
|
59
|
+
d: "M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"
|
|
60
|
+
}, null, -1)
|
|
61
|
+
])], 2)) : effectiveType.value === "danger" ? (openBlock(), createElementBlock("svg", {
|
|
62
|
+
key: 3,
|
|
63
|
+
class: normalizeClass(["w-5 h-5", colorClasses.value.iconColor]),
|
|
64
|
+
fill: "none",
|
|
65
|
+
stroke: "currentColor",
|
|
66
|
+
viewBox: "0 0 24 24"
|
|
67
|
+
}, [..._cache[3] || (_cache[3] = [
|
|
68
|
+
createElementVNode("path", {
|
|
69
|
+
"stroke-linecap": "round",
|
|
70
|
+
"stroke-linejoin": "round",
|
|
71
|
+
"stroke-width": "2",
|
|
72
|
+
d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
73
|
+
}, null, -1)
|
|
74
|
+
])], 2)) : createCommentVNode("", true)
|
|
75
|
+
]),
|
|
76
|
+
createElementVNode("div", _hoisted_3, [
|
|
77
|
+
renderSlot(_ctx.$slots, "default")
|
|
78
|
+
])
|
|
79
|
+
])
|
|
80
|
+
], 2);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
export {
|
|
85
|
+
_sfc_main as default
|
|
86
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CalloutProps } from '@blogmcp/mdx-schema';
|
|
2
|
+
declare var __VLS_1: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_1) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<CalloutProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalloutProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, renderSlot } from "vue";
|
|
2
|
+
import { calloutStyles } from "@blogmcp/mdx-schema/styles";
|
|
3
|
+
const _hoisted_1 = { class: "text-sm leading-relaxed" };
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "CalloutMinimal",
|
|
6
|
+
props: {
|
|
7
|
+
type: {}
|
|
8
|
+
},
|
|
9
|
+
setup(__props) {
|
|
10
|
+
const props = __props;
|
|
11
|
+
const effectiveType = computed(() => props.type || "info");
|
|
12
|
+
const colorClasses = computed(() => calloutStyles.minimal.type[effectiveType.value]);
|
|
13
|
+
return (_ctx, _cache) => {
|
|
14
|
+
return openBlock(), createElementBlock("div", {
|
|
15
|
+
class: normalizeClass([unref(calloutStyles).minimal.base, colorClasses.value.bg, colorClasses.value.border, colorClasses.value.text]),
|
|
16
|
+
"data-mdx-component": "Callout"
|
|
17
|
+
}, [
|
|
18
|
+
createElementVNode("div", _hoisted_1, [
|
|
19
|
+
renderSlot(_ctx.$slots, "default")
|
|
20
|
+
])
|
|
21
|
+
], 2);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
_sfc_main as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
title?: string;
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_1: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
10
|
+
export default _default;
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
12
|
+
new (): {
|
|
13
|
+
$slots: S;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, createCommentVNode, createElementVNode, toDisplayString, renderSlot } from "vue";
|
|
2
|
+
const _hoisted_1 = {
|
|
3
|
+
class: "mdx-card rounded-lg border border-gray-200 bg-white p-5 shadow-sm",
|
|
4
|
+
"data-mdx-component": "Card"
|
|
5
|
+
};
|
|
6
|
+
const _hoisted_2 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "mb-3 text-lg font-semibold text-gray-900"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_3 = { class: "text-gray-700" };
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "Card",
|
|
13
|
+
props: {
|
|
14
|
+
title: {}
|
|
15
|
+
},
|
|
16
|
+
setup(__props) {
|
|
17
|
+
return (_ctx, _cache) => {
|
|
18
|
+
return openBlock(), createElementBlock("section", _hoisted_1, [
|
|
19
|
+
__props.title ? (openBlock(), createElementBlock("h3", _hoisted_2, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
20
|
+
createElementVNode("div", _hoisted_3, [
|
|
21
|
+
renderSlot(_ctx.$slots, "default")
|
|
22
|
+
])
|
|
23
|
+
]);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
_sfc_main as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CodeBlockProps } from '@blogmcp/mdx-schema';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
default(): unknown;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<CodeBlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CodeBlockProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
7
|
+
export default _default;
|
|
8
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
9
|
+
new (): {
|
|
10
|
+
$slots: S;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from "./CodeBlockDefault.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const CodeBlockDefault = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-17b5008f"]]);
|
|
5
|
+
export {
|
|
6
|
+
CodeBlockDefault as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { defineComponent, ref, createElementBlock, openBlock, createElementVNode, createCommentVNode, toDisplayString, unref, normalizeClass, createTextVNode, renderSlot } from "vue";
|
|
2
|
+
import { useCodeBlock } from "../../composables/useCodeBlock.js";
|
|
3
|
+
const _hoisted_1 = {
|
|
4
|
+
class: "code-block my-6 rounded-lg overflow-hidden border border-gray-200 bg-gray-50",
|
|
5
|
+
"data-mdx-component": "CodeBlock"
|
|
6
|
+
};
|
|
7
|
+
const _hoisted_2 = { class: "flex items-center justify-between px-4 py-2 bg-gray-100 border-b border-gray-200" };
|
|
8
|
+
const _hoisted_3 = { class: "flex items-center gap-2" };
|
|
9
|
+
const _hoisted_4 = { class: "text-xs text-gray-600 font-medium" };
|
|
10
|
+
const _hoisted_5 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "text-xs text-gray-500"
|
|
13
|
+
};
|
|
14
|
+
const _hoisted_6 = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "w-3.5 h-3.5",
|
|
17
|
+
fill: "none",
|
|
18
|
+
stroke: "currentColor",
|
|
19
|
+
viewBox: "0 0 24 24"
|
|
20
|
+
};
|
|
21
|
+
const _hoisted_7 = {
|
|
22
|
+
key: 1,
|
|
23
|
+
class: "w-3.5 h-3.5",
|
|
24
|
+
fill: "none",
|
|
25
|
+
stroke: "currentColor",
|
|
26
|
+
viewBox: "0 0 24 24"
|
|
27
|
+
};
|
|
28
|
+
const _hoisted_8 = { class: "code-block-content p-4 overflow-x-auto" };
|
|
29
|
+
const _hoisted_9 = { class: "m-0" };
|
|
30
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
31
|
+
__name: "CodeBlockDefault",
|
|
32
|
+
props: {
|
|
33
|
+
language: {},
|
|
34
|
+
title: {},
|
|
35
|
+
showLineNumbers: { type: Boolean }
|
|
36
|
+
},
|
|
37
|
+
setup(__props) {
|
|
38
|
+
const props = __props;
|
|
39
|
+
const { copied, languageLabel, languageClass, copyCode } = useCodeBlock(props);
|
|
40
|
+
const codeRef = ref(null);
|
|
41
|
+
async function handleCopy() {
|
|
42
|
+
if (codeRef.value) {
|
|
43
|
+
await copyCode(codeRef.value.textContent || "");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return (_ctx, _cache) => {
|
|
47
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
48
|
+
createElementVNode("div", _hoisted_2, [
|
|
49
|
+
createElementVNode("div", _hoisted_3, [
|
|
50
|
+
createElementVNode("span", _hoisted_4, toDisplayString(unref(languageLabel)), 1),
|
|
51
|
+
__props.title ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(__props.title), 1)) : createCommentVNode("", true)
|
|
52
|
+
]),
|
|
53
|
+
createElementVNode("button", {
|
|
54
|
+
class: normalizeClass(["flex items-center gap-1 px-2 py-1 text-xs rounded transition-colors", unref(copied) ? "bg-green-500 text-white" : "hover:bg-gray-200 text-gray-500 hover:text-gray-700"]),
|
|
55
|
+
onClick: handleCopy
|
|
56
|
+
}, [
|
|
57
|
+
!unref(copied) ? (openBlock(), createElementBlock("svg", _hoisted_6, [..._cache[0] || (_cache[0] = [
|
|
58
|
+
createElementVNode("path", {
|
|
59
|
+
"stroke-linecap": "round",
|
|
60
|
+
"stroke-linejoin": "round",
|
|
61
|
+
"stroke-width": "2",
|
|
62
|
+
d: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"
|
|
63
|
+
}, null, -1)
|
|
64
|
+
])])) : (openBlock(), createElementBlock("svg", _hoisted_7, [..._cache[1] || (_cache[1] = [
|
|
65
|
+
createElementVNode("path", {
|
|
66
|
+
"stroke-linecap": "round",
|
|
67
|
+
"stroke-linejoin": "round",
|
|
68
|
+
"stroke-width": "2",
|
|
69
|
+
d: "M5 13l4 4L19 7"
|
|
70
|
+
}, null, -1)
|
|
71
|
+
])])),
|
|
72
|
+
createTextVNode(" " + toDisplayString(unref(copied) ? "Copied!" : "Copy"), 1)
|
|
73
|
+
], 2)
|
|
74
|
+
]),
|
|
75
|
+
createElementVNode("div", _hoisted_8, [
|
|
76
|
+
createElementVNode("pre", _hoisted_9, [
|
|
77
|
+
createElementVNode("code", {
|
|
78
|
+
ref_key: "codeRef",
|
|
79
|
+
ref: codeRef,
|
|
80
|
+
class: normalizeClass(unref(languageClass))
|
|
81
|
+
}, [
|
|
82
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
83
|
+
], 2)
|
|
84
|
+
])
|
|
85
|
+
])
|
|
86
|
+
]);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
export {
|
|
91
|
+
_sfc_main as default
|
|
92
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { GalleryProps } from '@blogmcp/mdx-schema';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<GalleryProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<GalleryProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, watch, onUnmounted, createElementBlock, openBlock, Fragment, createCommentVNode, createVNode, unref, normalizeClass, renderList, createElementVNode, normalizeStyle, createBlock, createStaticVNode, resolveDynamicComponent, toDisplayString } from "vue";
|
|
2
|
+
import { useGallery } from "../../composables/useGallery.js";
|
|
3
|
+
import { useOptimizedImg } from "../../composables/useMedia.js";
|
|
4
|
+
import GalleryLightbox from "./GalleryLightbox.vue.js";
|
|
5
|
+
const _hoisted_1 = ["onClick"];
|
|
6
|
+
const _hoisted_2 = ["src"];
|
|
7
|
+
const _hoisted_3 = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "gallery-description text-center text-sm text-gray-500 mt-2"
|
|
10
|
+
};
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "GalleryGrid",
|
|
13
|
+
props: {
|
|
14
|
+
images: {},
|
|
15
|
+
columns: {},
|
|
16
|
+
gap: {},
|
|
17
|
+
aspectRatio: {},
|
|
18
|
+
fit: {},
|
|
19
|
+
position: {}
|
|
20
|
+
},
|
|
21
|
+
setup(__props) {
|
|
22
|
+
const props = __props;
|
|
23
|
+
const { gridColsClass, gapClass, tileLayout, getImageSrc, getImageAlt, getImageDescription, getImageCaption, isVideo, hasImages } = useGallery(props);
|
|
24
|
+
const ImgTag = useOptimizedImg();
|
|
25
|
+
const lightboxOpen = ref(false);
|
|
26
|
+
const lightboxIndex = ref(0);
|
|
27
|
+
const imageOnlyIndices = computed(() => {
|
|
28
|
+
const indices = [];
|
|
29
|
+
for (let i = 0; i < props.images.length; i++) {
|
|
30
|
+
if (!isVideo(i)) indices.push(i);
|
|
31
|
+
}
|
|
32
|
+
return indices;
|
|
33
|
+
});
|
|
34
|
+
const imageOnlyCount = computed(() => imageOnlyIndices.value.length);
|
|
35
|
+
function openLightbox(fullIndex) {
|
|
36
|
+
if (isVideo(fullIndex)) return;
|
|
37
|
+
const lightboxIdx = imageOnlyIndices.value.indexOf(fullIndex);
|
|
38
|
+
if (lightboxIdx === -1) return;
|
|
39
|
+
lightboxIndex.value = lightboxIdx;
|
|
40
|
+
lightboxOpen.value = true;
|
|
41
|
+
}
|
|
42
|
+
function closeLightbox() {
|
|
43
|
+
lightboxOpen.value = false;
|
|
44
|
+
}
|
|
45
|
+
function navigateLightbox(newIndex) {
|
|
46
|
+
lightboxIndex.value = newIndex;
|
|
47
|
+
}
|
|
48
|
+
function lightboxGetSrc(idx) {
|
|
49
|
+
return getImageSrc(imageOnlyIndices.value[idx]);
|
|
50
|
+
}
|
|
51
|
+
function lightboxGetAlt(idx) {
|
|
52
|
+
return getImageAlt(imageOnlyIndices.value[idx]);
|
|
53
|
+
}
|
|
54
|
+
function lightboxGetDescription(idx) {
|
|
55
|
+
return getImageDescription(imageOnlyIndices.value[idx]);
|
|
56
|
+
}
|
|
57
|
+
watch(lightboxOpen, (open) => {
|
|
58
|
+
if (open) {
|
|
59
|
+
document.body.style.overflow = "hidden";
|
|
60
|
+
} else {
|
|
61
|
+
document.body.style.overflow = "";
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
onUnmounted(() => {
|
|
65
|
+
document.body.style.overflow = "";
|
|
66
|
+
});
|
|
67
|
+
return (_ctx, _cache) => {
|
|
68
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
69
|
+
unref(hasImages) ? (openBlock(), createElementBlock("div", {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: normalizeClass(["gallery not-prose my-6", [unref(gridColsClass), unref(gapClass)]]),
|
|
72
|
+
style: { "display": "grid" },
|
|
73
|
+
"data-mdx-component": "Gallery"
|
|
74
|
+
}, [
|
|
75
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.images, (_, index) => {
|
|
76
|
+
return openBlock(), createElementBlock("div", {
|
|
77
|
+
key: index,
|
|
78
|
+
class: "gallery-item"
|
|
79
|
+
}, [
|
|
80
|
+
createElementVNode("div", {
|
|
81
|
+
class: normalizeClass(["gallery-media group relative overflow-hidden rounded", unref(isVideo)(index) ? "bg-gray-900" : "bg-gray-100 cursor-pointer"]),
|
|
82
|
+
style: normalizeStyle(unref(tileLayout).tileStyle),
|
|
83
|
+
onClick: ($event) => openLightbox(index)
|
|
84
|
+
}, [
|
|
85
|
+
unref(isVideo)(index) ? (openBlock(), createElementBlock("video", {
|
|
86
|
+
key: 0,
|
|
87
|
+
src: `${unref(getImageSrc)(index)}#t=0.1`,
|
|
88
|
+
controls: "",
|
|
89
|
+
preload: "metadata",
|
|
90
|
+
playsinline: "",
|
|
91
|
+
class: normalizeClass(unref(tileLayout).mediaSizeClass),
|
|
92
|
+
style: normalizeStyle(unref(tileLayout).mediaStyle)
|
|
93
|
+
}, null, 14, _hoisted_2)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
94
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(ImgTag)), {
|
|
95
|
+
src: unref(getImageSrc)(index),
|
|
96
|
+
alt: unref(getImageAlt)(index),
|
|
97
|
+
sizes: "100vw sm:50vw md:33vw lg:299px",
|
|
98
|
+
class: normalizeClass([unref(tileLayout).mediaSizeClass, "transition-transform duration-200 group-hover:scale-[1.03]"]),
|
|
99
|
+
style: normalizeStyle(unref(tileLayout).mediaStyle),
|
|
100
|
+
loading: "lazy"
|
|
101
|
+
}, null, 8, ["src", "alt", "class", "style"])),
|
|
102
|
+
_cache[0] || (_cache[0] = createStaticVNode('<div class="absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors duration-200 pointer-events-none"></div><svg class="gallery-expand-icon absolute top-2 right-2 text-white opacity-50 [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover:opacity-80 transition-opacity duration-200 drop-shadow-md pointer-events-none" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>', 2))
|
|
103
|
+
], 64))
|
|
104
|
+
], 14, _hoisted_1),
|
|
105
|
+
unref(getImageCaption)(index) ? (openBlock(), createElementBlock("p", _hoisted_3, toDisplayString(unref(getImageCaption)(index)), 1)) : createCommentVNode("", true)
|
|
106
|
+
]);
|
|
107
|
+
}), 128))
|
|
108
|
+
], 2)) : createCommentVNode("", true),
|
|
109
|
+
createVNode(GalleryLightbox, {
|
|
110
|
+
"is-open": lightboxOpen.value,
|
|
111
|
+
"current-index": lightboxIndex.value,
|
|
112
|
+
"image-count": imageOnlyCount.value,
|
|
113
|
+
"get-image-src": lightboxGetSrc,
|
|
114
|
+
"get-image-alt": lightboxGetAlt,
|
|
115
|
+
"get-image-description": lightboxGetDescription,
|
|
116
|
+
onClose: closeLightbox,
|
|
117
|
+
onNavigate: navigateLightbox
|
|
118
|
+
}, null, 8, ["is-open", "current-index", "image-count"])
|
|
119
|
+
], 64);
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
export {
|
|
124
|
+
_sfc_main as default
|
|
125
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
currentIndex: number;
|
|
4
|
+
imageCount: number;
|
|
5
|
+
getImageSrc: (index: number) => string;
|
|
6
|
+
getImageAlt: (index: number) => string;
|
|
7
|
+
getImageDescription: (index: number) => string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
close: () => any;
|
|
11
|
+
navigate: (index: number) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onClose?: (() => any) | undefined;
|
|
14
|
+
onNavigate?: ((index: number) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from "./GalleryLightbox.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const GalleryLightbox = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f28ad12c"]]);
|
|
5
|
+
export {
|
|
6
|
+
GalleryLightbox as default
|
|
7
|
+
};
|