@fecommunity/reactpress-toolkit 3.0.4 → 3.7.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/LICENSE +1 -1
- package/README.md +194 -309
- package/dist/.source-fingerprint-toolkit +1 -0
- package/dist/admin/index.d.ts +2 -0
- package/dist/admin/index.js +18 -0
- package/dist/admin/permissions.d.ts +5 -0
- package/dist/admin/permissions.js +33 -0
- package/dist/admin/registry.d.ts +62 -0
- package/dist/admin/registry.js +79 -0
- package/dist/api/HttpClient.d.ts +2 -2
- package/dist/api/HttpClient.js +1 -1
- package/dist/api/Smtp.d.ts +17 -0
- package/dist/api/Smtp.js +15 -0
- package/dist/api/instance.d.ts +1 -1
- package/dist/api/instance.js +3 -3
- package/dist/app/createReactPressApp.d.ts +8 -0
- package/dist/app/createReactPressApp.js +265 -0
- package/dist/app/createThemeApp.d.ts +8 -0
- package/dist/app/createThemeApp.js +51 -0
- package/dist/app/devChunkRecovery.d.ts +2 -0
- package/dist/app/devChunkRecovery.js +68 -0
- package/dist/app/index.d.ts +39 -0
- package/dist/app/index.js +11 -0
- package/dist/config/env.js +29 -15
- package/dist/config/global.d.ts +7 -1
- package/dist/config/global.js +9 -3
- package/dist/config/i18n.js +27 -11
- package/dist/config/index.d.ts +3 -3
- package/dist/config/index.js +6 -5
- package/dist/{locales → config/locales}/en.json +31 -3
- package/dist/{locales → config/locales}/zh.json +31 -3
- package/dist/dev/index.d.ts +3 -0
- package/dist/dev/index.js +12 -0
- package/dist/dev/portRedirect.d.ts +20 -0
- package/dist/dev/portRedirect.js +93 -0
- package/dist/dev/vitePortRedirectPlugin.d.ts +24 -0
- package/dist/dev/vitePortRedirectPlugin.js +40 -0
- package/dist/extension/branding-mods.d.ts +10 -0
- package/dist/extension/branding-mods.js +65 -0
- package/dist/extension/configuration/defaults.d.ts +3 -0
- package/dist/extension/configuration/defaults.js +32 -0
- package/dist/extension/configuration/formily.d.ts +10 -0
- package/dist/extension/configuration/formily.js +170 -0
- package/dist/extension/configuration/index.d.ts +7 -0
- package/dist/extension/configuration/index.js +28 -0
- package/dist/extension/configuration/paths.d.ts +4 -0
- package/dist/extension/configuration/paths.js +50 -0
- package/dist/extension/configuration/presets/twentytwentyfive.d.ts +7 -0
- package/dist/extension/configuration/presets/twentytwentyfive.js +94 -0
- package/dist/extension/configuration/resolve.d.ts +24 -0
- package/dist/extension/configuration/resolve.js +98 -0
- package/dist/extension/configuration/types.d.ts +68 -0
- package/dist/extension/configuration/types.js +3 -0
- package/dist/extension/configuration/validate.d.ts +8 -0
- package/dist/extension/configuration/validate.js +21 -0
- package/dist/extension/index.d.ts +9 -0
- package/dist/extension/index.js +35 -0
- package/dist/extension/manifest-normalize.d.ts +5 -0
- package/dist/extension/manifest-normalize.js +75 -0
- package/dist/extension/node.d.ts +2 -0
- package/dist/extension/node.js +6 -0
- package/dist/extension/presets/twentytwentyfive-appearance.d.ts +10 -0
- package/dist/extension/presets/twentytwentyfive-appearance.js +193 -0
- package/dist/extension/presets/twentytwentyfive-customizer.d.ts +19 -0
- package/dist/extension/presets/twentytwentyfive-customizer.js +199 -0
- package/dist/extension/preview.d.ts +46 -0
- package/dist/extension/preview.js +92 -0
- package/dist/extension/site-notices.d.ts +19 -0
- package/dist/extension/site-notices.js +88 -0
- package/dist/extension/site-settings.d.ts +37 -0
- package/dist/extension/site-settings.js +144 -0
- package/dist/extension/theme-admin-locale.d.ts +11 -0
- package/dist/extension/theme-admin-locale.io.d.ts +2 -0
- package/dist/extension/theme-admin-locale.io.js +54 -0
- package/dist/extension/theme-admin-locale.js +81 -0
- package/dist/extension/theme.d.ts +89 -0
- package/dist/extension/theme.js +93 -0
- package/dist/extension/twentytwentyfive-vars.d.ts +7 -0
- package/dist/extension/twentytwentyfive-vars.js +100 -0
- package/dist/index.d.ts +15 -7
- package/dist/index.js +44 -22
- package/dist/plugin/admin/index.d.ts +2 -0
- package/dist/plugin/admin/index.js +18 -0
- package/dist/plugin/admin/permissions.d.ts +5 -0
- package/dist/plugin/admin/permissions.js +33 -0
- package/dist/plugin/admin/plugin-admin.d.ts +37 -0
- package/dist/plugin/admin/plugin-admin.js +41 -0
- package/dist/plugin/admin/registry.d.ts +62 -0
- package/dist/plugin/admin/registry.js +79 -0
- package/dist/plugin/admin/slots.d.ts +36 -0
- package/dist/plugin/admin/slots.js +16 -0
- package/dist/plugin/client/client.d.ts +14 -0
- package/dist/plugin/client/client.js +95 -0
- package/dist/plugin/client/index.d.ts +4 -0
- package/dist/plugin/client/index.js +11 -0
- package/dist/plugin/client/runtime.d.ts +18 -0
- package/dist/plugin/client/runtime.js +30 -0
- package/dist/plugin/dev/index.d.ts +4 -0
- package/dist/plugin/dev/index.js +16 -0
- package/dist/plugin/dev/portRedirect.d.ts +26 -0
- package/dist/plugin/dev/portRedirect.js +111 -0
- package/dist/plugin/dev/vitePortRedirectPlugin.d.ts +24 -0
- package/dist/plugin/dev/vitePortRedirectPlugin.js +40 -0
- package/dist/plugin/extension/index.d.ts +4 -0
- package/dist/plugin/extension/index.js +20 -0
- package/dist/plugin/extension/plugin-admin-locale.d.ts +21 -0
- package/dist/plugin/extension/plugin-admin-locale.io.d.ts +2 -0
- package/dist/plugin/extension/plugin-admin-locale.io.js +54 -0
- package/dist/plugin/extension/plugin-admin-locale.js +60 -0
- package/dist/plugin/extension/plugin.d.ts +82 -0
- package/dist/plugin/extension/plugin.js +146 -0
- package/dist/plugin/extension/security.d.ts +7 -0
- package/dist/plugin/extension/security.js +74 -0
- package/dist/plugin/extension/validate.d.ts +8 -0
- package/dist/plugin/extension/validate.js +55 -0
- package/dist/plugin/index.d.ts +9 -0
- package/dist/plugin/index.js +48 -0
- package/dist/plugin/node.d.ts +2 -0
- package/dist/plugin/node.js +6 -0
- package/dist/plugin/react/client.d.ts +14 -0
- package/dist/plugin/react/client.js +95 -0
- package/dist/plugin/react/index.d.ts +2 -0
- package/dist/plugin/react/index.js +18 -0
- package/dist/plugin/react/plugin-admin-ui.d.ts +23 -0
- package/dist/plugin/react/plugin-admin-ui.js +38 -0
- package/dist/plugin/react/runtime.d.ts +18 -0
- package/dist/plugin/react/runtime.js +30 -0
- package/dist/plugin/server/hook-reject.d.ts +12 -0
- package/dist/plugin/server/hook-reject.js +39 -0
- package/dist/plugin/server/index.d.ts +2 -0
- package/dist/plugin/server/index.js +18 -0
- package/dist/plugin/server/types.d.ts +34 -0
- package/dist/plugin/server/types.js +3 -0
- package/dist/primitives/AntdStyleTransitionFix.d.ts +2 -0
- package/dist/primitives/AntdStyleTransitionFix.js +16 -0
- package/dist/primitives/Badge.d.ts +7 -0
- package/dist/primitives/Badge.js +9 -0
- package/dist/primitives/Button.d.ts +10 -0
- package/dist/primitives/Button.js +38 -0
- package/dist/primitives/ColorModeToggle.d.ts +8 -0
- package/dist/primitives/ColorModeToggle.js +13 -0
- package/dist/primitives/IconButton.d.ts +7 -0
- package/dist/primitives/IconButton.js +13 -0
- package/dist/primitives/ScrollToTarget.d.ts +9 -0
- package/dist/primitives/ScrollToTarget.js +48 -0
- package/dist/primitives/Separator.d.ts +7 -0
- package/dist/primitives/Separator.js +9 -0
- package/dist/primitives/Skeleton.d.ts +7 -0
- package/dist/primitives/Skeleton.js +9 -0
- package/dist/primitives/Slot.d.ts +10 -0
- package/dist/primitives/Slot.js +25 -0
- package/dist/primitives/Spinner.d.ts +6 -0
- package/dist/primitives/Spinner.js +9 -0
- package/dist/primitives/animation/ConditionTransition.d.ts +8 -0
- package/dist/primitives/animation/ConditionTransition.js +13 -0
- package/dist/primitives/animation/ListTrail.d.ts +10 -0
- package/dist/primitives/animation/ListTrail.js +14 -0
- package/dist/primitives/animation/Opacity.d.ts +3 -0
- package/dist/primitives/animation/Opacity.js +10 -0
- package/dist/primitives/animation/Spring.d.ts +9 -0
- package/dist/primitives/animation/Spring.js +29 -0
- package/dist/primitives/animation/index.d.ts +7 -0
- package/dist/primitives/animation/index.js +11 -0
- package/dist/primitives/cn.d.ts +4 -0
- package/dist/primitives/cn.js +7 -0
- package/dist/primitives/icons.d.ts +4 -0
- package/dist/primitives/icons.js +15 -0
- package/dist/primitives/index.d.ts +22 -0
- package/dist/primitives/index.js +44 -0
- package/dist/react/client.d.ts +14 -0
- package/dist/react/client.js +95 -0
- package/dist/react/index.d.ts +4 -0
- package/dist/react/index.js +11 -0
- package/dist/react/runtime.d.ts +18 -0
- package/dist/react/runtime.js +30 -0
- package/dist/theme/antdDocument.d.ts +18 -0
- package/dist/theme/antdDocument.js +59 -0
- package/dist/theme/api/api-data.d.ts +2 -0
- package/dist/theme/api/api-data.js +8 -0
- package/dist/theme/api/api.d.ts +28 -0
- package/dist/theme/api/api.js +27 -0
- package/dist/theme/api/httpClient.d.ts +24 -0
- package/dist/theme/api/httpClient.js +83 -0
- package/dist/theme/api/json.d.ts +1 -0
- package/dist/theme/api/json.js +5 -0
- package/dist/theme/api/jsonp.d.ts +1 -0
- package/dist/theme/api/jsonp.js +5 -0
- package/dist/theme/api-data.d.ts +12 -0
- package/dist/theme/api-data.js +22 -0
- package/dist/theme/api.d.ts +28 -0
- package/dist/theme/api.js +27 -0
- package/dist/theme/appearance.d.ts +4 -0
- package/dist/theme/appearance.js +16 -0
- package/dist/theme/assets.d.ts +2 -0
- package/dist/theme/assets.js +27 -0
- package/dist/theme/authSession.d.ts +16 -0
- package/dist/theme/authSession.js +92 -0
- package/dist/theme/build/antdDocument.d.ts +145 -0
- package/dist/theme/build/antdDocument.js +70 -0
- package/dist/theme/build/next-config.d.ts +15 -0
- package/dist/theme/build/next-config.js +63 -0
- package/dist/theme/build/node.d.ts +2 -0
- package/dist/theme/build/node.js +6 -0
- package/dist/theme/colorMode.d.ts +12 -0
- package/dist/theme/colorMode.js +45 -0
- package/dist/theme/commentAuthor.d.ts +17 -0
- package/dist/theme/commentAuthor.js +48 -0
- package/dist/theme/content/archiveSlim.d.ts +7 -0
- package/dist/theme/content/archiveSlim.js +38 -0
- package/dist/theme/content/articleSlim.d.ts +10 -0
- package/dist/theme/content/articleSlim.js +35 -0
- package/dist/theme/content/assets.d.ts +8 -0
- package/dist/theme/content/assets.js +74 -0
- package/dist/theme/content/carouselArticles.d.ts +10 -0
- package/dist/theme/content/carouselArticles.js +39 -0
- package/dist/theme/content/excerpt.d.ts +15 -0
- package/dist/theme/content/excerpt.js +42 -0
- package/dist/theme/content/nav.d.ts +10 -0
- package/dist/theme/content/nav.js +30 -0
- package/dist/theme/content/seo.d.ts +6 -0
- package/dist/theme/content/seo.js +12 -0
- package/dist/theme/createAntdApp.d.ts +106 -0
- package/dist/theme/createAntdApp.js +175 -0
- package/dist/theme/createApp.d.ts +10 -0
- package/dist/theme/createApp.js +141 -0
- package/dist/theme/createCatalogApp.d.ts +108 -0
- package/dist/theme/createCatalogApp.js +168 -0
- package/dist/theme/customizer.d.ts +1 -0
- package/dist/theme/customizer.js +5 -0
- package/dist/theme/excerpt.d.ts +16 -0
- package/dist/theme/excerpt.js +31 -0
- package/dist/theme/extension/branding-mods.d.ts +10 -0
- package/dist/theme/extension/branding-mods.js +65 -0
- package/dist/theme/extension/configuration/defaults.d.ts +3 -0
- package/dist/theme/extension/configuration/defaults.js +32 -0
- package/dist/theme/extension/configuration/formily.d.ts +10 -0
- package/dist/theme/extension/configuration/formily.js +170 -0
- package/dist/theme/extension/configuration/index.d.ts +7 -0
- package/dist/theme/extension/configuration/index.js +28 -0
- package/dist/theme/extension/configuration/paths.d.ts +1 -0
- package/dist/theme/extension/configuration/paths.js +7 -0
- package/dist/theme/extension/configuration/presets/twentytwentyfive.d.ts +7 -0
- package/dist/theme/extension/configuration/presets/twentytwentyfive.js +94 -0
- package/dist/theme/extension/configuration/resolve.d.ts +24 -0
- package/dist/theme/extension/configuration/resolve.js +98 -0
- package/dist/theme/extension/configuration/types.d.ts +68 -0
- package/dist/theme/extension/configuration/types.js +3 -0
- package/dist/theme/extension/configuration/validate.d.ts +8 -0
- package/dist/theme/extension/configuration/validate.js +21 -0
- package/dist/theme/extension/index.d.ts +11 -0
- package/dist/theme/extension/index.js +38 -0
- package/dist/theme/extension/manifest-normalize.d.ts +5 -0
- package/dist/theme/extension/manifest-normalize.js +75 -0
- package/dist/theme/extension/presets/twentytwentyfive-appearance.d.ts +10 -0
- package/dist/theme/extension/presets/twentytwentyfive-appearance.js +193 -0
- package/dist/theme/extension/preview.d.ts +46 -0
- package/dist/theme/extension/preview.js +92 -0
- package/dist/theme/extension/site-notices.d.ts +19 -0
- package/dist/theme/extension/site-notices.js +88 -0
- package/dist/theme/extension/site-settings.d.ts +37 -0
- package/dist/theme/extension/site-settings.js +144 -0
- package/dist/theme/extension/siteNav.d.ts +18 -0
- package/dist/theme/extension/siteNav.js +17 -0
- package/dist/theme/extension/theme-admin-locale.d.ts +11 -0
- package/dist/theme/extension/theme-admin-locale.io.d.ts +2 -0
- package/dist/theme/extension/theme-admin-locale.io.js +54 -0
- package/dist/theme/extension/theme-admin-locale.js +68 -0
- package/dist/theme/extension/theme.d.ts +89 -0
- package/dist/theme/extension/theme.js +93 -0
- package/dist/theme/extension/twentytwentyfive-vars.d.ts +9 -0
- package/dist/theme/extension/twentytwentyfive-vars.js +103 -0
- package/dist/theme/fetch.d.ts +134 -0
- package/dist/theme/fetch.js +241 -0
- package/dist/theme/format.d.ts +16 -0
- package/dist/theme/format.js +48 -0
- package/dist/theme/httpClient.d.ts +20 -0
- package/dist/theme/httpClient.js +89 -0
- package/dist/theme/index.d.ts +63 -0
- package/dist/theme/index.js +226 -0
- package/dist/theme/json.d.ts +1 -0
- package/dist/theme/json.js +17 -0
- package/dist/theme/jsonp.d.ts +8 -0
- package/dist/theme/jsonp.js +27 -0
- package/dist/theme/locale.d.ts +23 -0
- package/dist/theme/locale.js +55 -0
- package/dist/theme/nav.d.ts +10 -0
- package/dist/theme/nav.js +30 -0
- package/dist/theme/next-config.d.ts +2 -0
- package/dist/theme/next-config.js +18 -0
- package/dist/theme/node.d.ts +2 -0
- package/dist/theme/node.js +18 -0
- package/dist/theme/preview/preview-config.d.ts +13 -0
- package/dist/theme/preview/preview-config.js +65 -0
- package/dist/theme/preview/preview-draft.d.ts +19 -0
- package/dist/theme/preview/preview-draft.js +51 -0
- package/dist/theme/preview/preview-mods.d.ts +16 -0
- package/dist/theme/preview/preview-mods.js +78 -0
- package/dist/theme/preview-config.d.ts +13 -0
- package/dist/theme/preview-config.js +65 -0
- package/dist/theme/preview-draft.d.ts +19 -0
- package/dist/theme/preview-draft.js +51 -0
- package/dist/theme/preview-mods.d.ts +16 -0
- package/dist/theme/preview-mods.js +78 -0
- package/dist/theme/providers/index.d.ts +118 -0
- package/dist/theme/providers/index.js +251 -0
- package/dist/theme/providers/setup.d.ts +124 -0
- package/dist/theme/providers/setup.js +29 -0
- package/dist/theme/runtime.d.ts +18 -0
- package/dist/theme/runtime.js +19 -0
- package/dist/theme/seo.d.ts +6 -0
- package/dist/theme/seo.js +12 -0
- package/dist/theme/server.d.ts +65 -0
- package/dist/theme/server.js +177 -0
- package/dist/theme/setting.d.ts +12 -0
- package/dist/theme/setting.js +42 -0
- package/dist/theme/ssr/bootstrap.d.ts +48 -0
- package/dist/theme/ssr/bootstrap.js +112 -0
- package/dist/theme/ssr/fetch.d.ts +134 -0
- package/dist/theme/ssr/fetch.js +264 -0
- package/dist/theme/ssr/format.d.ts +3 -0
- package/dist/theme/ssr/format.js +8 -0
- package/dist/theme/ssr/pageProps.d.ts +62 -0
- package/dist/theme/ssr/pageProps.js +138 -0
- package/dist/theme/ssr/setting.d.ts +12 -0
- package/dist/theme/ssr/setting.js +42 -0
- package/dist/theme/ssr/slimBootstrap.d.ts +11 -0
- package/dist/theme/ssr/slimBootstrap.js +75 -0
- package/dist/theme/ssr/static.d.ts +10 -0
- package/dist/theme/ssr/static.js +17 -0
- package/dist/theme/ssr/templates.d.ts +35 -0
- package/dist/theme/ssr/templates.js +50 -0
- package/dist/theme/static.d.ts +10 -0
- package/dist/theme/static.js +17 -0
- package/dist/theme/templates.d.ts +27 -0
- package/dist/theme/templates.js +38 -0
- package/dist/theme/ui-optional.d.ts +1 -0
- package/dist/theme/ui-optional.js +21 -0
- package/dist/theme/visitor/appearance.d.ts +4 -0
- package/dist/theme/visitor/appearance.js +16 -0
- package/dist/theme/visitor/authSession.d.ts +16 -0
- package/dist/theme/visitor/authSession.js +92 -0
- package/dist/theme/visitor/colorMode.d.ts +17 -0
- package/dist/theme/visitor/colorMode.js +59 -0
- package/dist/theme/visitor/commentAuthor.d.ts +16 -0
- package/dist/theme/visitor/commentAuthor.js +45 -0
- package/dist/theme/visitor/i18n.d.ts +4 -0
- package/dist/theme/visitor/i18n.js +28 -0
- package/dist/theme/visitor/locale.d.ts +23 -0
- package/dist/theme/visitor/locale.js +72 -0
- package/dist/theme/visitor/runtime.d.ts +18 -0
- package/dist/theme/visitor/runtime.js +19 -0
- package/dist/theme/visitor/visitorLocale.d.ts +11 -0
- package/dist/theme/visitor/visitorLocale.js +56 -0
- package/dist/theme/visitorLocale.d.ts +6 -0
- package/dist/theme/visitorLocale.js +39 -0
- package/dist/types/index.d.ts +79 -68
- package/dist/ui/AntdStyleTransitionFix.d.ts +5 -0
- package/dist/ui/AntdStyleTransitionFix.js +16 -0
- package/dist/ui/ArchiveEmptyState.d.ts +13 -0
- package/dist/ui/ArchiveEmptyState.js +8 -0
- package/dist/ui/ArchivePageLayout.d.ts +10 -0
- package/dist/ui/ArchivePageLayout.js +8 -0
- package/dist/ui/ArticleCard.d.ts +27 -0
- package/dist/ui/ArticleCard.js +16 -0
- package/dist/ui/ArticleList.d.ts +14 -0
- package/dist/ui/ArticleList.js +16 -0
- package/dist/ui/BaseGlobalStyles.d.ts +5 -0
- package/dist/ui/BaseGlobalStyles.js +18 -0
- package/dist/ui/LocaleSwitcher.d.ts +7 -0
- package/dist/ui/LocaleSwitcher.js +15 -0
- package/dist/ui/NavMenu.d.ts +16 -0
- package/dist/ui/NavMenu.js +8 -0
- package/dist/ui/NotFoundPanel.d.ts +11 -0
- package/dist/ui/NotFoundPanel.js +8 -0
- package/dist/ui/PageHeader.d.ts +10 -0
- package/dist/ui/PageHeader.js +8 -0
- package/dist/ui/SiteBranding.d.ts +10 -0
- package/dist/ui/SiteBranding.js +14 -0
- package/dist/ui/SiteDocument.d.ts +20 -0
- package/dist/ui/SiteDocument.js +13 -0
- package/dist/ui/SiteDocumentFallback.d.ts +8 -0
- package/dist/ui/SiteDocumentFallback.js +9 -0
- package/dist/ui/SiteLogo.d.ts +6 -0
- package/dist/ui/SiteLogo.js +16 -0
- package/dist/ui/SiteTagline.d.ts +7 -0
- package/dist/ui/SiteTagline.js +15 -0
- package/dist/ui/TaxonomyList.d.ts +25 -0
- package/dist/ui/TaxonomyList.js +30 -0
- package/dist/ui/ThemeCssVars.d.ts +2 -0
- package/dist/ui/ThemeCssVars.js +85 -0
- package/dist/ui/ThemeLayout.d.ts +13 -0
- package/dist/ui/ThemeLayout.js +11 -0
- package/dist/ui/components/AntdStyleTransitionFix.d.ts +5 -0
- package/dist/ui/components/AntdStyleTransitionFix.js +16 -0
- package/dist/ui/components/ArchiveEmptyState.d.ts +13 -0
- package/dist/ui/components/ArchiveEmptyState.js +8 -0
- package/dist/ui/components/ArchivePageLayout.d.ts +10 -0
- package/dist/ui/components/ArchivePageLayout.js +8 -0
- package/dist/ui/components/ArticleCard.d.ts +27 -0
- package/dist/ui/components/ArticleCard.js +16 -0
- package/dist/ui/components/ArticleList.d.ts +14 -0
- package/dist/ui/components/ArticleList.js +16 -0
- package/dist/ui/components/BaseGlobalStyles.d.ts +6 -0
- package/dist/ui/components/BaseGlobalStyles.js +18 -0
- package/dist/ui/components/LocaleSwitcher.d.ts +10 -0
- package/dist/ui/components/LocaleSwitcher.js +11 -0
- package/dist/ui/components/NavMenu.d.ts +16 -0
- package/dist/ui/components/NavMenu.js +8 -0
- package/dist/ui/components/NotFoundPanel.d.ts +11 -0
- package/dist/ui/components/NotFoundPanel.js +8 -0
- package/dist/ui/components/PageHeader.d.ts +10 -0
- package/dist/ui/components/PageHeader.js +8 -0
- package/dist/ui/components/RouteProgress.d.ts +9 -0
- package/dist/ui/components/RouteProgress.js +40 -0
- package/dist/ui/components/SiteAnalytics.d.ts +5 -0
- package/dist/ui/components/SiteAnalytics.js +42 -0
- package/dist/ui/components/SiteBranding.d.ts +11 -0
- package/dist/ui/components/SiteBranding.js +14 -0
- package/dist/ui/components/SiteDocument.d.ts +20 -0
- package/dist/ui/components/SiteDocument.js +13 -0
- package/dist/ui/components/SiteDocumentFallback.d.ts +8 -0
- package/dist/ui/components/SiteDocumentFallback.js +9 -0
- package/dist/ui/components/SiteLogo.d.ts +9 -0
- package/dist/ui/components/SiteLogo.js +23 -0
- package/dist/ui/components/SiteSeo.d.ts +13 -0
- package/dist/ui/components/SiteSeo.js +19 -0
- package/dist/ui/components/SiteTagline.d.ts +8 -0
- package/dist/ui/components/SiteTagline.js +15 -0
- package/dist/ui/components/TaxonomyList.d.ts +25 -0
- package/dist/ui/components/TaxonomyList.js +30 -0
- package/dist/ui/components/ThemeCssVars.d.ts +3 -0
- package/dist/ui/components/ThemeCssVars.js +85 -0
- package/dist/ui/components/ThemeLayout.d.ts +13 -0
- package/dist/ui/components/ThemeLayout.js +11 -0
- package/dist/ui/components/content/ArticleReader.d.ts +45 -0
- package/dist/ui/components/content/ArticleReader.js +23 -0
- package/dist/ui/components/content/ArticleToc.d.ts +21 -0
- package/dist/ui/components/content/ArticleToc.js +75 -0
- package/dist/ui/components/content/HtmlContent.d.ts +16 -0
- package/dist/ui/components/content/HtmlContent.js +237 -0
- package/dist/ui/components/content/Image.d.ts +9 -0
- package/dist/ui/components/content/Image.js +13 -0
- package/dist/ui/components/content/ImageViewer.d.ts +8 -0
- package/dist/ui/components/content/ImageViewer.js +33 -0
- package/dist/ui/components/content/LocaleTime.d.ts +10 -0
- package/dist/ui/components/content/LocaleTime.js +63 -0
- package/dist/ui/components/content/index.d.ts +14 -0
- package/dist/ui/components/content/index.js +18 -0
- package/dist/ui/components/toolbar/LocaleToggleButton.d.ts +8 -0
- package/dist/ui/components/toolbar/LocaleToggleButton.js +18 -0
- package/dist/ui/components/toolbar/ThemeToggleButton.d.ts +7 -0
- package/dist/ui/components/toolbar/ThemeToggleButton.js +10 -0
- package/dist/ui/components/toolbar/ToolbarIconButton.d.ts +7 -0
- package/dist/ui/components/toolbar/ToolbarIconButton.js +22 -0
- package/dist/ui/components/toolbar/constants.d.ts +5 -0
- package/dist/ui/components/toolbar/constants.js +8 -0
- package/dist/ui/components/toolbar/icons.d.ts +17 -0
- package/dist/ui/components/toolbar/icons.js +44 -0
- package/dist/ui/components/toolbar/index.d.ts +9 -0
- package/dist/ui/components/toolbar/index.js +25 -0
- package/dist/ui/components/toolbar/locale-label.d.ts +3 -0
- package/dist/ui/components/toolbar/locale-label.js +19 -0
- package/dist/ui/context/LocaleContext.d.ts +15 -0
- package/dist/ui/context/LocaleContext.js +59 -0
- package/dist/ui/context/ReactPressProvider.d.ts +4 -0
- package/dist/ui/context/ReactPressProvider.js +10 -0
- package/dist/ui/context/SiteCatalogContext.d.ts +41 -0
- package/dist/ui/context/SiteCatalogContext.js +60 -0
- package/dist/ui/context/ThemeRuntimeContext.d.ts +21 -0
- package/dist/ui/context/ThemeRuntimeContext.js +59 -0
- package/dist/ui/context/index.d.ts +8 -0
- package/dist/ui/context/index.js +26 -0
- package/dist/ui/context/siteCatalogTypes.d.ts +64 -0
- package/dist/ui/context/siteCatalogTypes.js +20 -0
- package/dist/ui/context/types.d.ts +34 -0
- package/dist/ui/context/types.js +2 -0
- package/dist/ui/hooks/index.d.ts +12 -0
- package/dist/ui/hooks/index.js +29 -0
- package/dist/ui/hooks/useAsyncLoading.d.ts +4 -0
- package/dist/ui/hooks/useAsyncLoading.js +31 -0
- package/dist/ui/hooks/useForceUpdate.d.ts +2 -0
- package/dist/ui/hooks/useForceUpdate.js +11 -0
- package/dist/ui/hooks/useNavActive.d.ts +5 -0
- package/dist/ui/hooks/useNavActive.js +11 -0
- package/dist/ui/hooks/usePagination.d.ts +34 -0
- package/dist/ui/hooks/usePagination.js +55 -0
- package/dist/ui/hooks/useReportArticleView.d.ts +4 -0
- package/dist/ui/hooks/useReportArticleView.js +40 -0
- package/dist/ui/hooks/useReportPageView.d.ts +11 -0
- package/dist/ui/hooks/useReportPageView.js +28 -0
- package/dist/ui/hooks/useRouteParam.d.ts +5 -0
- package/dist/ui/hooks/useRouteParam.js +15 -0
- package/dist/ui/hooks/useToggle.d.ts +2 -0
- package/dist/ui/hooks/useToggle.js +17 -0
- package/dist/ui/hooks/useWarningOnExit.d.ts +5 -0
- package/dist/ui/hooks/useWarningOnExit.js +59 -0
- package/dist/ui/index.d.ts +43 -0
- package/dist/ui/index.js +87 -0
- package/dist/utils/api-envelope.d.ts +14 -0
- package/dist/utils/api-envelope.js +31 -0
- package/dist/utils/clipboard.d.ts +2 -0
- package/dist/utils/clipboard.js +24 -0
- package/dist/utils/cookie.d.ts +2 -0
- package/dist/utils/cookie.js +15 -0
- package/dist/utils/date.d.ts +4 -0
- package/dist/utils/date.js +45 -0
- package/dist/utils/email.d.ts +3 -0
- package/dist/utils/email.js +9 -0
- package/dist/utils/error.d.ts +7 -0
- package/dist/utils/error.js +26 -0
- package/dist/utils/image.d.ts +7 -0
- package/dist/utils/image.js +34 -0
- package/dist/utils/index.d.ts +15 -33
- package/dist/utils/index.js +37 -57
- package/dist/utils/json.d.ts +2 -0
- package/dist/utils/json.js +18 -0
- package/dist/utils/jsonp.d.ts +8 -0
- package/dist/utils/jsonp.js +27 -0
- package/dist/utils/object.d.ts +7 -0
- package/dist/utils/object.js +63 -0
- package/dist/utils/setting.d.ts +12 -0
- package/dist/utils/setting.js +13 -0
- package/dist/utils/string.d.ts +4 -0
- package/dist/utils/string.js +15 -0
- package/dist/utils/viewport.d.ts +3 -0
- package/dist/utils/viewport.js +14 -0
- package/package.json +141 -12
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./hook-reject"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** Public server-side plugin SDK types (implemented by server HookService). */
|
|
2
|
+
export interface HookContext {
|
|
3
|
+
pluginId?: string;
|
|
4
|
+
userId?: number;
|
|
5
|
+
requestId?: string;
|
|
6
|
+
}
|
|
7
|
+
export type FilterCallback<T = unknown> = (value: T, context?: HookContext) => T | Promise<T>;
|
|
8
|
+
export type ActionCallback = (payload?: unknown, context?: HookContext) => void | Promise<void>;
|
|
9
|
+
export interface HookRegistrationOptions {
|
|
10
|
+
priority?: number;
|
|
11
|
+
pluginId?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PluginLogger {
|
|
14
|
+
log(message: string, ...args: unknown[]): void;
|
|
15
|
+
warn(message: string, ...args: unknown[]): void;
|
|
16
|
+
error(message: string, ...args: unknown[]): void;
|
|
17
|
+
}
|
|
18
|
+
export interface PluginContext {
|
|
19
|
+
id: string;
|
|
20
|
+
version: string;
|
|
21
|
+
config: Record<string, unknown>;
|
|
22
|
+
logger: PluginLogger;
|
|
23
|
+
}
|
|
24
|
+
export interface PluginServerModule {
|
|
25
|
+
register(hooks: HookService, ctx: PluginContext): void | Promise<void>;
|
|
26
|
+
deactivate?(): void | Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
export interface HookService {
|
|
29
|
+
applyFilters<T>(name: string, value: T, ctx?: HookContext): Promise<T>;
|
|
30
|
+
doAction(name: string, payload?: unknown, ctx?: HookContext): Promise<void>;
|
|
31
|
+
addFilter<T>(name: string, callback: FilterCallback<T>, options?: HookRegistrationOptions): () => void;
|
|
32
|
+
addAction(name: string, callback: ActionCallback, options?: HookRegistrationOptions): void;
|
|
33
|
+
removePluginHooks(pluginId: string): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AntdStyleTransitionFix = AntdStyleTransitionFix;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const STYLE_ELEMENT_ID = 'reactpress-antd-style-transition-fix';
|
|
7
|
+
/** Disable Ant Design CSS transitions during hydration to avoid style flash. */
|
|
8
|
+
function AntdStyleTransitionFix() {
|
|
9
|
+
(0, react_1.useEffect)(() => {
|
|
10
|
+
const el = document.querySelector(`#${STYLE_ELEMENT_ID}`);
|
|
11
|
+
el?.parentNode?.removeChild(el);
|
|
12
|
+
}, []);
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("style", { id: STYLE_ELEMENT_ID, dangerouslySetInnerHTML: {
|
|
14
|
+
__html: `[class^="ant-"], [class*=" ant-"] { transition: none !important; }`,
|
|
15
|
+
} }));
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type BadgeVariant = 'default' | 'secondary' | 'outline' | 'destructive';
|
|
3
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
variant?: BadgeVariant;
|
|
5
|
+
}
|
|
6
|
+
/** Headless badge / pill label. */
|
|
7
|
+
export declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Badge = Badge;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const cn_1 = require("./cn");
|
|
6
|
+
/** Headless badge / pill label. */
|
|
7
|
+
function Badge({ className, variant = 'default', ...props }) {
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("span", { className: (0, cn_1.cn)('rp-badge', `rp-badge--${variant}`, className), "data-rp-component": "badge", "data-variant": variant, ...props }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ButtonVariant = 'default' | 'outline' | 'ghost' | 'link' | 'destructive';
|
|
3
|
+
export type ButtonSize = 'sm' | 'md' | 'lg' | 'icon';
|
|
4
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
size?: ButtonSize;
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** Headless button primitive — style via `className` or `rp-btn--*` data classes. */
|
|
10
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Button = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const cn_1 = require("./cn");
|
|
10
|
+
const Slot_1 = require("./Slot");
|
|
11
|
+
const variantData = {
|
|
12
|
+
default: 'rp-btn--default',
|
|
13
|
+
outline: 'rp-btn--outline',
|
|
14
|
+
ghost: 'rp-btn--ghost',
|
|
15
|
+
link: 'rp-btn--link',
|
|
16
|
+
destructive: 'rp-btn--destructive',
|
|
17
|
+
};
|
|
18
|
+
const sizeData = {
|
|
19
|
+
sm: 'rp-btn--sm',
|
|
20
|
+
md: 'rp-btn--md',
|
|
21
|
+
lg: 'rp-btn--lg',
|
|
22
|
+
icon: 'rp-btn--icon',
|
|
23
|
+
};
|
|
24
|
+
/** Headless button primitive — style via `className` or `rp-btn--*` data classes. */
|
|
25
|
+
exports.Button = react_1.default.forwardRef(({ className, variant = 'default', size = 'md', asChild = false, type = 'button', ...props }, ref) => {
|
|
26
|
+
const sharedProps = {
|
|
27
|
+
className: (0, cn_1.cn)('rp-btn', variantData[variant], sizeData[size], className),
|
|
28
|
+
'data-rp-component': 'button',
|
|
29
|
+
'data-variant': variant,
|
|
30
|
+
'data-size': size,
|
|
31
|
+
...props,
|
|
32
|
+
};
|
|
33
|
+
if (asChild) {
|
|
34
|
+
return (0, jsx_runtime_1.jsx)(Slot_1.Slot, { ref: ref, ...sharedProps, asChild: true });
|
|
35
|
+
}
|
|
36
|
+
return (0, jsx_runtime_1.jsx)("button", { ref: ref, type: type, ...sharedProps });
|
|
37
|
+
});
|
|
38
|
+
exports.Button.displayName = 'Button';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ColorModeToggleProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
dark?: boolean;
|
|
4
|
+
sunIcon?: React.ReactNode;
|
|
5
|
+
moonIcon?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/** Headless light/dark toggle — wire to theme context in the consuming app. */
|
|
8
|
+
export declare const ColorModeToggle: React.ForwardRefExoticComponent<ColorModeToggleProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ColorModeToggle = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const cn_1 = require("./cn");
|
|
10
|
+
const icons_1 = require("./icons");
|
|
11
|
+
/** Headless light/dark toggle — wire to theme context in the consuming app. */
|
|
12
|
+
exports.ColorModeToggle = react_1.default.forwardRef(({ className, dark = false, sunIcon, moonIcon, type = 'button', ...props }, ref) => ((0, jsx_runtime_1.jsx)("button", { ref: ref, type: type, className: (0, cn_1.cn)('rp-color-mode-toggle', dark && 'rp-color-mode-toggle--dark', className), "data-rp-component": "color-mode-toggle", "aria-label": dark ? 'Switch to light mode' : 'Switch to dark mode', "aria-pressed": dark, ...props, children: dark ? moonIcon ?? (0, jsx_runtime_1.jsx)(icons_1.MoonIcon, {}) : sunIcon ?? (0, jsx_runtime_1.jsx)(icons_1.SunIcon, {}) })));
|
|
13
|
+
exports.ColorModeToggle.displayName = 'ColorModeToggle';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ButtonProps } from './Button';
|
|
3
|
+
export interface IconButtonProps extends Omit<ButtonProps, 'size'> {
|
|
4
|
+
'aria-label': string;
|
|
5
|
+
}
|
|
6
|
+
/** Square icon-only button built on `Button`. */
|
|
7
|
+
export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.IconButton = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const cn_1 = require("./cn");
|
|
10
|
+
const Button_1 = require("./Button");
|
|
11
|
+
/** Square icon-only button built on `Button`. */
|
|
12
|
+
exports.IconButton = react_1.default.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(Button_1.Button, { ref: ref, size: "icon", className: (0, cn_1.cn)('rp-icon-btn', className), ...props })));
|
|
13
|
+
exports.IconButton.displayName = 'IconButton';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ScrollToTargetProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
/** CSS selector for the scroll target element. */
|
|
4
|
+
targetSelector: string;
|
|
5
|
+
/** Scroll behavior passed to `scrollIntoView`. */
|
|
6
|
+
behavior?: ScrollBehavior;
|
|
7
|
+
}
|
|
8
|
+
/** Floating action that scrolls to a DOM target (e.g. comment section). */
|
|
9
|
+
export declare const ScrollToTarget: React.ForwardRefExoticComponent<ScrollToTargetProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ScrollToTarget = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
39
|
+
const cn_1 = require("./cn");
|
|
40
|
+
const icons_1 = require("./icons");
|
|
41
|
+
/** Floating action that scrolls to a DOM target (e.g. comment section). */
|
|
42
|
+
exports.ScrollToTarget = react_1.default.forwardRef(({ targetSelector, behavior = 'smooth', className, children, type = 'button', ...props }, ref) => {
|
|
43
|
+
const scrollToTarget = (0, react_1.useCallback)(() => {
|
|
44
|
+
document.querySelector(targetSelector)?.scrollIntoView({ behavior });
|
|
45
|
+
}, [targetSelector, behavior]);
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)("button", { ref: ref, type: type, className: (0, cn_1.cn)('rp-scroll-to-target', className), "data-rp-component": "scroll-to-target", onClick: scrollToTarget, ...props, children: children ?? (0, jsx_runtime_1.jsx)(icons_1.CommentBubbleIcon, {}) }));
|
|
47
|
+
});
|
|
48
|
+
exports.ScrollToTarget.displayName = 'ScrollToTarget';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
orientation?: 'horizontal' | 'vertical';
|
|
4
|
+
decorative?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** Accessible separator — horizontal or vertical rule. */
|
|
7
|
+
export declare function Separator({ className, orientation, decorative, ...props }: SeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Separator = Separator;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const cn_1 = require("./cn");
|
|
6
|
+
/** Accessible separator — horizontal or vertical rule. */
|
|
7
|
+
function Separator({ className, orientation = 'horizontal', decorative = true, ...props }) {
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("div", { role: decorative ? 'none' : 'separator', "aria-orientation": decorative ? undefined : orientation, className: (0, cn_1.cn)('rp-separator', `rp-separator--${orientation}`, className), "data-rp-component": "separator", ...props }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** When true, applies pulse animation class. */
|
|
4
|
+
animate?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** Placeholder skeleton block for loading states. */
|
|
7
|
+
export declare function Skeleton({ className, animate, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Skeleton = Skeleton;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const cn_1 = require("./cn");
|
|
6
|
+
/** Placeholder skeleton block for loading states. */
|
|
7
|
+
function Skeleton({ className, animate = true, ...props }) {
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.cn)('rp-skeleton', animate && 'rp-skeleton--animate', className), "data-rp-component": "skeleton", "aria-hidden": true, ...props }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SlotProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
|
+
asChild?: boolean;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Polymorphic slot — merge props onto the child element (Radix-style).
|
|
8
|
+
* When `asChild` is false, renders a `span`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const Slot: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Slot = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const cn_1 = require("./cn");
|
|
10
|
+
/**
|
|
11
|
+
* Polymorphic slot — merge props onto the child element (Radix-style).
|
|
12
|
+
* When `asChild` is false, renders a `span`.
|
|
13
|
+
*/
|
|
14
|
+
exports.Slot = react_1.default.forwardRef(({ asChild, children, ...props }, forwardedRef) => {
|
|
15
|
+
if (asChild && react_1.default.isValidElement(children)) {
|
|
16
|
+
return react_1.default.cloneElement(children, {
|
|
17
|
+
...props,
|
|
18
|
+
...children.props,
|
|
19
|
+
ref: forwardedRef,
|
|
20
|
+
className: (0, cn_1.cn)(props.className, children.props.className),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)("span", { ref: forwardedRef, ...props, children: children }));
|
|
24
|
+
});
|
|
25
|
+
exports.Slot.displayName = 'Slot';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
size?: 'sm' | 'md' | 'lg';
|
|
4
|
+
}
|
|
5
|
+
/** Accessible loading spinner. */
|
|
6
|
+
export declare function Spinner({ className, size, ...props }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Spinner = Spinner;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const cn_1 = require("./cn");
|
|
6
|
+
/** Accessible loading spinner. */
|
|
7
|
+
function Spinner({ className, size = 'md', ...props }) {
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("span", { role: "status", "aria-label": "Loading", className: (0, cn_1.cn)('rp-spinner', `rp-spinner--${size}`, className), "data-rp-component": "spinner", ...props }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ConditionTransitionProps {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
options: Record<string, unknown>;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/** Mount/unmount transition driven by a boolean flag. Requires `react-spring`. */
|
|
8
|
+
export declare function ConditionTransition({ visible, options, children }: ConditionTransitionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConditionTransition = ConditionTransition;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_spring_1 = require("react-spring");
|
|
6
|
+
/** Mount/unmount transition driven by a boolean flag. Requires `react-spring`. */
|
|
7
|
+
function ConditionTransition({ visible, options, children }) {
|
|
8
|
+
const transitions = (0, react_spring_1.useTransition)(visible, {
|
|
9
|
+
config: { mass: 2, tension: 280, friction: 24, clamp: true },
|
|
10
|
+
...options,
|
|
11
|
+
});
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: transitions((style, item) => item && ((0, jsx_runtime_1.jsx)(react_spring_1.animated.div, { style: { ...style, overflow: 'hidden' }, children: children }))) }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ListTrailProps {
|
|
3
|
+
length: number;
|
|
4
|
+
options: Record<string, unknown>;
|
|
5
|
+
element?: keyof JSX.IntrinsicElements;
|
|
6
|
+
setItemContainerProps?: (index: number) => Record<string, unknown>;
|
|
7
|
+
renderItem: (index: number) => React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/** Staggered list entrance animation. Requires `react-spring`. */
|
|
10
|
+
export declare function ListTrail({ length, options, element, setItemContainerProps, renderItem, }: ListTrailProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListTrail = ListTrail;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_spring_1 = require("react-spring");
|
|
6
|
+
/** Staggered list entrance animation. Requires `react-spring`. */
|
|
7
|
+
function ListTrail({ length, options, element = 'div', setItemContainerProps = () => ({}), renderItem, }) {
|
|
8
|
+
const C = react_spring_1.animated[element];
|
|
9
|
+
const trail = (0, react_spring_1.useTrail)(length, {
|
|
10
|
+
config: { mass: 2, tension: 280, friction: 24, clamp: true },
|
|
11
|
+
...options,
|
|
12
|
+
});
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: trail.map((style, index) => ((0, jsx_runtime_1.jsx)(C, { style: style, ...setItemContainerProps(index), children: renderItem(index) }, index))) }));
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Opacity = Opacity;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const Spring_1 = require("./Spring");
|
|
6
|
+
/** Fade-in spring preset built on `Spring`. */
|
|
7
|
+
function Opacity(props) {
|
|
8
|
+
const { from = {}, to = {}, ...rest } = props;
|
|
9
|
+
return (0, jsx_runtime_1.jsx)(Spring_1.Spring, { from: { ...from, opacity: 0 }, to: { ...to, opacity: 1 }, ...rest });
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SpringProps {
|
|
3
|
+
containerProps?: Record<string, unknown>;
|
|
4
|
+
from?: Record<string, number>;
|
|
5
|
+
to?: Record<string, number>;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/** Animate children when they enter the viewport. Requires `react-spring` + `react-visibility-sensor`. */
|
|
9
|
+
export declare function Spring({ containerProps, from, to, children }: SpringProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Spring = Spring;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const react_spring_1 = require("react-spring");
|
|
10
|
+
const react_visibility_sensor_1 = __importDefault(require("react-visibility-sensor"));
|
|
11
|
+
const viewport_1 = require("../../utils/viewport");
|
|
12
|
+
/** Animate children when they enter the viewport. Requires `react-spring` + `react-visibility-sensor`. */
|
|
13
|
+
function Spring({ containerProps = {}, from = {}, to = {}, children }) {
|
|
14
|
+
const ref = (0, react_1.useRef)(null);
|
|
15
|
+
const [styles, animation] = (0, react_spring_1.useSpring)(() => ({
|
|
16
|
+
...from,
|
|
17
|
+
config: { mass: 10, tension: 400, friction: 40, precision: 0.00001, clamp: true },
|
|
18
|
+
}));
|
|
19
|
+
const onViewportChange = (0, react_1.useCallback)((visible) => {
|
|
20
|
+
if (visible)
|
|
21
|
+
animation.start(to);
|
|
22
|
+
}, [animation, to]);
|
|
23
|
+
(0, react_1.useEffect)(() => {
|
|
24
|
+
if ((0, viewport_1.elementInViewport)(ref.current)) {
|
|
25
|
+
animation.start(to);
|
|
26
|
+
}
|
|
27
|
+
}, [animation, to]);
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(react_visibility_sensor_1.default, { onChange: onViewportChange, children: (0, jsx_runtime_1.jsx)(react_spring_1.animated.div, { ...containerProps, ref: ref, style: styles, children: children }) }));
|
|
29
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { SpringProps } from './Spring';
|
|
2
|
+
export { Spring } from './Spring';
|
|
3
|
+
export { Opacity } from './Opacity';
|
|
4
|
+
export type { ListTrailProps } from './ListTrail';
|
|
5
|
+
export { ListTrail } from './ListTrail';
|
|
6
|
+
export type { ConditionTransitionProps } from './ConditionTransition';
|
|
7
|
+
export { ConditionTransition } from './ConditionTransition';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConditionTransition = exports.ListTrail = exports.Opacity = exports.Spring = void 0;
|
|
4
|
+
var Spring_1 = require("./Spring");
|
|
5
|
+
Object.defineProperty(exports, "Spring", { enumerable: true, get: function () { return Spring_1.Spring; } });
|
|
6
|
+
var Opacity_1 = require("./Opacity");
|
|
7
|
+
Object.defineProperty(exports, "Opacity", { enumerable: true, get: function () { return Opacity_1.Opacity; } });
|
|
8
|
+
var ListTrail_1 = require("./ListTrail");
|
|
9
|
+
Object.defineProperty(exports, "ListTrail", { enumerable: true, get: function () { return ListTrail_1.ListTrail; } });
|
|
10
|
+
var ConditionTransition_1 = require("./ConditionTransition");
|
|
11
|
+
Object.defineProperty(exports, "ConditionTransition", { enumerable: true, get: function () { return ConditionTransition_1.ConditionTransition; } });
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function SunIcon(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function MoonIcon(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function CommentBubbleIcon(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SunIcon = SunIcon;
|
|
4
|
+
exports.MoonIcon = MoonIcon;
|
|
5
|
+
exports.CommentBubbleIcon = CommentBubbleIcon;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
function SunIcon(props) {
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", width: 24, height: 24, "aria-hidden": true, ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M3.55,18.54L4.96,19.95L6.76,18.16L5.34,16.74M11,22.45C11.32,22.45 13,22.45 13,22.45V19.5H11M12,5.5A6,6 0 0,0 6,11.5A6,6 0 0,0 12,17.5A6,6 0 0,0 18,11.5C18,8.18 15.31,5.5 12,5.5M20,12.5H23V10.5H20M17.24,18.16L19.04,19.95L20.45,18.54L18.66,16.74M20.45,4.46L19.04,3.05L17.24,4.84L18.66,6.26M13,0.55H11V3.5H13M4,10.5H1V12.5H4M6.76,4.84L4.96,3.05L3.55,4.46L5.34,6.26L6.76,4.84Z" }) }));
|
|
9
|
+
}
|
|
10
|
+
function MoonIcon(props) {
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", width: 24, height: 24, "aria-hidden": true, ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M17.75,4.09L15.22,6.03L16.13,9.09L13.5,7.28L10.87,9.09L11.78,6.03L9.25,4.09L12.44,4L13.5,1L14.56,4L17.75,4.09M21.25,11L19.61,12.25L20.2,14.23L18.5,13.06L16.8,14.23L17.39,12.25L15.75,11L17.81,10.95L18.5,9L19.19,10.95L21.25,11M18.97,15.95C19.8,15.87 20.69,17.05 20.16,17.8C19.84,18.25 19.5,18.67 19.08,19.07C15.17,23 8.84,23 4.94,19.07C1.03,15.17 1.03,8.83 4.94,4.93C5.34,4.53 5.76,4.17 6.21,3.85C6.96,3.32 8.14,4.21 8.06,5.04C7.79,7.9 8.75,10.87 10.95,13.06C13.14,15.26 16.1,16.22 18.97,15.95M17.33,17.97C14.5,17.81 11.7,16.64 9.53,14.5C7.36,12.31 6.2,9.5 6.04,6.68C3.23,9.82 3.34,14.64 6.35,17.66C9.37,20.67 14.19,20.78 17.33,17.97Z" }) }));
|
|
12
|
+
}
|
|
13
|
+
function CommentBubbleIcon(props) {
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", "aria-hidden": true, ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M988.8 512a348.8 348.8 0 0 1-144.96 278.72v208.32l-187.84-131.52a387.2 387.2 0 0 1-56 4.8A408.64 408.64 0 0 1 384 811.84l-36.8-23.04a493.76 493.76 0 0 0 52.8 3.2 493.44 493.44 0 0 0 51.2-2.88c221.44-23.04 394.24-192 394.24-400a365.12 365.12 0 0 0-4.16-51.84 373.44 373.44 0 0 0-48.96-138.56l18.88 11.2A353.6 353.6 0 0 1 988.8 512z m-198.72-128c0-192-169.6-349.76-378.24-349.76h-24C192 47.04 33.92 198.72 33.92 384a334.08 334.08 0 0 0 118.4 253.12v187.52l86.08-60.48 66.24-46.4a396.16 396.16 0 0 0 107.52 16C620.48 734.08 790.08 576 790.08 384z" }) }));
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { cn } from './cn';
|
|
2
|
+
export type { SlotProps } from './Slot';
|
|
3
|
+
export { Slot } from './Slot';
|
|
4
|
+
export type { ButtonProps, ButtonSize, ButtonVariant } from './Button';
|
|
5
|
+
export { Button } from './Button';
|
|
6
|
+
export type { IconButtonProps } from './IconButton';
|
|
7
|
+
export { IconButton } from './IconButton';
|
|
8
|
+
export type { BadgeProps, BadgeVariant } from './Badge';
|
|
9
|
+
export { Badge } from './Badge';
|
|
10
|
+
export type { SeparatorProps } from './Separator';
|
|
11
|
+
export { Separator } from './Separator';
|
|
12
|
+
export type { SkeletonProps } from './Skeleton';
|
|
13
|
+
export { Skeleton } from './Skeleton';
|
|
14
|
+
export type { SpinnerProps } from './Spinner';
|
|
15
|
+
export { Spinner } from './Spinner';
|
|
16
|
+
export type { ColorModeToggleProps } from './ColorModeToggle';
|
|
17
|
+
export { ColorModeToggle } from './ColorModeToggle';
|
|
18
|
+
export type { ScrollToTargetProps } from './ScrollToTarget';
|
|
19
|
+
export { ScrollToTarget } from './ScrollToTarget';
|
|
20
|
+
export { AntdStyleTransitionFix } from './AntdStyleTransitionFix';
|
|
21
|
+
export { SunIcon, MoonIcon, CommentBubbleIcon } from './icons';
|
|
22
|
+
export * from './animation';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.CommentBubbleIcon = exports.MoonIcon = exports.SunIcon = exports.AntdStyleTransitionFix = exports.ScrollToTarget = exports.ColorModeToggle = exports.Spinner = exports.Skeleton = exports.Separator = exports.Badge = exports.IconButton = exports.Button = exports.Slot = exports.cn = void 0;
|
|
18
|
+
var cn_1 = require("./cn");
|
|
19
|
+
Object.defineProperty(exports, "cn", { enumerable: true, get: function () { return cn_1.cn; } });
|
|
20
|
+
var Slot_1 = require("./Slot");
|
|
21
|
+
Object.defineProperty(exports, "Slot", { enumerable: true, get: function () { return Slot_1.Slot; } });
|
|
22
|
+
var Button_1 = require("./Button");
|
|
23
|
+
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return Button_1.Button; } });
|
|
24
|
+
var IconButton_1 = require("./IconButton");
|
|
25
|
+
Object.defineProperty(exports, "IconButton", { enumerable: true, get: function () { return IconButton_1.IconButton; } });
|
|
26
|
+
var Badge_1 = require("./Badge");
|
|
27
|
+
Object.defineProperty(exports, "Badge", { enumerable: true, get: function () { return Badge_1.Badge; } });
|
|
28
|
+
var Separator_1 = require("./Separator");
|
|
29
|
+
Object.defineProperty(exports, "Separator", { enumerable: true, get: function () { return Separator_1.Separator; } });
|
|
30
|
+
var Skeleton_1 = require("./Skeleton");
|
|
31
|
+
Object.defineProperty(exports, "Skeleton", { enumerable: true, get: function () { return Skeleton_1.Skeleton; } });
|
|
32
|
+
var Spinner_1 = require("./Spinner");
|
|
33
|
+
Object.defineProperty(exports, "Spinner", { enumerable: true, get: function () { return Spinner_1.Spinner; } });
|
|
34
|
+
var ColorModeToggle_1 = require("./ColorModeToggle");
|
|
35
|
+
Object.defineProperty(exports, "ColorModeToggle", { enumerable: true, get: function () { return ColorModeToggle_1.ColorModeToggle; } });
|
|
36
|
+
var ScrollToTarget_1 = require("./ScrollToTarget");
|
|
37
|
+
Object.defineProperty(exports, "ScrollToTarget", { enumerable: true, get: function () { return ScrollToTarget_1.ScrollToTarget; } });
|
|
38
|
+
var AntdStyleTransitionFix_1 = require("./AntdStyleTransitionFix");
|
|
39
|
+
Object.defineProperty(exports, "AntdStyleTransitionFix", { enumerable: true, get: function () { return AntdStyleTransitionFix_1.AntdStyleTransitionFix; } });
|
|
40
|
+
var icons_1 = require("./icons");
|
|
41
|
+
Object.defineProperty(exports, "SunIcon", { enumerable: true, get: function () { return icons_1.SunIcon; } });
|
|
42
|
+
Object.defineProperty(exports, "MoonIcon", { enumerable: true, get: function () { return icons_1.MoonIcon; } });
|
|
43
|
+
Object.defineProperty(exports, "CommentBubbleIcon", { enumerable: true, get: function () { return icons_1.CommentBubbleIcon; } });
|
|
44
|
+
__exportStar(require("./animation"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createApiInstance } from '../api/instance';
|
|
2
|
+
export declare class ApiError extends Error {
|
|
3
|
+
code: number;
|
|
4
|
+
constructor(code: number, message: string);
|
|
5
|
+
}
|
|
6
|
+
export interface ClientOptions {
|
|
7
|
+
baseURL?: string;
|
|
8
|
+
getAccessToken?: () => string | null | undefined;
|
|
9
|
+
onUnauthorized?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export type ReactPressClient = ReturnType<typeof createApiInstance>;
|
|
12
|
+
/** Single factory for web / theme / plugins — wraps generated API modules. */
|
|
13
|
+
export declare function createClient(options?: ClientOptions): ReactPressClient;
|
|
14
|
+
export declare function getDefaultApiBaseUrl(): string;
|