@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,10 @@
1
+ const _export_sfc = (sfc, props) => {
2
+ const target = sfc.__vccOpts || sfc;
3
+ for (const [key, val] of props) {
4
+ target[key] = val;
5
+ }
6
+ return target;
7
+ };
8
+ export {
9
+ _export_sfc as default
10
+ };
@@ -0,0 +1,4 @@
1
+ var constants = {};
2
+ export {
3
+ constants as __exports
4
+ };
@@ -0,0 +1,5 @@
1
+ import { __require as requireDist } from "../node_modules/@braintree/sanitize-url/dist/index.js";
2
+ var distExports = requireDist();
3
+ export {
4
+ distExports as d
5
+ };
@@ -0,0 +1,4 @@
1
+ var dist = {};
2
+ export {
3
+ dist as __exports
4
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * MDX Components Composables
3
+ *
4
+ * Shared logic for MDX components.
5
+ */
6
+ export { useCallout, calloutConfigs, calloutIconPaths } from './useCallout';
7
+ export { useCodeBlock, getLanguageLabel, languageLabels } from './useCodeBlock';
8
+ export { useGallery, gridColsClasses, isMediaObject, isVideoUrl } from './useGallery';
9
+ export { useYouTube, YOUTUBE_EMBED_BASE, YOUTUBE_IFRAME_ALLOW, } from './useYouTube';
10
+ export { useAudioPlayer } from './useAudioPlayer';
11
+ export { useOptimizedImg, IMG_COMPONENT_KEY } from './useMedia';
@@ -0,0 +1,24 @@
1
+ import { calloutConfigs, calloutIconPaths, useCallout } from "./useCallout.js";
2
+ import { getLanguageLabel, languageLabels, useCodeBlock } from "./useCodeBlock.js";
3
+ import { gridColsClasses, isMediaObject, isVideoUrl, useGallery } from "./useGallery.js";
4
+ import { YOUTUBE_EMBED_BASE, YOUTUBE_IFRAME_ALLOW, useYouTube } from "./useYouTube.js";
5
+ import { useAudioPlayer } from "./useAudioPlayer.js";
6
+ import { IMG_COMPONENT_KEY, useOptimizedImg } from "./useMedia.js";
7
+ export {
8
+ IMG_COMPONENT_KEY,
9
+ YOUTUBE_EMBED_BASE,
10
+ YOUTUBE_IFRAME_ALLOW,
11
+ calloutConfigs,
12
+ calloutIconPaths,
13
+ getLanguageLabel,
14
+ gridColsClasses,
15
+ isMediaObject,
16
+ isVideoUrl,
17
+ languageLabels,
18
+ useAudioPlayer,
19
+ useCallout,
20
+ useCodeBlock,
21
+ useGallery,
22
+ useOptimizedImg,
23
+ useYouTube
24
+ };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * AudioPlayer Composable
3
+ *
4
+ * Shared logic for AudioPlayer component variants.
5
+ */
6
+ import type { AudioPlayerProps } from '@blogmcp/mdx-schema';
7
+ /**
8
+ * Composable for AudioPlayer component logic
9
+ */
10
+ export declare function useAudioPlayer(props: AudioPlayerProps): {
11
+ hasTitle: import("vue").ComputedRef<boolean>;
12
+ displayTitle: import("vue").ComputedRef<string>;
13
+ showTranscription: import("vue").ComputedRef<boolean>;
14
+ audioUrl: import("vue").ComputedRef<string>;
15
+ transcriptionUrl: import("vue").ComputedRef<string>;
16
+ transcriptionText: import("vue").Ref<string | null, string | null>;
17
+ transcriptionSummary: import("vue").Ref<string | null, string | null>;
18
+ transcriptionLoading: import("vue").Ref<boolean, boolean>;
19
+ transcriptionExpanded: import("vue").Ref<boolean, boolean>;
20
+ loadTranscription: () => Promise<void>;
21
+ toggleTranscription: () => void;
22
+ };
@@ -0,0 +1,58 @@
1
+ import { computed, ref } from "vue";
2
+ function useAudioPlayer(props) {
3
+ const hasTitle = computed(() => !!props.title);
4
+ const displayTitle = computed(() => props.title || props.slug || "Audio");
5
+ const showTranscription = computed(() => props.showTranscription ?? false);
6
+ const audioUrl = computed(() => {
7
+ if (!props.slug) return "";
8
+ return `/api/media/file/${props.slug}`;
9
+ });
10
+ const transcriptionUrl = computed(() => {
11
+ if (!props.slug) return "";
12
+ return `/api/media/transcription/${props.slug}`;
13
+ });
14
+ const transcriptionText = ref(null);
15
+ const transcriptionSummary = ref(null);
16
+ const transcriptionLoading = ref(false);
17
+ const transcriptionExpanded = ref(false);
18
+ async function loadTranscription() {
19
+ if (!props.slug || transcriptionText.value !== null) return;
20
+ transcriptionLoading.value = true;
21
+ try {
22
+ const response = await fetch(transcriptionUrl.value);
23
+ if (response.ok) {
24
+ const data = await response.json();
25
+ transcriptionText.value = data.fullText || data.full_text || "";
26
+ transcriptionSummary.value = data.summary || null;
27
+ } else {
28
+ transcriptionText.value = "";
29
+ }
30
+ } catch {
31
+ transcriptionText.value = "";
32
+ } finally {
33
+ transcriptionLoading.value = false;
34
+ }
35
+ }
36
+ function toggleTranscription() {
37
+ transcriptionExpanded.value = !transcriptionExpanded.value;
38
+ if (transcriptionExpanded.value && transcriptionText.value === null) {
39
+ loadTranscription();
40
+ }
41
+ }
42
+ return {
43
+ hasTitle,
44
+ displayTitle,
45
+ showTranscription,
46
+ audioUrl,
47
+ transcriptionUrl,
48
+ transcriptionText,
49
+ transcriptionSummary,
50
+ transcriptionLoading,
51
+ transcriptionExpanded,
52
+ loadTranscription,
53
+ toggleTranscription
54
+ };
55
+ }
56
+ export {
57
+ useAudioPlayer
58
+ };
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Callout Composable
3
+ *
4
+ * Shared logic for Callout component variants.
5
+ */
6
+ import type { CalloutType, CalloutProps } from '@blogmcp/mdx-schema';
7
+ export interface CalloutConfig {
8
+ type: CalloutType;
9
+ icon: string;
10
+ colors: {
11
+ bg: string;
12
+ border: string;
13
+ text: string;
14
+ iconColor: string;
15
+ };
16
+ }
17
+ /**
18
+ * Default callout configurations for each type
19
+ */
20
+ export declare const calloutConfigs: Record<CalloutType, Omit<CalloutConfig, 'type'>>;
21
+ /**
22
+ * SVG path data for callout icons
23
+ */
24
+ export declare const calloutIconPaths: Record<string, string>;
25
+ /**
26
+ * Composable for Callout component logic
27
+ */
28
+ export declare function useCallout(props: CalloutProps): {
29
+ effectiveType: import("vue").ComputedRef<CalloutType>;
30
+ config: import("vue").ComputedRef<{
31
+ icon: string;
32
+ colors: {
33
+ bg: string;
34
+ border: string;
35
+ text: string;
36
+ iconColor: string;
37
+ };
38
+ type: CalloutType;
39
+ }>;
40
+ containerClasses: import("vue").ComputedRef<string[]>;
41
+ iconPath: import("vue").ComputedRef<string>;
42
+ iconClasses: import("vue").ComputedRef<string>;
43
+ };
@@ -0,0 +1,71 @@
1
+ import { computed } from "vue";
2
+ const calloutConfigs = {
3
+ info: {
4
+ icon: "info-circle",
5
+ colors: {
6
+ bg: "bg-blue-900/20",
7
+ border: "border-blue-500",
8
+ text: "text-blue-200",
9
+ iconColor: "text-blue-400"
10
+ }
11
+ },
12
+ warning: {
13
+ icon: "warning-triangle",
14
+ colors: {
15
+ bg: "bg-yellow-900/20",
16
+ border: "border-yellow-500",
17
+ text: "text-yellow-200",
18
+ iconColor: "text-yellow-400"
19
+ }
20
+ },
21
+ tip: {
22
+ icon: "lightbulb",
23
+ colors: {
24
+ bg: "bg-green-900/20",
25
+ border: "border-green-500",
26
+ text: "text-green-200",
27
+ iconColor: "text-green-400"
28
+ }
29
+ },
30
+ danger: {
31
+ icon: "alert-circle",
32
+ colors: {
33
+ bg: "bg-red-900/20",
34
+ border: "border-red-500",
35
+ text: "text-red-200",
36
+ iconColor: "text-red-400"
37
+ }
38
+ }
39
+ };
40
+ const calloutIconPaths = {
41
+ "info-circle": "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",
42
+ "warning-triangle": "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",
43
+ lightbulb: "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",
44
+ "alert-circle": "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
45
+ };
46
+ function useCallout(props) {
47
+ const effectiveType = computed(() => props.type || "info");
48
+ const config = computed(() => ({
49
+ type: effectiveType.value,
50
+ ...calloutConfigs[effectiveType.value]
51
+ }));
52
+ const containerClasses = computed(() => [
53
+ config.value.colors.bg,
54
+ config.value.colors.border,
55
+ config.value.colors.text
56
+ ]);
57
+ const iconPath = computed(() => calloutIconPaths[config.value.icon]);
58
+ const iconClasses = computed(() => config.value.colors.iconColor);
59
+ return {
60
+ effectiveType,
61
+ config,
62
+ containerClasses,
63
+ iconPath,
64
+ iconClasses
65
+ };
66
+ }
67
+ export {
68
+ calloutConfigs,
69
+ calloutIconPaths,
70
+ useCallout
71
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * CodeBlock Composable
3
+ *
4
+ * Shared logic for CodeBlock component variants.
5
+ */
6
+ import type { CodeBlockProps } from '@blogmcp/mdx-schema';
7
+ /**
8
+ * Language label mappings
9
+ */
10
+ export declare const languageLabels: Record<string, string>;
11
+ /**
12
+ * Get display label for a language
13
+ */
14
+ export declare function getLanguageLabel(language?: string): string;
15
+ /**
16
+ * Composable for CodeBlock component logic
17
+ */
18
+ export declare function useCodeBlock(props: CodeBlockProps): {
19
+ copied: import("vue").Ref<boolean, boolean>;
20
+ languageLabel: import("vue").ComputedRef<string>;
21
+ languageClass: import("vue").ComputedRef<string>;
22
+ copyCode: (codeContent: string) => Promise<void>;
23
+ };
@@ -0,0 +1,67 @@
1
+ import { ref, computed } from "vue";
2
+ const languageLabels = {
3
+ js: "JavaScript",
4
+ javascript: "JavaScript",
5
+ ts: "TypeScript",
6
+ typescript: "TypeScript",
7
+ vue: "Vue",
8
+ html: "HTML",
9
+ css: "CSS",
10
+ json: "JSON",
11
+ python: "Python",
12
+ py: "Python",
13
+ bash: "Bash",
14
+ sh: "Shell",
15
+ sql: "SQL",
16
+ text: "Plain Text",
17
+ rust: "Rust",
18
+ go: "Go",
19
+ java: "Java",
20
+ cpp: "C++",
21
+ c: "C",
22
+ csharp: "C#",
23
+ php: "PHP",
24
+ ruby: "Ruby",
25
+ swift: "Swift",
26
+ kotlin: "Kotlin",
27
+ yaml: "YAML",
28
+ yml: "YAML",
29
+ xml: "XML",
30
+ markdown: "Markdown",
31
+ md: "Markdown",
32
+ graphql: "GraphQL",
33
+ dockerfile: "Dockerfile"
34
+ };
35
+ function getLanguageLabel(language) {
36
+ if (!language) return "Plain Text";
37
+ const lang = language.toLowerCase();
38
+ if (languageLabels[lang]) return languageLabels[lang];
39
+ return lang.charAt(0).toUpperCase() + lang.slice(1);
40
+ }
41
+ function useCodeBlock(props) {
42
+ const copied = ref(false);
43
+ const languageLabel = computed(() => getLanguageLabel(props.language));
44
+ const languageClass = computed(() => `language-${props.language || "text"}`);
45
+ async function copyCode(codeContent) {
46
+ try {
47
+ await navigator.clipboard.writeText(codeContent);
48
+ copied.value = true;
49
+ setTimeout(() => {
50
+ copied.value = false;
51
+ }, 2e3);
52
+ } catch (error) {
53
+ console.error("Failed to copy code:", error);
54
+ }
55
+ }
56
+ return {
57
+ copied,
58
+ languageLabel,
59
+ languageClass,
60
+ copyCode
61
+ };
62
+ }
63
+ export {
64
+ getLanguageLabel,
65
+ languageLabels,
66
+ useCodeBlock
67
+ };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Gallery Composable
3
+ *
4
+ * Shared logic for Gallery component variants.
5
+ */
6
+ import type { GalleryProps, MediaObject } from '@blogmcp/mdx-schema';
7
+ import { galleryTileLayout, type GalleryTileLayout } from '@blogmcp/mdx-schema/styles';
8
+ export { galleryTileLayout, type GalleryTileLayout };
9
+ /**
10
+ * Type guard for MediaObject
11
+ */
12
+ export declare function isMediaObject(value: unknown): value is MediaObject;
13
+ /**
14
+ * Check if a URL points to a video file based on extension
15
+ */
16
+ export declare function isVideoUrl(src: string): boolean;
17
+ /**
18
+ * Grid column class mappings
19
+ */
20
+ export declare const gridColsClasses: Record<number, string>;
21
+ /**
22
+ * Composable for Gallery component logic
23
+ */
24
+ export declare function useGallery(props: GalleryProps): {
25
+ effectiveColumns: import("vue").ComputedRef<1 | 2 | 3 | 4>;
26
+ gridColsClass: import("vue").ComputedRef<string>;
27
+ gapClass: import("vue").ComputedRef<string>;
28
+ tileLayout: import("vue").ComputedRef<GalleryTileLayout>;
29
+ getImageSrc: (index: number) => string;
30
+ getImageAlt: (index: number) => string;
31
+ getImageDescription: (index: number) => string | undefined;
32
+ getImageCaption: (index: number) => string | undefined;
33
+ isVideo: (index: number) => boolean;
34
+ getVideoPoster: (index: number) => string | undefined;
35
+ hasImages: import("vue").ComputedRef<boolean>;
36
+ imageCount: import("vue").ComputedRef<number>;
37
+ };
@@ -0,0 +1,84 @@
1
+ import { computed } from "vue";
2
+ import { galleryTileLayout } from "@blogmcp/mdx-schema/styles";
3
+ import { galleryTileLayout as galleryTileLayout2 } from "@blogmcp/mdx-schema/styles";
4
+ const VIDEO_EXTENSIONS = /\.(mp4|webm|mov|avi|mkv|m4v)(\?.*)?$/i;
5
+ const KB_MEDIA_FILE_RE = /\/api\/media\/file\/([^/?#]+)/;
6
+ function isMediaObject(value) {
7
+ return typeof value === "object" && value !== null && "src" in value && typeof value.src === "string";
8
+ }
9
+ function isVideoUrl(src) {
10
+ return VIDEO_EXTENSIONS.test(src);
11
+ }
12
+ const gridColsClasses = {
13
+ 1: "grid-cols-1",
14
+ 2: "grid-cols-2",
15
+ 3: "grid-cols-3",
16
+ 4: "grid-cols-4"
17
+ };
18
+ function useGallery(props) {
19
+ const effectiveColumns = computed(() => props.columns || 2);
20
+ const gridColsClass = computed(() => {
21
+ const cols = effectiveColumns.value;
22
+ return gridColsClasses[cols] || "grid-cols-2";
23
+ });
24
+ const gapClass = computed(() => {
25
+ const gap = props.gap || 4;
26
+ return `gap-${gap}`;
27
+ });
28
+ const tileLayout = computed(() => galleryTileLayout(props));
29
+ function getImageSrc(index) {
30
+ const image = props.images[index];
31
+ return isMediaObject(image) ? image.src : image;
32
+ }
33
+ function getImageAlt(index) {
34
+ const image = props.images[index];
35
+ if (isMediaObject(image)) return image.alt || `Gallery image ${index + 1}`;
36
+ return `Gallery image ${index + 1}`;
37
+ }
38
+ function getImageDescription(index) {
39
+ const image = props.images[index];
40
+ return isMediaObject(image) ? image.description : void 0;
41
+ }
42
+ function getImageCaption(index) {
43
+ const image = props.images[index];
44
+ if (!isMediaObject(image)) return void 0;
45
+ return image.description || image.alt || void 0;
46
+ }
47
+ function isVideo(index) {
48
+ const image = props.images[index];
49
+ if (isMediaObject(image)) {
50
+ if (image.type === "video") return true;
51
+ if (image.type === "image") return false;
52
+ return isVideoUrl(image.src);
53
+ }
54
+ return isVideoUrl(image);
55
+ }
56
+ function getVideoPoster(index) {
57
+ const src = getImageSrc(index);
58
+ const match = src.match(KB_MEDIA_FILE_RE);
59
+ return match ? `/api/media/poster/${match[1]}` : void 0;
60
+ }
61
+ const hasImages = computed(() => props.images && props.images.length > 0);
62
+ const imageCount = computed(() => props.images?.length || 0);
63
+ return {
64
+ effectiveColumns,
65
+ gridColsClass,
66
+ gapClass,
67
+ tileLayout,
68
+ getImageSrc,
69
+ getImageAlt,
70
+ getImageDescription,
71
+ getImageCaption,
72
+ isVideo,
73
+ getVideoPoster,
74
+ hasImages,
75
+ imageCount
76
+ };
77
+ }
78
+ export {
79
+ galleryTileLayout2 as galleryTileLayout,
80
+ gridColsClasses,
81
+ isMediaObject,
82
+ isVideoUrl,
83
+ useGallery
84
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Media Composables
3
+ *
4
+ * Image optimization helpers for MDX components.
5
+ * Uses provide/inject so the host app (blog) can supply NuxtImg
6
+ * while the md-editor (no @nuxt/image) gets a plain 'img' fallback.
7
+ */
8
+ import { type InjectionKey, type Component } from 'vue';
9
+ /**
10
+ * Injection key for the optimized image component.
11
+ * The host app should `provide(IMG_COMPONENT_KEY, NuxtImg)`.
12
+ */
13
+ export declare const IMG_COMPONENT_KEY: InjectionKey<Component | string>;
14
+ /**
15
+ * Returns the provided image component (e.g. NuxtImg),
16
+ * or falls back to plain `'img'` when nothing is provided.
17
+ */
18
+ export declare function useOptimizedImg(): Component | string;
@@ -0,0 +1,9 @@
1
+ import { inject } from "vue";
2
+ const IMG_COMPONENT_KEY = Symbol("ImgComponent");
3
+ function useOptimizedImg() {
4
+ return inject(IMG_COMPONENT_KEY, "img");
5
+ }
6
+ export {
7
+ IMG_COMPONENT_KEY,
8
+ useOptimizedImg
9
+ };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * YouTube Composable
3
+ *
4
+ * Shared logic for YouTube component variants.
5
+ */
6
+ import type { YouTubeProps } from '@blogmcp/mdx-schema';
7
+ /**
8
+ * YouTube embed URL base
9
+ */
10
+ export declare const YOUTUBE_EMBED_BASE = "https://www.youtube.com/embed/";
11
+ /**
12
+ * Default iframe allow attributes
13
+ */
14
+ export declare const YOUTUBE_IFRAME_ALLOW = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture";
15
+ /**
16
+ * Composable for YouTube component logic
17
+ */
18
+ export declare function useYouTube(props: YouTubeProps): {
19
+ embedUrl: import("vue").ComputedRef<string>;
20
+ iframeTitle: import("vue").ComputedRef<string>;
21
+ hasTitle: import("vue").ComputedRef<boolean>;
22
+ thumbnailUrl: import("vue").ComputedRef<string>;
23
+ iframeAttrs: import("vue").ComputedRef<{
24
+ src: string;
25
+ title: string;
26
+ frameborder: string;
27
+ allow: string;
28
+ allowfullscreen: boolean;
29
+ }>;
30
+ YOUTUBE_IFRAME_ALLOW: string;
31
+ };
@@ -0,0 +1,32 @@
1
+ import { computed } from "vue";
2
+ const YOUTUBE_EMBED_BASE = "https://www.youtube.com/embed/";
3
+ const YOUTUBE_IFRAME_ALLOW = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture";
4
+ function useYouTube(props) {
5
+ const embedUrl = computed(() => `${YOUTUBE_EMBED_BASE}${props.id}`);
6
+ const iframeTitle = computed(() => props.title || "YouTube video");
7
+ const hasTitle = computed(() => !!props.title);
8
+ const thumbnailUrl = computed(() => {
9
+ if (!props.id) return "";
10
+ return `https://img.youtube.com/vi/${props.id}/maxresdefault.jpg`;
11
+ });
12
+ const iframeAttrs = computed(() => ({
13
+ src: embedUrl.value,
14
+ title: iframeTitle.value,
15
+ frameborder: "0",
16
+ allow: YOUTUBE_IFRAME_ALLOW,
17
+ allowfullscreen: true
18
+ }));
19
+ return {
20
+ embedUrl,
21
+ iframeTitle,
22
+ hasTitle,
23
+ thumbnailUrl,
24
+ iframeAttrs,
25
+ YOUTUBE_IFRAME_ALLOW
26
+ };
27
+ }
28
+ export {
29
+ YOUTUBE_EMBED_BASE,
30
+ YOUTUBE_IFRAME_ALLOW,
31
+ useYouTube
32
+ };
@@ -0,0 +1,12 @@
1
+ declare var __VLS_5: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_5) => any;
4
+ };
5
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, 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,4 @@
1
+ import _sfc_main from "./AlertEdit.vue2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,18 @@
1
+ import { defineComponent, createBlock, openBlock, normalizeProps, guardReactiveProps, withCtx, renderSlot } from "vue";
2
+ import _sfc_main$1 from "../render/alert/Alert.vue2.js";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "AlertEdit",
5
+ setup(__props) {
6
+ return (_ctx, _cache) => {
7
+ return openBlock(), createBlock(_sfc_main$1, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
8
+ default: withCtx(() => [
9
+ renderSlot(_ctx.$slots, "default")
10
+ ]),
11
+ _: 3
12
+ }, 16);
13
+ };
14
+ }
15
+ });
16
+ export {
17
+ _sfc_main as default
18
+ };
@@ -0,0 +1,3 @@
1
+ import type { AudioPlayerProps } from '@blogmcp/mdx-schema';
2
+ declare const _default: import("vue").DefineComponent<AudioPlayerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AudioPlayerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
+ export default _default;