@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,415 @@
|
|
|
1
|
+
const t = [
|
|
2
|
+
{
|
|
3
|
+
name: "Callout",
|
|
4
|
+
description: "Info/warning/tip message box",
|
|
5
|
+
icon: "💬",
|
|
6
|
+
category: "content",
|
|
7
|
+
aliases: ["callout", "note", "alert", "info", "warning", "tip"],
|
|
8
|
+
props: [
|
|
9
|
+
{
|
|
10
|
+
name: "type",
|
|
11
|
+
type: "string",
|
|
12
|
+
required: !1,
|
|
13
|
+
default: '"info"',
|
|
14
|
+
description: "Callout style: info, warning, tip, or danger",
|
|
15
|
+
enum: ["info", "warning", "tip", "danger"]
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
hasChildren: !0,
|
|
19
|
+
selfClosing: !1,
|
|
20
|
+
defaultProps: 'type="info"',
|
|
21
|
+
defaultChildren: "Your message here",
|
|
22
|
+
example: `<Callout type="info">
|
|
23
|
+
Your message here
|
|
24
|
+
</Callout>`,
|
|
25
|
+
addedIn: "0.1.0",
|
|
26
|
+
deprecated: []
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "YouTube",
|
|
30
|
+
description: "Embedded video player",
|
|
31
|
+
icon: "▶",
|
|
32
|
+
category: "media",
|
|
33
|
+
aliases: ["youtube", "video", "embed"],
|
|
34
|
+
props: [
|
|
35
|
+
{
|
|
36
|
+
name: "id",
|
|
37
|
+
type: "string",
|
|
38
|
+
required: !0,
|
|
39
|
+
description: 'YouTube video ID (e.g., "dQw4w9WgXcQ")'
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "title",
|
|
43
|
+
type: "string",
|
|
44
|
+
required: !1,
|
|
45
|
+
description: "Video title displayed below the embed"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
hasChildren: !1,
|
|
49
|
+
selfClosing: !0,
|
|
50
|
+
defaultProps: 'id="VIDEO_ID" title="Video title"',
|
|
51
|
+
defaultChildren: "",
|
|
52
|
+
example: '<YouTube id="dQw4w9WgXcQ" title="Video title" />',
|
|
53
|
+
addedIn: "0.1.0",
|
|
54
|
+
deprecated: []
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "Gallery",
|
|
58
|
+
description: "Image grid with lightbox",
|
|
59
|
+
icon: "🖼",
|
|
60
|
+
category: "media",
|
|
61
|
+
aliases: ["gallery", "images", "grid", "photos"],
|
|
62
|
+
props: [
|
|
63
|
+
{
|
|
64
|
+
name: "images",
|
|
65
|
+
type: "array",
|
|
66
|
+
required: !0,
|
|
67
|
+
description: "Array of image objects with src and alt properties: {src: string, alt: string}[]"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "columns",
|
|
71
|
+
type: "number",
|
|
72
|
+
required: !1,
|
|
73
|
+
default: "2",
|
|
74
|
+
description: "Number of columns (1-4)",
|
|
75
|
+
numericRange: [1, 4]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "gap",
|
|
79
|
+
type: "number",
|
|
80
|
+
required: !1,
|
|
81
|
+
default: "4",
|
|
82
|
+
description: "Gap between images (Tailwind scale)"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "aspectRatio",
|
|
86
|
+
type: "string",
|
|
87
|
+
required: !1,
|
|
88
|
+
default: '"1"',
|
|
89
|
+
description: 'Tile aspect-ratio controlling height, e.g. "16/9" or "775/308". Use "auto" to drop the fixed box and let images use their natural height (full width, proportional) — ideal for a single wide image.',
|
|
90
|
+
addedIn: "0.2.0"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "fit",
|
|
94
|
+
type: "string",
|
|
95
|
+
required: !1,
|
|
96
|
+
default: '"cover"',
|
|
97
|
+
description: 'How the image fills its tile: "cover" crops to fill, "contain" shows the whole image letterboxed (no crop). Ignored when aspectRatio="auto".',
|
|
98
|
+
enum: ["cover", "contain"],
|
|
99
|
+
addedIn: "0.2.0"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "position",
|
|
103
|
+
type: "string",
|
|
104
|
+
required: !1,
|
|
105
|
+
default: '"center"',
|
|
106
|
+
description: 'CSS object-position selecting which region shows when cropping (e.g. "top", "50% 30%"). Only applies with fit="cover" and a fixed aspect-ratio.',
|
|
107
|
+
addedIn: "0.2.0"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
hasChildren: !1,
|
|
111
|
+
selfClosing: !0,
|
|
112
|
+
defaultProps: 'images={[{"src": "/image1.jpg", "alt": "Image 1"}, {"src": "/image2.jpg", "alt": "Image 2"}]} columns={2}',
|
|
113
|
+
defaultChildren: "",
|
|
114
|
+
example: '<Gallery images={[{"src": "/banner.svg", "alt": "Banner"}]} columns={1} aspectRatio="16/9" fit="contain" />',
|
|
115
|
+
addedIn: "0.1.0",
|
|
116
|
+
deprecated: []
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: "CodeBlock",
|
|
120
|
+
description: "Syntax-highlighted code",
|
|
121
|
+
icon: "{ }",
|
|
122
|
+
category: "code",
|
|
123
|
+
aliases: ["codeblock", "snippet", "syntax"],
|
|
124
|
+
props: [
|
|
125
|
+
{
|
|
126
|
+
name: "language",
|
|
127
|
+
type: "string",
|
|
128
|
+
required: !1,
|
|
129
|
+
default: '"javascript"',
|
|
130
|
+
description: "Programming language for syntax highlighting"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: "title",
|
|
134
|
+
type: "string",
|
|
135
|
+
required: !1,
|
|
136
|
+
description: "File name or title displayed in header"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: "showLineNumbers",
|
|
140
|
+
type: "boolean",
|
|
141
|
+
required: !1,
|
|
142
|
+
default: "false",
|
|
143
|
+
description: "Whether to show line numbers"
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
hasChildren: !0,
|
|
147
|
+
selfClosing: !1,
|
|
148
|
+
defaultProps: 'language="javascript" title="example.js"',
|
|
149
|
+
defaultChildren: 'const hello = "world";',
|
|
150
|
+
example: `<CodeBlock language="javascript" title="example.js">
|
|
151
|
+
const hello = "world";
|
|
152
|
+
</CodeBlock>`,
|
|
153
|
+
addedIn: "0.1.0",
|
|
154
|
+
deprecated: []
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: "AudioPlayer",
|
|
158
|
+
description: "Audio player with optional transcription",
|
|
159
|
+
icon: "🔊",
|
|
160
|
+
category: "media",
|
|
161
|
+
aliases: ["audioplayer", "audio", "podcast", "recording"],
|
|
162
|
+
props: [
|
|
163
|
+
{
|
|
164
|
+
name: "slug",
|
|
165
|
+
type: "string",
|
|
166
|
+
required: !0,
|
|
167
|
+
description: "Media slug — resolves to /api/media/file/{slug}"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: "title",
|
|
171
|
+
type: "string",
|
|
172
|
+
required: !1,
|
|
173
|
+
description: "Displayed title"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "showTranscription",
|
|
177
|
+
type: "boolean",
|
|
178
|
+
required: !1,
|
|
179
|
+
default: "false",
|
|
180
|
+
description: "Show collapsible transcript panel"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
hasChildren: !1,
|
|
184
|
+
selfClosing: !0,
|
|
185
|
+
defaultProps: 'slug="audio-slug" title="Audio title"',
|
|
186
|
+
defaultChildren: "",
|
|
187
|
+
example: '<AudioPlayer slug="interview-dr-smith" title="Interview" showTranscription />',
|
|
188
|
+
addedIn: "0.1.0",
|
|
189
|
+
deprecated: []
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: "Button",
|
|
193
|
+
description: "Action button or CTA link. Self-closing; label is a prop so agents do not nest MDX inside.",
|
|
194
|
+
icon: "🔘",
|
|
195
|
+
category: "action",
|
|
196
|
+
aliases: ["button", "cta", "action"],
|
|
197
|
+
props: [
|
|
198
|
+
{
|
|
199
|
+
name: "label",
|
|
200
|
+
type: "string",
|
|
201
|
+
required: !0,
|
|
202
|
+
description: "Button text"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "to",
|
|
206
|
+
type: "string",
|
|
207
|
+
required: !1,
|
|
208
|
+
description: "Link URL — when set, the button renders as an <a>"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: "variant",
|
|
212
|
+
type: "string",
|
|
213
|
+
required: !1,
|
|
214
|
+
default: '"solid"',
|
|
215
|
+
description: "Visual style",
|
|
216
|
+
enum: ["solid", "outline", "soft", "ghost", "link"]
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
name: "color",
|
|
220
|
+
type: "string",
|
|
221
|
+
required: !1,
|
|
222
|
+
default: '"primary"',
|
|
223
|
+
description: "Semantic color",
|
|
224
|
+
enum: ["primary", "neutral", "success", "warning", "error"]
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: "size",
|
|
228
|
+
type: "string",
|
|
229
|
+
required: !1,
|
|
230
|
+
default: '"md"',
|
|
231
|
+
description: "Button size",
|
|
232
|
+
enum: ["sm", "md", "lg"]
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
hasChildren: !1,
|
|
236
|
+
selfClosing: !0,
|
|
237
|
+
defaultProps: 'label="Read more" to="/docs"',
|
|
238
|
+
defaultChildren: "",
|
|
239
|
+
example: '<Button label="Read more" to="/docs" variant="outline" />',
|
|
240
|
+
addedIn: "0.1.0",
|
|
241
|
+
deprecated: []
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: "Card",
|
|
245
|
+
description: "Content block with optional title. Wraps child MDX in a bordered container.",
|
|
246
|
+
icon: "🃏",
|
|
247
|
+
category: "content",
|
|
248
|
+
aliases: ["card", "panel", "box"],
|
|
249
|
+
props: [
|
|
250
|
+
{
|
|
251
|
+
name: "title",
|
|
252
|
+
type: "string",
|
|
253
|
+
required: !1,
|
|
254
|
+
description: "Optional heading displayed at the top of the card"
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
hasChildren: !0,
|
|
258
|
+
selfClosing: !1,
|
|
259
|
+
defaultProps: 'title="Card title"',
|
|
260
|
+
defaultChildren: "Card body content.",
|
|
261
|
+
example: `<Card title="About">
|
|
262
|
+
Content goes here.
|
|
263
|
+
</Card>`,
|
|
264
|
+
addedIn: "0.1.0",
|
|
265
|
+
deprecated: []
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
name: "Alert",
|
|
269
|
+
description: "Inline notice — flatter and smaller than Callout. Use for short status messages.",
|
|
270
|
+
icon: "⚠️",
|
|
271
|
+
category: "content",
|
|
272
|
+
aliases: ["alert", "notice", "banner"],
|
|
273
|
+
props: [
|
|
274
|
+
{
|
|
275
|
+
name: "severity",
|
|
276
|
+
type: "string",
|
|
277
|
+
required: !1,
|
|
278
|
+
default: '"info"',
|
|
279
|
+
description: "Severity level — drives color and icon",
|
|
280
|
+
enum: ["info", "success", "warning", "error"]
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
name: "title",
|
|
284
|
+
type: "string",
|
|
285
|
+
required: !1,
|
|
286
|
+
description: "Optional bold heading above the body"
|
|
287
|
+
}
|
|
288
|
+
],
|
|
289
|
+
hasChildren: !0,
|
|
290
|
+
selfClosing: !1,
|
|
291
|
+
defaultProps: 'severity="warning" title="Heads up"',
|
|
292
|
+
defaultChildren: "Important message.",
|
|
293
|
+
example: `<Alert severity="warning" title="Heads up">
|
|
294
|
+
Read this carefully.
|
|
295
|
+
</Alert>`,
|
|
296
|
+
addedIn: "0.1.0",
|
|
297
|
+
deprecated: []
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
name: "Badge",
|
|
301
|
+
description: "Small label or tag. Self-closing; label is a prop.",
|
|
302
|
+
icon: "🏷",
|
|
303
|
+
category: "content",
|
|
304
|
+
aliases: ["badge", "tag", "chip", "label"],
|
|
305
|
+
props: [
|
|
306
|
+
{
|
|
307
|
+
name: "label",
|
|
308
|
+
type: "string",
|
|
309
|
+
required: !0,
|
|
310
|
+
description: "Badge text"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
name: "color",
|
|
314
|
+
type: "string",
|
|
315
|
+
required: !1,
|
|
316
|
+
default: '"neutral"',
|
|
317
|
+
description: "Semantic color",
|
|
318
|
+
enum: ["primary", "neutral", "success", "warning", "error"]
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
name: "variant",
|
|
322
|
+
type: "string",
|
|
323
|
+
required: !1,
|
|
324
|
+
default: '"soft"',
|
|
325
|
+
description: "Visual style",
|
|
326
|
+
enum: ["solid", "soft", "outline"]
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
hasChildren: !1,
|
|
330
|
+
selfClosing: !0,
|
|
331
|
+
defaultProps: 'label="New" color="success"',
|
|
332
|
+
defaultChildren: "",
|
|
333
|
+
example: '<Badge label="New" color="success" />',
|
|
334
|
+
addedIn: "0.1.0",
|
|
335
|
+
deprecated: []
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
name: "Icon",
|
|
339
|
+
description: 'Inline SVG icon from any Iconify set (lucide, mdi, heroicons, etc.). Name format: "set:icon".',
|
|
340
|
+
icon: "★",
|
|
341
|
+
category: "media",
|
|
342
|
+
aliases: ["icon", "symbol"],
|
|
343
|
+
props: [
|
|
344
|
+
{
|
|
345
|
+
name: "name",
|
|
346
|
+
type: "string",
|
|
347
|
+
required: !0,
|
|
348
|
+
description: 'Iconify identifier, e.g. "lucide:star", "mdi:check", "heroicons:heart"'
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
name: "size",
|
|
352
|
+
type: "number",
|
|
353
|
+
required: !1,
|
|
354
|
+
default: "20",
|
|
355
|
+
description: "Pixel size (width = height)"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
name: "color",
|
|
359
|
+
type: "string",
|
|
360
|
+
required: !1,
|
|
361
|
+
description: "CSS color — omit to inherit current text color"
|
|
362
|
+
}
|
|
363
|
+
],
|
|
364
|
+
hasChildren: !1,
|
|
365
|
+
selfClosing: !0,
|
|
366
|
+
defaultProps: 'name="lucide:star"',
|
|
367
|
+
defaultChildren: "",
|
|
368
|
+
example: '<Icon name="lucide:star" size={24} />',
|
|
369
|
+
addedIn: "0.1.0",
|
|
370
|
+
deprecated: []
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
name: "Tooltip",
|
|
374
|
+
description: "Hover-reveal tooltip wrapping its child. Backed by Ark UI — keyboard accessible, portals on demand.",
|
|
375
|
+
icon: "💡",
|
|
376
|
+
category: "action",
|
|
377
|
+
aliases: ["tooltip", "hint"],
|
|
378
|
+
props: [
|
|
379
|
+
{
|
|
380
|
+
name: "label",
|
|
381
|
+
type: "string",
|
|
382
|
+
required: !0,
|
|
383
|
+
description: "Tooltip text shown on hover or focus"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
name: "placement",
|
|
387
|
+
type: "string",
|
|
388
|
+
required: !1,
|
|
389
|
+
default: '"top"',
|
|
390
|
+
description: "Position relative to the trigger",
|
|
391
|
+
enum: ["top", "bottom", "left", "right"]
|
|
392
|
+
}
|
|
393
|
+
],
|
|
394
|
+
hasChildren: !0,
|
|
395
|
+
selfClosing: !1,
|
|
396
|
+
defaultProps: 'label="Click to save"',
|
|
397
|
+
defaultChildren: '<Button label="Save" />',
|
|
398
|
+
example: `<Tooltip label="Saves instantly">
|
|
399
|
+
<Button label="Save" />
|
|
400
|
+
</Tooltip>`,
|
|
401
|
+
addedIn: "0.1.0",
|
|
402
|
+
deprecated: []
|
|
403
|
+
}
|
|
404
|
+
], i = new Map(t.map((e) => [e.name, e]));
|
|
405
|
+
function a(e) {
|
|
406
|
+
return i.get(e);
|
|
407
|
+
}
|
|
408
|
+
function n() {
|
|
409
|
+
return t.map((e) => e.name);
|
|
410
|
+
}
|
|
411
|
+
export {
|
|
412
|
+
t as componentMetadata,
|
|
413
|
+
a as getComponentMetadata,
|
|
414
|
+
n as getComponentNames
|
|
415
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { isPropRenameEntry as c, isEnumValueRenameEntry as a, isPropRemovedEntry as u, isPropBecameRequiredEntry as d, isDefaultChangeAcceptedEntry as l, isComponentStructureChangeEntry as $ } from "./types/index.js";
|
|
2
|
+
const i = /* @__PURE__ */ new Set();
|
|
3
|
+
function m() {
|
|
4
|
+
return typeof process < "u" && typeof process.env < "u" && process.env.NODE_ENV === "production";
|
|
5
|
+
}
|
|
6
|
+
function t(r, n) {
|
|
7
|
+
m() || i.has(r) || (i.add(r), console.warn(`[mdx-schema] ${n}`));
|
|
8
|
+
}
|
|
9
|
+
const f = /^on[A-Za-z]/i;
|
|
10
|
+
function y(r, n) {
|
|
11
|
+
return f.test(r) && typeof n == "string";
|
|
12
|
+
}
|
|
13
|
+
function P(r, n) {
|
|
14
|
+
const o = { ...r };
|
|
15
|
+
for (const e of Object.keys(o))
|
|
16
|
+
y(e, o[e]) && (delete o[e], t(`${n.name}.eventHandlerProp.${e}`, `${n.name}: dropped string-valued event-handler-shaped prop "${e}" — MDX content cannot bind DOM event handlers (potential XSS vector).`));
|
|
17
|
+
for (const e of n.deprecated) {
|
|
18
|
+
if (c(e)) {
|
|
19
|
+
const p = Object.prototype.hasOwnProperty.call(o, e.prop), s = Object.prototype.hasOwnProperty.call(o, e.aliasFor);
|
|
20
|
+
p && (s || (o[e.aliasFor] = o[e.prop]), delete o[e.prop], t(`${n.name}.propRename.${e.prop}`, `${n.name}: prop "${e.prop}" was renamed to "${e.aliasFor}" in ${e.since} (removed in ${e.removeIn}). ${e.message}`));
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
if (a(e)) {
|
|
24
|
+
const p = o[e.prop];
|
|
25
|
+
if (typeof p == "string" && Object.prototype.hasOwnProperty.call(e.valueAliases, p)) {
|
|
26
|
+
const s = e.valueAliases[p];
|
|
27
|
+
o[e.prop] = s, t(`${n.name}.enumValueRename.${e.prop}`, `${n.name}.${e.prop}: value "${p}" was renamed to "${s}" in ${e.since} (removed in ${e.removeIn}). ${e.message}`);
|
|
28
|
+
}
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if (u(e)) {
|
|
32
|
+
Object.prototype.hasOwnProperty.call(o, e.prop) && t(`${n.name}.propRemoved.${e.prop}`, `${n.name}: prop "${e.prop}" was removed in ${e.removeIn} but is still present on content (run codemod ${e.codemod}). ${e.message}`);
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if (d(e)) {
|
|
36
|
+
Object.prototype.hasOwnProperty.call(o, e.prop) || (o[e.prop] = e.defaultValue, t(`${n.name}.propBecameRequired.${e.prop}`, `${n.name}: prop "${e.prop}" became required in ${e.since} but is missing from stored content (run codemod ${e.codemod}; injected default for render). ${e.message}`));
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
l(e) || $(e);
|
|
40
|
+
}
|
|
41
|
+
return o;
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
i as loggedKeys,
|
|
45
|
+
P as prepareProps
|
|
46
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
base: "inline-flex items-center justify-center font-medium border transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
3
|
+
size: {
|
|
4
|
+
sm: "px-2.5 py-1 text-sm rounded",
|
|
5
|
+
md: "px-4 py-2 text-sm rounded-md",
|
|
6
|
+
lg: "px-5 py-2.5 text-base rounded-md"
|
|
7
|
+
},
|
|
8
|
+
variantColor: {
|
|
9
|
+
solid: {
|
|
10
|
+
primary: "bg-blue-600 text-white hover:bg-blue-700 border-transparent",
|
|
11
|
+
neutral: "bg-gray-800 text-white hover:bg-gray-900 border-transparent",
|
|
12
|
+
success: "bg-emerald-600 text-white hover:bg-emerald-700 border-transparent",
|
|
13
|
+
warning: "bg-amber-500 text-white hover:bg-amber-600 border-transparent",
|
|
14
|
+
error: "bg-red-600 text-white hover:bg-red-700 border-transparent"
|
|
15
|
+
},
|
|
16
|
+
outline: {
|
|
17
|
+
primary: "border-blue-600 text-blue-700 hover:bg-blue-50",
|
|
18
|
+
neutral: "border-gray-400 text-gray-800 hover:bg-gray-50",
|
|
19
|
+
success: "border-emerald-600 text-emerald-700 hover:bg-emerald-50",
|
|
20
|
+
warning: "border-amber-500 text-amber-700 hover:bg-amber-50",
|
|
21
|
+
error: "border-red-600 text-red-700 hover:bg-red-50"
|
|
22
|
+
},
|
|
23
|
+
soft: {
|
|
24
|
+
primary: "bg-blue-50 text-blue-700 hover:bg-blue-100 border-transparent",
|
|
25
|
+
neutral: "bg-gray-100 text-gray-800 hover:bg-gray-200 border-transparent",
|
|
26
|
+
success: "bg-emerald-50 text-emerald-700 hover:bg-emerald-100 border-transparent",
|
|
27
|
+
warning: "bg-amber-50 text-amber-700 hover:bg-amber-100 border-transparent",
|
|
28
|
+
error: "bg-red-50 text-red-700 hover:bg-red-100 border-transparent"
|
|
29
|
+
},
|
|
30
|
+
ghost: {
|
|
31
|
+
primary: "text-blue-700 hover:bg-blue-50 border-transparent",
|
|
32
|
+
neutral: "text-gray-800 hover:bg-gray-100 border-transparent",
|
|
33
|
+
success: "text-emerald-700 hover:bg-emerald-50 border-transparent",
|
|
34
|
+
warning: "text-amber-700 hover:bg-amber-50 border-transparent",
|
|
35
|
+
error: "text-red-700 hover:bg-red-50 border-transparent"
|
|
36
|
+
},
|
|
37
|
+
link: {
|
|
38
|
+
primary: "text-blue-700 hover:underline border-transparent bg-transparent",
|
|
39
|
+
neutral: "text-gray-800 hover:underline border-transparent bg-transparent",
|
|
40
|
+
success: "text-emerald-700 hover:underline border-transparent bg-transparent",
|
|
41
|
+
warning: "text-amber-700 hover:underline border-transparent bg-transparent",
|
|
42
|
+
error: "text-red-700 hover:underline border-transparent bg-transparent"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}, a = {
|
|
46
|
+
base: "inline-flex items-center px-2 py-0.5 text-xs font-medium border rounded-full",
|
|
47
|
+
variantColor: {
|
|
48
|
+
solid: {
|
|
49
|
+
primary: "bg-blue-600 text-white border-transparent",
|
|
50
|
+
neutral: "bg-gray-700 text-white border-transparent",
|
|
51
|
+
success: "bg-emerald-600 text-white border-transparent",
|
|
52
|
+
warning: "bg-amber-500 text-white border-transparent",
|
|
53
|
+
error: "bg-red-600 text-white border-transparent"
|
|
54
|
+
},
|
|
55
|
+
soft: {
|
|
56
|
+
primary: "bg-blue-100 text-blue-800 border-transparent",
|
|
57
|
+
neutral: "bg-gray-100 text-gray-700 border-transparent",
|
|
58
|
+
success: "bg-emerald-100 text-emerald-800 border-transparent",
|
|
59
|
+
warning: "bg-amber-100 text-amber-800 border-transparent",
|
|
60
|
+
error: "bg-red-100 text-red-800 border-transparent"
|
|
61
|
+
},
|
|
62
|
+
outline: {
|
|
63
|
+
primary: "border-blue-500 text-blue-700",
|
|
64
|
+
neutral: "border-gray-400 text-gray-700",
|
|
65
|
+
success: "border-emerald-500 text-emerald-700",
|
|
66
|
+
warning: "border-amber-500 text-amber-700",
|
|
67
|
+
error: "border-red-500 text-red-700"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}, b = {
|
|
71
|
+
base: "mdx-alert flex gap-3 rounded-md border px-4 py-3 text-sm",
|
|
72
|
+
severity: {
|
|
73
|
+
info: { wrap: "bg-blue-50 border-blue-200 text-blue-900", icon: "lucide:info", iconClass: "text-blue-600" },
|
|
74
|
+
success: { wrap: "bg-emerald-50 border-emerald-200 text-emerald-900", icon: "lucide:check-circle-2", iconClass: "text-emerald-600" },
|
|
75
|
+
warning: { wrap: "bg-amber-50 border-amber-200 text-amber-900", icon: "lucide:alert-triangle", iconClass: "text-amber-600" },
|
|
76
|
+
error: { wrap: "bg-red-50 border-red-200 text-red-900", icon: "lucide:alert-octagon", iconClass: "text-red-600" }
|
|
77
|
+
}
|
|
78
|
+
}, n = {
|
|
79
|
+
default: {
|
|
80
|
+
base: "callout my-6 p-4 rounded-lg border-l-4",
|
|
81
|
+
type: {
|
|
82
|
+
info: { bg: "bg-blue-50", border: "border-blue-500", text: "text-blue-900", iconColor: "text-blue-500" },
|
|
83
|
+
warning: { bg: "bg-yellow-50", border: "border-yellow-500", text: "text-yellow-900", iconColor: "text-yellow-500" },
|
|
84
|
+
tip: { bg: "bg-green-50", border: "border-green-500", text: "text-green-900", iconColor: "text-green-500" },
|
|
85
|
+
danger: { bg: "bg-red-50", border: "border-red-500", text: "text-red-900", iconColor: "text-red-500" }
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
minimal: {
|
|
89
|
+
base: "callout my-6 p-4 rounded border",
|
|
90
|
+
type: {
|
|
91
|
+
info: { bg: "bg-blue-50", border: "border-blue-200", text: "text-blue-800" },
|
|
92
|
+
warning: { bg: "bg-yellow-50", border: "border-yellow-200", text: "text-yellow-800" },
|
|
93
|
+
tip: { bg: "bg-green-50", border: "border-green-200", text: "text-green-800" },
|
|
94
|
+
danger: { bg: "bg-red-50", border: "border-red-200", text: "text-red-800" }
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
/** SVG path data for the `default` variant icon, keyed by callout type. */
|
|
98
|
+
iconPaths: {
|
|
99
|
+
info: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
100
|
+
warning: "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",
|
|
101
|
+
tip: "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",
|
|
102
|
+
danger: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
function o(e) {
|
|
106
|
+
const r = e.aspectRatio || "1";
|
|
107
|
+
return r === "auto" ? { tileStyle: {}, mediaStyle: {}, mediaSizeClass: "w-full h-auto" } : {
|
|
108
|
+
tileStyle: { aspectRatio: r },
|
|
109
|
+
mediaStyle: { objectFit: e.fit || "cover", objectPosition: e.position || "center" },
|
|
110
|
+
mediaSizeClass: "w-full h-full"
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export {
|
|
114
|
+
b as alertStyles,
|
|
115
|
+
a as badgeStyles,
|
|
116
|
+
t as buttonStyles,
|
|
117
|
+
n as calloutStyles,
|
|
118
|
+
o as galleryTileLayout
|
|
119
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
function n(e) {
|
|
2
|
+
return e.kind === "propRename";
|
|
3
|
+
}
|
|
4
|
+
function r(e) {
|
|
5
|
+
return e.kind === "enumValueRename";
|
|
6
|
+
}
|
|
7
|
+
function t(e) {
|
|
8
|
+
return e.kind === "propRemoved";
|
|
9
|
+
}
|
|
10
|
+
function u(e) {
|
|
11
|
+
return e.kind === "propBecameRequired";
|
|
12
|
+
}
|
|
13
|
+
function i(e) {
|
|
14
|
+
return e.kind === "defaultChangeAccepted";
|
|
15
|
+
}
|
|
16
|
+
function o(e) {
|
|
17
|
+
return e.kind === "componentStructureChange";
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
o as isComponentStructureChangeEntry,
|
|
21
|
+
i as isDefaultChangeAcceptedEntry,
|
|
22
|
+
r as isEnumValueRenameEntry,
|
|
23
|
+
u as isPropBecameRequiredEntry,
|
|
24
|
+
t as isPropRemovedEntry,
|
|
25
|
+
n as isPropRenameEntry
|
|
26
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import i from "../../../node_modules/dompurify/dist/purify.es.js";
|
|
2
|
+
let e;
|
|
3
|
+
function o() {
|
|
4
|
+
if (e)
|
|
5
|
+
return e;
|
|
6
|
+
if (typeof window < "u" && typeof window.document < "u")
|
|
7
|
+
e = i;
|
|
8
|
+
else {
|
|
9
|
+
const { JSDOM: t } = require("jsdom");
|
|
10
|
+
e = i(new t("").window), f(e);
|
|
11
|
+
}
|
|
12
|
+
return e;
|
|
13
|
+
}
|
|
14
|
+
function f(t) {
|
|
15
|
+
t.addHook("afterSanitizeAttributes", (r) => {
|
|
16
|
+
r.tagName === "A" && r.getAttribute("target") === "_blank" && r.setAttribute("rel", "noopener noreferrer");
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
const n = {
|
|
20
|
+
USE_PROFILES: { html: !0 },
|
|
21
|
+
ADD_ATTR: ["target", "rel"],
|
|
22
|
+
FORBID_TAGS: ["style", "form", "input", "iframe"],
|
|
23
|
+
FORBID_ATTR: ["style", "formaction"],
|
|
24
|
+
SANITIZE_NAMED_PROPS: !0,
|
|
25
|
+
ALLOW_DATA_ATTR: !1
|
|
26
|
+
};
|
|
27
|
+
function a(t, r = n) {
|
|
28
|
+
return o().sanitize(t, r);
|
|
29
|
+
}
|
|
30
|
+
({
|
|
31
|
+
// Derive from STRICT_CONFIG so its security posture — and any FUTURE hardening (a new
|
|
32
|
+
// FORBID_TAGS/FORBID_ATTR entry) — propagates to this higher-risk host boundary automatically.
|
|
33
|
+
// ADD_ATTR is overridden outright (it restates STRICT_CONFIG's target/rel + adds the two
|
|
34
|
+
// structural attrs the overlay anchors on) — the one place the two configs intentionally differ.
|
|
35
|
+
...n
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
n as STRICT_CONFIG,
|
|
39
|
+
o as getPurifier,
|
|
40
|
+
a as sanitizeHtml
|
|
41
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React MDX renderer (SDK version) — Fix 3.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors the Vue `KbMdxContent.vue` path: parses content (frontmatter strip
|
|
5
|
+
* + `HAS_MDX_RE` fast-path + `MDX_COMPONENT_PATTERN` walk), runs prepareProps
|
|
6
|
+
* on each item.props using getComponentMetadata, then renders via a consumer-
|
|
7
|
+
* supplied component registry passed via prop (or via context).
|
|
8
|
+
*
|
|
9
|
+
* Framework-neutral by design: the SDK does NOT depend on
|
|
10
|
+
* `@blogmcp/mdx-render-react`. Consumers that want the built-in render
|
|
11
|
+
* components can import from that package and pass the resulting map as
|
|
12
|
+
* `components`; consumers building a custom design system pass their own.
|
|
13
|
+
*
|
|
14
|
+
* Marked instance: configured with a pluggable image renderer (default from
|
|
15
|
+
* the SDK's `defaultImageHtml`) so consumers can swap in IPX / Cloudinary /
|
|
16
|
+
* etc. Mirrors the Vue path one-for-one.
|
|
17
|
+
*/
|
|
18
|
+
import { type ComponentType, type ReactNode } from 'react';
|
|
19
|
+
import type { ImageHtmlRenderer } from '../core/client-types';
|
|
20
|
+
/** Per-component map a consumer passes into `<KbMdxContent components={…} />`. */
|
|
21
|
+
export type KbMdxComponentRegistry = Record<string, ComponentType<any>>;
|
|
22
|
+
export interface KbMdxContentProps {
|
|
23
|
+
/** Raw MDX/markdown source (frontmatter allowed; it is stripped). */
|
|
24
|
+
content: string;
|
|
25
|
+
/**
|
|
26
|
+
* Consumer-supplied registry mapping schema component names → React
|
|
27
|
+
* components. When a component is missing, the renderer falls back to
|
|
28
|
+
* the yellow "Unknown component" box (same UX as the Vue path).
|
|
29
|
+
*/
|
|
30
|
+
components?: KbMdxComponentRegistry;
|
|
31
|
+
/** Optional custom image HTML renderer; defaults to the SDK's plain <img>. */
|
|
32
|
+
imageRenderer?: ImageHtmlRenderer;
|
|
33
|
+
}
|
|
34
|
+
export declare function KbMdxContent({ content, components, imageRenderer, }: KbMdxContentProps): ReactNode;
|
|
35
|
+
export default KbMdxContent;
|