@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.
Files changed (249) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +10 -0
  2. package/dist/_virtual/constants.js +4 -0
  3. package/dist/_virtual/index.js +5 -0
  4. package/dist/_virtual/index2.js +4 -0
  5. package/dist/composables/index.d.ts +11 -0
  6. package/dist/composables/index.js +24 -0
  7. package/dist/composables/useAudioPlayer.d.ts +22 -0
  8. package/dist/composables/useAudioPlayer.js +58 -0
  9. package/dist/composables/useCallout.d.ts +43 -0
  10. package/dist/composables/useCallout.js +71 -0
  11. package/dist/composables/useCodeBlock.d.ts +23 -0
  12. package/dist/composables/useCodeBlock.js +67 -0
  13. package/dist/composables/useGallery.d.ts +37 -0
  14. package/dist/composables/useGallery.js +84 -0
  15. package/dist/composables/useMedia.d.ts +18 -0
  16. package/dist/composables/useMedia.js +9 -0
  17. package/dist/composables/useYouTube.d.ts +31 -0
  18. package/dist/composables/useYouTube.js +32 -0
  19. package/dist/edit/AlertEdit.vue.d.ts +12 -0
  20. package/dist/edit/AlertEdit.vue.js +4 -0
  21. package/dist/edit/AlertEdit.vue2.js +18 -0
  22. package/dist/edit/AudioPlayerEdit.vue.d.ts +3 -0
  23. package/dist/edit/AudioPlayerEdit.vue.js +117 -0
  24. package/dist/edit/AudioPlayerEdit.vue2.js +4 -0
  25. package/dist/edit/BadgeEdit.vue.d.ts +2 -0
  26. package/dist/edit/BadgeEdit.vue.js +4 -0
  27. package/dist/edit/BadgeEdit.vue2.js +13 -0
  28. package/dist/edit/ButtonEdit.vue.d.ts +2 -0
  29. package/dist/edit/ButtonEdit.vue.js +4 -0
  30. package/dist/edit/ButtonEdit.vue2.js +13 -0
  31. package/dist/edit/CalloutEdit.vue.d.ts +13 -0
  32. package/dist/edit/CalloutEdit.vue.js +85 -0
  33. package/dist/edit/CalloutEdit.vue2.js +4 -0
  34. package/dist/edit/CardEdit.vue.d.ts +12 -0
  35. package/dist/edit/CardEdit.vue.js +4 -0
  36. package/dist/edit/CardEdit.vue2.js +18 -0
  37. package/dist/edit/CodeBlockEdit.vue.d.ts +12 -0
  38. package/dist/edit/CodeBlockEdit.vue.js +7 -0
  39. package/dist/edit/CodeBlockEdit.vue2.js +89 -0
  40. package/dist/edit/GalleryEdit.vue.d.ts +3 -0
  41. package/dist/edit/GalleryEdit.vue.js +64 -0
  42. package/dist/edit/GalleryEdit.vue2.js +4 -0
  43. package/dist/edit/IconEdit.vue.d.ts +2 -0
  44. package/dist/edit/IconEdit.vue.js +4 -0
  45. package/dist/edit/IconEdit.vue2.js +13 -0
  46. package/dist/edit/TooltipEdit.vue.d.ts +16 -0
  47. package/dist/edit/TooltipEdit.vue.js +4 -0
  48. package/dist/edit/TooltipEdit.vue2.js +24 -0
  49. package/dist/edit/YouTubeEdit.vue.d.ts +3 -0
  50. package/dist/edit/YouTubeEdit.vue.js +41 -0
  51. package/dist/edit/YouTubeEdit.vue2.js +4 -0
  52. package/dist/edit/index.d.ts +29 -0
  53. package/dist/edit/index.js +35 -0
  54. package/dist/index.d.ts +12 -0
  55. package/dist/index.js +75 -0
  56. package/dist/mdx-render-vue.css +31 -0
  57. package/dist/node_modules/@ark-ui/vue/dist/_virtual/_rolldown/runtime.js +13 -0
  58. package/dist/node_modules/@ark-ui/vue/dist/components/factory.js +35 -0
  59. package/dist/node_modules/@ark-ui/vue/dist/components/presence/use-presence-context.js +6 -0
  60. package/dist/node_modules/@ark-ui/vue/dist/components/presence/use-presence.js +40 -0
  61. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow-tip.js +5 -0
  62. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow-tip.vue_vue_type_script_setup_true_lang.js +21 -0
  63. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow.js +5 -0
  64. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow.vue_vue_type_script_setup_true_lang.js +21 -0
  65. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-content.js +5 -0
  66. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-content.vue_vue_type_script_setup_true_lang.js +25 -0
  67. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-context.js +5 -0
  68. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-context.vue_vue_type_script_setup_true_lang.js +14 -0
  69. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-positioner.js +5 -0
  70. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-positioner.vue_vue_type_script_setup_true_lang.js +23 -0
  71. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root-provider.js +5 -0
  72. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root-provider.vue_vue_type_script_setup_true_lang.js +38 -0
  73. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root.js +5 -0
  74. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root.vue_vue_type_script_setup_true_lang.js +68 -0
  75. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-trigger.js +5 -0
  76. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-trigger.vue_vue_type_script_setup_true_lang.js +25 -0
  77. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip.js +22 -0
  78. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/use-tooltip-context.js +6 -0
  79. package/dist/node_modules/@ark-ui/vue/dist/components/tooltip/use-tooltip.js +36 -0
  80. package/dist/node_modules/@ark-ui/vue/dist/providers/environment/use-environment-context.js +13 -0
  81. package/dist/node_modules/@ark-ui/vue/dist/providers/locale/use-locale-context.js +12 -0
  82. package/dist/node_modules/@ark-ui/vue/dist/utils/clean-props.js +8 -0
  83. package/dist/node_modules/@ark-ui/vue/dist/utils/create-context.js +14 -0
  84. package/dist/node_modules/@ark-ui/vue/dist/utils/dynamic.js +34 -0
  85. package/dist/node_modules/@ark-ui/vue/dist/utils/unref-element.js +8 -0
  86. package/dist/node_modules/@ark-ui/vue/dist/utils/use-forward-expose.js +46 -0
  87. package/dist/node_modules/@ark-ui/vue/dist/utils/use-render-strategy.js +5 -0
  88. package/dist/node_modules/@braintree/sanitize-url/dist/constants.js +20 -0
  89. package/dist/node_modules/@braintree/sanitize-url/dist/index.js +75 -0
  90. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +728 -0
  91. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +629 -0
  92. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +176 -0
  93. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +151 -0
  94. package/dist/node_modules/@iconify/vue/dist/iconify.js +1691 -0
  95. package/dist/node_modules/@zag-js/anatomy/dist/create-anatomy.js +29 -0
  96. package/dist/node_modules/@zag-js/core/dist/create-machine.js +28 -0
  97. package/dist/node_modules/@zag-js/core/dist/merge-props.js +55 -0
  98. package/dist/node_modules/@zag-js/core/dist/scope.js +20 -0
  99. package/dist/node_modules/@zag-js/core/dist/state.js +176 -0
  100. package/dist/node_modules/@zag-js/core/dist/types.js +11 -0
  101. package/dist/node_modules/@zag-js/dom-query/dist/chunk-QZ7TP4HQ.js +6 -0
  102. package/dist/node_modules/@zag-js/dom-query/dist/computed-style.js +11 -0
  103. package/dist/node_modules/@zag-js/dom-query/dist/event.js +37 -0
  104. package/dist/node_modules/@zag-js/dom-query/dist/node.js +64 -0
  105. package/dist/node_modules/@zag-js/dom-query/dist/overflow.js +28 -0
  106. package/dist/node_modules/@zag-js/dom-query/dist/platform.js +23 -0
  107. package/dist/node_modules/@zag-js/dom-query/dist/query.js +6 -0
  108. package/dist/node_modules/@zag-js/dom-query/dist/raf.js +52 -0
  109. package/dist/node_modules/@zag-js/dom-query/dist/set.js +22 -0
  110. package/dist/node_modules/@zag-js/dom-query/dist/shared.js +8 -0
  111. package/dist/node_modules/@zag-js/focus-visible/dist/index.js +159 -0
  112. package/dist/node_modules/@zag-js/popper/dist/get-anchor.js +39 -0
  113. package/dist/node_modules/@zag-js/popper/dist/get-placement.js +296 -0
  114. package/dist/node_modules/@zag-js/popper/dist/get-styles.js +47 -0
  115. package/dist/node_modules/@zag-js/popper/dist/middleware.js +79 -0
  116. package/dist/node_modules/@zag-js/popper/dist/placement.js +7 -0
  117. package/dist/node_modules/@zag-js/presence/dist/presence.connect.js +18 -0
  118. package/dist/node_modules/@zag-js/presence/dist/presence.machine.js +175 -0
  119. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.anatomy.js +7 -0
  120. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.connect.js +155 -0
  121. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.dom.js +24 -0
  122. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.machine.js +416 -0
  123. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.store.js +9 -0
  124. package/dist/node_modules/@zag-js/types/dist/prop-types.js +14 -0
  125. package/dist/node_modules/@zag-js/utils/dist/array.js +7 -0
  126. package/dist/node_modules/@zag-js/utils/dist/equal.js +36 -0
  127. package/dist/node_modules/@zag-js/utils/dist/functions.js +11 -0
  128. package/dist/node_modules/@zag-js/utils/dist/guard.js +26 -0
  129. package/dist/node_modules/@zag-js/utils/dist/object.js +16 -0
  130. package/dist/node_modules/@zag-js/utils/dist/store.js +44 -0
  131. package/dist/node_modules/@zag-js/utils/dist/warning.js +31 -0
  132. package/dist/node_modules/@zag-js/vue/dist/bindable.js +48 -0
  133. package/dist/node_modules/@zag-js/vue/dist/machine.js +258 -0
  134. package/dist/node_modules/@zag-js/vue/dist/normalize-props.js +42 -0
  135. package/dist/node_modules/@zag-js/vue/dist/refs.js +14 -0
  136. package/dist/node_modules/@zag-js/vue/dist/track.js +22 -0
  137. package/dist/node_modules/dompurify/dist/purify.es.js +1190 -0
  138. package/dist/registry.d.ts +76 -0
  139. package/dist/registry.js +164 -0
  140. package/dist/render/alert/Alert.vue.d.ts +18 -0
  141. package/dist/render/alert/Alert.vue.js +4 -0
  142. package/dist/render/alert/Alert.vue2.js +43 -0
  143. package/dist/render/alert/index.d.ts +2 -0
  144. package/dist/render/audioplayer/AudioPlayerDefault.vue.d.ts +3 -0
  145. package/dist/render/audioplayer/AudioPlayerDefault.vue.js +116 -0
  146. package/dist/render/audioplayer/AudioPlayerDefault.vue2.js +4 -0
  147. package/dist/render/audioplayer/index.d.ts +5 -0
  148. package/dist/render/audioplayer/index.js +5 -0
  149. package/dist/render/badge/Badge.vue.d.ts +10 -0
  150. package/dist/render/badge/Badge.vue.js +4 -0
  151. package/dist/render/badge/Badge.vue2.js +28 -0
  152. package/dist/render/badge/index.d.ts +2 -0
  153. package/dist/render/button/Button.vue.d.ts +13 -0
  154. package/dist/render/button/Button.vue.js +4 -0
  155. package/dist/render/button/Button.vue2.js +42 -0
  156. package/dist/render/button/index.d.ts +2 -0
  157. package/dist/render/callout/CalloutDefault.vue.d.ts +13 -0
  158. package/dist/render/callout/CalloutDefault.vue.js +86 -0
  159. package/dist/render/callout/CalloutDefault.vue2.js +4 -0
  160. package/dist/render/callout/CalloutMinimal.vue.d.ts +13 -0
  161. package/dist/render/callout/CalloutMinimal.vue.js +27 -0
  162. package/dist/render/callout/CalloutMinimal.vue2.js +4 -0
  163. package/dist/render/callout/index.d.ts +6 -0
  164. package/dist/render/callout/index.js +7 -0
  165. package/dist/render/card/Card.vue.d.ts +15 -0
  166. package/dist/render/card/Card.vue.js +4 -0
  167. package/dist/render/card/Card.vue2.js +29 -0
  168. package/dist/render/card/index.d.ts +2 -0
  169. package/dist/render/codeblock/CodeBlockDefault.vue.d.ts +12 -0
  170. package/dist/render/codeblock/CodeBlockDefault.vue.js +7 -0
  171. package/dist/render/codeblock/CodeBlockDefault.vue2.js +92 -0
  172. package/dist/render/codeblock/index.d.ts +5 -0
  173. package/dist/render/codeblock/index.js +5 -0
  174. package/dist/render/gallery/GalleryGrid.vue.d.ts +3 -0
  175. package/dist/render/gallery/GalleryGrid.vue.js +125 -0
  176. package/dist/render/gallery/GalleryGrid.vue2.js +4 -0
  177. package/dist/render/gallery/GalleryLightbox.vue.d.ts +16 -0
  178. package/dist/render/gallery/GalleryLightbox.vue.js +7 -0
  179. package/dist/render/gallery/GalleryLightbox.vue2.js +170 -0
  180. package/dist/render/gallery/index.d.ts +6 -0
  181. package/dist/render/gallery/index.js +7 -0
  182. package/dist/render/icon/Icon.vue.d.ts +9 -0
  183. package/dist/render/icon/Icon.vue.js +4 -0
  184. package/dist/render/icon/Icon.vue2.js +25 -0
  185. package/dist/render/icon/index.d.ts +2 -0
  186. package/dist/render/index.d.ts +40 -0
  187. package/dist/render/index.js +63 -0
  188. package/dist/render/tooltip/Tooltip.vue.d.ts +18 -0
  189. package/dist/render/tooltip/Tooltip.vue.js +4 -0
  190. package/dist/render/tooltip/Tooltip.vue2.js +58 -0
  191. package/dist/render/tooltip/index.d.ts +2 -0
  192. package/dist/render/youtube/YouTubeDefault.vue.d.ts +3 -0
  193. package/dist/render/youtube/YouTubeDefault.vue.js +79 -0
  194. package/dist/render/youtube/YouTubeDefault.vue2.js +4 -0
  195. package/dist/render/youtube/index.d.ts +5 -0
  196. package/dist/render/youtube/index.js +5 -0
  197. package/dist/useAudioPlayer.d.ts +22 -0
  198. package/dist/useCallout.d.ts +46 -0
  199. package/dist/useCodeBlock.d.ts +25 -0
  200. package/dist/useGallery.d.ts +44 -0
  201. package/dist/useMedia.d.ts +16 -0
  202. package/dist/useYouTube.d.ts +32 -0
  203. package/package.json +125 -0
  204. package/src/composables/index.ts +16 -0
  205. package/src/composables/useAudioPlayer.ts +84 -0
  206. package/src/composables/useCallout.ts +103 -0
  207. package/src/composables/useCodeBlock.ts +90 -0
  208. package/src/composables/useGallery.ts +143 -0
  209. package/src/composables/useMedia.ts +23 -0
  210. package/src/composables/useYouTube.ts +58 -0
  211. package/src/edit/AlertEdit.vue +9 -0
  212. package/src/edit/AudioPlayerEdit.vue +92 -0
  213. package/src/edit/BadgeEdit.vue +7 -0
  214. package/src/edit/ButtonEdit.vue +10 -0
  215. package/src/edit/CalloutEdit.vue +107 -0
  216. package/src/edit/CardEdit.vue +9 -0
  217. package/src/edit/CodeBlockEdit.vue +76 -0
  218. package/src/edit/GalleryEdit.vue +65 -0
  219. package/src/edit/IconEdit.vue +7 -0
  220. package/src/edit/TooltipEdit.vue +15 -0
  221. package/src/edit/YouTubeEdit.vue +33 -0
  222. package/src/edit/index.ts +32 -0
  223. package/src/index.ts +62 -0
  224. package/src/registry.ts +272 -0
  225. package/src/render/alert/Alert.vue +32 -0
  226. package/src/render/alert/index.ts +2 -0
  227. package/src/render/audioplayer/AudioPlayerDefault.vue +89 -0
  228. package/src/render/audioplayer/index.ts +8 -0
  229. package/src/render/badge/Badge.vue +25 -0
  230. package/src/render/badge/index.ts +2 -0
  231. package/src/render/button/Button.vue +41 -0
  232. package/src/render/button/index.ts +2 -0
  233. package/src/render/callout/CalloutDefault.vue +101 -0
  234. package/src/render/callout/CalloutMinimal.vue +31 -0
  235. package/src/render/callout/index.ts +9 -0
  236. package/src/render/card/Card.vue +15 -0
  237. package/src/render/card/index.ts +2 -0
  238. package/src/render/codeblock/CodeBlockDefault.vue +76 -0
  239. package/src/render/codeblock/index.ts +8 -0
  240. package/src/render/gallery/GalleryGrid.vue +162 -0
  241. package/src/render/gallery/GalleryLightbox.vue +162 -0
  242. package/src/render/gallery/index.ts +9 -0
  243. package/src/render/icon/Icon.vue +22 -0
  244. package/src/render/icon/index.ts +2 -0
  245. package/src/render/index.ts +76 -0
  246. package/src/render/tooltip/Tooltip.vue +35 -0
  247. package/src/render/tooltip/index.ts +2 -0
  248. package/src/render/youtube/YouTubeDefault.vue +72 -0
  249. package/src/render/youtube/index.ts +8 -0
