@windrun-huaiin/base-ui 4.0.0 → 4.1.1

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.
@@ -1,4 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ComponentType, ReactNode } from 'react';
3
+ import { LucideProps } from 'lucide-react';
2
4
 
3
5
  declare function NotFoundPage(): react_jsx_runtime.JSX.Element;
4
6
 
@@ -43,4 +45,23 @@ declare global {
43
45
 
44
46
  declare function MicrosoftClarityScript(): react_jsx_runtime.JSX.Element | null;
45
47
 
46
- export { GoogleAnalyticsScript, LanguageDetector, LanguageSwitcher, MicrosoftClarityScript, NotFoundPage, useGoogleAnalytics };
48
+ interface IconConfig {
49
+ siteIcon?: ComponentType | string;
50
+ }
51
+ interface IconConfigProviderProps {
52
+ config: IconConfig;
53
+ children: ReactNode;
54
+ }
55
+ /**
56
+ * IconConfigProvider - icon config provider based on React Context
57
+ * directly store the config value, without depending on module state
58
+ */
59
+ declare function IconConfigProvider({ config, children }: IconConfigProviderProps): react_jsx_runtime.JSX.Element;
60
+
61
+ /**
62
+ * site icon component - client component
63
+ * based on React Context to get the config, solve the problem of cross-package module instance isolation
64
+ */
65
+ declare function SiteIcon({ size, className, ...props }: Omit<LucideProps, 'children'>): react_jsx_runtime.JSX.Element;
66
+
67
+ export { GoogleAnalyticsScript, type IconConfig, IconConfigProvider, LanguageDetector, LanguageSwitcher, MicrosoftClarityScript, NotFoundPage, SiteIcon, useGoogleAnalytics };
@@ -1,4 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ComponentType, ReactNode } from 'react';
3
+ import { LucideProps } from 'lucide-react';
2
4
 
3
5
  declare function NotFoundPage(): react_jsx_runtime.JSX.Element;
4
6
 
@@ -43,4 +45,23 @@ declare global {
43
45
 
44
46
  declare function MicrosoftClarityScript(): react_jsx_runtime.JSX.Element | null;
45
47
 
46
- export { GoogleAnalyticsScript, LanguageDetector, LanguageSwitcher, MicrosoftClarityScript, NotFoundPage, useGoogleAnalytics };
48
+ interface IconConfig {
49
+ siteIcon?: ComponentType | string;
50
+ }
51
+ interface IconConfigProviderProps {
52
+ config: IconConfig;
53
+ children: ReactNode;
54
+ }
55
+ /**
56
+ * IconConfigProvider - icon config provider based on React Context
57
+ * directly store the config value, without depending on module state
58
+ */
59
+ declare function IconConfigProvider({ config, children }: IconConfigProviderProps): react_jsx_runtime.JSX.Element;
60
+
61
+ /**
62
+ * site icon component - client component
63
+ * based on React Context to get the config, solve the problem of cross-package module instance isolation
64
+ */
65
+ declare function SiteIcon({ size, className, ...props }: Omit<LucideProps, 'children'>): react_jsx_runtime.JSX.Element;
66
+
67
+ export { GoogleAnalyticsScript, type IconConfig, IconConfigProvider, LanguageDetector, LanguageSwitcher, MicrosoftClarityScript, NotFoundPage, SiteIcon, useGoogleAnalytics };
@@ -1141,6 +1141,9 @@ function cn(...inputs) {
1141
1141
  return tailwindMerge.twMerge(clsx.clsx(inputs));
1142
1142
  }
1143
1143
  var IconConfigContext = React30.createContext(null);
1144
+ function IconConfigProvider({ config, children }) {
1145
+ return /* @__PURE__ */ jsxRuntime.jsx(IconConfigContext.Provider, { value: config, children });
1146
+ }
1144
1147
  function useIconConfig() {
1145
1148
  const config = React30.useContext(IconConfigContext);
1146
1149
  if (config === null) {
@@ -1631,10 +1634,12 @@ function MicrosoftClarityScript() {
1631
1634
  */
1632
1635
 
1633
1636
  exports.GoogleAnalyticsScript = GoogleAnalyticsScript;
1637
+ exports.IconConfigProvider = IconConfigProvider;
1634
1638
  exports.LanguageDetector = LanguageDetector;
1635
1639
  exports.LanguageSwitcher = LanguageSwitcher;
1636
1640
  exports.MicrosoftClarityScript = MicrosoftClarityScript;
1637
1641
  exports.NotFoundPage = NotFoundPage;
1642
+ exports.SiteIcon = SiteIcon;
1638
1643
  exports.useGoogleAnalytics = useGoogleAnalytics;
1639
1644
  //# sourceMappingURL=index.js.map
1640
1645
  //# sourceMappingURL=index.js.map