@blogmcp/sdk 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 +9 -0
- package/dist/_virtual/constants.js +4 -0
- package/dist/_virtual/index.js +2 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/index3.js +2 -0
- package/dist/_virtual/re.js +4 -0
- package/dist/core/article-seo.d.ts +27 -0
- package/dist/core/article-seo.js +25 -0
- package/dist/core/auth.d.ts +34 -0
- package/dist/core/auth.js +89 -0
- package/dist/core/blog-config.d.ts +5 -0
- package/dist/core/blog-config.js +14 -0
- package/dist/core/client-types.d.ts +51 -0
- package/dist/core/client.d.ts +159 -0
- package/dist/core/client.js +82 -0
- package/dist/core/i18n.d.ts +29 -0
- package/dist/core/i18n.js +34 -0
- package/dist/core/index.d.ts +26 -0
- package/dist/core/index.js +67 -0
- package/dist/core/markdown.d.ts +69 -0
- package/dist/core/markdown.js +47 -0
- package/dist/core/navigation.d.ts +70 -0
- package/dist/core/navigation.js +71 -0
- package/dist/core/queries.d.ts +34 -0
- package/dist/core/queries.js +363 -0
- package/dist/core/retry.d.ts +9 -0
- package/dist/core/retry.js +14 -0
- package/dist/core/seo.d.ts +142 -0
- package/dist/core/seo.js +166 -0
- package/dist/core/theme.d.ts +41 -0
- package/dist/core/theme.js +60 -0
- package/dist/core/translations/cs.json.js +27 -0
- package/dist/core/translations/en.json.js +27 -0
- package/dist/core/types.d.ts +184 -0
- package/dist/core/types.js +9 -0
- package/dist/core/view-model.d.ts +53 -0
- package/dist/core/view-model.js +47 -0
- package/dist/node_modules/@braintree/sanitize-url/dist/constants.js +8 -0
- package/dist/node_modules/@braintree/sanitize-url/dist/index.js +60 -0
- package/dist/node_modules/dompurify/dist/purify.es.js +662 -0
- package/dist/node_modules/semver/classes/comparator.js +56 -0
- package/dist/node_modules/semver/classes/range.js +148 -0
- package/dist/node_modules/semver/classes/semver.js +169 -0
- package/dist/node_modules/semver/functions/clean.js +14 -0
- package/dist/node_modules/semver/functions/cmp.js +39 -0
- package/dist/node_modules/semver/functions/coerce.js +33 -0
- package/dist/node_modules/semver/functions/compare-build.js +14 -0
- package/dist/node_modules/semver/functions/compare-loose.js +11 -0
- package/dist/node_modules/semver/functions/compare.js +11 -0
- package/dist/node_modules/semver/functions/diff.js +24 -0
- package/dist/node_modules/semver/functions/eq.js +11 -0
- package/dist/node_modules/semver/functions/gt.js +11 -0
- package/dist/node_modules/semver/functions/gte.js +11 -0
- package/dist/node_modules/semver/functions/inc.js +21 -0
- package/dist/node_modules/semver/functions/lt.js +11 -0
- package/dist/node_modules/semver/functions/lte.js +11 -0
- package/dist/node_modules/semver/functions/major.js +11 -0
- package/dist/node_modules/semver/functions/minor.js +11 -0
- package/dist/node_modules/semver/functions/neq.js +11 -0
- package/dist/node_modules/semver/functions/parse.js +21 -0
- package/dist/node_modules/semver/functions/patch.js +11 -0
- package/dist/node_modules/semver/functions/prerelease.js +14 -0
- package/dist/node_modules/semver/functions/rcompare.js +11 -0
- package/dist/node_modules/semver/functions/rsort.js +11 -0
- package/dist/node_modules/semver/functions/satisfies.js +18 -0
- package/dist/node_modules/semver/functions/sort.js +11 -0
- package/dist/node_modules/semver/functions/valid.js +14 -0
- package/dist/node_modules/semver/index.js +97 -0
- package/dist/node_modules/semver/internal/constants.js +28 -0
- package/dist/node_modules/semver/internal/debug.js +8 -0
- package/dist/node_modules/semver/internal/identifiers.js +18 -0
- package/dist/node_modules/semver/internal/lrucache.js +32 -0
- package/dist/node_modules/semver/internal/parse-options.js +10 -0
- package/dist/node_modules/semver/internal/re.js +32 -0
- package/dist/node_modules/semver/ranges/gtr.js +11 -0
- package/dist/node_modules/semver/ranges/intersects.js +11 -0
- package/dist/node_modules/semver/ranges/ltr.js +11 -0
- package/dist/node_modules/semver/ranges/max-satisfying.js +22 -0
- package/dist/node_modules/semver/ranges/min-satisfying.js +22 -0
- package/dist/node_modules/semver/ranges/min-version.js +42 -0
- package/dist/node_modules/semver/ranges/outside.js +44 -0
- package/dist/node_modules/semver/ranges/simplify.js +24 -0
- package/dist/node_modules/semver/ranges/subset.js +94 -0
- package/dist/node_modules/semver/ranges/to-comparators.js +11 -0
- package/dist/node_modules/semver/ranges/valid.js +17 -0
- package/dist/nuxt/composables/useAsyncKb.d.ts +32 -0
- package/dist/nuxt/composables/useAsyncKb.js +34 -0
- package/dist/nuxt/index.d.ts +1 -0
- package/dist/nuxt/index.js +6 -0
- package/dist/packages/mdx-render-vue/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/packages/mdx-render-vue/dist/_virtual/constants.js +4 -0
- package/dist/packages/mdx-render-vue/dist/_virtual/index.js +5 -0
- package/dist/packages/mdx-render-vue/dist/_virtual/index2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/composables/useAudioPlayer.js +40 -0
- package/dist/packages/mdx-render-vue/dist/composables/useCallout.js +66 -0
- package/dist/packages/mdx-render-vue/dist/composables/useCodeBlock.js +62 -0
- package/dist/packages/mdx-render-vue/dist/composables/useGallery.js +68 -0
- package/dist/packages/mdx-render-vue/dist/composables/useMedia.js +9 -0
- package/dist/packages/mdx-render-vue/dist/composables/useYouTube.js +24 -0
- package/dist/packages/mdx-render-vue/dist/edit/AlertEdit.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/AlertEdit.vue2.js +16 -0
- package/dist/packages/mdx-render-vue/dist/edit/AudioPlayerEdit.vue.js +102 -0
- package/dist/packages/mdx-render-vue/dist/edit/AudioPlayerEdit.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/BadgeEdit.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/BadgeEdit.vue2.js +11 -0
- package/dist/packages/mdx-render-vue/dist/edit/ButtonEdit.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/ButtonEdit.vue2.js +11 -0
- package/dist/packages/mdx-render-vue/dist/edit/CalloutEdit.vue.js +78 -0
- package/dist/packages/mdx-render-vue/dist/edit/CalloutEdit.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/CardEdit.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/CardEdit.vue2.js +16 -0
- package/dist/packages/mdx-render-vue/dist/edit/CodeBlockEdit.vue.js +6 -0
- package/dist/packages/mdx-render-vue/dist/edit/CodeBlockEdit.vue2.js +74 -0
- package/dist/packages/mdx-render-vue/dist/edit/GalleryEdit.vue.js +56 -0
- package/dist/packages/mdx-render-vue/dist/edit/GalleryEdit.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/IconEdit.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/IconEdit.vue2.js +11 -0
- package/dist/packages/mdx-render-vue/dist/edit/TooltipEdit.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/TooltipEdit.vue2.js +20 -0
- package/dist/packages/mdx-render-vue/dist/edit/YouTubeEdit.vue.js +34 -0
- package/dist/packages/mdx-render-vue/dist/edit/YouTubeEdit.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/factory.js +29 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/presence/use-presence-context.js +6 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/presence/use-presence.js +32 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow-tip.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow-tip.vue_vue_type_script_setup_true_lang.js +18 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow.vue_vue_type_script_setup_true_lang.js +18 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-content.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-content.vue_vue_type_script_setup_true_lang.js +20 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-context.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-context.vue_vue_type_script_setup_true_lang.js +12 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-positioner.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-positioner.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root-provider.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root-provider.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-trigger.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-trigger.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip.js +22 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/use-tooltip-context.js +6 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/use-tooltip.js +29 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/providers/environment/use-environment-context.js +12 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/providers/locale/use-locale-context.js +11 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/clean-props.js +8 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/create-context.js +12 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/dynamic.js +25 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/unref-element.js +8 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/use-forward-expose.js +36 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/use-render-strategy.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@braintree/sanitize-url/dist/constants.js +8 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@braintree/sanitize-url/dist/index.js +60 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +532 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +403 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +136 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +128 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@iconify/vue/dist/iconify.js +1192 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/anatomy/dist/create-anatomy.js +26 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/core/dist/create-machine.js +21 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/core/dist/merge-props.js +45 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/core/dist/scope.js +16 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/core/dist/state.js +136 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/core/dist/types.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/chunk-QZ7TP4HQ.js +4 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/computed-style.js +8 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/event.js +31 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/node.js +49 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/overflow.js +19 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/platform.js +16 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/query.js +6 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/raf.js +41 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/set.js +14 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/shared.js +7 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/focus-visible/dist/index.js +90 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/popper/dist/get-anchor.js +34 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/popper/dist/get-placement.js +187 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/popper/dist/get-styles.js +47 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/popper/dist/middleware.js +56 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/popper/dist/placement.js +7 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/presence/dist/presence.connect.js +16 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/presence/dist/presence.machine.js +147 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/tooltip/dist/tooltip.anatomy.js +6 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/tooltip/dist/tooltip.connect.js +119 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/tooltip/dist/tooltip.dom.js +15 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/tooltip/dist/tooltip.machine.js +375 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/tooltip/dist/tooltip.store.js +9 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/types/dist/prop-types.js +10 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/array.js +6 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/equal.js +27 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/functions.js +10 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/guard.js +15 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/object.js +13 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/store.js +25 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/warning.js +25 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/vue/dist/bindable.js +37 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/vue/dist/machine.js +205 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/vue/dist/normalize-props.js +30 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/vue/dist/refs.js +14 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/vue/dist/track.js +19 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/dompurify/dist/purify.es.js +659 -0
- package/dist/packages/mdx-render-vue/dist/registry.js +154 -0
- package/dist/packages/mdx-render-vue/dist/render/alert/Alert.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/alert/Alert.vue2.js +37 -0
- package/dist/packages/mdx-render-vue/dist/render/audioplayer/AudioPlayerDefault.vue.js +102 -0
- package/dist/packages/mdx-render-vue/dist/render/audioplayer/AudioPlayerDefault.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/badge/Badge.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/badge/Badge.vue2.js +25 -0
- package/dist/packages/mdx-render-vue/dist/render/button/Button.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/button/Button.vue2.js +37 -0
- package/dist/packages/mdx-render-vue/dist/render/callout/CalloutDefault.vue.js +79 -0
- package/dist/packages/mdx-render-vue/dist/render/callout/CalloutDefault.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/callout/CalloutMinimal.vue.js +22 -0
- package/dist/packages/mdx-render-vue/dist/render/callout/CalloutMinimal.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/card/Card.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/card/Card.vue2.js +24 -0
- package/dist/packages/mdx-render-vue/dist/render/codeblock/CodeBlockDefault.vue.js +6 -0
- package/dist/packages/mdx-render-vue/dist/render/codeblock/CodeBlockDefault.vue2.js +77 -0
- package/dist/packages/mdx-render-vue/dist/render/gallery/GalleryGrid.vue.js +103 -0
- package/dist/packages/mdx-render-vue/dist/render/gallery/GalleryGrid.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/gallery/GalleryLightbox.vue.js +6 -0
- package/dist/packages/mdx-render-vue/dist/render/gallery/GalleryLightbox.vue2.js +142 -0
- package/dist/packages/mdx-render-vue/dist/render/icon/Icon.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/icon/Icon.vue2.js +23 -0
- package/dist/packages/mdx-render-vue/dist/render/tooltip/Tooltip.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/tooltip/Tooltip.vue2.js +54 -0
- package/dist/packages/mdx-render-vue/dist/render/youtube/YouTubeDefault.vue.js +69 -0
- package/dist/packages/mdx-render-vue/dist/render/youtube/YouTubeDefault.vue2.js +4 -0
- package/dist/packages/mdx-schema/dist/composables/useMdxParsing.js +139 -0
- package/dist/packages/mdx-schema/dist/metadata/index.js +415 -0
- package/dist/packages/mdx-schema/dist/prepareProps.js +46 -0
- package/dist/packages/mdx-schema/dist/styles/index.js +119 -0
- package/dist/packages/mdx-schema/dist/types/index.js +26 -0
- package/dist/packages/sanitize/dist/html.js +41 -0
- package/dist/react/KbMdxContent.d.ts +35 -0
- package/dist/react/KbMdxContent.js +102 -0
- package/dist/react/context.d.ts +11 -0
- package/dist/react/context.js +5 -0
- package/dist/react/hooks/useImageRenderer.d.ts +6 -0
- package/dist/react/hooks/useImageRenderer.js +9 -0
- package/dist/react/hooks/useKbClient.d.ts +3 -0
- package/dist/react/hooks/useKbClient.js +7 -0
- package/dist/react/hooks/useKbContext.d.ts +3 -0
- package/dist/react/hooks/useKbContext.js +11 -0
- package/dist/react/hooks/useKbI18n.d.ts +7 -0
- package/dist/react/hooks/useKbI18n.js +8 -0
- package/dist/react/hooks/useKbLanguage.d.ts +21 -0
- package/dist/react/hooks/useKbLanguage.js +63 -0
- package/dist/react/hooks/useKbSearch.d.ts +20 -0
- package/dist/react/hooks/useKbSearch.js +22 -0
- package/dist/react/hooks/useMdxContent.d.ts +18 -0
- package/dist/react/hooks/useMdxContent.js +11 -0
- package/dist/react/index.d.ts +21 -0
- package/dist/react/index.js +20 -0
- package/dist/react/provider.d.ts +25 -0
- package/dist/react/provider.js +29 -0
- package/dist/react/server/index.d.ts +38 -0
- package/dist/react/server/index.js +26 -0
- package/dist/sdk.css +1 -0
- package/dist/vue/components/KbAccessGate.vue.d.ts +36 -0
- package/dist/vue/components/KbAccessGate.vue.js +74 -0
- package/dist/vue/components/KbAccessGate.vue2.js +4 -0
- package/dist/vue/components/KbArticleCard.vue.d.ts +34 -0
- package/dist/vue/components/KbArticleCard.vue.js +87 -0
- package/dist/vue/components/KbArticleCard.vue2.js +4 -0
- package/dist/vue/components/KbMdxContent.vue.d.ts +5 -0
- package/dist/vue/components/KbMdxContent.vue.js +7 -0
- package/dist/vue/components/KbMdxContent.vue2.js +82 -0
- package/dist/vue/composables/useArticles.d.ts +30 -0
- package/dist/vue/composables/useArticles.js +36 -0
- package/dist/vue/composables/useImageRenderer.d.ts +6 -0
- package/dist/vue/composables/useImageRenderer.js +9 -0
- package/dist/vue/composables/useKbAuth.d.ts +27 -0
- package/dist/vue/composables/useKbAuth.js +83 -0
- package/dist/vue/composables/useKbClient.d.ts +6 -0
- package/dist/vue/composables/useKbClient.js +13 -0
- package/dist/vue/composables/useKbComments.d.ts +37 -0
- package/dist/vue/composables/useKbComments.js +160 -0
- package/dist/vue/composables/useKbI18n.d.ts +6 -0
- package/dist/vue/composables/useKbI18n.js +8 -0
- package/dist/vue/composables/useKbLanguage.d.ts +22 -0
- package/dist/vue/composables/useKbLanguage.js +63 -0
- package/dist/vue/composables/useNavigation.d.ts +18 -0
- package/dist/vue/composables/useNavigation.js +20 -0
- package/dist/vue/composables/useSearch.d.ts +21 -0
- package/dist/vue/composables/useSearch.js +20 -0
- package/dist/vue/composables/useTags.d.ts +17 -0
- package/dist/vue/composables/useTags.js +36 -0
- package/dist/vue/index.d.ts +22 -0
- package/dist/vue/index.js +36 -0
- package/dist/vue/plugin.d.ts +30 -0
- package/dist/vue/plugin.js +17 -0
- package/package.json +97 -0
- package/src/core/article-seo.ts +101 -0
- package/src/core/auth.ts +138 -0
- package/src/core/blog-config.ts +30 -0
- package/src/core/client-types.ts +58 -0
- package/src/core/client.ts +287 -0
- package/src/core/i18n.ts +84 -0
- package/src/core/index.ts +147 -0
- package/src/core/markdown.ts +178 -0
- package/src/core/navigation.ts +152 -0
- package/src/core/queries.ts +414 -0
- package/src/core/retry.ts +19 -0
- package/src/core/seo.ts +374 -0
- package/src/core/theme.ts +128 -0
- package/src/core/translations/cs.json +225 -0
- package/src/core/translations/en.json +225 -0
- package/src/core/types.ts +231 -0
- package/src/core/view-model.ts +98 -0
- package/src/nuxt/composables/useAsyncKb.ts +119 -0
- package/src/nuxt/index.ts +6 -0
- package/src/react/KbMdxContent.tsx +215 -0
- package/src/react/context.ts +25 -0
- package/src/react/hooks/useImageRenderer.ts +15 -0
- package/src/react/hooks/useKbClient.ts +9 -0
- package/src/react/hooks/useKbContext.ts +13 -0
- package/src/react/hooks/useKbI18n.ts +15 -0
- package/src/react/hooks/useKbLanguage.ts +105 -0
- package/src/react/hooks/useKbSearch.ts +50 -0
- package/src/react/hooks/useMdxContent.tsx +33 -0
- package/src/react/index.ts +31 -0
- package/src/react/provider.tsx +70 -0
- package/src/react/server/index.ts +70 -0
- package/src/vue/components/KbAccessGate.vue +86 -0
- package/src/vue/components/KbArticleCard.vue +102 -0
- package/src/vue/components/KbMdxContent.vue +211 -0
- package/src/vue/composables/useArticles.ts +78 -0
- package/src/vue/composables/useImageRenderer.ts +12 -0
- package/src/vue/composables/useKbAuth.ts +131 -0
- package/src/vue/composables/useKbClient.ts +17 -0
- package/src/vue/composables/useKbComments.ts +281 -0
- package/src/vue/composables/useKbI18n.ts +11 -0
- package/src/vue/composables/useKbLanguage.ts +103 -0
- package/src/vue/composables/useNavigation.ts +38 -0
- package/src/vue/composables/useSearch.ts +52 -0
- package/src/vue/composables/useTags.ts +64 -0
- package/src/vue/index.ts +27 -0
- package/src/vue/plugin.ts +73 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { defineComponent as D, ref as b, computed as x, watch as A, onUnmounted as E, createElementBlock as i, openBlock as n, Fragment as d, createCommentVNode as w, createVNode as $, unref as t, normalizeClass as g, renderList as j, createElementVNode as F, normalizeStyle as p, createBlock as R, createStaticVNode as T, resolveDynamicComponent as U, toDisplayString as q } from "vue";
|
|
2
|
+
import { useGallery as H } from "../../composables/useGallery.js";
|
|
3
|
+
import { useOptimizedImg as J } from "../../composables/useMedia.js";
|
|
4
|
+
import K from "./GalleryLightbox.vue.js";
|
|
5
|
+
const M = ["onClick"], P = ["src"], Q = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "gallery-description text-center text-sm text-gray-500 mt-2"
|
|
8
|
+
}, oe = /* @__PURE__ */ D({
|
|
9
|
+
__name: "GalleryGrid",
|
|
10
|
+
props: {
|
|
11
|
+
images: {},
|
|
12
|
+
columns: {},
|
|
13
|
+
gap: {},
|
|
14
|
+
aspectRatio: {},
|
|
15
|
+
fit: {},
|
|
16
|
+
position: {}
|
|
17
|
+
},
|
|
18
|
+
setup(y) {
|
|
19
|
+
const v = y, { gridColsClass: k, gapClass: C, tileLayout: r, getImageSrc: u, getImageAlt: h, getImageDescription: S, getImageCaption: f, isVideo: s, hasImages: I } = H(v), _ = J(), c = b(!1), m = b(0), a = x(() => {
|
|
20
|
+
const e = [];
|
|
21
|
+
for (let o = 0; o < v.images.length; o++)
|
|
22
|
+
s(o) || e.push(o);
|
|
23
|
+
return e;
|
|
24
|
+
}), G = x(() => a.value.length);
|
|
25
|
+
function z(e) {
|
|
26
|
+
if (s(e)) return;
|
|
27
|
+
const o = a.value.indexOf(e);
|
|
28
|
+
o !== -1 && (m.value = o, c.value = !0);
|
|
29
|
+
}
|
|
30
|
+
function L() {
|
|
31
|
+
c.value = !1;
|
|
32
|
+
}
|
|
33
|
+
function N(e) {
|
|
34
|
+
m.value = e;
|
|
35
|
+
}
|
|
36
|
+
function O(e) {
|
|
37
|
+
return u(a.value[e]);
|
|
38
|
+
}
|
|
39
|
+
function V(e) {
|
|
40
|
+
return h(a.value[e]);
|
|
41
|
+
}
|
|
42
|
+
function B(e) {
|
|
43
|
+
return S(a.value[e]);
|
|
44
|
+
}
|
|
45
|
+
return A(c, (e) => {
|
|
46
|
+
e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
|
|
47
|
+
}), E(() => {
|
|
48
|
+
document.body.style.overflow = "";
|
|
49
|
+
}), (e, o) => (n(), i(d, null, [
|
|
50
|
+
t(I) ? (n(), i("div", {
|
|
51
|
+
key: 0,
|
|
52
|
+
class: g(["gallery not-prose my-6", [t(k), t(C)]]),
|
|
53
|
+
style: { display: "grid" },
|
|
54
|
+
"data-mdx-component": "Gallery"
|
|
55
|
+
}, [
|
|
56
|
+
(n(!0), i(d, null, j(y.images, (W, l) => (n(), i("div", {
|
|
57
|
+
key: l,
|
|
58
|
+
class: "gallery-item"
|
|
59
|
+
}, [
|
|
60
|
+
F("div", {
|
|
61
|
+
class: g(["gallery-media group relative overflow-hidden rounded", t(s)(l) ? "bg-gray-900" : "bg-gray-100 cursor-pointer"]),
|
|
62
|
+
style: p(t(r).tileStyle),
|
|
63
|
+
onClick: (X) => z(l)
|
|
64
|
+
}, [
|
|
65
|
+
t(s)(l) ? (n(), i("video", {
|
|
66
|
+
key: 0,
|
|
67
|
+
src: `${t(u)(l)}#t=0.1`,
|
|
68
|
+
controls: "",
|
|
69
|
+
preload: "metadata",
|
|
70
|
+
playsinline: "",
|
|
71
|
+
class: g(t(r).mediaSizeClass),
|
|
72
|
+
style: p(t(r).mediaStyle)
|
|
73
|
+
}, null, 14, P)) : (n(), i(d, { key: 1 }, [
|
|
74
|
+
(n(), R(U(t(_)), {
|
|
75
|
+
src: t(u)(l),
|
|
76
|
+
alt: t(h)(l),
|
|
77
|
+
sizes: "100vw sm:50vw md:33vw lg:299px",
|
|
78
|
+
class: g([t(r).mediaSizeClass, "transition-transform duration-200 group-hover:scale-[1.03]"]),
|
|
79
|
+
style: p(t(r).mediaStyle),
|
|
80
|
+
loading: "lazy"
|
|
81
|
+
}, null, 8, ["src", "alt", "class", "style"])),
|
|
82
|
+
o[0] || (o[0] = T('<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))
|
|
83
|
+
], 64))
|
|
84
|
+
], 14, M),
|
|
85
|
+
t(f)(l) ? (n(), i("p", Q, q(t(f)(l)), 1)) : w("", !0)
|
|
86
|
+
]))), 128))
|
|
87
|
+
], 2)) : w("", !0),
|
|
88
|
+
$(K, {
|
|
89
|
+
"is-open": c.value,
|
|
90
|
+
"current-index": m.value,
|
|
91
|
+
"image-count": G.value,
|
|
92
|
+
"get-image-src": O,
|
|
93
|
+
"get-image-alt": V,
|
|
94
|
+
"get-image-description": B,
|
|
95
|
+
onClose: L,
|
|
96
|
+
onNavigate: N
|
|
97
|
+
}, null, 8, ["is-open", "current-index", "image-count"])
|
|
98
|
+
], 64));
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
export {
|
|
102
|
+
oe as default
|
|
103
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { defineComponent as p, computed as d, onMounted as C, onUnmounted as T, ref as k, createBlock as B, openBlock as l, Teleport as E, createVNode as N, Transition as S, withCtx as j, createElementBlock as a, createCommentVNode as s, createElementVNode as o, toDisplayString as h, withModifiers as M } from "vue";
|
|
2
|
+
const z = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "lightbox-counter absolute top-4 left-4 text-white/80 text-sm select-none"
|
|
5
|
+
}, A = ["src", "alt"], D = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "lightbox-caption text-white/80 text-sm mt-3 text-center max-w-[80vw]"
|
|
8
|
+
}, F = /* @__PURE__ */ p({
|
|
9
|
+
__name: "GalleryLightbox",
|
|
10
|
+
props: {
|
|
11
|
+
isOpen: { type: Boolean },
|
|
12
|
+
currentIndex: {},
|
|
13
|
+
imageCount: {},
|
|
14
|
+
getImageSrc: { type: Function },
|
|
15
|
+
getImageAlt: { type: Function },
|
|
16
|
+
getImageDescription: { type: Function }
|
|
17
|
+
},
|
|
18
|
+
emits: ["close", "navigate"],
|
|
19
|
+
setup(t, { emit: f }) {
|
|
20
|
+
const i = t, r = f, c = d(() => i.currentIndex > 0), x = d(() => i.currentIndex < i.imageCount - 1), g = d(() => i.imageCount > 1);
|
|
21
|
+
function v(n) {
|
|
22
|
+
i.isOpen && (n.key === "Escape" ? r("close") : n.key === "ArrowLeft" && c.value ? r("navigate", i.currentIndex - 1) : n.key === "ArrowRight" && x.value && r("navigate", i.currentIndex + 1));
|
|
23
|
+
}
|
|
24
|
+
C(() => {
|
|
25
|
+
document.addEventListener("keydown", v);
|
|
26
|
+
}), T(() => {
|
|
27
|
+
document.removeEventListener("keydown", v);
|
|
28
|
+
});
|
|
29
|
+
const m = k(0), w = k(0);
|
|
30
|
+
function y(n) {
|
|
31
|
+
m.value = n.touches[0].clientX, w.value = n.touches[0].clientY;
|
|
32
|
+
}
|
|
33
|
+
function b(n) {
|
|
34
|
+
const e = n.changedTouches[0].clientX - m.value, u = n.changedTouches[0].clientY - w.value;
|
|
35
|
+
Math.abs(e) > 50 && Math.abs(e) > Math.abs(u) && (e < 0 && x.value ? r("navigate", i.currentIndex + 1) : e > 0 && c.value && r("navigate", i.currentIndex - 1));
|
|
36
|
+
}
|
|
37
|
+
function I(n) {
|
|
38
|
+
n.target === n.currentTarget && r("close");
|
|
39
|
+
}
|
|
40
|
+
return (n, e) => (l(), B(E, { to: "body" }, [
|
|
41
|
+
N(S, { name: "lightbox-fade" }, {
|
|
42
|
+
default: j(() => [
|
|
43
|
+
t.isOpen ? (l(), a("div", {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: "lightbox-overlay fixed inset-0 z-50 flex items-center justify-center bg-black/90",
|
|
46
|
+
onClick: I,
|
|
47
|
+
onTouchstart: y,
|
|
48
|
+
onTouchend: b
|
|
49
|
+
}, [
|
|
50
|
+
o("button", {
|
|
51
|
+
class: "lightbox-close absolute top-4 right-4 z-10 text-white/80 hover:text-white p-2",
|
|
52
|
+
"aria-label": "Close lightbox",
|
|
53
|
+
onClick: e[0] || (e[0] = (u) => r("close"))
|
|
54
|
+
}, [...e[4] || (e[4] = [
|
|
55
|
+
o("svg", {
|
|
56
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
57
|
+
width: "28",
|
|
58
|
+
height: "28",
|
|
59
|
+
viewBox: "0 0 24 24",
|
|
60
|
+
fill: "none",
|
|
61
|
+
stroke: "currentColor",
|
|
62
|
+
"stroke-width": "2",
|
|
63
|
+
"stroke-linecap": "round",
|
|
64
|
+
"stroke-linejoin": "round"
|
|
65
|
+
}, [
|
|
66
|
+
o("line", {
|
|
67
|
+
x1: "18",
|
|
68
|
+
y1: "6",
|
|
69
|
+
x2: "6",
|
|
70
|
+
y2: "18"
|
|
71
|
+
}),
|
|
72
|
+
o("line", {
|
|
73
|
+
x1: "6",
|
|
74
|
+
y1: "6",
|
|
75
|
+
x2: "18",
|
|
76
|
+
y2: "18"
|
|
77
|
+
})
|
|
78
|
+
], -1)
|
|
79
|
+
])]),
|
|
80
|
+
g.value ? (l(), a("div", z, h(t.currentIndex + 1) + " / " + h(t.imageCount), 1)) : s("", !0),
|
|
81
|
+
g.value && c.value ? (l(), a("button", {
|
|
82
|
+
key: 1,
|
|
83
|
+
class: "lightbox-prev absolute left-4 top-1/2 -translate-y-1/2 z-10 text-white/80 hover:text-white p-2",
|
|
84
|
+
"aria-label": "Previous image",
|
|
85
|
+
onClick: e[1] || (e[1] = (u) => r("navigate", t.currentIndex - 1))
|
|
86
|
+
}, [...e[5] || (e[5] = [
|
|
87
|
+
o("svg", {
|
|
88
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
89
|
+
width: "32",
|
|
90
|
+
height: "32",
|
|
91
|
+
viewBox: "0 0 24 24",
|
|
92
|
+
fill: "none",
|
|
93
|
+
stroke: "currentColor",
|
|
94
|
+
"stroke-width": "2",
|
|
95
|
+
"stroke-linecap": "round",
|
|
96
|
+
"stroke-linejoin": "round"
|
|
97
|
+
}, [
|
|
98
|
+
o("polyline", { points: "15 18 9 12 15 6" })
|
|
99
|
+
], -1)
|
|
100
|
+
])])) : s("", !0),
|
|
101
|
+
g.value && x.value ? (l(), a("button", {
|
|
102
|
+
key: 2,
|
|
103
|
+
class: "lightbox-next absolute right-4 top-1/2 -translate-y-1/2 z-10 text-white/80 hover:text-white p-2",
|
|
104
|
+
"aria-label": "Next image",
|
|
105
|
+
onClick: e[2] || (e[2] = (u) => r("navigate", t.currentIndex + 1))
|
|
106
|
+
}, [...e[6] || (e[6] = [
|
|
107
|
+
o("svg", {
|
|
108
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
109
|
+
width: "32",
|
|
110
|
+
height: "32",
|
|
111
|
+
viewBox: "0 0 24 24",
|
|
112
|
+
fill: "none",
|
|
113
|
+
stroke: "currentColor",
|
|
114
|
+
"stroke-width": "2",
|
|
115
|
+
"stroke-linecap": "round",
|
|
116
|
+
"stroke-linejoin": "round"
|
|
117
|
+
}, [
|
|
118
|
+
o("polyline", { points: "9 18 15 12 9 6" })
|
|
119
|
+
], -1)
|
|
120
|
+
])])) : s("", !0),
|
|
121
|
+
o("div", {
|
|
122
|
+
class: "flex flex-col items-center max-h-[95vh] max-w-[90vw]",
|
|
123
|
+
onClick: e[3] || (e[3] = M(() => {
|
|
124
|
+
}, ["stop"]))
|
|
125
|
+
}, [
|
|
126
|
+
o("img", {
|
|
127
|
+
src: t.getImageSrc(t.currentIndex),
|
|
128
|
+
alt: t.getImageAlt(t.currentIndex),
|
|
129
|
+
class: "lightbox-image max-h-[85vh] max-w-[90vw] object-contain"
|
|
130
|
+
}, null, 8, A),
|
|
131
|
+
t.getImageDescription(t.currentIndex) ? (l(), a("p", D, h(t.getImageDescription(t.currentIndex)), 1)) : s("", !0)
|
|
132
|
+
])
|
|
133
|
+
], 32)) : s("", !0)
|
|
134
|
+
]),
|
|
135
|
+
_: 1
|
|
136
|
+
})
|
|
137
|
+
]));
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
export {
|
|
141
|
+
F as default
|
|
142
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponent as o, createBlock as n, openBlock as t, unref as c, normalizeStyle as i } from "vue";
|
|
2
|
+
import { Icon as l } from "../../node_modules/@iconify/vue/dist/iconify.js";
|
|
3
|
+
const s = /* @__PURE__ */ o({
|
|
4
|
+
__name: "Icon",
|
|
5
|
+
props: {
|
|
6
|
+
name: {},
|
|
7
|
+
size: { default: 20 },
|
|
8
|
+
color: {}
|
|
9
|
+
},
|
|
10
|
+
setup(e) {
|
|
11
|
+
return (a, m) => (t(), n(c(l), {
|
|
12
|
+
icon: e.name,
|
|
13
|
+
width: e.size,
|
|
14
|
+
height: e.size,
|
|
15
|
+
style: i(e.color ? { color: e.color } : void 0),
|
|
16
|
+
class: "inline-block align-[-0.125em]",
|
|
17
|
+
"data-mdx-component": "Icon"
|
|
18
|
+
}, null, 8, ["icon", "width", "height", "style"]));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
s as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineComponent as p, computed as c, createBlock as n, openBlock as r, unref as e, withCtx as o, createVNode as a, createElementVNode as u, renderSlot as m, Teleport as f, createTextVNode as _, toDisplayString as g } from "vue";
|
|
2
|
+
import { tooltip_exports as t } from "../../node_modules/@ark-ui/vue/dist/components/tooltip/tooltip.js";
|
|
3
|
+
const x = {
|
|
4
|
+
class: "inline-flex",
|
|
5
|
+
"data-mdx-component": "Tooltip"
|
|
6
|
+
}, b = /* @__PURE__ */ p({
|
|
7
|
+
__name: "Tooltip",
|
|
8
|
+
props: {
|
|
9
|
+
label: {},
|
|
10
|
+
placement: { default: "top" }
|
|
11
|
+
},
|
|
12
|
+
setup(l) {
|
|
13
|
+
const i = l, s = c(() => ({ placement: i.placement }));
|
|
14
|
+
return (d, y) => (r(), n(e(t).Root, {
|
|
15
|
+
positioning: s.value,
|
|
16
|
+
"open-delay": 200,
|
|
17
|
+
"close-delay": 100
|
|
18
|
+
}, {
|
|
19
|
+
default: o(() => [
|
|
20
|
+
a(e(t).Trigger, { "as-child": "" }, {
|
|
21
|
+
default: o(() => [
|
|
22
|
+
u("span", x, [
|
|
23
|
+
m(d.$slots, "default")
|
|
24
|
+
])
|
|
25
|
+
]),
|
|
26
|
+
_: 3
|
|
27
|
+
}),
|
|
28
|
+
(r(), n(f, { to: "body" }, [
|
|
29
|
+
a(e(t).Positioner, null, {
|
|
30
|
+
default: o(() => [
|
|
31
|
+
a(e(t).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" }, {
|
|
32
|
+
default: o(() => [
|
|
33
|
+
a(e(t).Arrow, null, {
|
|
34
|
+
default: o(() => [
|
|
35
|
+
a(e(t).ArrowTip, { class: "border-gray-900" })
|
|
36
|
+
]),
|
|
37
|
+
_: 1
|
|
38
|
+
}),
|
|
39
|
+
_(" " + g(l.label), 1)
|
|
40
|
+
]),
|
|
41
|
+
_: 1
|
|
42
|
+
})
|
|
43
|
+
]),
|
|
44
|
+
_: 1
|
|
45
|
+
})
|
|
46
|
+
]))
|
|
47
|
+
]),
|
|
48
|
+
_: 3
|
|
49
|
+
}, 8, ["positioning"]));
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export {
|
|
53
|
+
b as default
|
|
54
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { defineComponent as h, ref as v, createElementBlock as l, openBlock as t, createElementVNode as o, createCommentVNode as r, unref as e, createBlock as w, resolveDynamicComponent as y, toDisplayString as _ } from "vue";
|
|
2
|
+
import { useYouTube as g } from "../../composables/useYouTube.js";
|
|
3
|
+
import { useOptimizedImg as x } from "../../composables/useMedia.js";
|
|
4
|
+
const k = {
|
|
5
|
+
class: "youtube-embed my-6",
|
|
6
|
+
"data-mdx-component": "YouTube"
|
|
7
|
+
}, C = {
|
|
8
|
+
class: "relative w-full rounded-lg overflow-hidden shadow-md",
|
|
9
|
+
style: { "padding-bottom": "56.25%" }
|
|
10
|
+
}, T = ["aria-label"], B = ["src", "title", "allow"], E = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "text-center text-sm text-gray-600 mt-3"
|
|
13
|
+
}, I = /* @__PURE__ */ h({
|
|
14
|
+
__name: "YouTubeDefault",
|
|
15
|
+
props: {
|
|
16
|
+
id: {},
|
|
17
|
+
title: {}
|
|
18
|
+
},
|
|
19
|
+
setup(i) {
|
|
20
|
+
const u = i, { embedUrl: c, iframeTitle: a, thumbnailUrl: d, hasTitle: m, YOUTUBE_IFRAME_ALLOW: p } = g(u), f = x(), s = v(!1);
|
|
21
|
+
function b() {
|
|
22
|
+
s.value = !0;
|
|
23
|
+
}
|
|
24
|
+
return (U, n) => (t(), l("div", k, [
|
|
25
|
+
o("div", C, [
|
|
26
|
+
s.value ? r("", !0) : (t(), l("button", {
|
|
27
|
+
key: 0,
|
|
28
|
+
class: "absolute inset-0 w-full h-full cursor-pointer border-0 p-0 bg-black group",
|
|
29
|
+
"aria-label": `Play ${e(a)}`,
|
|
30
|
+
onClick: b
|
|
31
|
+
}, [
|
|
32
|
+
(t(), w(y(e(f)), {
|
|
33
|
+
src: e(d),
|
|
34
|
+
alt: e(a),
|
|
35
|
+
sizes: "100vw md:768px lg:1024px",
|
|
36
|
+
class: "absolute inset-0 w-full h-full object-cover"
|
|
37
|
+
}, null, 8, ["src", "alt"])),
|
|
38
|
+
n[0] || (n[0] = o("svg", {
|
|
39
|
+
class: "absolute inset-0 m-auto w-16 h-16 text-white drop-shadow-lg opacity-90 group-hover:opacity-100 transition-opacity",
|
|
40
|
+
viewBox: "0 0 68 48",
|
|
41
|
+
"aria-hidden": "true"
|
|
42
|
+
}, [
|
|
43
|
+
o("path", {
|
|
44
|
+
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",
|
|
45
|
+
fill: "red"
|
|
46
|
+
}),
|
|
47
|
+
o("path", {
|
|
48
|
+
d: "M45 24L27 14v20",
|
|
49
|
+
fill: "white"
|
|
50
|
+
})
|
|
51
|
+
], -1))
|
|
52
|
+
], 8, T)),
|
|
53
|
+
s.value ? (t(), l("iframe", {
|
|
54
|
+
key: 1,
|
|
55
|
+
src: `${e(c)}?autoplay=1`,
|
|
56
|
+
title: e(a),
|
|
57
|
+
class: "absolute inset-0 w-full h-full",
|
|
58
|
+
frameborder: "0",
|
|
59
|
+
allow: e(p),
|
|
60
|
+
allowfullscreen: ""
|
|
61
|
+
}, null, 8, B)) : r("", !0)
|
|
62
|
+
]),
|
|
63
|
+
e(m) ? (t(), l("p", E, _(i.title), 1)) : r("", !0)
|
|
64
|
+
]));
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
export {
|
|
68
|
+
I as default
|
|
69
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
const f = /<[A-Z][a-zA-Z]*[\s/>]/, u = /<([A-Z][a-zA-Z]*)\s*([^>]*)>([\s\S]*?)<\/\1>|<([A-Z][a-zA-Z]*)\s*((?:[^/]|\/(?!>))*)\/>/g;
|
|
2
|
+
function p(n, i) {
|
|
3
|
+
if (n[i] !== "{")
|
|
4
|
+
return null;
|
|
5
|
+
let e = 0, t = null;
|
|
6
|
+
for (let s = i; s < n.length; s++) {
|
|
7
|
+
const r = n[s];
|
|
8
|
+
if (t) {
|
|
9
|
+
if (r === "\\") {
|
|
10
|
+
s++;
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
r === t && (t = null);
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
if (r === '"' || r === "'") {
|
|
17
|
+
t = r;
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
if (r === "{") {
|
|
21
|
+
e++;
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
if (r === "}" && (e--, e === 0))
|
|
25
|
+
return { content: n.slice(i + 1, s), endIndex: s + 1 };
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
function h(n) {
|
|
30
|
+
const i = {};
|
|
31
|
+
if (!n.trim())
|
|
32
|
+
return i;
|
|
33
|
+
let e = 0;
|
|
34
|
+
const t = n;
|
|
35
|
+
for (; e < t.length; ) {
|
|
36
|
+
for (; e < t.length && /\s/.test(t[e]); )
|
|
37
|
+
e++;
|
|
38
|
+
if (e >= t.length)
|
|
39
|
+
break;
|
|
40
|
+
const s = t.slice(e).match(/^(\w+)/);
|
|
41
|
+
if (!s) {
|
|
42
|
+
e++;
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const r = s[1];
|
|
46
|
+
for (e += r.length; e < t.length && /\s/.test(t[e]); )
|
|
47
|
+
e++;
|
|
48
|
+
if (t[e] !== "=") {
|
|
49
|
+
i[r] = !0;
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
for (e++; e < t.length && /\s/.test(t[e]); )
|
|
53
|
+
e++;
|
|
54
|
+
if (t[e] === '"') {
|
|
55
|
+
const l = t.indexOf('"', e + 1);
|
|
56
|
+
if (l === -1) {
|
|
57
|
+
i[r] = "";
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
i[r] = t.slice(e + 1, l), e = l + 1;
|
|
61
|
+
} else if (t[e] === "{") {
|
|
62
|
+
const l = p(t, e);
|
|
63
|
+
if (l) {
|
|
64
|
+
try {
|
|
65
|
+
i[r] = JSON.parse(l.content.replace(/'/g, '"'));
|
|
66
|
+
} catch {
|
|
67
|
+
i[r] = l.content;
|
|
68
|
+
}
|
|
69
|
+
e = l.endIndex;
|
|
70
|
+
} else
|
|
71
|
+
e++;
|
|
72
|
+
} else
|
|
73
|
+
e++;
|
|
74
|
+
}
|
|
75
|
+
return i;
|
|
76
|
+
}
|
|
77
|
+
function a(n) {
|
|
78
|
+
const i = [];
|
|
79
|
+
for (const [e, t] of Object.entries(n))
|
|
80
|
+
t != null && (t === !0 ? i.push(e) : typeof t == "string" ? i.push(`${e}="${t}"`) : typeof t == "number" ? i.push(`${e}={${t}}`) : typeof t == "boolean" ? i.push(`${e}={${t}}`) : i.push(`${e}={${JSON.stringify(t)}}`));
|
|
81
|
+
return i.join(" ");
|
|
82
|
+
}
|
|
83
|
+
function m(n, i, e) {
|
|
84
|
+
const t = a(i), s = t ? ` ${t}` : "";
|
|
85
|
+
return e ? `<${n}${s}>
|
|
86
|
+
${e}
|
|
87
|
+
</${n}>` : `<${n}${s} />`;
|
|
88
|
+
}
|
|
89
|
+
function d(n) {
|
|
90
|
+
if (n.startsWith("---")) {
|
|
91
|
+
const i = n.indexOf("---", 3);
|
|
92
|
+
if (i !== -1)
|
|
93
|
+
return n.substring(i + 3).trim();
|
|
94
|
+
}
|
|
95
|
+
return n;
|
|
96
|
+
}
|
|
97
|
+
function g(n) {
|
|
98
|
+
if (n.startsWith("---")) {
|
|
99
|
+
const i = n.indexOf("---", 3);
|
|
100
|
+
if (i !== -1)
|
|
101
|
+
return n.substring(3, i).trim();
|
|
102
|
+
}
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
function x(n) {
|
|
106
|
+
if (!f.test(n))
|
|
107
|
+
return [{ type: "html", content: n }];
|
|
108
|
+
const i = new RegExp(u.source, "g"), e = [];
|
|
109
|
+
let t = 0, s;
|
|
110
|
+
for (; (s = i.exec(n)) !== null; ) {
|
|
111
|
+
if (s.index > t) {
|
|
112
|
+
const o = n.slice(t, s.index);
|
|
113
|
+
o.trim() && e.push({ type: "html", content: o });
|
|
114
|
+
}
|
|
115
|
+
const r = s[1] || s[4] || "", l = s[1] ? s[2] || "" : s[5] || "", c = s[3];
|
|
116
|
+
e.push({
|
|
117
|
+
type: "component",
|
|
118
|
+
name: r,
|
|
119
|
+
props: h(l),
|
|
120
|
+
children: c?.trim()
|
|
121
|
+
}), t = s.index + s[0].length;
|
|
122
|
+
}
|
|
123
|
+
if (t < n.length) {
|
|
124
|
+
const r = n.slice(t);
|
|
125
|
+
r.trim() && e.push({ type: "html", content: r });
|
|
126
|
+
}
|
|
127
|
+
return e.length === 0 && n.trim() ? [{ type: "html", content: n }] : e;
|
|
128
|
+
}
|
|
129
|
+
export {
|
|
130
|
+
f as HAS_MDX_RE,
|
|
131
|
+
u as MDX_COMPONENT_PATTERN,
|
|
132
|
+
p as extractBraceExpression,
|
|
133
|
+
g as extractFrontmatter,
|
|
134
|
+
x as extractMdxComponents,
|
|
135
|
+
h as parseJsxProps,
|
|
136
|
+
m as serializeComponent,
|
|
137
|
+
a as serializeProps,
|
|
138
|
+
d as stripFrontmatter
|
|
139
|
+
};
|