@@ -0,0 +1,170 @@
1
+ import { defineComponent, computed, onMounted, onUnmounted, ref, createBlock, openBlock, Teleport, createVNode, Transition, withCtx, createElementBlock, createCommentVNode, createElementVNode, toDisplayString, withModifiers } from "vue";
2
+ const _hoisted_1 = {
3
+ key: 0,
4
+ class: "lightbox-counter absolute top-4 left-4 text-white/80 text-sm select-none"
5
+ };
6
+ const _hoisted_2 = ["src", "alt"];
7
+ const _hoisted_3 = {
8
+ key: 0,
9
+ class: "lightbox-caption text-white/80 text-sm mt-3 text-center max-w-[80vw]"
10
+ };
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ __name: "GalleryLightbox",
13
+ props: {
14
+ isOpen: { type: Boolean },
15
+ currentIndex: {},
16
+ imageCount: {},
17
+ getImageSrc: { type: Function },
18
+ getImageAlt: { type: Function },
19
+ getImageDescription: { type: Function }
20
+ },
21
+ emits: ["close", "navigate"],
22
+ setup(__props, { emit: __emit }) {
23
+ const props = __props;
24
+ const emit = __emit;
25
+ const hasPrev = computed(() => props.currentIndex > 0);
26
+ const hasNext = computed(() => props.currentIndex < props.imageCount - 1);
27
+ const showNav = computed(() => props.imageCount > 1);
28
+ function onKeydown(e) {
29
+ if (!props.isOpen) return;
30
+ if (e.key === "Escape") {
31
+ emit("close");
32
+ } else if (e.key === "ArrowLeft" && hasPrev.value) {
33
+ emit("navigate", props.currentIndex - 1);
34
+ } else if (e.key === "ArrowRight" && hasNext.value) {
35
+ emit("navigate", props.currentIndex + 1);
36
+ }
37
+ }
38
+ onMounted(() => {
39
+ document.addEventListener("keydown", onKeydown);
40
+ });
41
+ onUnmounted(() => {
42
+ document.removeEventListener("keydown", onKeydown);
43
+ });
44
+ const touchStartX = ref(0);
45
+ const touchStartY = ref(0);
46
+ function onTouchStart(e) {
47
+ touchStartX.value = e.touches[0].clientX;
48
+ touchStartY.value = e.touches[0].clientY;
49
+ }
50
+ function onTouchEnd(e) {
51
+ const dx = e.changedTouches[0].clientX - touchStartX.value;
52
+ const dy = e.changedTouches[0].clientY - touchStartY.value;
53
+ if (Math.abs(dx) > 50 && Math.abs(dx) > Math.abs(dy)) {
54
+ if (dx < 0 && hasNext.value) {
55
+ emit("navigate", props.currentIndex + 1);
56
+ } else if (dx > 0 && hasPrev.value) {
57
+ emit("navigate", props.currentIndex - 1);
58
+ }
59
+ }
60
+ }
61
+ function onBackdropClick(e) {
62
+ if (e.target === e.currentTarget) {
63
+ emit("close");
64
+ }
65
+ }
66
+ return (_ctx, _cache) => {
67
+ return openBlock(), createBlock(Teleport, { to: "body" }, [
68
+ createVNode(Transition, { name: "lightbox-fade" }, {
69
+ default: withCtx(() => [
70
+ __props.isOpen ? (openBlock(), createElementBlock("div", {
71
+ key: 0,
72
+ class: "lightbox-overlay fixed inset-0 z-50 flex items-center justify-center bg-black/90",
73
+ onClick: onBackdropClick,
74
+ onTouchstart: onTouchStart,
75
+ onTouchend: onTouchEnd
76
+ }, [
77
+ createElementVNode("button", {
78
+ class: "lightbox-close absolute top-4 right-4 z-10 text-white/80 hover:text-white p-2",
79
+ "aria-label": "Close lightbox",
80
+ onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
81
+ }, [..._cache[4] || (_cache[4] = [
82
+ createElementVNode("svg", {
83
+ xmlns: "http://www.w3.org/2000/svg",
84
+ width: "28",
85
+ height: "28",
86
+ viewBox: "0 0 24 24",
87
+ fill: "none",
88
+ stroke: "currentColor",
89
+ "stroke-width": "2",
90
+ "stroke-linecap": "round",
91
+ "stroke-linejoin": "round"
92
+ }, [
93
+ createElementVNode("line", {
94
+ x1: "18",
95
+ y1: "6",
96
+ x2: "6",
97
+ y2: "18"
98
+ }),
99
+ createElementVNode("line", {
100
+ x1: "6",
101
+ y1: "6",
102
+ x2: "18",
103
+ y2: "18"
104
+ })
105
+ ], -1)
106
+ ])]),
107
+ showNav.value ? (openBlock(), createElementBlock("div", _hoisted_1, toDisplayString(__props.currentIndex + 1) + " / " + toDisplayString(__props.imageCount), 1)) : createCommentVNode("", true),
108
+ showNav.value && hasPrev.value ? (openBlock(), createElementBlock("button", {
109
+ key: 1,
110
+ class: "lightbox-prev absolute left-4 top-1/2 -translate-y-1/2 z-10 text-white/80 hover:text-white p-2",
111
+ "aria-label": "Previous image",
112
+ onClick: _cache[1] || (_cache[1] = ($event) => emit("navigate", __props.currentIndex - 1))
113
+ }, [..._cache[5] || (_cache[5] = [
114
+ createElementVNode("svg", {
115
+ xmlns: "http://www.w3.org/2000/svg",
116
+ width: "32",
117
+ height: "32",
118
+ viewBox: "0 0 24 24",
119
+ fill: "none",
120
+ stroke: "currentColor",
121
+ "stroke-width": "2",
122
+ "stroke-linecap": "round",
123
+ "stroke-linejoin": "round"
124
+ }, [
125
+ createElementVNode("polyline", { points: "15 18 9 12 15 6" })
126
+ ], -1)
127
+ ])])) : createCommentVNode("", true),
128
+ showNav.value && hasNext.value ? (openBlock(), createElementBlock("button", {
129
+ key: 2,
130
+ class: "lightbox-next absolute right-4 top-1/2 -translate-y-1/2 z-10 text-white/80 hover:text-white p-2",
131
+ "aria-label": "Next image",
132
+ onClick: _cache[2] || (_cache[2] = ($event) => emit("navigate", __props.currentIndex + 1))
133
+ }, [..._cache[6] || (_cache[6] = [
134
+ createElementVNode("svg", {
135
+ xmlns: "http://www.w3.org/2000/svg",
136
+ width: "32",
137
+ height: "32",
138
+ viewBox: "0 0 24 24",
139
+ fill: "none",
140
+ stroke: "currentColor",
141
+ "stroke-width": "2",
142
+ "stroke-linecap": "round",
143
+ "stroke-linejoin": "round"
144
+ }, [
145
+ createElementVNode("polyline", { points: "9 18 15 12 9 6" })
146
+ ], -1)
147
+ ])])) : createCommentVNode("", true),
148
+ createElementVNode("div", {
149
+ class: "flex flex-col items-center max-h-[95vh] max-w-[90vw]",
150
+ onClick: _cache[3] || (_cache[3] = withModifiers(() => {
151
+ }, ["stop"]))
152
+ }, [
153
+ createElementVNode("img", {
154
+ src: __props.getImageSrc(__props.currentIndex),
155
+ alt: __props.getImageAlt(__props.currentIndex),
156
+ class: "lightbox-image max-h-[85vh] max-w-[90vw] object-contain"
157
+ }, null, 8, _hoisted_2),
158
+ __props.getImageDescription(__props.currentIndex) ? (openBlock(), createElementBlock("p", _hoisted_3, toDisplayString(__props.getImageDescription(__props.currentIndex)), 1)) : createCommentVNode("", true)
159
+ ])
160
+ ], 32)) : createCommentVNode("", true)
161
+ ]),
162
+ _: 1
163
+ })
164
+ ]);
165
+ };
166
+ }
167
+ });
168
+ export {
169
+ _sfc_main as default
170
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Gallery Render Component Variants
3
+ */
4
+ export { default as GalleryGrid } from './GalleryGrid.vue';
5
+ export { default as GalleryLightbox } from './GalleryLightbox.vue';
6
+ export { default } from './GalleryGrid.vue';
@@ -0,0 +1,7 @@
1
+ import { default as default2, default as default3 } from "./GalleryGrid.vue.js";
2
+ import { default as default4 } from "./GalleryLightbox.vue.js";
3
+ export {
4
+ default2 as GalleryGrid,
5
+ default4 as GalleryLightbox,
6
+ default3 as default
7
+ };
@@ -0,0 +1,9 @@
1
+ interface Props {
2
+ name: string;
3
+ size?: number;
4
+ color?: string;
5
+ }
6
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
7
+ size: number;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./Icon.vue2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,25 @@
1
+ import { defineComponent, createBlock, openBlock, unref, normalizeStyle } from "vue";
2
+ import { Icon } from "../../node_modules/@iconify/vue/dist/iconify.js";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "Icon",
5
+ props: {
6
+ name: {},
7
+ size: { default: 20 },
8
+ color: {}
9
+ },
10
+ setup(__props) {
11
+ return (_ctx, _cache) => {
12
+ return openBlock(), createBlock(unref(Icon), {
13
+ icon: __props.name,
14
+ width: __props.size,
15
+ height: __props.size,
16
+ style: normalizeStyle(__props.color ? { color: __props.color } : void 0),
17
+ class: "inline-block align-[-0.125em]",
18
+ "data-mdx-component": "Icon"
19
+ }, null, 8, ["icon", "width", "height", "style"]);
20
+ };
21
+ }
22
+ });
23
+ export {
24
+ _sfc_main as default
25
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Icon } from './Icon.vue';
2
+ export { default } from './Icon.vue';
@@ -0,0 +1,40 @@
1
+ /**
2
+ * MDX Render Components
3
+ *
4
+ * These components are used for rendering MDX content in blogs/frontends.
5
+ * Multiple variants available for each component type.
6
+ *
7
+ * Prefer using the async resolver (getRenderComponentAsync) for dynamic loading.
8
+ * Named exports below are kept for backward compatibility but load all components eagerly.
9
+ */
10
+ import { CalloutDefault, CalloutMinimal } from './callout';
11
+ import { CodeBlockDefault } from './codeblock';
12
+ import { GalleryGrid, GalleryLightbox } from './gallery';
13
+ import { YouTubeDefault } from './youtube';
14
+ import { AudioPlayerDefault } from './audioplayer';
15
+ import { Button as ButtonDefault } from './button';
16
+ import { Card as CardDefault } from './card';
17
+ import { Alert as AlertDefault } from './alert';
18
+ import { Badge as BadgeDefault } from './badge';
19
+ import { Icon as IconDefault } from './icon';
20
+ import { Tooltip as TooltipDefault } from './tooltip';
21
+ export { CalloutDefault, CalloutMinimal };
22
+ export { CodeBlockDefault };
23
+ export { GalleryGrid, GalleryLightbox };
24
+ export { YouTubeDefault };
25
+ export { AudioPlayerDefault };
26
+ export { ButtonDefault, CardDefault, AlertDefault, BadgeDefault, IconDefault, TooltipDefault };
27
+ export { default as Callout } from './callout';
28
+ export { default as CodeBlock } from './codeblock';
29
+ export { default as Gallery } from './gallery';
30
+ export { default as YouTube } from './youtube';
31
+ export { default as AudioPlayer } from './audioplayer';
32
+ export { default as Button } from './button';
33
+ export { default as Card } from './card';
34
+ export { default as Alert } from './alert';
35
+ export { default as Badge } from './badge';
36
+ export { default as Icon } from './icon';
37
+ export { default as Tooltip } from './tooltip';
38
+ export { getRenderComponentAsync, getComponentVariants, getEditorConfig, componentRegistry, } from '../registry';
39
+ /** @deprecated Use getRenderComponentAsync from registry instead */
40
+ export declare function getRenderComponent(componentName: string, variant?: string): unknown;
@@ -0,0 +1,63 @@
1
+ import _sfc_main$a from "./callout/CalloutDefault.vue.js";
2
+ import _sfc_main$9 from "./callout/CalloutMinimal.vue.js";
3
+ import CodeBlockDefault from "./codeblock/CodeBlockDefault.vue.js";
4
+ import _sfc_main$8 from "./gallery/GalleryGrid.vue.js";
5
+ import { default as default2 } from "./gallery/GalleryLightbox.vue.js";
6
+ import _sfc_main$7 from "./youtube/YouTubeDefault.vue.js";
7
+ import _sfc_main$6 from "./audioplayer/AudioPlayerDefault.vue.js";
8
+ import _sfc_main$5 from "./button/Button.vue2.js";
9
+ import _sfc_main$4 from "./card/Card.vue2.js";
10
+ import _sfc_main$3 from "./alert/Alert.vue2.js";
11
+ import _sfc_main$2 from "./badge/Badge.vue2.js";
12
+ import _sfc_main$1 from "./icon/Icon.vue2.js";
13
+ import _sfc_main from "./tooltip/Tooltip.vue2.js";
14
+ import { componentRegistry, getComponentVariants, getEditorConfig, getRenderComponentAsync } from "../registry.js";
15
+ const syncRegistry = {
16
+ Callout: { default: _sfc_main$a, minimal: _sfc_main$9 },
17
+ CodeBlock: { default: CodeBlockDefault },
18
+ Gallery: { default: _sfc_main$8, grid: _sfc_main$8 },
19
+ YouTube: { default: _sfc_main$7 },
20
+ AudioPlayer: { default: _sfc_main$6 },
21
+ Button: { default: _sfc_main$5 },
22
+ Card: { default: _sfc_main$4 },
23
+ Alert: { default: _sfc_main$3 },
24
+ Badge: { default: _sfc_main$2 },
25
+ Icon: { default: _sfc_main$1 },
26
+ Tooltip: { default: _sfc_main }
27
+ };
28
+ function getRenderComponent(componentName, variant = "default") {
29
+ const componentVariants = syncRegistry[componentName];
30
+ if (!componentVariants) return void 0;
31
+ return componentVariants[variant] || componentVariants.default;
32
+ }
33
+ export {
34
+ _sfc_main$3 as Alert,
35
+ _sfc_main$3 as AlertDefault,
36
+ _sfc_main$6 as AudioPlayer,
37
+ _sfc_main$6 as AudioPlayerDefault,
38
+ _sfc_main$2 as Badge,
39
+ _sfc_main$2 as BadgeDefault,
40
+ _sfc_main$5 as Button,
41
+ _sfc_main$5 as ButtonDefault,
42
+ _sfc_main$a as Callout,
43
+ _sfc_main$a as CalloutDefault,
44
+ _sfc_main$9 as CalloutMinimal,
45
+ _sfc_main$4 as Card,
46
+ _sfc_main$4 as CardDefault,
47
+ CodeBlockDefault as CodeBlock,
48
+ CodeBlockDefault,
49
+ _sfc_main$8 as Gallery,
50
+ _sfc_main$8 as GalleryGrid,
51
+ default2 as GalleryLightbox,
52
+ _sfc_main$1 as Icon,
53
+ _sfc_main$1 as IconDefault,
54
+ _sfc_main as Tooltip,
55
+ _sfc_main as TooltipDefault,
56
+ _sfc_main$7 as YouTube,
57
+ _sfc_main$7 as YouTubeDefault,
58
+ componentRegistry,
59
+ getComponentVariants,
60
+ getEditorConfig,
61
+ getRenderComponent,
62
+ getRenderComponentAsync
63
+ };
@@ -0,0 +1,18 @@
1
+ interface Props {
2
+ label: string;
3
+ placement?: 'top' | 'bottom' | 'left' | 'right';
4
+ }
5
+ declare var __VLS_10: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_10) => any;
8
+ };
9
+ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
10
+ placement: "top" | "bottom" | "left" | "right";
11
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./Tooltip.vue2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,58 @@
1
+ import { defineComponent, computed, createBlock, openBlock, unref, withCtx, createVNode, createElementVNode, renderSlot, Teleport, createTextVNode, toDisplayString } from "vue";
2
+ import { tooltip_exports } from "../../node_modules/@ark-ui/vue/dist/components/tooltip/tooltip.js";
3
+ const _hoisted_1 = {
4
+ class: "inline-flex",
5
+ "data-mdx-component": "Tooltip"
6
+ };
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ __name: "Tooltip",
9
+ props: {
10
+ label: {},
11
+ placement: { default: "top" }
12
+ },
13
+ setup(__props) {
14
+ const props = __props;
15
+ const positioning = computed(() => ({ placement: props.placement }));
16
+ return (_ctx, _cache) => {
17
+ return openBlock(), createBlock(unref(tooltip_exports).Root, {
18
+ positioning: positioning.value,
19
+ "open-delay": 200,
20
+ "close-delay": 100
21
+ }, {
22
+ default: withCtx(() => [
23
+ createVNode(unref(tooltip_exports).Trigger, { "as-child": "" }, {
24
+ default: withCtx(() => [
25
+ createElementVNode("span", _hoisted_1, [
26
+ renderSlot(_ctx.$slots, "default")
27
+ ])
28
+ ]),
29
+ _: 3
30
+ }),
31
+ (openBlock(), createBlock(Teleport, { to: "body" }, [
32
+ createVNode(unref(tooltip_exports).Positioner, null, {
33
+ default: withCtx(() => [
34
+ createVNode(unref(tooltip_exports).Content, { class: "z-50 rounded-md bg-gray-900 px-2.5 py-1.5 text-xs text-white shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out" }, {
35
+ default: withCtx(() => [
36
+ createVNode(unref(tooltip_exports).Arrow, null, {
37
+ default: withCtx(() => [
38
+ createVNode(unref(tooltip_exports).ArrowTip, { class: "border-gray-900" })
39
+ ]),
40
+ _: 1
41
+ }),
42
+ createTextVNode(" " + toDisplayString(__props.label), 1)
43
+ ]),
44
+ _: 1
45
+ })
46
+ ]),
47
+ _: 1
48
+ })
49
+ ]))
50
+ ]),
51
+ _: 3
52
+ }, 8, ["positioning"]);
53
+ };
54
+ }
55
+ });
56
+ export {
57
+ _sfc_main as default
58
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Tooltip } from './Tooltip.vue';
2
+ export { default } from './Tooltip.vue';
@@ -0,0 +1,3 @@
1
+ import type { YouTubeProps } from '@blogmcp/mdx-schema';
2
+ declare const _default: import("vue").DefineComponent<YouTubeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<YouTubeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
+ export default _default;
@@ -0,0 +1,79 @@
1
+ import { defineComponent, ref, createElementBlock, openBlock, createElementVNode, createCommentVNode, unref, createBlock, resolveDynamicComponent, toDisplayString } from "vue";
2
+ import { useYouTube } from "../../composables/useYouTube.js";
3
+ import { useOptimizedImg } from "../../composables/useMedia.js";
4
+ const _hoisted_1 = {
5
+ class: "youtube-embed my-6",
6
+ "data-mdx-component": "YouTube"
7
+ };
8
+ const _hoisted_2 = {
9
+ class: "relative w-full rounded-lg overflow-hidden shadow-md",
10
+ style: { "padding-bottom": "56.25%" }
11
+ };
12
+ const _hoisted_3 = ["aria-label"];
13
+ const _hoisted_4 = ["src", "title", "allow"];
14
+ const _hoisted_5 = {
15
+ key: 0,
16
+ class: "text-center text-sm text-gray-600 mt-3"
17
+ };
18
+ const _sfc_main = /* @__PURE__ */ defineComponent({
19
+ __name: "YouTubeDefault",
20
+ props: {
21
+ id: {},
22
+ title: {}
23
+ },
24
+ setup(__props) {
25
+ const props = __props;
26
+ const { embedUrl, iframeTitle, thumbnailUrl, hasTitle, YOUTUBE_IFRAME_ALLOW } = useYouTube(props);
27
+ const ImgTag = useOptimizedImg();
28
+ const activated = ref(false);
29
+ function activate() {
30
+ activated.value = true;
31
+ }
32
+ return (_ctx, _cache) => {
33
+ return openBlock(), createElementBlock("div", _hoisted_1, [
34
+ createElementVNode("div", _hoisted_2, [
35
+ !activated.value ? (openBlock(), createElementBlock("button", {
36
+ key: 0,
37
+ class: "absolute inset-0 w-full h-full cursor-pointer border-0 p-0 bg-black group",
38
+ "aria-label": `Play ${unref(iframeTitle)}`,
39
+ onClick: activate
40
+ }, [
41
+ (openBlock(), createBlock(resolveDynamicComponent(unref(ImgTag)), {
42
+ src: unref(thumbnailUrl),
43
+ alt: unref(iframeTitle),
44
+ sizes: "100vw md:768px lg:1024px",
45
+ class: "absolute inset-0 w-full h-full object-cover"
46
+ }, null, 8, ["src", "alt"])),
47
+ _cache[0] || (_cache[0] = createElementVNode("svg", {
48
+ class: "absolute inset-0 m-auto w-16 h-16 text-white drop-shadow-lg opacity-90 group-hover:opacity-100 transition-opacity",
49
+ viewBox: "0 0 68 48",
50
+ "aria-hidden": "true"
51
+ }, [
52
+ createElementVNode("path", {
53
+ d: "M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55C3.97 2.33 2.27 4.81 1.48 7.74.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z",
54
+ fill: "red"
55
+ }),
56
+ createElementVNode("path", {
57
+ d: "M45 24L27 14v20",
58
+ fill: "white"
59
+ })
60
+ ], -1))
61
+ ], 8, _hoisted_3)) : createCommentVNode("", true),
62
+ activated.value ? (openBlock(), createElementBlock("iframe", {
63
+ key: 1,
64
+ src: `${unref(embedUrl)}?autoplay=1`,
65
+ title: unref(iframeTitle),
66
+ class: "absolute inset-0 w-full h-full",
67
+ frameborder: "0",
68
+ allow: unref(YOUTUBE_IFRAME_ALLOW),
69
+ allowfullscreen: ""
70
+ }, null, 8, _hoisted_4)) : createCommentVNode("", true)
71
+ ]),
72
+ unref(hasTitle) ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(__props.title), 1)) : createCommentVNode("", true)
73
+ ]);
74
+ };
75
+ }
76
+ });
77
+ export {
78
+ _sfc_main as default
79
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./YouTubeDefault.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * YouTube Render Component Variants
3
+ */
4
+ export { default as YouTubeDefault } from './YouTubeDefault.vue';
5
+ export { default } from './YouTubeDefault.vue';
@@ -0,0 +1,5 @@
1
+ import { default as default2, default as default3 } from "./YouTubeDefault.vue.js";
2
+ export {
3
+ default2 as YouTubeDefault,
4
+ default3 as default
5
+ };
@@ -0,0 +1,22 @@
1
+ import { AudioPlayerProps } from '@blogmcp/mdx-schema';
2
+ import { ComputedRef } from 'vue';
3
+ import { Ref } from 'vue';
4
+
5
+ /**
6
+ * Composable for AudioPlayer component logic
7
+ */
8
+ export declare function useAudioPlayer(props: AudioPlayerProps): {
9
+ hasTitle: ComputedRef<boolean>;
10
+ displayTitle: ComputedRef<string>;
11
+ showTranscription: ComputedRef<boolean>;
12
+ audioUrl: ComputedRef<string>;
13
+ transcriptionUrl: ComputedRef<string>;
14
+ transcriptionText: Ref<string | null, string | null>;
15
+ transcriptionSummary: Ref<string | null, string | null>;
16
+ transcriptionLoading: Ref<boolean, boolean>;
17
+ transcriptionExpanded: Ref<boolean, boolean>;
18
+ loadTranscription: () => Promise<void>;
19
+ toggleTranscription: () => void;
20
+ };
21
+
22
+ export { }
@@ -0,0 +1,46 @@
1
+ import { CalloutProps } from '@blogmcp/mdx-schema';
2
+ import { CalloutType } from '@blogmcp/mdx-schema';
3
+ import { ComputedRef } from 'vue';
4
+
5
+ export declare interface CalloutConfig {
6
+ type: CalloutType;
7
+ icon: string;
8
+ colors: {
9
+ bg: string;
10
+ border: string;
11
+ text: string;
12
+ iconColor: string;
13
+ };
14
+ }
15
+
16
+ /**
17
+ * Default callout configurations for each type
18
+ */
19
+ export declare const calloutConfigs: Record<CalloutType, Omit<CalloutConfig, 'type'>>;
20
+
21
+ /**
22
+ * SVG path data for callout icons
23
+ */
24
+ export declare const calloutIconPaths: Record<string, string>;
25
+
26
+ /**
27
+ * Composable for Callout component logic
28
+ */
29
+ export declare function useCallout(props: CalloutProps): {
30
+ effectiveType: ComputedRef<CalloutType>;
31
+ config: ComputedRef< {
32
+ icon: string;
33
+ colors: {
34
+ bg: string;
35
+ border: string;
36
+ text: string;
37
+ iconColor: string;
38
+ };
39
+ type: CalloutType;
40
+ }>;
41
+ containerClasses: ComputedRef<string[]>;
42
+ iconPath: ComputedRef<string>;
43
+ iconClasses: ComputedRef<string>;
44
+ };
45
+
46
+ export { }
@@ -0,0 +1,25 @@
1
+ import { CodeBlockProps } from '@blogmcp/mdx-schema';
2
+ import { ComputedRef } from 'vue';
3
+ import { Ref } from 'vue';
4
+
5
+ /**
6
+ * Get display label for a language
7
+ */
8
+ export declare function getLanguageLabel(language?: string): string;
9
+
10
+ /**
11
+ * Language label mappings
12
+ */
13
+ export declare const languageLabels: Record<string, string>;
14
+
15
+ /**
16
+ * Composable for CodeBlock component logic
17
+ */
18
+ export declare function useCodeBlock(props: CodeBlockProps): {
19
+ copied: Ref<boolean, boolean>;
20
+ languageLabel: ComputedRef<string>;
21
+ languageClass: ComputedRef<string>;
22
+ copyCode: (codeContent: string) => Promise<void>;
23
+ };
24
+
25
+ export { }