@fecommunity/reactpress-toolkit 3.0.0 → 3.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/README.md +194 -309
- 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 +88 -0
- package/dist/app/createReactPressApp.js +262 -0
- package/dist/app/createThemeApp.d.ts +6 -0
- package/dist/app/createThemeApp.js +47 -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/registry.d.ts +62 -0
- package/dist/plugin/admin/registry.js +79 -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/index.d.ts +9 -0
- package/dist/plugin/index.js +48 -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/runtime.d.ts +18 -0
- package/dist/plugin/react/runtime.js +30 -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 +17 -0
- package/dist/theme/build/next-config.js +100 -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 +5 -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 +10 -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 +8 -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 +7 -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 +2 -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 +15 -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 +9 -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 +3 -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 +129 -16
- package/LICENSE +0 -21
package/dist/utils/index.js
CHANGED
|
@@ -1,59 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Utility functions for ReactPress Toolkit
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
exports.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
exports.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
function
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
exports.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*/
|
|
42
|
-
class ApiError extends Error {
|
|
43
|
-
constructor(message, code = 500, details = null) {
|
|
44
|
-
super(message);
|
|
45
|
-
this.name = 'ApiError';
|
|
46
|
-
this.code = code;
|
|
47
|
-
this.details = details;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Check if an object is an instance of ApiError
|
|
51
|
-
* @param error - Error to check
|
|
52
|
-
* @returns True if it's an ApiError instance
|
|
53
|
-
*/
|
|
54
|
-
static isInstance(error) {
|
|
55
|
-
return error instanceof ApiError ||
|
|
56
|
-
(error && error.name === 'ApiError' && error.code !== undefined);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.ApiError = ApiError;
|
|
3
|
+
exports.resolveImageUrl = exports.copyToClipboard = exports.truncateWords = exports.stripHtml = exports.pickSiteSettings = exports.setByPath = exports.getNestedLocaleValue = exports.getNestedLocaleString = exports.getByPath = exports.deepMerge = exports.deepClone = exports.safeJsonParse = exports.jsonp = exports.isApiError = exports.ApiError = exports.isValidCommentEmail = exports.COMMENT_EMAIL_REGEXP = exports.formatPublishDateShort = exports.formatPublishDate = exports.formatDate = exports.readRequestCookie = exports.unpackPaginated = exports.unpackOne = exports.unpackList = void 0;
|
|
4
|
+
var api_envelope_1 = require("./api-envelope");
|
|
5
|
+
Object.defineProperty(exports, "unpackList", { enumerable: true, get: function () { return api_envelope_1.unpackList; } });
|
|
6
|
+
Object.defineProperty(exports, "unpackOne", { enumerable: true, get: function () { return api_envelope_1.unpackOne; } });
|
|
7
|
+
Object.defineProperty(exports, "unpackPaginated", { enumerable: true, get: function () { return api_envelope_1.unpackPaginated; } });
|
|
8
|
+
var cookie_1 = require("./cookie");
|
|
9
|
+
Object.defineProperty(exports, "readRequestCookie", { enumerable: true, get: function () { return cookie_1.readRequestCookie; } });
|
|
10
|
+
var date_1 = require("./date");
|
|
11
|
+
Object.defineProperty(exports, "formatDate", { enumerable: true, get: function () { return date_1.formatDate; } });
|
|
12
|
+
Object.defineProperty(exports, "formatPublishDate", { enumerable: true, get: function () { return date_1.formatPublishDate; } });
|
|
13
|
+
Object.defineProperty(exports, "formatPublishDateShort", { enumerable: true, get: function () { return date_1.formatPublishDateShort; } });
|
|
14
|
+
var email_1 = require("./email");
|
|
15
|
+
Object.defineProperty(exports, "COMMENT_EMAIL_REGEXP", { enumerable: true, get: function () { return email_1.COMMENT_EMAIL_REGEXP; } });
|
|
16
|
+
Object.defineProperty(exports, "isValidCommentEmail", { enumerable: true, get: function () { return email_1.isValidCommentEmail; } });
|
|
17
|
+
var error_1 = require("./error");
|
|
18
|
+
Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return error_1.ApiError; } });
|
|
19
|
+
Object.defineProperty(exports, "isApiError", { enumerable: true, get: function () { return error_1.isApiError; } });
|
|
20
|
+
var jsonp_1 = require("./jsonp");
|
|
21
|
+
Object.defineProperty(exports, "jsonp", { enumerable: true, get: function () { return jsonp_1.jsonp; } });
|
|
22
|
+
var json_1 = require("./json");
|
|
23
|
+
Object.defineProperty(exports, "safeJsonParse", { enumerable: true, get: function () { return json_1.safeJsonParse; } });
|
|
24
|
+
var object_1 = require("./object");
|
|
25
|
+
Object.defineProperty(exports, "deepClone", { enumerable: true, get: function () { return object_1.deepClone; } });
|
|
26
|
+
Object.defineProperty(exports, "deepMerge", { enumerable: true, get: function () { return object_1.deepMerge; } });
|
|
27
|
+
Object.defineProperty(exports, "getByPath", { enumerable: true, get: function () { return object_1.getByPath; } });
|
|
28
|
+
Object.defineProperty(exports, "getNestedLocaleString", { enumerable: true, get: function () { return object_1.getNestedLocaleString; } });
|
|
29
|
+
Object.defineProperty(exports, "getNestedLocaleValue", { enumerable: true, get: function () { return object_1.getNestedLocaleValue; } });
|
|
30
|
+
Object.defineProperty(exports, "setByPath", { enumerable: true, get: function () { return object_1.setByPath; } });
|
|
31
|
+
var setting_1 = require("./setting");
|
|
32
|
+
Object.defineProperty(exports, "pickSiteSettings", { enumerable: true, get: function () { return setting_1.pickSiteSettings; } });
|
|
33
|
+
var string_1 = require("./string");
|
|
34
|
+
Object.defineProperty(exports, "stripHtml", { enumerable: true, get: function () { return string_1.stripHtml; } });
|
|
35
|
+
Object.defineProperty(exports, "truncateWords", { enumerable: true, get: function () { return string_1.truncateWords; } });
|
|
36
|
+
var clipboard_1 = require("./clipboard");
|
|
37
|
+
Object.defineProperty(exports, "copyToClipboard", { enumerable: true, get: function () { return clipboard_1.copyToClipboard; } });
|
|
38
|
+
var image_1 = require("./image");
|
|
39
|
+
Object.defineProperty(exports, "resolveImageUrl", { enumerable: true, get: function () { return image_1.resolveImageUrl; } });
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.safeJsonParse = safeJsonParse;
|
|
4
|
+
/** Parse JSON string or pass through objects; return fallback on failure. */
|
|
5
|
+
function safeJsonParse(raw, fallback) {
|
|
6
|
+
if (raw == null || raw === '')
|
|
7
|
+
return fallback;
|
|
8
|
+
if (typeof raw === 'object')
|
|
9
|
+
return raw;
|
|
10
|
+
if (typeof raw !== 'string')
|
|
11
|
+
return fallback;
|
|
12
|
+
try {
|
|
13
|
+
return JSON.parse(raw);
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return fallback;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.jsonp = jsonp;
|
|
4
|
+
function jsonp(url, params, callback) {
|
|
5
|
+
const callbackName = `jsonp_callback_${Date.now()}`;
|
|
6
|
+
const queryParams = { ...params, cb: callbackName };
|
|
7
|
+
const queryString = Object.keys(queryParams)
|
|
8
|
+
.map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(queryParams[key])}`)
|
|
9
|
+
.join('&');
|
|
10
|
+
const script = document.createElement('script');
|
|
11
|
+
script.src = `${url}?${queryString}`;
|
|
12
|
+
window[callbackName] = (data) => {
|
|
13
|
+
callback(data);
|
|
14
|
+
delete window[callbackName];
|
|
15
|
+
document.head.removeChild(script);
|
|
16
|
+
};
|
|
17
|
+
script.onerror = () => {
|
|
18
|
+
callback(new Error('JSONP request failed'));
|
|
19
|
+
if (window[callbackName]) {
|
|
20
|
+
delete window[callbackName];
|
|
21
|
+
}
|
|
22
|
+
if (document.head.contains(script)) {
|
|
23
|
+
document.head.removeChild(script);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
document.head.appendChild(script);
|
|
27
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Deep get for dot-separated paths (`a.b.c`). */
|
|
2
|
+
export declare function getByPath(obj: unknown, path: string): unknown;
|
|
3
|
+
export declare function getNestedLocaleValue(obj: unknown, dotPath: string): unknown;
|
|
4
|
+
export declare function getNestedLocaleString(obj: unknown, dotPath: string): string | undefined;
|
|
5
|
+
export declare function setByPath(obj: Record<string, unknown>, path: string, value: unknown): void;
|
|
6
|
+
export declare function deepMerge<T extends Record<string, unknown>>(target: T, source: Record<string, unknown>): T;
|
|
7
|
+
export declare function deepClone<T>(obj: T): T;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getByPath = getByPath;
|
|
4
|
+
exports.getNestedLocaleValue = getNestedLocaleValue;
|
|
5
|
+
exports.getNestedLocaleString = getNestedLocaleString;
|
|
6
|
+
exports.setByPath = setByPath;
|
|
7
|
+
exports.deepMerge = deepMerge;
|
|
8
|
+
exports.deepClone = deepClone;
|
|
9
|
+
/** Deep get for dot-separated paths (`a.b.c`). */
|
|
10
|
+
function getByPath(obj, path) {
|
|
11
|
+
if (!path)
|
|
12
|
+
return obj;
|
|
13
|
+
const parts = path.split('.').filter(Boolean);
|
|
14
|
+
let cur = obj;
|
|
15
|
+
for (const part of parts) {
|
|
16
|
+
if (cur == null || typeof cur !== 'object')
|
|
17
|
+
return undefined;
|
|
18
|
+
cur = cur[part];
|
|
19
|
+
}
|
|
20
|
+
return cur;
|
|
21
|
+
}
|
|
22
|
+
function getNestedLocaleValue(obj, dotPath) {
|
|
23
|
+
return getByPath(obj, dotPath);
|
|
24
|
+
}
|
|
25
|
+
function getNestedLocaleString(obj, dotPath) {
|
|
26
|
+
const value = getByPath(obj, dotPath);
|
|
27
|
+
return typeof value === 'string' && value.trim() ? value : undefined;
|
|
28
|
+
}
|
|
29
|
+
function setByPath(obj, path, value) {
|
|
30
|
+
const parts = path.split('.').filter(Boolean);
|
|
31
|
+
let cur = obj;
|
|
32
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
33
|
+
const key = parts[i];
|
|
34
|
+
const next = cur[key];
|
|
35
|
+
if (next == null || typeof next !== 'object' || Array.isArray(next)) {
|
|
36
|
+
cur[key] = {};
|
|
37
|
+
}
|
|
38
|
+
cur = cur[key];
|
|
39
|
+
}
|
|
40
|
+
cur[parts[parts.length - 1]] = value;
|
|
41
|
+
}
|
|
42
|
+
function deepMerge(target, source) {
|
|
43
|
+
const out = { ...target };
|
|
44
|
+
for (const key of Object.keys(source)) {
|
|
45
|
+
const sv = source[key];
|
|
46
|
+
const tv = out[key];
|
|
47
|
+
if (sv &&
|
|
48
|
+
typeof sv === 'object' &&
|
|
49
|
+
!Array.isArray(sv) &&
|
|
50
|
+
tv &&
|
|
51
|
+
typeof tv === 'object' &&
|
|
52
|
+
!Array.isArray(tv)) {
|
|
53
|
+
out[key] = deepMerge(tv, sv);
|
|
54
|
+
}
|
|
55
|
+
else if (sv !== undefined) {
|
|
56
|
+
out[key] = sv;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return out;
|
|
60
|
+
}
|
|
61
|
+
function deepClone(obj) {
|
|
62
|
+
return JSON.parse(JSON.stringify(obj));
|
|
63
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type SettingRow = {
|
|
2
|
+
key: string;
|
|
3
|
+
value?: unknown;
|
|
4
|
+
[field: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
/** Map global settings rows to a props object by key. */
|
|
7
|
+
export declare function pickSiteSettings<T extends Record<string, {
|
|
8
|
+
key: string;
|
|
9
|
+
default: string;
|
|
10
|
+
}>>(settings: SettingRow[], schema: T): {
|
|
11
|
+
[K in keyof T]: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pickSiteSettings = pickSiteSettings;
|
|
4
|
+
/** Map global settings rows to a props object by key. */
|
|
5
|
+
function pickSiteSettings(settings, schema) {
|
|
6
|
+
const out = {};
|
|
7
|
+
for (const prop of Object.keys(schema)) {
|
|
8
|
+
const { key, default: fallback } = schema[prop];
|
|
9
|
+
const row = settings.find((s) => s.key === key);
|
|
10
|
+
out[prop] = row?.value != null ? String(row.value) : fallback;
|
|
11
|
+
}
|
|
12
|
+
return out;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stripHtml = stripHtml;
|
|
4
|
+
exports.truncateWords = truncateWords;
|
|
5
|
+
/** Strip HTML tags and collapse whitespace. */
|
|
6
|
+
function stripHtml(html) {
|
|
7
|
+
return html.replace(/<[^>]+>/g, ' ').replace(/\s+/g, ' ').trim();
|
|
8
|
+
}
|
|
9
|
+
/** Truncate text to a word limit with an ellipsis. */
|
|
10
|
+
function truncateWords(text, limit) {
|
|
11
|
+
const words = text.trim().split(/\s+/).filter(Boolean);
|
|
12
|
+
if (words.length <= limit)
|
|
13
|
+
return text.trim();
|
|
14
|
+
return `${words.slice(0, limit).join(' ')}…`;
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.elementInViewport = elementInViewport;
|
|
4
|
+
exports.isOdd = isOdd;
|
|
5
|
+
/** Whether an element's top edge is within the upper viewport band. */
|
|
6
|
+
function elementInViewport(el) {
|
|
7
|
+
if (!el || !(el instanceof HTMLElement))
|
|
8
|
+
return false;
|
|
9
|
+
const rect = el.getBoundingClientRect();
|
|
10
|
+
return rect.top >= 0 && rect.top <= window.innerHeight * 0.4;
|
|
11
|
+
}
|
|
12
|
+
function isOdd(value) {
|
|
13
|
+
return value % 2 !== 0;
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,24 +1,135 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fecommunity/reactpress-toolkit",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
7
|
-
".":
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"./
|
|
12
|
-
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"default": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"./api": {
|
|
12
|
+
"types": "./dist/api/index.d.ts",
|
|
13
|
+
"default": "./dist/api/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./api/instance": {
|
|
16
|
+
"types": "./dist/api/instance.d.ts",
|
|
17
|
+
"default": "./dist/api/instance.js"
|
|
18
|
+
},
|
|
19
|
+
"./types": {
|
|
20
|
+
"types": "./dist/types/index.d.ts",
|
|
21
|
+
"default": "./dist/types/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./utils": {
|
|
24
|
+
"types": "./dist/utils/index.d.ts",
|
|
25
|
+
"default": "./dist/utils/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./config": {
|
|
28
|
+
"types": "./dist/config/index.d.ts",
|
|
29
|
+
"default": "./dist/config/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./theme": {
|
|
32
|
+
"types": "./dist/theme/index.d.ts",
|
|
33
|
+
"default": "./dist/theme/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./theme/server": {
|
|
36
|
+
"types": "./dist/theme/server.d.ts",
|
|
37
|
+
"default": "./dist/theme/server.js"
|
|
38
|
+
},
|
|
39
|
+
"./theme/next-config": {
|
|
40
|
+
"types": "./dist/theme/next-config.d.ts",
|
|
41
|
+
"default": "./dist/theme/next-config.js"
|
|
42
|
+
},
|
|
43
|
+
"./theme/node": {
|
|
44
|
+
"types": "./dist/theme/node.d.ts",
|
|
45
|
+
"default": "./dist/theme/node.js"
|
|
46
|
+
},
|
|
47
|
+
"./theme/providers": {
|
|
48
|
+
"types": "./dist/theme/providers/index.d.ts",
|
|
49
|
+
"default": "./dist/theme/providers/index.js"
|
|
50
|
+
},
|
|
51
|
+
"./app": {
|
|
52
|
+
"types": "./dist/app/index.d.ts",
|
|
53
|
+
"default": "./dist/app/index.js"
|
|
54
|
+
},
|
|
55
|
+
"./ui": {
|
|
56
|
+
"types": "./dist/ui/index.d.ts",
|
|
57
|
+
"default": "./dist/ui/index.js"
|
|
58
|
+
},
|
|
59
|
+
"./ui/content": {
|
|
60
|
+
"types": "./dist/ui/components/content/index.d.ts",
|
|
61
|
+
"default": "./dist/ui/components/content/index.js"
|
|
62
|
+
},
|
|
63
|
+
"./plugin": {
|
|
64
|
+
"types": "./dist/plugin/index.d.ts",
|
|
65
|
+
"default": "./dist/plugin/index.js"
|
|
66
|
+
},
|
|
67
|
+
"./plugin/admin": {
|
|
68
|
+
"types": "./dist/plugin/admin/index.d.ts",
|
|
69
|
+
"default": "./dist/plugin/admin/index.js"
|
|
70
|
+
},
|
|
71
|
+
"./plugin/client": {
|
|
72
|
+
"types": "./dist/plugin/client/index.d.ts",
|
|
73
|
+
"default": "./dist/plugin/client/index.js"
|
|
74
|
+
},
|
|
75
|
+
"./plugin/react": {
|
|
76
|
+
"types": "./dist/plugin/react/index.d.ts",
|
|
77
|
+
"default": "./dist/plugin/react/index.js"
|
|
78
|
+
},
|
|
79
|
+
"./plugin/dev": {
|
|
80
|
+
"types": "./dist/plugin/dev/index.d.ts",
|
|
81
|
+
"default": "./dist/plugin/dev/index.js"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"peerDependencies": {
|
|
85
|
+
"@ant-design/cssinjs": ">=1",
|
|
86
|
+
"@tanstack/react-query": ">=5",
|
|
87
|
+
"highlight.js": ">=9",
|
|
88
|
+
"next": ">=12",
|
|
89
|
+
"nprogress": ">=0.2",
|
|
90
|
+
"react": "^18.3.1",
|
|
91
|
+
"react-dom": "^18.3.1",
|
|
92
|
+
"viewerjs": ">=1"
|
|
93
|
+
},
|
|
94
|
+
"peerDependenciesMeta": {
|
|
95
|
+
"@tanstack/react-query": { "optional": true },
|
|
96
|
+
"@ant-design/cssinjs": { "optional": true },
|
|
97
|
+
"highlight.js": { "optional": true },
|
|
98
|
+
"next": { "optional": true },
|
|
99
|
+
"nprogress": { "optional": true },
|
|
100
|
+
"react": { "optional": true },
|
|
101
|
+
"react-dom": { "optional": true },
|
|
102
|
+
"viewerjs": { "optional": true }
|
|
103
|
+
},
|
|
104
|
+
"scripts": {
|
|
105
|
+
"generate": "node scripts/generate-swagger.js",
|
|
106
|
+
"build": "tsc && rm -rf dist/config/locales && cp -r src/config/locales dist/config/locales",
|
|
107
|
+
"typecheck": "tsc --noEmit"
|
|
13
108
|
},
|
|
14
109
|
"files": [
|
|
15
110
|
"dist"
|
|
16
111
|
],
|
|
17
|
-
"keywords": [
|
|
18
|
-
|
|
112
|
+
"keywords": [
|
|
113
|
+
"reactpress",
|
|
114
|
+
"cms",
|
|
115
|
+
"toolkit",
|
|
116
|
+
"theme",
|
|
117
|
+
"headless"
|
|
118
|
+
],
|
|
119
|
+
"author": "fecommunity",
|
|
19
120
|
"license": "ISC",
|
|
20
|
-
"
|
|
121
|
+
"repository": {
|
|
122
|
+
"type": "git",
|
|
123
|
+
"url": "git+https://github.com/fecommunity/reactpress.git",
|
|
124
|
+
"directory": "toolkit"
|
|
125
|
+
},
|
|
126
|
+
"publishConfig": {
|
|
127
|
+
"access": "public",
|
|
128
|
+
"registry": "https://registry.npmjs.org/"
|
|
129
|
+
},
|
|
130
|
+
"description": "ReactPress TypeScript toolkit: OpenAPI clients, theme SSR helpers, headless UI, and admin plugin registry.",
|
|
21
131
|
"dependencies": {
|
|
132
|
+
"ajv": "^8.17.1",
|
|
22
133
|
"axios": "^1.12.2",
|
|
23
134
|
"dotenv": "^8.6.0",
|
|
24
135
|
"fs-extra": "^10.0.0",
|
|
@@ -26,11 +137,13 @@
|
|
|
26
137
|
"swagger-typescript-api": "^12.0.4"
|
|
27
138
|
},
|
|
28
139
|
"devDependencies": {
|
|
140
|
+
"@ant-design/cssinjs": "^1.22.0",
|
|
29
141
|
"@types/fs-extra": "^9.0.13",
|
|
30
|
-
"@types/node": "^17.0.22"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
142
|
+
"@types/node": "^17.0.22",
|
|
143
|
+
"@types/react": "^18.3.18",
|
|
144
|
+
"@types/react-dom": "^18.3.5",
|
|
145
|
+
"react": "^18.3.1",
|
|
146
|
+
"react-dom": "^18.3.1",
|
|
147
|
+
"typescript": "^5.7.3"
|
|
35
148
|
}
|
|
36
|
-
}
|
|
149
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) [2024] [fecommunity]
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|