@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,26 @@
|
|
|
1
|
+
var c = (e, a = []) => ({
|
|
2
|
+
parts: (...t) => {
|
|
3
|
+
if (d(a))
|
|
4
|
+
return c(e, t);
|
|
5
|
+
throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?");
|
|
6
|
+
},
|
|
7
|
+
extendWith: (...t) => c(e, [...a, ...t]),
|
|
8
|
+
omit: (...t) => c(e, a.filter((o) => !t.includes(o))),
|
|
9
|
+
rename: (t) => c(t, a),
|
|
10
|
+
keys: () => a,
|
|
11
|
+
build: () => [...new Set(a)].reduce(
|
|
12
|
+
(t, o) => Object.assign(t, {
|
|
13
|
+
[o]: {
|
|
14
|
+
selector: [
|
|
15
|
+
`&[data-scope="${r(e)}"][data-part="${r(o)}"]`,
|
|
16
|
+
`& [data-scope="${r(e)}"][data-part="${r(o)}"]`
|
|
17
|
+
].join(", "),
|
|
18
|
+
attrs: { "data-scope": r(e), "data-part": r(o) }
|
|
19
|
+
}
|
|
20
|
+
}),
|
|
21
|
+
{}
|
|
22
|
+
)
|
|
23
|
+
}), r = (e) => e.replace(/([A-Z])([A-Z])/g, "$1-$2").replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(), d = (e) => e.length === 0;
|
|
24
|
+
export {
|
|
25
|
+
c as createAnatomy
|
|
26
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ensureStateIndex as u } from "./state.js";
|
|
2
|
+
function o() {
|
|
3
|
+
return {
|
|
4
|
+
and: (...r) => function(n) {
|
|
5
|
+
return r.every((e) => n.guard(e));
|
|
6
|
+
},
|
|
7
|
+
or: (...r) => function(n) {
|
|
8
|
+
return r.some((e) => n.guard(e));
|
|
9
|
+
},
|
|
10
|
+
not: (r) => function(n) {
|
|
11
|
+
return !n.guard(r);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function d(r) {
|
|
16
|
+
return u(r), r;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
o as createGuards,
|
|
20
|
+
d as createMachine
|
|
21
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { callAll as l } from "../../utils/dist/functions.js";
|
|
2
|
+
import { isString as i } from "../../utils/dist/guard.js";
|
|
3
|
+
var f = (...r) => r.map((e) => e?.trim?.()).filter(Boolean).join(" "), c = /((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g, n = (r) => {
|
|
4
|
+
const e = {};
|
|
5
|
+
let o;
|
|
6
|
+
for (; o = c.exec(r); )
|
|
7
|
+
e[o[1]] = o[2];
|
|
8
|
+
return e;
|
|
9
|
+
}, m = (r, e) => {
|
|
10
|
+
if (i(r)) {
|
|
11
|
+
if (i(e)) return `${r};${e}`;
|
|
12
|
+
r = n(r);
|
|
13
|
+
} else i(e) && (e = n(e));
|
|
14
|
+
return Object.assign({}, r ?? {}, e ?? {});
|
|
15
|
+
};
|
|
16
|
+
function p(...r) {
|
|
17
|
+
let e = {};
|
|
18
|
+
for (let o of r) {
|
|
19
|
+
if (!o) continue;
|
|
20
|
+
for (let t in e) {
|
|
21
|
+
if (t.startsWith("on") && typeof e[t] == "function" && typeof o[t] == "function") {
|
|
22
|
+
e[t] = l(o[t], e[t]);
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
if (t === "className" || t === "class") {
|
|
26
|
+
e[t] = f(e[t], o[t]);
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
if (t === "style") {
|
|
30
|
+
e[t] = m(e[t], o[t]);
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
e[t] = o[t] !== void 0 ? o[t] : e[t];
|
|
34
|
+
}
|
|
35
|
+
for (let t in o)
|
|
36
|
+
e[t] === void 0 && (e[t] = o[t]);
|
|
37
|
+
const s = Object.getOwnPropertySymbols(o);
|
|
38
|
+
for (let t of s)
|
|
39
|
+
e[t] = o[t];
|
|
40
|
+
}
|
|
41
|
+
return e;
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
p as mergeProps
|
|
45
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isActiveElement as c, getActiveElement as g, getDocument as i } from "../../dom-query/dist/node.js";
|
|
2
|
+
function r(t) {
|
|
3
|
+
const e = () => t.getRootNode?.() ?? document, n = () => i(e());
|
|
4
|
+
return {
|
|
5
|
+
...t,
|
|
6
|
+
getRootNode: e,
|
|
7
|
+
getDoc: n,
|
|
8
|
+
getWin: () => n().defaultView ?? window,
|
|
9
|
+
getActiveElement: () => g(e()),
|
|
10
|
+
isActiveElement: c,
|
|
11
|
+
getById: (o) => e().getElementById(o)
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
r as createScope
|
|
16
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { invariant as S, ensure as P } from "../../utils/dist/warning.js";
|
|
2
|
+
var u = ".", j = "#", I = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap();
|
|
3
|
+
function g(t) {
|
|
4
|
+
return t.join(u);
|
|
5
|
+
}
|
|
6
|
+
function E(t) {
|
|
7
|
+
return t.includes(u);
|
|
8
|
+
}
|
|
9
|
+
function w(t) {
|
|
10
|
+
return t.startsWith(j);
|
|
11
|
+
}
|
|
12
|
+
function T(t) {
|
|
13
|
+
return t.startsWith(u);
|
|
14
|
+
}
|
|
15
|
+
function b(t) {
|
|
16
|
+
return w(t) ? t.slice(j.length) : t;
|
|
17
|
+
}
|
|
18
|
+
function p(t, e) {
|
|
19
|
+
return t ? `${t}${u}${e}` : e;
|
|
20
|
+
}
|
|
21
|
+
function v(t) {
|
|
22
|
+
const e = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = (i, n) => {
|
|
23
|
+
e.set(i, n);
|
|
24
|
+
const r = n.id;
|
|
25
|
+
r && (o.has(r) && S(`[zag-js] Duplicate state id: "${r}"`), o.set(r, i));
|
|
26
|
+
const a = n.states;
|
|
27
|
+
if (a) {
|
|
28
|
+
P(n.initial, () => `[zag-js] Compound state "${i}" has child states but no "initial" property`), n.initial in a || S(
|
|
29
|
+
`[zag-js] Compound state "${i}" has initial "${String(n.initial)}" which is not a child state`
|
|
30
|
+
);
|
|
31
|
+
for (const [c, l] of Object.entries(a)) {
|
|
32
|
+
if (!l) continue;
|
|
33
|
+
const C = p(i, c);
|
|
34
|
+
s(C, l);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
for (const [i, n] of Object.entries(t.states))
|
|
39
|
+
n && s(i, n);
|
|
40
|
+
return { index: e, idIndex: o };
|
|
41
|
+
}
|
|
42
|
+
function h(t) {
|
|
43
|
+
const e = I.get(t);
|
|
44
|
+
if (e) return e;
|
|
45
|
+
const { index: o, idIndex: s } = v(t);
|
|
46
|
+
return I.set(t, o), M.set(t, s), o;
|
|
47
|
+
}
|
|
48
|
+
function A(t, e) {
|
|
49
|
+
return h(t), M.get(t)?.get(e);
|
|
50
|
+
}
|
|
51
|
+
function x(t) {
|
|
52
|
+
return t ? String(t).split(u).filter(Boolean) : [];
|
|
53
|
+
}
|
|
54
|
+
function d(t, e) {
|
|
55
|
+
if (!e) return [];
|
|
56
|
+
const o = h(t), s = x(e), i = [], n = [];
|
|
57
|
+
for (const r of s) {
|
|
58
|
+
n.push(r);
|
|
59
|
+
const a = g(n), c = o.get(a);
|
|
60
|
+
if (!c) break;
|
|
61
|
+
i.push({ path: a, state: c });
|
|
62
|
+
}
|
|
63
|
+
return i;
|
|
64
|
+
}
|
|
65
|
+
function f(t, e) {
|
|
66
|
+
const o = h(t), s = x(e);
|
|
67
|
+
if (!s.length) return e;
|
|
68
|
+
const i = [];
|
|
69
|
+
for (const a of s) {
|
|
70
|
+
i.push(a);
|
|
71
|
+
const c = g(i);
|
|
72
|
+
if (!o.has(c)) return e;
|
|
73
|
+
}
|
|
74
|
+
let n = g(i), r = o.get(n);
|
|
75
|
+
for (; r?.initial; ) {
|
|
76
|
+
const a = `${n}${u}${r.initial}`, c = o.get(a);
|
|
77
|
+
if (!c) break;
|
|
78
|
+
n = a, r = c;
|
|
79
|
+
}
|
|
80
|
+
return n;
|
|
81
|
+
}
|
|
82
|
+
function $(t, e) {
|
|
83
|
+
return h(t).has(e);
|
|
84
|
+
}
|
|
85
|
+
function W(t, e, o) {
|
|
86
|
+
const s = String(e);
|
|
87
|
+
if (w(s)) {
|
|
88
|
+
const i = b(s), n = A(t, i);
|
|
89
|
+
return P(n, () => `[zag-js] Unknown state id: "${i}"`), f(t, n);
|
|
90
|
+
}
|
|
91
|
+
if (T(s) && o) {
|
|
92
|
+
const i = p(o, s.slice(1));
|
|
93
|
+
return f(t, i);
|
|
94
|
+
}
|
|
95
|
+
if (!E(s) && o) {
|
|
96
|
+
const i = x(o);
|
|
97
|
+
for (let n = i.length - 1; n >= 1; n--) {
|
|
98
|
+
const r = i.slice(0, n).join(u), a = p(r, s);
|
|
99
|
+
if ($(t, a)) return f(t, a);
|
|
100
|
+
}
|
|
101
|
+
if ($(t, s)) return f(t, s);
|
|
102
|
+
}
|
|
103
|
+
return f(t, s);
|
|
104
|
+
}
|
|
105
|
+
function z(t, e, o) {
|
|
106
|
+
const s = d(t, e);
|
|
107
|
+
for (let n = s.length - 1; n >= 0; n--) {
|
|
108
|
+
const a = s[n]?.state.on?.[o];
|
|
109
|
+
if (a) return { transitions: a, source: s[n]?.path };
|
|
110
|
+
}
|
|
111
|
+
return { transitions: t.on?.[o], source: void 0 };
|
|
112
|
+
}
|
|
113
|
+
function y(t, e, o, s) {
|
|
114
|
+
const i = e ? d(t, e) : [], n = d(t, o);
|
|
115
|
+
let r = 0;
|
|
116
|
+
for (; r < i.length && r < n.length && i[r]?.path === n[r]?.path; )
|
|
117
|
+
r += 1;
|
|
118
|
+
let a = i.slice(r).reverse(), c = n.slice(r);
|
|
119
|
+
const l = i.at(-1)?.path === n.at(-1)?.path;
|
|
120
|
+
return s && l && (a = i.slice().reverse(), c = n), { exiting: a, entering: c };
|
|
121
|
+
}
|
|
122
|
+
function B(t, e) {
|
|
123
|
+
return t ? t === e || t.startsWith(`${e}${u}`) : !1;
|
|
124
|
+
}
|
|
125
|
+
function L(t, e, o) {
|
|
126
|
+
return d(t, e).some((s) => s.state.tags?.includes(o));
|
|
127
|
+
}
|
|
128
|
+
export {
|
|
129
|
+
h as ensureStateIndex,
|
|
130
|
+
z as findTransition,
|
|
131
|
+
y as getExitEnterStates,
|
|
132
|
+
d as getStateChain,
|
|
133
|
+
L as hasTag,
|
|
134
|
+
B as matchesState,
|
|
135
|
+
W as resolveStateValue
|
|
136
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { isAndroid as r } from "./platform.js";
|
|
2
|
+
function u(t) {
|
|
3
|
+
return t.composedPath?.() ?? t.nativeEvent?.composedPath?.();
|
|
4
|
+
}
|
|
5
|
+
function p(t) {
|
|
6
|
+
return u(t)?.[0] ?? t.target;
|
|
7
|
+
}
|
|
8
|
+
function d(t) {
|
|
9
|
+
return s(t).isComposing || t.keyCode === 229;
|
|
10
|
+
}
|
|
11
|
+
function a(t) {
|
|
12
|
+
return t.pointerType === "" && t.isTrusted ? !0 : r() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType;
|
|
13
|
+
}
|
|
14
|
+
var f = (t) => t.button === 0;
|
|
15
|
+
function s(t) {
|
|
16
|
+
return t.nativeEvent ?? t;
|
|
17
|
+
}
|
|
18
|
+
var m = (t, n, o, e) => {
|
|
19
|
+
const i = typeof t == "function" ? t() : t;
|
|
20
|
+
return i?.addEventListener(n, o, e), () => {
|
|
21
|
+
i?.removeEventListener(n, o, e);
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
m as addDomEvent,
|
|
26
|
+
p as getEventTarget,
|
|
27
|
+
s as getNativeEvent,
|
|
28
|
+
d as isComposingEvent,
|
|
29
|
+
f as isLeftClick,
|
|
30
|
+
a as isVirtualClick
|
|
31
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { isObject as n } from "./shared.js";
|
|
2
|
+
var a = 1, d = 9, m = 11, i = (t) => n(t) && t.nodeType === a && typeof t.nodeName == "string", u = (t) => n(t) && t.nodeType === d, s = (t) => n(t) && t === t.window, c = (t) => i(t) ? t.localName || "" : "#document";
|
|
3
|
+
function D(t) {
|
|
4
|
+
return ["html", "body", "#document"].includes(c(t));
|
|
5
|
+
}
|
|
6
|
+
var f = (t) => n(t) && t.nodeType !== void 0, r = (t) => f(t) && t.nodeType === m && "host" in t;
|
|
7
|
+
function g(t) {
|
|
8
|
+
if (!t) return !1;
|
|
9
|
+
const e = t.getRootNode();
|
|
10
|
+
return v(e) === t;
|
|
11
|
+
}
|
|
12
|
+
function w(t) {
|
|
13
|
+
return u(t) ? t : s(t) ? t.document : t?.ownerDocument ?? document;
|
|
14
|
+
}
|
|
15
|
+
function E(t) {
|
|
16
|
+
return w(t).documentElement;
|
|
17
|
+
}
|
|
18
|
+
function N(t) {
|
|
19
|
+
return r(t) ? N(t.host) : u(t) ? t.defaultView ?? window : i(t) ? t.ownerDocument?.defaultView ?? window : window;
|
|
20
|
+
}
|
|
21
|
+
function v(t) {
|
|
22
|
+
let e = t.activeElement;
|
|
23
|
+
for (; e?.shadowRoot; ) {
|
|
24
|
+
const o = e.shadowRoot.activeElement;
|
|
25
|
+
if (!o || o === e) break;
|
|
26
|
+
e = o;
|
|
27
|
+
}
|
|
28
|
+
return e;
|
|
29
|
+
}
|
|
30
|
+
function T(t) {
|
|
31
|
+
if (c(t) === "html") return t;
|
|
32
|
+
const e = t.assignedSlot || t.parentNode || r(t) && t.host || E(t);
|
|
33
|
+
return r(e) ? e.host : e;
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
v as getActiveElement,
|
|
37
|
+
w as getDocument,
|
|
38
|
+
E as getDocumentElement,
|
|
39
|
+
c as getNodeName,
|
|
40
|
+
T as getParentNode,
|
|
41
|
+
N as getWindow,
|
|
42
|
+
g as isActiveElement,
|
|
43
|
+
u as isDocument,
|
|
44
|
+
i as isHTMLElement,
|
|
45
|
+
f as isNode,
|
|
46
|
+
D as isRootElement,
|
|
47
|
+
r as isShadowRoot,
|
|
48
|
+
s as isWindow
|
|
49
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { getWindow as c, getParentNode as u, isRootElement as a, getDocument as f, isHTMLElement as w } from "./node.js";
|
|
2
|
+
function s(t) {
|
|
3
|
+
const e = u(t);
|
|
4
|
+
return a(e) ? f(e).body : w(e) && i(e) ? e : s(e);
|
|
5
|
+
}
|
|
6
|
+
function v(t, e = []) {
|
|
7
|
+
const o = s(t), r = o === t.ownerDocument.body, n = c(o);
|
|
8
|
+
return r ? e.concat(n, n.visualViewport || [], i(o) ? o : []) : e.concat(o, v(o, []));
|
|
9
|
+
}
|
|
10
|
+
var d = /auto|scroll|overlay|hidden|clip/, m = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
11
|
+
function i(t) {
|
|
12
|
+
const e = c(t), { overflow: o, overflowX: r, overflowY: n, display: l } = e.getComputedStyle(t);
|
|
13
|
+
return d.test(o + n + r) && !m.has(l);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
s as getNearestOverflowAncestor,
|
|
17
|
+
v as getOverflowAncestors,
|
|
18
|
+
i as isOverflowElement
|
|
19
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var a = () => typeof document < "u";
|
|
2
|
+
function e() {
|
|
3
|
+
return navigator.userAgentData?.platform ?? navigator.platform;
|
|
4
|
+
}
|
|
5
|
+
function o() {
|
|
6
|
+
const t = navigator.userAgentData;
|
|
7
|
+
return t && Array.isArray(t.brands) ? t.brands.map(({ brand: r, version: n }) => `${r}/${n}`).join(" ") : navigator.userAgent;
|
|
8
|
+
}
|
|
9
|
+
var i = (t) => a() && t.test(e()), s = (t) => a() && t.test(o()), g = () => i(/^Mac/i), u = () => s(/Android/i);
|
|
10
|
+
export {
|
|
11
|
+
e as getPlatform,
|
|
12
|
+
o as getUserAgent,
|
|
13
|
+
u as isAndroid,
|
|
14
|
+
a as isDom,
|
|
15
|
+
g as isMac
|
|
16
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { __publicField as e } from "./chunk-QZ7TP4HQ.js";
|
|
2
|
+
var s = class l {
|
|
3
|
+
constructor() {
|
|
4
|
+
e(this, "id", null), e(this, "fn_cleanup"), e(this, "cleanup", () => {
|
|
5
|
+
this.cancel();
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
static create() {
|
|
9
|
+
return new l();
|
|
10
|
+
}
|
|
11
|
+
request(n) {
|
|
12
|
+
this.cancel(), this.id = globalThis.requestAnimationFrame(() => {
|
|
13
|
+
this.id = null, this.fn_cleanup = n?.();
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
cancel() {
|
|
17
|
+
this.id !== null && (globalThis.cancelAnimationFrame(this.id), this.id = null), this.fn_cleanup?.(), this.fn_cleanup = void 0;
|
|
18
|
+
}
|
|
19
|
+
isActive() {
|
|
20
|
+
return this.id !== null;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
function u(i) {
|
|
24
|
+
const n = s.create();
|
|
25
|
+
return n.request(i), n.cleanup;
|
|
26
|
+
}
|
|
27
|
+
function o(i) {
|
|
28
|
+
const n = /* @__PURE__ */ new Set();
|
|
29
|
+
function a(c) {
|
|
30
|
+
const t = globalThis.requestAnimationFrame(c);
|
|
31
|
+
n.add(() => globalThis.cancelAnimationFrame(t));
|
|
32
|
+
}
|
|
33
|
+
return a(() => a(i)), function() {
|
|
34
|
+
n.forEach((t) => t());
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
s as AnimationFrame,
|
|
39
|
+
o as nextTick,
|
|
40
|
+
u as raf
|
|
41
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { noop as u } from "./shared.js";
|
|
2
|
+
function c(t, e) {
|
|
3
|
+
if (!t) return u;
|
|
4
|
+
const r = Object.keys(e).reduce((n, s) => (n[s] = t.style.getPropertyValue(s), n), {});
|
|
5
|
+
return i(r, e) ? u : (Object.assign(t.style, e), () => {
|
|
6
|
+
Object.assign(t.style, r), t.style.length === 0 && t.removeAttribute("style");
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
function i(t, e) {
|
|
10
|
+
return Object.keys(t).every((r) => t[r] === e[r]);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
c as setStyle
|
|
14
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { isVirtualClick as k, getEventTarget as L } from "../../dom-query/dist/event.js";
|
|
2
|
+
import { isMac as T } from "../../dom-query/dist/platform.js";
|
|
3
|
+
import { getWindow as d, getDocument as f, getActiveElement as F } from "../../dom-query/dist/node.js";
|
|
4
|
+
function M(e) {
|
|
5
|
+
return !(e.metaKey || !T() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
6
|
+
}
|
|
7
|
+
var H = /* @__PURE__ */ new Set(["checkbox", "radio", "range", "color", "file", "image", "button", "submit", "reset"]);
|
|
8
|
+
function K(e, n, t) {
|
|
9
|
+
const r = t ? L(t) : null, i = f(r), s = d(r), u = F(i);
|
|
10
|
+
return e = e || u instanceof s.HTMLInputElement && !H.has(u?.type) || u instanceof s.HTMLTextAreaElement || u instanceof s.HTMLElement && u.isContentEditable, !(e && n === "keyboard" && t instanceof s.KeyboardEvent && !Reflect.has(V, t.key));
|
|
11
|
+
}
|
|
12
|
+
var a = null, E = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map(), c = !1, p = !1, C = !1, V = {
|
|
13
|
+
Tab: !0,
|
|
14
|
+
Escape: !0
|
|
15
|
+
};
|
|
16
|
+
function m(e, n) {
|
|
17
|
+
for (let t of E)
|
|
18
|
+
t(e, n);
|
|
19
|
+
}
|
|
20
|
+
function v(e) {
|
|
21
|
+
c = !0, M(e) && (a = "keyboard", m("keyboard", e));
|
|
22
|
+
}
|
|
23
|
+
function o(e) {
|
|
24
|
+
a = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (c = !0, m("pointer", e));
|
|
25
|
+
}
|
|
26
|
+
function b(e) {
|
|
27
|
+
k(e) && (c = !0, a = "virtual");
|
|
28
|
+
}
|
|
29
|
+
function g(e) {
|
|
30
|
+
const n = L(e);
|
|
31
|
+
n === d(n) || n === f(n) || C || !e.isTrusted || (!c && !p && (a = "virtual", m("virtual", e)), c = !1, p = !1);
|
|
32
|
+
}
|
|
33
|
+
function w() {
|
|
34
|
+
c = !1, p = !0;
|
|
35
|
+
}
|
|
36
|
+
function P(e) {
|
|
37
|
+
if (typeof window > "u" || l.get(d(e)))
|
|
38
|
+
return;
|
|
39
|
+
const n = d(e), t = f(e);
|
|
40
|
+
let r = n.HTMLElement.prototype.focus;
|
|
41
|
+
function i() {
|
|
42
|
+
c = !0, r.apply(this, arguments);
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
Object.defineProperty(n.HTMLElement.prototype, "focus", {
|
|
46
|
+
configurable: !0,
|
|
47
|
+
value: i
|
|
48
|
+
});
|
|
49
|
+
} catch {
|
|
50
|
+
}
|
|
51
|
+
t.addEventListener("keydown", v, !0), t.addEventListener("keyup", v, !0), t.addEventListener("click", b, !0), n.addEventListener("focus", g, !0), n.addEventListener("blur", w, !1), typeof n.PointerEvent < "u" ? (t.addEventListener("pointerdown", o, !0), t.addEventListener("pointermove", o, !0), t.addEventListener("pointerup", o, !0)) : (t.addEventListener("mousedown", o, !0), t.addEventListener("mousemove", o, !0), t.addEventListener("mouseup", o, !0)), n.addEventListener(
|
|
52
|
+
"beforeunload",
|
|
53
|
+
() => {
|
|
54
|
+
S(e);
|
|
55
|
+
},
|
|
56
|
+
{ once: !0 }
|
|
57
|
+
), l.set(n, { focus: r });
|
|
58
|
+
}
|
|
59
|
+
var S = (e, n) => {
|
|
60
|
+
const t = d(e), r = f(e), i = l.get(t);
|
|
61
|
+
if (i) {
|
|
62
|
+
try {
|
|
63
|
+
Object.defineProperty(t.HTMLElement.prototype, "focus", {
|
|
64
|
+
configurable: !0,
|
|
65
|
+
value: i.focus
|
|
66
|
+
});
|
|
67
|
+
} catch {
|
|
68
|
+
}
|
|
69
|
+
r.removeEventListener("keydown", v, !0), r.removeEventListener("keyup", v, !0), r.removeEventListener("click", b, !0), t.removeEventListener("focus", g, !0), t.removeEventListener("blur", w, !1), typeof t.PointerEvent < "u" ? (r.removeEventListener("pointerdown", o, !0), r.removeEventListener("pointermove", o, !0), r.removeEventListener("pointerup", o, !0)) : (r.removeEventListener("mousedown", o, !0), r.removeEventListener("mousemove", o, !0), r.removeEventListener("mouseup", o, !0)), l.delete(t);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
function y() {
|
|
73
|
+
return a === "keyboard" || a === "virtual";
|
|
74
|
+
}
|
|
75
|
+
function x(e = {}) {
|
|
76
|
+
const { isTextInput: n, autoFocus: t, onChange: r, root: i } = e;
|
|
77
|
+
P(i), r?.({ isFocusVisible: t || y(), modality: a });
|
|
78
|
+
const s = (u, h) => {
|
|
79
|
+
K(!!n, u, h) && r?.({ isFocusVisible: y(), modality: u });
|
|
80
|
+
};
|
|
81
|
+
return E.add(s), () => {
|
|
82
|
+
E.delete(s);
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
export {
|
|
86
|
+
C as ignoreFocusEvent,
|
|
87
|
+
y as isFocusVisible,
|
|
88
|
+
l as listenerMap,
|
|
89
|
+
x as trackFocusVisible
|
|
90
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { isHTMLElement as u } from "../../dom-query/dist/node.js";
|
|
2
|
+
function c(t = 0, n = 0, e = 0, o = 0) {
|
|
3
|
+
if (typeof DOMRect == "function")
|
|
4
|
+
return new DOMRect(t, n, e, o);
|
|
5
|
+
const r = {
|
|
6
|
+
x: t,
|
|
7
|
+
y: n,
|
|
8
|
+
width: e,
|
|
9
|
+
height: o,
|
|
10
|
+
top: n,
|
|
11
|
+
right: t + e,
|
|
12
|
+
bottom: n + o,
|
|
13
|
+
left: t
|
|
14
|
+
};
|
|
15
|
+
return { ...r, toJSON: () => r };
|
|
16
|
+
}
|
|
17
|
+
function i(t) {
|
|
18
|
+
if (!t) return c();
|
|
19
|
+
const { x: n, y: e, width: o, height: r } = t;
|
|
20
|
+
return c(n, e, o, r);
|
|
21
|
+
}
|
|
22
|
+
function g(t, n) {
|
|
23
|
+
return {
|
|
24
|
+
contextElement: u(t) ? t : t?.contextElement,
|
|
25
|
+
getBoundingClientRect: () => {
|
|
26
|
+
const e = t, o = n?.(e);
|
|
27
|
+
return o || !e ? i(o) : e.getBoundingClientRect();
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
c as createDOMRect,
|
|
33
|
+
g as getAnchorElement
|
|
34
|
+
};
|