@windrun-huaiin/third-ui 26.0.0 → 28.0.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.
Files changed (210) hide show
  1. package/dist/ai/ai-prompt-textarea.d.ts +72 -0
  2. package/dist/ai/ai-prompt-textarea.js +114 -0
  3. package/dist/ai/ai-prompt-textarea.mjs +112 -0
  4. package/dist/ai/index.d.ts +1 -0
  5. package/dist/ai/index.js +2 -0
  6. package/dist/ai/index.mjs +1 -0
  7. package/dist/clerk/clerk-provider-client.js +0 -1
  8. package/dist/clerk/clerk-provider-client.mjs +0 -1
  9. package/dist/clerk/fingerprint/fingerprint-client.js +0 -4
  10. package/dist/clerk/fingerprint/fingerprint-client.mjs +0 -4
  11. package/dist/clerk/fingerprint/use-fingerprint.js +0 -6
  12. package/dist/clerk/fingerprint/use-fingerprint.mjs +0 -6
  13. package/dist/clerk/signin-with-fingerprint-client.js +0 -9
  14. package/dist/clerk/signin-with-fingerprint-client.mjs +0 -9
  15. package/dist/clerk/signup-button-with-fingerprint-client.js +0 -16
  16. package/dist/clerk/signup-button-with-fingerprint-client.mjs +0 -16
  17. package/dist/clerk/signup-with-fingerprint-client.js +0 -9
  18. package/dist/clerk/signup-with-fingerprint-client.mjs +0 -9
  19. package/dist/fuma/base/custom-header.js +10 -8
  20. package/dist/fuma/base/custom-header.mjs +10 -8
  21. package/dist/fuma/base/custom-home-layout.d.ts +0 -4
  22. package/dist/fuma/base/docs-root-provider.d.ts +19 -0
  23. package/dist/fuma/base/docs-root-provider.js +17 -0
  24. package/dist/fuma/base/docs-root-provider.mjs +15 -0
  25. package/dist/fuma/base/index.d.ts +5 -0
  26. package/dist/fuma/base/index.js +16 -7
  27. package/dist/fuma/base/index.mjs +5 -1
  28. package/dist/fuma/base/nav-config.d.ts +10 -0
  29. package/dist/fuma/base/nav-config.js +32 -0
  30. package/dist/fuma/base/nav-config.mjs +28 -0
  31. package/dist/fuma/base/site-docs-layout.d.ts +11 -0
  32. package/dist/fuma/base/site-docs-layout.js +15 -0
  33. package/dist/fuma/base/site-docs-layout.mjs +13 -0
  34. package/dist/fuma/base/site-home-layout.d.ts +24 -0
  35. package/dist/fuma/base/site-home-layout.js +16 -0
  36. package/dist/fuma/base/site-home-layout.mjs +14 -0
  37. package/dist/fuma/base/site-layout-shared.d.ts +89 -0
  38. package/dist/fuma/base/site-layout-shared.js +48 -0
  39. package/dist/fuma/base/site-layout-shared.mjs +42 -0
  40. package/dist/fuma/base/site-layout.d.ts +4 -116
  41. package/dist/fuma/base/site-layout.js +2 -2
  42. package/dist/fuma/base/site-layout.mjs +2 -2
  43. package/dist/fuma/fuma-page-genarator.d.ts +1 -1
  44. package/dist/fuma/fuma-page-genarator.js +65 -10
  45. package/dist/fuma/fuma-page-genarator.mjs +61 -6
  46. package/dist/fuma/llm-copy-handler.js +0 -9
  47. package/dist/fuma/llm-copy-handler.mjs +0 -9
  48. package/dist/fuma/mdx/index.d.ts +0 -1
  49. package/dist/fuma/mdx/index.js +0 -2
  50. package/dist/fuma/mdx/index.mjs +0 -1
  51. package/dist/fuma/mdx/suno-embed.js +3 -1
  52. package/dist/fuma/mdx/suno-embed.mjs +3 -1
  53. package/dist/fuma/mdx/toc-base.js +0 -1
  54. package/dist/fuma/mdx/toc-base.mjs +0 -1
  55. package/dist/fuma/server/features/widgets.js +5 -1
  56. package/dist/fuma/server/features/widgets.mjs +5 -1
  57. package/dist/fuma/server/llm-copy-handler.d.ts +2 -0
  58. package/dist/fuma/server/llm-copy-handler.js +7 -0
  59. package/dist/fuma/server/llm-copy-handler.mjs +1 -0
  60. package/dist/fuma/server/page-generator.d.ts +2 -0
  61. package/dist/fuma/server/page-generator.js +7 -0
  62. package/dist/fuma/server/page-generator.mjs +1 -0
  63. package/dist/lib/seo-metadata.js +3 -3
  64. package/dist/lib/seo-metadata.mjs +1 -1
  65. package/dist/lib/seo-util.js +4 -4
  66. package/dist/lib/seo-util.mjs +1 -1
  67. package/dist/lib/site-docs-helper.d.ts +51 -0
  68. package/dist/lib/site-docs-helper.js +68 -0
  69. package/dist/lib/site-docs-helper.mjs +66 -0
  70. package/dist/main/alert-dialog/index.js +14 -0
  71. package/dist/main/alert-dialog/index.mjs +5 -0
  72. package/dist/main/buttons/gradient-button.d.ts +20 -0
  73. package/dist/main/buttons/gradient-button.js +88 -0
  74. package/dist/main/buttons/gradient-button.mjs +86 -0
  75. package/dist/main/buttons/index.d.ts +3 -0
  76. package/dist/main/buttons/index.js +12 -0
  77. package/dist/main/buttons/index.mjs +4 -0
  78. package/dist/main/buttons/x-button.d.ts +39 -0
  79. package/dist/main/buttons/x-button.js +92 -0
  80. package/dist/main/buttons/x-button.mjs +90 -0
  81. package/dist/main/buttons/x-toggle-button.d.ts +32 -0
  82. package/dist/main/buttons/x-toggle-button.js +95 -0
  83. package/dist/main/buttons/x-toggle-button.mjs +74 -0
  84. package/dist/main/credit/credit-nav-button.js +25 -1
  85. package/dist/main/credit/credit-nav-button.mjs +25 -1
  86. package/dist/main/credit/credit-overview-client.js +3 -2
  87. package/dist/main/credit/credit-overview-client.mjs +3 -2
  88. package/dist/main/credit/index.d.ts +4 -0
  89. package/dist/main/credit/index.js +10 -0
  90. package/dist/main/credit/index.mjs +3 -0
  91. package/dist/main/credit/server.d.ts +2 -0
  92. package/dist/main/credit/server.js +7 -0
  93. package/dist/main/credit/server.mjs +1 -0
  94. package/dist/main/cta.js +4 -2
  95. package/dist/main/cta.mjs +4 -2
  96. package/dist/main/footer.js +3 -3
  97. package/dist/main/footer.mjs +1 -1
  98. package/dist/main/hero/index.d.ts +2 -0
  99. package/dist/main/hero/index.js +10 -0
  100. package/dist/main/hero/index.mjs +3 -0
  101. package/dist/main/home/server.d.ts +7 -0
  102. package/dist/main/home/server.js +19 -0
  103. package/dist/main/home/server.mjs +7 -0
  104. package/dist/main/index.d.ts +0 -15
  105. package/dist/main/index.js +0 -43
  106. package/dist/main/index.mjs +0 -21
  107. package/dist/main/loading/index.d.ts +1 -0
  108. package/dist/main/loading/index.js +9 -0
  109. package/dist/main/loading/index.mjs +2 -0
  110. package/dist/main/loading-frame/index.d.ts +1 -0
  111. package/dist/main/loading-frame/index.js +9 -0
  112. package/dist/main/loading-frame/index.mjs +2 -0
  113. package/dist/main/money-price/index.d.ts +4 -0
  114. package/dist/main/money-price/index.js +15 -0
  115. package/dist/main/money-price/index.mjs +4 -0
  116. package/dist/main/money-price/money-price-button.d.ts +1 -1
  117. package/dist/main/money-price/money-price-button.js +12 -9
  118. package/dist/main/money-price/money-price-button.mjs +12 -9
  119. package/dist/main/money-price/money-price-interactive.d.ts +1 -1
  120. package/dist/main/money-price/money-price-interactive.js +22 -25
  121. package/dist/main/money-price/money-price-interactive.mjs +22 -25
  122. package/dist/main/money-price/money-price-types.d.ts +2 -0
  123. package/dist/main/money-price/server.d.ts +5 -0
  124. package/dist/main/money-price/server.js +18 -0
  125. package/dist/main/money-price/server.mjs +4 -0
  126. package/package.json +94 -4
  127. package/src/ai/index.ts +1 -0
  128. package/src/clerk/clerk-provider-client.tsx +1 -3
  129. package/src/clerk/fingerprint/fingerprint-client.ts +0 -4
  130. package/src/clerk/fingerprint/use-fingerprint.ts +0 -6
  131. package/src/clerk/signin-with-fingerprint-client.tsx +0 -10
  132. package/src/clerk/signup-button-with-fingerprint-client.tsx +0 -17
  133. package/src/clerk/signup-with-fingerprint-client.tsx +0 -10
  134. package/src/fuma/base/custom-header.tsx +12 -8
  135. package/src/fuma/base/custom-home-layout.tsx +3 -6
  136. package/src/fuma/base/docs-root-provider.tsx +58 -0
  137. package/src/fuma/base/index.ts +5 -0
  138. package/src/fuma/base/nav-config.ts +81 -0
  139. package/src/fuma/base/site-docs-layout.tsx +35 -0
  140. package/src/fuma/base/site-home-layout.tsx +78 -0
  141. package/src/fuma/base/site-layout-shared.tsx +190 -0
  142. package/src/fuma/base/site-layout.tsx +4 -289
  143. package/src/fuma/fuma-banner-suit.tsx +1 -1
  144. package/src/fuma/fuma-page-genarator.tsx +61 -8
  145. package/src/fuma/llm-copy-handler.ts +0 -11
  146. package/src/fuma/mdx/index.ts +0 -1
  147. package/src/fuma/mdx/suno-embed.tsx +1 -1
  148. package/src/fuma/mdx/toc-base.tsx +0 -1
  149. package/src/fuma/mdx/toc-footer-wrapper.tsx +2 -2
  150. package/src/fuma/server/features/widgets.tsx +1 -1
  151. package/src/fuma/server/llm-copy-handler.ts +2 -0
  152. package/src/fuma/server/page-generator.ts +2 -0
  153. package/src/lib/seo-metadata.ts +1 -1
  154. package/src/lib/seo-util.ts +2 -2
  155. package/src/lib/server.ts +1 -1
  156. package/src/{fuma/mdx → main/buttons}/gradient-button.tsx +10 -21
  157. package/src/main/buttons/index.ts +5 -0
  158. package/src/main/{x-button.tsx → buttons/x-button.tsx} +28 -42
  159. package/src/main/credit/credit-nav-button.tsx +36 -3
  160. package/src/main/credit/credit-overview-client.tsx +1 -1
  161. package/src/main/credit/index.ts +11 -0
  162. package/src/main/credit/server.ts +7 -0
  163. package/src/main/cta.tsx +1 -1
  164. package/src/main/footer.tsx +1 -2
  165. package/src/main/hero/index.ts +4 -0
  166. package/src/main/home/server.ts +7 -0
  167. package/src/main/index.ts +1 -20
  168. package/src/main/language-detector.tsx +0 -1
  169. package/src/main/loading/index.ts +3 -0
  170. package/src/main/loading-frame/index.ts +3 -0
  171. package/src/main/money-price/index.ts +18 -0
  172. package/src/main/money-price/money-price-button.tsx +17 -9
  173. package/src/main/money-price/money-price-interactive.tsx +30 -25
  174. package/src/main/money-price/money-price-types.ts +2 -0
  175. package/src/main/money-price/server.ts +22 -0
  176. package/dist/fuma/mdx/features.d.ts +0 -8
  177. package/dist/fuma/mdx/features.js +0 -92
  178. package/dist/fuma/mdx/features.mjs +0 -85
  179. package/dist/fuma/mdx/image-grid.d.ts +0 -6
  180. package/dist/fuma/mdx/image-grid.js +0 -17
  181. package/dist/fuma/mdx/image-grid.mjs +0 -15
  182. package/dist/fuma/mdx/image-zoom.d.ts +0 -22
  183. package/dist/fuma/mdx/image-zoom.js +0 -39
  184. package/dist/fuma/mdx/image-zoom.mjs +0 -37
  185. package/dist/fuma/mdx/markdown-component-map.d.ts +0 -3
  186. package/dist/fuma/mdx/markdown-component-map.js +0 -79
  187. package/dist/fuma/mdx/markdown-component-map.mjs +0 -77
  188. package/dist/fuma/mdx/math.d.ts +0 -17
  189. package/dist/fuma/mdx/math.js +0 -60
  190. package/dist/fuma/mdx/math.mjs +0 -57
  191. package/dist/fuma/mdx/mermaid.d.ts +0 -13
  192. package/dist/fuma/mdx/mermaid.js +0 -360
  193. package/dist/fuma/mdx/mermaid.mjs +0 -358
  194. package/dist/fuma/mdx/site-mdx-components.d.ts +0 -13
  195. package/dist/fuma/mdx/site-mdx-components.js +0 -19
  196. package/dist/fuma/mdx/site-mdx-components.mjs +0 -17
  197. package/dist/fuma/mdx/site-mdx-presets.d.ts +0 -13
  198. package/dist/fuma/mdx/site-mdx-presets.js +0 -49
  199. package/dist/fuma/mdx/site-mdx-presets.mjs +0 -45
  200. package/dist/fuma/server/optional-features.d.ts +0 -6
  201. package/dist/fuma/server/optional-features.js +0 -17
  202. package/dist/fuma/server/optional-features.mjs +0 -6
  203. package/dist/fuma/server/site-mdx-components.d.ts +0 -13
  204. package/dist/fuma/server/site-mdx-components.js +0 -18
  205. package/dist/fuma/server/site-mdx-components.mjs +0 -16
  206. package/dist/fuma/server/site-mdx-presets.d.ts +0 -195
  207. package/dist/fuma/server/site-mdx-presets.js +0 -55
  208. package/dist/fuma/server/site-mdx-presets.mjs +0 -52
  209. /package/src/{main → ai}/ai-prompt-textarea.tsx +0 -0
  210. /package/src/main/{x-toggle-button.tsx → buttons/x-toggle-button.tsx} +0 -0
@@ -0,0 +1,90 @@
1
+ "use client";
2
+ import { __awaiter } from 'tslib';
3
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
+ import React__default, { useState, useRef, useEffect } from 'react';
5
+ import { Loader2Icon, ChevronDownIcon } from '@windrun-huaiin/base-ui/icons';
6
+ import { themeIconColor, themeBgColor, themeBorderColor, themeMainBgColor } from '@windrun-huaiin/base-ui/lib';
7
+ import { cn } from '@windrun-huaiin/lib/utils';
8
+
9
+ function XButton(props) {
10
+ var _a, _b, _c;
11
+ const [isLoading, setIsLoading] = useState(false);
12
+ const [menuOpen, setMenuOpen] = useState(false);
13
+ const menuRef = useRef(null);
14
+ const { iconClassName } = props;
15
+ const defaultIconClass = "w-5 h-5";
16
+ const variant = (_a = props.variant) !== null && _a !== void 0 ? _a : 'default';
17
+ const finalIconClass = cn(variant === 'default' ? '' : themeIconColor, iconClassName || defaultIconClass);
18
+ const loadingIconClass = cn(finalIconClass, "mr-1 animate-spin");
19
+ const chevronIconClass = "w-6 h-6";
20
+ const renderIcon = (icon) => {
21
+ if (React__default.isValidElement(icon)) {
22
+ return React__default.cloneElement(icon, {
23
+ className: cn(finalIconClass, icon.props.className),
24
+ });
25
+ }
26
+ return icon;
27
+ };
28
+ useEffect(() => {
29
+ if (props.type === 'split') {
30
+ const handleClickOutside = (event) => {
31
+ if (menuRef.current && !menuRef.current.contains(event.target)) {
32
+ setMenuOpen(false);
33
+ }
34
+ };
35
+ if (menuOpen) {
36
+ document.addEventListener('mousedown', handleClickOutside);
37
+ }
38
+ return () => {
39
+ document.removeEventListener('mousedown', handleClickOutside);
40
+ };
41
+ }
42
+ }, [menuOpen, props.type]);
43
+ const handleButtonClick = (onClick) => __awaiter(this, void 0, void 0, function* () {
44
+ if (isLoading)
45
+ return;
46
+ setIsLoading(true);
47
+ try {
48
+ yield onClick();
49
+ }
50
+ catch (error) {
51
+ console.error('Button click error:', error);
52
+ }
53
+ finally {
54
+ setIsLoading(false);
55
+ }
56
+ });
57
+ const baseButtonClass = "flex items-center justify-center gap-2 px-4 py-2 text-sm font-semibold transition-colors";
58
+ const singleButtonVariantClass = variant === 'soft'
59
+ ? cn(themeBgColor, themeIconColor, themeBorderColor, "border hover:brightness-95")
60
+ : variant === 'subtle'
61
+ ? cn(themeMainBgColor, themeIconColor, "border border-neutral-200 hover:bg-neutral-50 dark:border-neutral-800 dark:hover:bg-neutral-800")
62
+ : "bg-neutral-200 dark:bg-neutral-800 text-neutral-700 dark:text-white hover:bg-neutral-300 dark:hover:bg-neutral-700";
63
+ const splitMainButtonVariantClass = variant === 'soft'
64
+ ? cn("bg-transparent hover:bg-black/5 dark:hover:bg-white/5", themeIconColor)
65
+ : variant === 'subtle'
66
+ ? cn("bg-transparent hover:bg-neutral-50 dark:hover:bg-neutral-800", themeIconColor)
67
+ : "bg-neutral-200 dark:bg-neutral-800 text-neutral-700 dark:text-white hover:bg-neutral-300 dark:hover:bg-neutral-700";
68
+ const splitDropdownVariantClass = variant === 'soft'
69
+ ? cn("bg-transparent hover:bg-black/5 dark:hover:bg-white/5 sm:border-l", themeIconColor, themeBorderColor)
70
+ : variant === 'subtle'
71
+ ? cn("bg-transparent hover:bg-neutral-50 dark:hover:bg-neutral-800 sm:border-l", themeIconColor, "border-neutral-200 dark:border-neutral-800")
72
+ : "bg-neutral-200 dark:bg-neutral-800 text-neutral-700 dark:text-white hover:bg-neutral-300 dark:hover:bg-neutral-700 sm:border-l sm:border-neutral-300 sm:dark:border-neutral-700";
73
+ const disabledClass = "opacity-60 cursor-not-allowed";
74
+ if (props.type === 'single') {
75
+ const { button, loadingText, minWidth = 'min-w-[110px]', className = '' } = props;
76
+ const isDisabled = button.disabled || isLoading;
77
+ const actualLoadingText = loadingText || ((_b = button.text) === null || _b === void 0 ? void 0 : _b.trim()) || 'Loading...';
78
+ return (jsx("button", { onClick: () => handleButtonClick(button.onClick), disabled: isDisabled, className: cn("w-full sm:w-auto", minWidth, baseButtonClass, singleButtonVariantClass, "rounded-full", isDisabled && disabledClass, className), title: button.text, children: isLoading ? (jsxs(Fragment, { children: [jsx(Loader2Icon, { className: loadingIconClass }), jsx("span", { children: actualLoadingText })] })) : (jsxs(Fragment, { children: [renderIcon(button.icon), jsx("span", { children: button.text })] })) }));
79
+ }
80
+ const { mainButton, menuItems, loadingText, menuWidth = 'w-full sm:w-40', className = '', mainButtonClassName = '', dropdownButtonClassName = '' } = props;
81
+ const isMainDisabled = mainButton.disabled || isLoading;
82
+ const actualLoadingText = loadingText || ((_c = mainButton.text) === null || _c === void 0 ? void 0 : _c.trim()) || 'Loading...';
83
+ return (jsxs("div", { className: cn("relative flex flex-row items-stretch w-full sm:w-auto rounded-full gap-0", menuOpen && "z-90", className), children: [jsx("button", { onClick: () => handleButtonClick(mainButton.onClick), disabled: isMainDisabled, className: cn("flex-1 min-w-0 sm:min-w-[100px] sm:flex-initial rounded-l-full", baseButtonClass, splitMainButtonVariantClass, isMainDisabled && disabledClass, mainButtonClassName), onMouseDown: e => { if (e.button === 2)
84
+ e.preventDefault(); }, title: mainButton.text, children: isLoading ? (jsxs(Fragment, { children: [jsx(Loader2Icon, { className: loadingIconClass }), jsx("span", { children: actualLoadingText })] })) : (jsxs(Fragment, { children: [renderIcon(mainButton.icon), jsx("span", { children: mainButton.text })] })) }), jsx("button", { type: "button", onClick: () => setMenuOpen(!menuOpen), disabled: isLoading, className: cn("w-12 rounded-r-full", baseButtonClass, splitDropdownVariantClass, isLoading && disabledClass, dropdownButtonClassName), "aria-label": "Open menu", children: jsx(ChevronDownIcon, { className: cn(chevronIconClass, menuOpen && "rotate-180", "transition-transform") }) }), menuOpen && (jsx("div", { ref: menuRef, className: cn("absolute top-full right-0 mt-2 bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-lg shadow-lg z-50 overflow-hidden", menuWidth), children: menuItems.map((item, index) => (jsxs("button", { type: "button", onClick: () => {
85
+ setMenuOpen(false);
86
+ handleButtonClick(item.onClick);
87
+ }, disabled: item.disabled || isLoading, className: cn("w-full flex items-center gap-2 px-3 py-2 text-sm text-left hover:bg-neutral-100 dark:hover:bg-neutral-700 transition-colors", item.disabled && disabledClass, item.splitTopBorder && "border-t border-neutral-200 dark:border-neutral-700"), children: [renderIcon(item.icon), jsx("span", { className: "flex-1", children: item.text }), item.tag && (jsx("span", { className: cn("px-1.5 py-0.5 text-xs rounded", item.tag.color || "bg-blue-100 text-blue-800"), children: item.tag.text }))] }, index))) }))] }));
88
+ }
89
+
90
+ export { XButton };
@@ -0,0 +1,32 @@
1
+ import * as React from 'react';
2
+ export type XToggleButtonOption = {
3
+ value: string;
4
+ label: React.ReactNode;
5
+ disabled?: boolean;
6
+ className?: string;
7
+ badge?: React.ReactNode;
8
+ mobileIcon?: React.ReactNode;
9
+ };
10
+ type XToggleButtonSize = 'default' | 'compact';
11
+ export type XToggleButtonProps = {
12
+ options: XToggleButtonOption[];
13
+ value?: string;
14
+ defaultValue?: string;
15
+ onChange?: (value: string) => void;
16
+ disabled?: boolean;
17
+ className?: string;
18
+ itemClassName?: string;
19
+ activeItemClassName?: string;
20
+ inactiveItemClassName?: string;
21
+ badgeClassName?: string;
22
+ minItemWidthClassName?: string;
23
+ maxItemWidthClassName?: string;
24
+ itemTextClassName?: string;
25
+ itemPaddingClassName?: string;
26
+ size?: XToggleButtonSize;
27
+ fullWidth?: boolean;
28
+ name?: string;
29
+ ariaLabel?: string;
30
+ };
31
+ export declare function XToggleButton({ options, value, defaultValue, onChange, disabled, className, itemClassName, activeItemClassName, inactiveItemClassName, badgeClassName, minItemWidthClassName, maxItemWidthClassName, itemTextClassName, itemPaddingClassName, size, fullWidth, name, ariaLabel, }: XToggleButtonProps): import("react/jsx-runtime").JSX.Element;
32
+ export {};
@@ -0,0 +1,95 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+ var React = require('react');
6
+ var utils = require('@windrun-huaiin/lib/utils');
7
+ var lib = require('@windrun-huaiin/base-ui/lib');
8
+
9
+ function _interopNamespaceDefault(e) {
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
27
+
28
+ function XToggleButton({ options, value, defaultValue, onChange, disabled = false, className, itemClassName, activeItemClassName, inactiveItemClassName, badgeClassName, minItemWidthClassName, maxItemWidthClassName, itemTextClassName, itemPaddingClassName, size = 'default', fullWidth = false, name, ariaLabel, }) {
29
+ const containerRef = React__namespace.useRef(null);
30
+ const activeButtonRef = React__namespace.useRef(null);
31
+ const [badgeOffset, setBadgeOffset] = React__namespace.useState(0);
32
+ const normalizedOptions = React__namespace.useMemo(() => options.filter((option) => option.value.trim()), [options]);
33
+ const fallbackValue = React__namespace.useMemo(() => {
34
+ var _a, _b;
35
+ if (defaultValue && normalizedOptions.some((option) => option.value === defaultValue)) {
36
+ return defaultValue;
37
+ }
38
+ return (_b = (_a = normalizedOptions[0]) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '';
39
+ }, [defaultValue, normalizedOptions]);
40
+ const isControlled = value !== undefined;
41
+ const [internalValue, setInternalValue] = React__namespace.useState(fallbackValue);
42
+ React__namespace.useEffect(() => {
43
+ if (!isControlled) {
44
+ setInternalValue(fallbackValue);
45
+ }
46
+ }, [fallbackValue, isControlled]);
47
+ const selectedValue = isControlled ? value !== null && value !== void 0 ? value : '' : internalValue;
48
+ React__namespace.useEffect(() => {
49
+ if (activeButtonRef.current && containerRef.current) {
50
+ const buttonRect = activeButtonRef.current.getBoundingClientRect();
51
+ const containerRect = containerRef.current.getBoundingClientRect();
52
+ const buttonCenterX = buttonRect.left - containerRect.left + buttonRect.width / 2;
53
+ setBadgeOffset(buttonCenterX);
54
+ }
55
+ }, [selectedValue]);
56
+ function handleSelect(nextValue, optionDisabled) {
57
+ if (disabled || optionDisabled || nextValue === selectedValue) {
58
+ return;
59
+ }
60
+ if (!isControlled) {
61
+ setInternalValue(nextValue);
62
+ }
63
+ onChange === null || onChange === void 0 ? void 0 : onChange(nextValue);
64
+ }
65
+ const containerSizeClass = size === 'compact'
66
+ ? 'px-1.5 py-1.5 gap-0'
67
+ : 'px-2 py-2 gap-0 sm:px-3 sm:py-3 sm:gap-0';
68
+ const defaultItemTextClass = size === 'compact'
69
+ ? 'text-xs'
70
+ : 'text-xs sm:text-sm md:text-base';
71
+ const finalItemTextClassName = itemTextClassName !== null && itemTextClassName !== void 0 ? itemTextClassName : defaultItemTextClass;
72
+ const defaultItemPaddingClass = size === 'compact'
73
+ ? 'px-2 py-1'
74
+ : 'px-2 py-1.5 sm:px-3 sm:py-2';
75
+ const finalItemPaddingClassName = itemPaddingClassName !== null && itemPaddingClassName !== void 0 ? itemPaddingClassName : defaultItemPaddingClass;
76
+ const minItemWidthClass = minItemWidthClassName !== null && minItemWidthClassName !== void 0 ? minItemWidthClassName : 'min-w-[80px] sm:min-w-[100px] md:min-w-[120px]';
77
+ const maxItemWidthClass = maxItemWidthClassName !== null && maxItemWidthClassName !== void 0 ? maxItemWidthClassName : 'max-w-[120px] sm:max-w-[160px]';
78
+ const selectedOption = normalizedOptions.find((opt) => opt.value === selectedValue);
79
+ return (jsxRuntime.jsxs("div", { ref: containerRef, role: "radiogroup", "aria-label": ariaLabel, "aria-disabled": disabled, className: utils.cn('relative inline-flex items-center rounded-full border border-gray-300 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-900', fullWidth && 'flex w-full', containerSizeClass, className), children: [(selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.badge) ? (jsxRuntime.jsx("span", { style: {
80
+ left: `${badgeOffset}px`,
81
+ transform: 'translate(-50%, calc(-50% - 1px))'
82
+ }, className: utils.cn('absolute top-0 z-20 whitespace-nowrap rounded-md bg-yellow-100 px-2.5 py-0.5 text-[0.625rem] font-semibold text-yellow-800 shadow-sm sm:text-xs', badgeClassName), children: selectedOption.badge })) : null, normalizedOptions.map((option) => {
83
+ const active = option.value === selectedValue;
84
+ const optionDisabled = disabled || option.disabled;
85
+ return (jsxRuntime.jsx("div", { className: utils.cn('relative flex items-center justify-center', fullWidth && 'flex-1'), children: jsxRuntime.jsx("button", { ref: active ? activeButtonRef : null, type: "button", role: "radio", name: name, "aria-checked": active, "aria-pressed": active, disabled: optionDisabled, onClick: () => handleSelect(option.value, option.disabled), className: utils.cn('relative z-10 inline-flex items-center justify-center rounded-full font-medium text-center transition truncate', fullWidth && 'w-full', !fullWidth && minItemWidthClass, !fullWidth && maxItemWidthClass, finalItemPaddingClassName, finalItemTextClassName, active
86
+ ? utils.cn('text-white shadow-sm', lib.themeButtonGradientClass, lib.themeButtonGradientHoverClass, activeItemClassName)
87
+ : utils.cn('text-gray-800 hover:text-gray-900 dark:text-gray-200 dark:hover:text-gray-100', inactiveItemClassName), optionDisabled && 'cursor-not-allowed opacity-60', itemClassName, option.className), children: option.mobileIcon ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: "hidden sm:block", children: option.label }), jsxRuntime.jsx("span", { className: "block sm:hidden", children: active && React__namespace.isValidElement(option.mobileIcon)
88
+ ? React__namespace.cloneElement(option.mobileIcon, {
89
+ className: utils.cn(option.mobileIcon.props.className, 'text-white'),
90
+ })
91
+ : option.mobileIcon })] })) : (option.label) }) }, option.value));
92
+ })] }));
93
+ }
94
+
95
+ exports.XToggleButton = XToggleButton;
@@ -0,0 +1,74 @@
1
+ "use client";
2
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
+ import * as React from 'react';
4
+ import { cn } from '@windrun-huaiin/lib/utils';
5
+ import { themeButtonGradientClass, themeButtonGradientHoverClass } from '@windrun-huaiin/base-ui/lib';
6
+
7
+ function XToggleButton({ options, value, defaultValue, onChange, disabled = false, className, itemClassName, activeItemClassName, inactiveItemClassName, badgeClassName, minItemWidthClassName, maxItemWidthClassName, itemTextClassName, itemPaddingClassName, size = 'default', fullWidth = false, name, ariaLabel, }) {
8
+ const containerRef = React.useRef(null);
9
+ const activeButtonRef = React.useRef(null);
10
+ const [badgeOffset, setBadgeOffset] = React.useState(0);
11
+ const normalizedOptions = React.useMemo(() => options.filter((option) => option.value.trim()), [options]);
12
+ const fallbackValue = React.useMemo(() => {
13
+ var _a, _b;
14
+ if (defaultValue && normalizedOptions.some((option) => option.value === defaultValue)) {
15
+ return defaultValue;
16
+ }
17
+ return (_b = (_a = normalizedOptions[0]) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '';
18
+ }, [defaultValue, normalizedOptions]);
19
+ const isControlled = value !== undefined;
20
+ const [internalValue, setInternalValue] = React.useState(fallbackValue);
21
+ React.useEffect(() => {
22
+ if (!isControlled) {
23
+ setInternalValue(fallbackValue);
24
+ }
25
+ }, [fallbackValue, isControlled]);
26
+ const selectedValue = isControlled ? value !== null && value !== void 0 ? value : '' : internalValue;
27
+ React.useEffect(() => {
28
+ if (activeButtonRef.current && containerRef.current) {
29
+ const buttonRect = activeButtonRef.current.getBoundingClientRect();
30
+ const containerRect = containerRef.current.getBoundingClientRect();
31
+ const buttonCenterX = buttonRect.left - containerRect.left + buttonRect.width / 2;
32
+ setBadgeOffset(buttonCenterX);
33
+ }
34
+ }, [selectedValue]);
35
+ function handleSelect(nextValue, optionDisabled) {
36
+ if (disabled || optionDisabled || nextValue === selectedValue) {
37
+ return;
38
+ }
39
+ if (!isControlled) {
40
+ setInternalValue(nextValue);
41
+ }
42
+ onChange === null || onChange === void 0 ? void 0 : onChange(nextValue);
43
+ }
44
+ const containerSizeClass = size === 'compact'
45
+ ? 'px-1.5 py-1.5 gap-0'
46
+ : 'px-2 py-2 gap-0 sm:px-3 sm:py-3 sm:gap-0';
47
+ const defaultItemTextClass = size === 'compact'
48
+ ? 'text-xs'
49
+ : 'text-xs sm:text-sm md:text-base';
50
+ const finalItemTextClassName = itemTextClassName !== null && itemTextClassName !== void 0 ? itemTextClassName : defaultItemTextClass;
51
+ const defaultItemPaddingClass = size === 'compact'
52
+ ? 'px-2 py-1'
53
+ : 'px-2 py-1.5 sm:px-3 sm:py-2';
54
+ const finalItemPaddingClassName = itemPaddingClassName !== null && itemPaddingClassName !== void 0 ? itemPaddingClassName : defaultItemPaddingClass;
55
+ const minItemWidthClass = minItemWidthClassName !== null && minItemWidthClassName !== void 0 ? minItemWidthClassName : 'min-w-[80px] sm:min-w-[100px] md:min-w-[120px]';
56
+ const maxItemWidthClass = maxItemWidthClassName !== null && maxItemWidthClassName !== void 0 ? maxItemWidthClassName : 'max-w-[120px] sm:max-w-[160px]';
57
+ const selectedOption = normalizedOptions.find((opt) => opt.value === selectedValue);
58
+ return (jsxs("div", { ref: containerRef, role: "radiogroup", "aria-label": ariaLabel, "aria-disabled": disabled, className: cn('relative inline-flex items-center rounded-full border border-gray-300 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-900', fullWidth && 'flex w-full', containerSizeClass, className), children: [(selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.badge) ? (jsx("span", { style: {
59
+ left: `${badgeOffset}px`,
60
+ transform: 'translate(-50%, calc(-50% - 1px))'
61
+ }, className: cn('absolute top-0 z-20 whitespace-nowrap rounded-md bg-yellow-100 px-2.5 py-0.5 text-[0.625rem] font-semibold text-yellow-800 shadow-sm sm:text-xs', badgeClassName), children: selectedOption.badge })) : null, normalizedOptions.map((option) => {
62
+ const active = option.value === selectedValue;
63
+ const optionDisabled = disabled || option.disabled;
64
+ return (jsx("div", { className: cn('relative flex items-center justify-center', fullWidth && 'flex-1'), children: jsx("button", { ref: active ? activeButtonRef : null, type: "button", role: "radio", name: name, "aria-checked": active, "aria-pressed": active, disabled: optionDisabled, onClick: () => handleSelect(option.value, option.disabled), className: cn('relative z-10 inline-flex items-center justify-center rounded-full font-medium text-center transition truncate', fullWidth && 'w-full', !fullWidth && minItemWidthClass, !fullWidth && maxItemWidthClass, finalItemPaddingClassName, finalItemTextClassName, active
65
+ ? cn('text-white shadow-sm', themeButtonGradientClass, themeButtonGradientHoverClass, activeItemClassName)
66
+ : cn('text-gray-800 hover:text-gray-900 dark:text-gray-200 dark:hover:text-gray-100', inactiveItemClassName), optionDisabled && 'cursor-not-allowed opacity-60', itemClassName, option.className), children: option.mobileIcon ? (jsxs(Fragment, { children: [jsx("span", { className: "hidden sm:block", children: option.label }), jsx("span", { className: "block sm:hidden", children: active && React.isValidElement(option.mobileIcon)
67
+ ? React.cloneElement(option.mobileIcon, {
68
+ className: cn(option.mobileIcon.props.className, 'text-white'),
69
+ })
70
+ : option.mobileIcon })] })) : (option.label) }) }, option.value));
71
+ })] }));
72
+ }
73
+
74
+ export { XToggleButton };
@@ -4,9 +4,12 @@
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var utils = require('@windrun-huaiin/lib/utils');
6
6
  var icons = require('@windrun-huaiin/base-ui/icons');
7
+ var lib = require('@windrun-huaiin/base-ui/lib');
7
8
  var ui = require('@windrun-huaiin/base-ui/ui');
8
9
  var React = require('react');
9
10
  var moneyPriceInteractive = require('../money-price/money-price-interactive.js');
11
+ var moneyPriceConfigUtil = require('../money-price/money-price-config-util.js');
12
+ var dialogStyles = require('../alert-dialog/dialog-styles.js');
10
13
 
11
14
  function CreditNavButton({ locale, totalBalance, totalLabel, children, }) {
12
15
  const [open, setOpen] = React.useState(false);
@@ -106,7 +109,28 @@ function CreditNavButton({ locale, totalBalance, totalLabel, children, }) {
106
109
  closePricingModal,
107
110
  }), [closeMenu, isMobile, openPricingModal, closePricingModal]);
108
111
  const isOnetimeModal = pricingModal.mode === 'onetime';
109
- return (jsxRuntime.jsxs(CreditNavPopoverContext.Provider, { value: contextValue, children: [jsxRuntime.jsxs(ui.DropdownMenu, { modal: false, open: open, onOpenChange: setOpen, children: [jsxRuntime.jsx(ui.DropdownMenuTrigger, { asChild: true, children: jsxRuntime.jsxs("button", { type: "button", "aria-label": `${formattedBalance} ${totalLabel}`, className: utils.cn('group relative mx-2 sm:mx-1 inline-flex items-center gap-2 overflow-hidden rounded-full border border-slate-200 bg-white pl-2 pr-4 py-1.5 text-sm font-semibold text-slate-700 shadow-sm transition-all duration-200 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-100', 'hover:-translate-y-0.5 hover:scale-[1.02] hover:border-transparent hover:text-white hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-slate-400 dark:focus-visible:ring-slate-500'), ref: triggerRef, children: [jsxRuntime.jsx("span", { className: "pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-200 group-hover:opacity-100 group-focus-visible:opacity-100 bg-linear-to-bl from-indigo-200/60 via-indigo-400/90 to-purple-200/50 dark:from-indigo-300/20 dark:via-slate-400 dark:to-slate-500/50", "aria-hidden": "true" }), jsxRuntime.jsx("span", { className: "relative z-10 flex h-6 w-6 items-center justify-center rounded-full bg-slate-100 text-slate-600 transition-transform duration-200 group-hover:scale-110 group-hover:bg-white/20 group-hover:text-white dark:bg-slate-800 dark:text-slate-200 dark:group-hover:bg-white/20 dark:group-hover:text-white", children: jsxRuntime.jsx(icons.GemIcon, { className: "h-3.5 w-3.5" }) }), jsxRuntime.jsxs("span", { className: "relative z-10 flex items-center", children: [jsxRuntime.jsx("span", { className: "text-base font-semibold leading-none", children: formattedBalance }), jsxRuntime.jsx("span", { className: "sr-only", children: ` ${totalLabel}` })] })] }) }), jsxRuntime.jsx(ui.DropdownMenuContent, { forceMount: true, sideOffset: 12, align: "end", className: "z-50 border-0 bg-transparent p-0 shadow-none mx-4 sm:mx-2 md:mx-1", children: jsxRuntime.jsx("div", { className: "w-[90vw] max-w-[90vw] max-h-[80vh] overflow-y-auto overflow-x-hidden rounded-3xl bg-transparent sm:w-[410px] sm:max-h-[90vh] sm:max-w-[95vw]", ref: contentRef, children: children }) })] }), pricingModal.modalMoneyPriceData && pricingModal.pricingContext ? (jsxRuntime.jsx(ui.AlertDialog, { open: pricingModal.open, onOpenChange: (open) => setPricingModal((prev) => (Object.assign(Object.assign({}, prev), { open }))), children: jsxRuntime.jsxs(ui.AlertDialogContent, { className: "mt-5 sm:mt-6 md:mt-10 lg:mt-15 w-[95vw] max-w-[1200px] overflow-hidden border border-slate-200 bg-white p-0 shadow-[0_32px_90px_rgba(15,23,42,0.25)] ring-1 ring-black/5 dark:border-white/12 dark:bg-[#0f1222] dark:shadow-[0_40px_120px_rgba(0,0,0,0.6)] dark:ring-white/10", children: [jsxRuntime.jsxs(ui.AlertDialogHeader, { className: "flex flex-row items-center justify-between border-b border-slate-200 px-6 pt-4 pb-1 dark:border-slate-800", children: [jsxRuntime.jsx(ui.AlertDialogTitle, { asChild: true, children: jsxRuntime.jsxs("div", { className: "flex flex-wrap items-baseline gap-3 text-slate-900 dark:text-white", children: [jsxRuntime.jsx("span", { className: "text-2xl font-semibold leading-tight", children: pricingModal.modalMoneyPriceData.title }), pricingModal.modalMoneyPriceData.subtitle ? (jsxRuntime.jsx("span", { className: "text-sm font-medium text-slate-500 dark:text-slate-300", children: pricingModal.modalMoneyPriceData.subtitle })) : null] }) }), jsxRuntime.jsx("button", { type: "button", className: "rounded-full p-2 text-gray-400 transition hover:bg-gray-400 hover:text-gray-400 dark:text-white/80 dark:hover:bg-white/80 dark:hover:text-white/80", onClick: closePricingModal, children: jsxRuntime.jsx(icons.XIcon, { className: "h-6 w-6" }) })] }), jsxRuntime.jsx("div", { className: "max-h-[60vh] sm:max-h-[80vh] overflow-y-auto px-4 pt-2 pb-6", children: jsxRuntime.jsx("div", { className: "mx-auto w-full", children: jsxRuntime.jsx(moneyPriceInteractive.MoneyPriceInteractive, { data: pricingModal.modalMoneyPriceData, config: pricingModal.pricingContext.moneyPriceConfig, checkoutApiEndpoint: pricingModal.pricingContext.checkoutApiEndpoint, customerPortalApiEndpoint: pricingModal.pricingContext.customerPortalApiEndpoint, enableSubscriptionUpgrade: pricingModal.pricingContext.enableSubscriptionUpgrade, initialBillingType: isOnetimeModal ? 'onetime' : undefined, disableAutoDetectBilling: isOnetimeModal, initUserContext: pricingModal.pricingContext.initUserContext }, pricingModal.mode) }) })] }) })) : null] }));
112
+ const modalInitialBillingType = React.useMemo(() => {
113
+ var _a, _b;
114
+ if (isOnetimeModal) {
115
+ return 'onetime';
116
+ }
117
+ const pricingContext = pricingModal.pricingContext;
118
+ const priceId = (_b = (_a = pricingContext === null || pricingContext === void 0 ? void 0 : pricingContext.initUserContext) === null || _a === void 0 ? void 0 : _a.xSubscription) === null || _b === void 0 ? void 0 : _b.priceId;
119
+ if (!pricingContext || !priceId) {
120
+ return undefined;
121
+ }
122
+ const providerConfig = moneyPriceConfigUtil.getActiveProviderConfigUtil(pricingContext.moneyPriceConfig);
123
+ const products = providerConfig.subscriptionProducts || providerConfig.products || {};
124
+ for (const product of Object.values(products)) {
125
+ for (const [billingType, plan] of Object.entries(product.plans)) {
126
+ if (plan.priceId === priceId) {
127
+ return billingType;
128
+ }
129
+ }
130
+ }
131
+ return undefined;
132
+ }, [isOnetimeModal, pricingModal.pricingContext]);
133
+ return (jsxRuntime.jsxs(CreditNavPopoverContext.Provider, { value: contextValue, children: [jsxRuntime.jsxs(ui.DropdownMenu, { modal: false, open: open, onOpenChange: setOpen, children: [jsxRuntime.jsx(ui.DropdownMenuTrigger, { asChild: true, children: jsxRuntime.jsxs("button", { type: "button", "aria-label": `${formattedBalance} ${totalLabel}`, className: utils.cn('group relative mx-2 sm:mx-1 inline-flex items-center gap-2 overflow-hidden rounded-full border border-slate-200 bg-white pl-2 pr-4 py-1.5 text-sm font-semibold text-slate-700 shadow-sm transition-all duration-200 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-100', 'hover:-translate-y-0.5 hover:scale-[1.02] hover:border-transparent hover:text-white hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-slate-400 dark:focus-visible:ring-slate-500'), ref: triggerRef, children: [jsxRuntime.jsx("span", { className: "pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-200 group-hover:opacity-100 group-focus-visible:opacity-100 bg-linear-to-bl from-indigo-200/60 via-indigo-400/90 to-purple-200/50 dark:from-indigo-300/20 dark:via-slate-400 dark:to-slate-500/50", "aria-hidden": "true" }), jsxRuntime.jsx("span", { className: "relative z-10 flex h-6 w-6 items-center justify-center rounded-full bg-slate-100 text-slate-600 transition-transform duration-200 group-hover:scale-110 group-hover:bg-white/20 group-hover:text-white dark:bg-slate-800 dark:text-slate-200 dark:group-hover:bg-white/20 dark:group-hover:text-white", children: jsxRuntime.jsx(icons.GemIcon, { className: "h-3.5 w-3.5" }) }), jsxRuntime.jsxs("span", { className: "relative z-10 flex items-center", children: [jsxRuntime.jsx("span", { className: "text-base font-semibold leading-none", children: formattedBalance }), jsxRuntime.jsx("span", { className: "sr-only", children: ` ${totalLabel}` })] })] }) }), jsxRuntime.jsx(ui.DropdownMenuContent, { forceMount: true, sideOffset: 12, align: "end", className: "z-50 border-0 bg-transparent p-0 shadow-none mx-4 sm:mx-2 md:mx-1", children: jsxRuntime.jsx("div", { className: "w-[90vw] max-w-[90vw] max-h-[80vh] overflow-y-auto overflow-x-hidden rounded-3xl bg-transparent sm:w-[410px] sm:max-h-[90vh] sm:max-w-[95vw]", ref: contentRef, children: children }) })] }), pricingModal.modalMoneyPriceData && pricingModal.pricingContext ? (jsxRuntime.jsx(ui.AlertDialog, { open: pricingModal.open, onOpenChange: (open) => setPricingModal((prev) => (Object.assign(Object.assign({}, prev), { open }))), children: jsxRuntime.jsxs(ui.AlertDialogContent, { className: utils.cn('mt-5 sm:mt-6 md:mt-10 lg:mt-15 w-[95vw] max-w-[1200px] overflow-hidden border border-slate-200 p-0 shadow-[0_32px_90px_rgba(15,23,42,0.25)] ring-1 ring-black/5 dark:border-white/12 dark:shadow-[0_40px_120px_rgba(0,0,0,0.6)] dark:ring-white/10', lib.themeMainBgColor), overlayClassName: dialogStyles.dialogThemedOverlayClass, children: [jsxRuntime.jsxs(ui.AlertDialogHeader, { className: "flex flex-row items-center justify-between border-b border-slate-200 px-6 pt-4 pb-1 dark:border-slate-800", children: [jsxRuntime.jsx(ui.AlertDialogTitle, { asChild: true, children: jsxRuntime.jsxs("div", { className: "flex flex-wrap items-baseline gap-3 text-slate-900 dark:text-white", children: [jsxRuntime.jsx("span", { className: "text-2xl font-semibold leading-tight", children: pricingModal.modalMoneyPriceData.title }), pricingModal.modalMoneyPriceData.subtitle ? (jsxRuntime.jsx("span", { className: "text-sm font-medium text-slate-500 dark:text-slate-300", children: pricingModal.modalMoneyPriceData.subtitle })) : null] }) }), jsxRuntime.jsx("button", { type: "button", className: "rounded-full p-2 text-gray-400 transition hover:bg-gray-400 hover:text-gray-400 dark:text-white/80 dark:hover:bg-white/80 dark:hover:text-white/80", onClick: closePricingModal, children: jsxRuntime.jsx(icons.XIcon, { className: "h-6 w-6" }) })] }), jsxRuntime.jsx("div", { className: "max-h-[60vh] sm:max-h-[80vh] overflow-y-auto px-4 pt-2 pb-6", children: jsxRuntime.jsx("div", { className: "mx-auto w-full", children: jsxRuntime.jsx(moneyPriceInteractive.MoneyPriceInteractive, { data: pricingModal.modalMoneyPriceData, config: pricingModal.pricingContext.moneyPriceConfig, checkoutApiEndpoint: pricingModal.pricingContext.checkoutApiEndpoint, customerPortalApiEndpoint: pricingModal.pricingContext.customerPortalApiEndpoint, enableSubscriptionUpgrade: pricingModal.pricingContext.enableSubscriptionUpgrade, initialBillingType: modalInitialBillingType, disableAutoDetectBilling: isOnetimeModal, initUserContext: pricingModal.pricingContext.initUserContext }, pricingModal.mode) }) })] }) })) : null] }));
110
134
  }
111
135
  const CreditNavPopoverContext = React.createContext(null);
112
136
  function useCreditNavPopover() {
@@ -2,9 +2,12 @@
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { cn } from '@windrun-huaiin/lib/utils';
4
4
  import { GemIcon, XIcon } from '@windrun-huaiin/base-ui/icons';
5
+ import { themeMainBgColor } from '@windrun-huaiin/base-ui/lib';
5
6
  import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, AlertDialog, AlertDialogContent, AlertDialogHeader, AlertDialogTitle } from '@windrun-huaiin/base-ui/ui';
6
7
  import { createContext, useState, useRef, useCallback, useMemo, useEffect, useContext } from 'react';
7
8
  import { MoneyPriceInteractive } from '../money-price/money-price-interactive.mjs';
9
+ import { getActiveProviderConfigUtil } from '../money-price/money-price-config-util.mjs';
10
+ import { dialogThemedOverlayClass } from '../alert-dialog/dialog-styles.mjs';
8
11
 
9
12
  function CreditNavButton({ locale, totalBalance, totalLabel, children, }) {
10
13
  const [open, setOpen] = useState(false);
@@ -104,7 +107,28 @@ function CreditNavButton({ locale, totalBalance, totalLabel, children, }) {
104
107
  closePricingModal,
105
108
  }), [closeMenu, isMobile, openPricingModal, closePricingModal]);
106
109
  const isOnetimeModal = pricingModal.mode === 'onetime';
107
- return (jsxs(CreditNavPopoverContext.Provider, { value: contextValue, children: [jsxs(DropdownMenu, { modal: false, open: open, onOpenChange: setOpen, children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsxs("button", { type: "button", "aria-label": `${formattedBalance} ${totalLabel}`, className: cn('group relative mx-2 sm:mx-1 inline-flex items-center gap-2 overflow-hidden rounded-full border border-slate-200 bg-white pl-2 pr-4 py-1.5 text-sm font-semibold text-slate-700 shadow-sm transition-all duration-200 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-100', 'hover:-translate-y-0.5 hover:scale-[1.02] hover:border-transparent hover:text-white hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-slate-400 dark:focus-visible:ring-slate-500'), ref: triggerRef, children: [jsx("span", { className: "pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-200 group-hover:opacity-100 group-focus-visible:opacity-100 bg-linear-to-bl from-indigo-200/60 via-indigo-400/90 to-purple-200/50 dark:from-indigo-300/20 dark:via-slate-400 dark:to-slate-500/50", "aria-hidden": "true" }), jsx("span", { className: "relative z-10 flex h-6 w-6 items-center justify-center rounded-full bg-slate-100 text-slate-600 transition-transform duration-200 group-hover:scale-110 group-hover:bg-white/20 group-hover:text-white dark:bg-slate-800 dark:text-slate-200 dark:group-hover:bg-white/20 dark:group-hover:text-white", children: jsx(GemIcon, { className: "h-3.5 w-3.5" }) }), jsxs("span", { className: "relative z-10 flex items-center", children: [jsx("span", { className: "text-base font-semibold leading-none", children: formattedBalance }), jsx("span", { className: "sr-only", children: ` ${totalLabel}` })] })] }) }), jsx(DropdownMenuContent, { forceMount: true, sideOffset: 12, align: "end", className: "z-50 border-0 bg-transparent p-0 shadow-none mx-4 sm:mx-2 md:mx-1", children: jsx("div", { className: "w-[90vw] max-w-[90vw] max-h-[80vh] overflow-y-auto overflow-x-hidden rounded-3xl bg-transparent sm:w-[410px] sm:max-h-[90vh] sm:max-w-[95vw]", ref: contentRef, children: children }) })] }), pricingModal.modalMoneyPriceData && pricingModal.pricingContext ? (jsx(AlertDialog, { open: pricingModal.open, onOpenChange: (open) => setPricingModal((prev) => (Object.assign(Object.assign({}, prev), { open }))), children: jsxs(AlertDialogContent, { className: "mt-5 sm:mt-6 md:mt-10 lg:mt-15 w-[95vw] max-w-[1200px] overflow-hidden border border-slate-200 bg-white p-0 shadow-[0_32px_90px_rgba(15,23,42,0.25)] ring-1 ring-black/5 dark:border-white/12 dark:bg-[#0f1222] dark:shadow-[0_40px_120px_rgba(0,0,0,0.6)] dark:ring-white/10", children: [jsxs(AlertDialogHeader, { className: "flex flex-row items-center justify-between border-b border-slate-200 px-6 pt-4 pb-1 dark:border-slate-800", children: [jsx(AlertDialogTitle, { asChild: true, children: jsxs("div", { className: "flex flex-wrap items-baseline gap-3 text-slate-900 dark:text-white", children: [jsx("span", { className: "text-2xl font-semibold leading-tight", children: pricingModal.modalMoneyPriceData.title }), pricingModal.modalMoneyPriceData.subtitle ? (jsx("span", { className: "text-sm font-medium text-slate-500 dark:text-slate-300", children: pricingModal.modalMoneyPriceData.subtitle })) : null] }) }), jsx("button", { type: "button", className: "rounded-full p-2 text-gray-400 transition hover:bg-gray-400 hover:text-gray-400 dark:text-white/80 dark:hover:bg-white/80 dark:hover:text-white/80", onClick: closePricingModal, children: jsx(XIcon, { className: "h-6 w-6" }) })] }), jsx("div", { className: "max-h-[60vh] sm:max-h-[80vh] overflow-y-auto px-4 pt-2 pb-6", children: jsx("div", { className: "mx-auto w-full", children: jsx(MoneyPriceInteractive, { data: pricingModal.modalMoneyPriceData, config: pricingModal.pricingContext.moneyPriceConfig, checkoutApiEndpoint: pricingModal.pricingContext.checkoutApiEndpoint, customerPortalApiEndpoint: pricingModal.pricingContext.customerPortalApiEndpoint, enableSubscriptionUpgrade: pricingModal.pricingContext.enableSubscriptionUpgrade, initialBillingType: isOnetimeModal ? 'onetime' : undefined, disableAutoDetectBilling: isOnetimeModal, initUserContext: pricingModal.pricingContext.initUserContext }, pricingModal.mode) }) })] }) })) : null] }));
110
+ const modalInitialBillingType = useMemo(() => {
111
+ var _a, _b;
112
+ if (isOnetimeModal) {
113
+ return 'onetime';
114
+ }
115
+ const pricingContext = pricingModal.pricingContext;
116
+ const priceId = (_b = (_a = pricingContext === null || pricingContext === void 0 ? void 0 : pricingContext.initUserContext) === null || _a === void 0 ? void 0 : _a.xSubscription) === null || _b === void 0 ? void 0 : _b.priceId;
117
+ if (!pricingContext || !priceId) {
118
+ return undefined;
119
+ }
120
+ const providerConfig = getActiveProviderConfigUtil(pricingContext.moneyPriceConfig);
121
+ const products = providerConfig.subscriptionProducts || providerConfig.products || {};
122
+ for (const product of Object.values(products)) {
123
+ for (const [billingType, plan] of Object.entries(product.plans)) {
124
+ if (plan.priceId === priceId) {
125
+ return billingType;
126
+ }
127
+ }
128
+ }
129
+ return undefined;
130
+ }, [isOnetimeModal, pricingModal.pricingContext]);
131
+ return (jsxs(CreditNavPopoverContext.Provider, { value: contextValue, children: [jsxs(DropdownMenu, { modal: false, open: open, onOpenChange: setOpen, children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsxs("button", { type: "button", "aria-label": `${formattedBalance} ${totalLabel}`, className: cn('group relative mx-2 sm:mx-1 inline-flex items-center gap-2 overflow-hidden rounded-full border border-slate-200 bg-white pl-2 pr-4 py-1.5 text-sm font-semibold text-slate-700 shadow-sm transition-all duration-200 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-100', 'hover:-translate-y-0.5 hover:scale-[1.02] hover:border-transparent hover:text-white hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-slate-400 dark:focus-visible:ring-slate-500'), ref: triggerRef, children: [jsx("span", { className: "pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-200 group-hover:opacity-100 group-focus-visible:opacity-100 bg-linear-to-bl from-indigo-200/60 via-indigo-400/90 to-purple-200/50 dark:from-indigo-300/20 dark:via-slate-400 dark:to-slate-500/50", "aria-hidden": "true" }), jsx("span", { className: "relative z-10 flex h-6 w-6 items-center justify-center rounded-full bg-slate-100 text-slate-600 transition-transform duration-200 group-hover:scale-110 group-hover:bg-white/20 group-hover:text-white dark:bg-slate-800 dark:text-slate-200 dark:group-hover:bg-white/20 dark:group-hover:text-white", children: jsx(GemIcon, { className: "h-3.5 w-3.5" }) }), jsxs("span", { className: "relative z-10 flex items-center", children: [jsx("span", { className: "text-base font-semibold leading-none", children: formattedBalance }), jsx("span", { className: "sr-only", children: ` ${totalLabel}` })] })] }) }), jsx(DropdownMenuContent, { forceMount: true, sideOffset: 12, align: "end", className: "z-50 border-0 bg-transparent p-0 shadow-none mx-4 sm:mx-2 md:mx-1", children: jsx("div", { className: "w-[90vw] max-w-[90vw] max-h-[80vh] overflow-y-auto overflow-x-hidden rounded-3xl bg-transparent sm:w-[410px] sm:max-h-[90vh] sm:max-w-[95vw]", ref: contentRef, children: children }) })] }), pricingModal.modalMoneyPriceData && pricingModal.pricingContext ? (jsx(AlertDialog, { open: pricingModal.open, onOpenChange: (open) => setPricingModal((prev) => (Object.assign(Object.assign({}, prev), { open }))), children: jsxs(AlertDialogContent, { className: cn('mt-5 sm:mt-6 md:mt-10 lg:mt-15 w-[95vw] max-w-[1200px] overflow-hidden border border-slate-200 p-0 shadow-[0_32px_90px_rgba(15,23,42,0.25)] ring-1 ring-black/5 dark:border-white/12 dark:shadow-[0_40px_120px_rgba(0,0,0,0.6)] dark:ring-white/10', themeMainBgColor), overlayClassName: dialogThemedOverlayClass, children: [jsxs(AlertDialogHeader, { className: "flex flex-row items-center justify-between border-b border-slate-200 px-6 pt-4 pb-1 dark:border-slate-800", children: [jsx(AlertDialogTitle, { asChild: true, children: jsxs("div", { className: "flex flex-wrap items-baseline gap-3 text-slate-900 dark:text-white", children: [jsx("span", { className: "text-2xl font-semibold leading-tight", children: pricingModal.modalMoneyPriceData.title }), pricingModal.modalMoneyPriceData.subtitle ? (jsx("span", { className: "text-sm font-medium text-slate-500 dark:text-slate-300", children: pricingModal.modalMoneyPriceData.subtitle })) : null] }) }), jsx("button", { type: "button", className: "rounded-full p-2 text-gray-400 transition hover:bg-gray-400 hover:text-gray-400 dark:text-white/80 dark:hover:bg-white/80 dark:hover:text-white/80", onClick: closePricingModal, children: jsx(XIcon, { className: "h-6 w-6" }) })] }), jsx("div", { className: "max-h-[60vh] sm:max-h-[80vh] overflow-y-auto px-4 pt-2 pb-6", children: jsx("div", { className: "mx-auto w-full", children: jsx(MoneyPriceInteractive, { data: pricingModal.modalMoneyPriceData, config: pricingModal.pricingContext.moneyPriceConfig, checkoutApiEndpoint: pricingModal.pricingContext.checkoutApiEndpoint, customerPortalApiEndpoint: pricingModal.pricingContext.customerPortalApiEndpoint, enableSubscriptionUpgrade: pricingModal.pricingContext.enableSubscriptionUpgrade, initialBillingType: modalInitialBillingType, disableAutoDetectBilling: isOnetimeModal, initUserContext: pricingModal.pricingContext.initUserContext }, pricingModal.mode) }) })] }) })) : null] }));
108
132
  }
109
133
  const CreditNavPopoverContext = createContext(null);
110
134
  function useCreditNavPopover() {
@@ -4,10 +4,11 @@
4
4
  var tslib = require('tslib');
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var nextjs = require('@clerk/nextjs');
7
- var gradientButton = require('../../fuma/mdx/gradient-button.js');
7
+ var gradientButton = require('../buttons/gradient-button.js');
8
+ var React = require('react');
8
9
  var icons = require('@windrun-huaiin/base-ui/icons');
10
+ require('@windrun-huaiin/base-ui/lib');
9
11
  var utils = require('@windrun-huaiin/lib/utils');
10
- var React = require('react');
11
12
  var customerPortal = require('../money-price/customer-portal.js');
12
13
  var creditNavButton = require('./credit-nav-button.js');
13
14
 
@@ -2,10 +2,11 @@
2
2
  import { __awaiter } from 'tslib';
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import { useClerk } from '@clerk/nextjs';
5
- import { GradientButton } from '../../fuma/mdx/gradient-button.mjs';
5
+ import { GradientButton } from '../buttons/gradient-button.mjs';
6
+ import { useState, useRef, useCallback, useMemo, useLayoutEffect } from 'react';
6
7
  import { GemIcon, Settings2Icon, BellIcon, ChevronUpIcon, ChevronDownIcon, ShoppingCartIcon, CircleQuestionMarkIcon } from '@windrun-huaiin/base-ui/icons';
8
+ import '@windrun-huaiin/base-ui/lib';
7
9
  import { cn } from '@windrun-huaiin/lib/utils';
8
- import { useState, useRef, useCallback, useMemo, useLayoutEffect } from 'react';
9
10
  import { redirectToCustomerPortal } from '../money-price/customer-portal.mjs';
10
11
  import { useCreditNavPopover } from './credit-nav-button.mjs';
11
12
 
@@ -0,0 +1,4 @@
1
+ export { CreditOverviewClient } from './credit-overview-client';
2
+ export { CreditNavButton } from './credit-nav-button';
3
+ export type { CreditOverviewTranslations } from './credit-overview-client';
4
+ export type { CreditOverviewData, CreditBucket, CreditBucketStatus, SubscriptionInfo, } from './types';
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var creditOverviewClient = require('./credit-overview-client.js');
5
+ var creditNavButton = require('./credit-nav-button.js');
6
+
7
+
8
+
9
+ exports.CreditOverviewClient = creditOverviewClient.CreditOverviewClient;
10
+ exports.CreditNavButton = creditNavButton.CreditNavButton;
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ export { CreditOverviewClient } from './credit-overview-client.mjs';
3
+ export { CreditNavButton } from './credit-nav-button.mjs';
@@ -0,0 +1,2 @@
1
+ export { CreditOverview } from './credit-overview';
2
+ export type { CreditOverviewData, CreditBucket, CreditBucketStatus, SubscriptionInfo, } from './types';
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var creditOverview = require('./credit-overview.js');
4
+
5
+
6
+
7
+ exports.CreditOverview = creditOverview.CreditOverview;
@@ -0,0 +1 @@
1
+ export { CreditOverview } from './credit-overview.mjs';
package/dist/main/cta.js CHANGED
@@ -3,9 +3,11 @@
3
3
  var tslib = require('tslib');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var server = require('next-intl/server');
6
- var gradientButton = require('../fuma/mdx/gradient-button.js');
7
- var utils = require('@windrun-huaiin/lib/utils');
6
+ var gradientButton = require('./buttons/gradient-button.js');
7
+ require('react');
8
+ require('@windrun-huaiin/base-ui/icons');
8
9
  var lib = require('@windrun-huaiin/base-ui/lib');
10
+ var utils = require('@windrun-huaiin/lib/utils');
9
11
  var richTextExpert = require('./rich-text-expert.js');
10
12
  var sectionLayout = require('./section-layout.js');
11
13
 
package/dist/main/cta.mjs CHANGED
@@ -1,9 +1,11 @@
1
1
  import { __awaiter } from 'tslib';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { getTranslations } from 'next-intl/server';
4
- import { GradientButton } from '../fuma/mdx/gradient-button.mjs';
5
- import { cn } from '@windrun-huaiin/lib/utils';
4
+ import { GradientButton } from './buttons/gradient-button.mjs';
5
+ import 'react';
6
+ import '@windrun-huaiin/base-ui/icons';
6
7
  import { themeIconColor } from '@windrun-huaiin/base-ui/lib';
8
+ import { cn } from '@windrun-huaiin/lib/utils';
7
9
  import { richText } from './rich-text-expert.mjs';
8
10
  import { responsiveSection } from './section-layout.mjs';
9
11
 
@@ -7,8 +7,8 @@ var icons = require('@windrun-huaiin/base-ui/icons');
7
7
  var Link = require('next/link');
8
8
  var footerEmail = require('./footer-email.js');
9
9
  var tIntl = require('../lib/t-intl.js');
10
- var lib = require('@windrun-huaiin/lib');
11
- var lib$1 = require('@windrun-huaiin/base-ui/lib');
10
+ var utils = require('@windrun-huaiin/lib/utils');
11
+ var lib = require('@windrun-huaiin/base-ui/lib');
12
12
 
13
13
  function Footer(_a) {
14
14
  return tslib.__awaiter(this, arguments, void 0, function* ({ locale, localePrefixAsNeeded = true, defaultLocale = 'en' }) {
@@ -23,7 +23,7 @@ function Footer(_a) {
23
23
  clickToCopyText: tIntl.safeT(tFooter, 'clickToCopy', 'Click to copy'),
24
24
  copiedText: tIntl.safeT(tFooter, 'copied', 'Copied!'),
25
25
  };
26
- return (jsxRuntime.jsxs("div", { className: "mb-10 w-full mx-auto", children: [jsxRuntime.jsx("div", { className: lib.cn("w-full border-current border-t", lib$1.themeIconColor) }), jsxRuntime.jsx("footer", { children: jsxRuntime.jsxs("div", { className: "w-full flex flex-col items-center justify-center px-4 py-8 space-y-3", children: [jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-center gap-x-2 gap-y-2 text-xs sm:text-sm sm:gap-x-6", children: [jsxRuntime.jsxs(Link, { href: lib.getAsNeededLocalizedUrl(locale, "/legal/terms", localePrefixAsNeeded, defaultLocale), className: "flex items-center space-x-1 hover:underline", children: [jsxRuntime.jsx(icons.ReceiptTextIcon, { className: "h-3.5 w-3.5" }), jsxRuntime.jsx("span", { children: data.terms })] }), jsxRuntime.jsxs(Link, { href: lib.getAsNeededLocalizedUrl(locale, "/legal/privacy", localePrefixAsNeeded, defaultLocale), className: "flex items-center space-x-1 hover:underline", children: [jsxRuntime.jsx(icons.ShieldUserIcon, { className: "h-3.5 w-3.5" }), jsxRuntime.jsx("span", { children: data.privacy })] }), jsxRuntime.jsxs(footerEmail.FooterEmail, { email: data.email, clickToCopyText: data.clickToCopyText, copiedText: data.copiedText, children: [jsxRuntime.jsx(icons.MailIcon, { className: "h-3.5 w-3.5" }), jsxRuntime.jsx("span", { children: data.contactUs })] })] }), jsxRuntime.jsx("div", { className: "text-xs sm:text-sm text-center", children: jsxRuntime.jsx("span", { children: data.copyright }) })] }) })] }));
26
+ return (jsxRuntime.jsxs("div", { className: "mb-10 w-full mx-auto", children: [jsxRuntime.jsx("div", { className: utils.cn("w-full border-current border-t", lib.themeIconColor) }), jsxRuntime.jsx("footer", { children: jsxRuntime.jsxs("div", { className: "w-full flex flex-col items-center justify-center px-4 py-8 space-y-3", children: [jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-center gap-x-2 gap-y-2 text-xs sm:text-sm sm:gap-x-6", children: [jsxRuntime.jsxs(Link, { href: utils.getAsNeededLocalizedUrl(locale, "/legal/terms", localePrefixAsNeeded, defaultLocale), className: "flex items-center space-x-1 hover:underline", children: [jsxRuntime.jsx(icons.ReceiptTextIcon, { className: "h-3.5 w-3.5" }), jsxRuntime.jsx("span", { children: data.terms })] }), jsxRuntime.jsxs(Link, { href: utils.getAsNeededLocalizedUrl(locale, "/legal/privacy", localePrefixAsNeeded, defaultLocale), className: "flex items-center space-x-1 hover:underline", children: [jsxRuntime.jsx(icons.ShieldUserIcon, { className: "h-3.5 w-3.5" }), jsxRuntime.jsx("span", { children: data.privacy })] }), jsxRuntime.jsxs(footerEmail.FooterEmail, { email: data.email, clickToCopyText: data.clickToCopyText, copiedText: data.copiedText, children: [jsxRuntime.jsx(icons.MailIcon, { className: "h-3.5 w-3.5" }), jsxRuntime.jsx("span", { children: data.contactUs })] })] }), jsxRuntime.jsx("div", { className: "text-xs sm:text-sm text-center", children: jsxRuntime.jsx("span", { children: data.copyright }) })] }) })] }));
27
27
  });
28
28
  }
29
29
 
@@ -5,7 +5,7 @@ import { ReceiptTextIcon, ShieldUserIcon, MailIcon } from '@windrun-huaiin/base-
5
5
  import Link from 'next/link';
6
6
  import { FooterEmail } from './footer-email.mjs';
7
7
  import { safeT } from '../lib/t-intl.mjs';
8
- import { cn, getAsNeededLocalizedUrl } from '@windrun-huaiin/lib';
8
+ import { cn, getAsNeededLocalizedUrl } from '@windrun-huaiin/lib/utils';
9
9
  import { themeIconColor } from '@windrun-huaiin/base-ui/lib';
10
10
 
11
11
  function Footer(_a) {
@@ -0,0 +1,2 @@
1
+ export { HeroMedia } from '../hero-media';
2
+ export { HeroSection } from '../hero-section';
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var heroMedia = require('../hero-media.js');
5
+ var heroSection = require('../hero-section.js');
6
+
7
+
8
+
9
+ exports.HeroMedia = heroMedia.HeroMedia;
10
+ exports.HeroSection = heroSection.HeroSection;
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ export { HeroMedia } from '../hero-media.mjs';
3
+ export { HeroSection } from '../hero-section.mjs';
@@ -0,0 +1,7 @@
1
+ export * from '../gallery/gallery-server';
2
+ export * from '../usage';
3
+ export * from '../features';
4
+ export * from '../tips';
5
+ export * from '../faq';
6
+ export * from '../seo-content';
7
+ export * from '../cta';
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var galleryServer = require('../gallery/gallery-server.js');
4
+ var usage = require('../usage.js');
5
+ var features = require('../features.js');
6
+ var tips = require('../tips.js');
7
+ var faq = require('../faq.js');
8
+ var seoContent = require('../seo-content.js');
9
+ var cta = require('../cta.js');
10
+
11
+
12
+
13
+ exports.Gallery = galleryServer.Gallery;
14
+ exports.Usage = usage.Usage;
15
+ exports.Features = features.Features;
16
+ exports.Tips = tips.Tips;
17
+ exports.FAQ = faq.FAQ;
18
+ exports.SeoContent = seoContent.SeoContent;
19
+ exports.CTA = cta.CTA;
@@ -0,0 +1,7 @@
1
+ export { Gallery } from '../gallery/gallery-server.mjs';
2
+ export { Usage } from '../usage.mjs';
3
+ export { Features } from '../features.mjs';
4
+ export { Tips } from '../tips.mjs';
5
+ export { FAQ } from '../faq.mjs';
6
+ export { SeoContent } from '../seo-content.mjs';
7
+ export { CTA } from '../cta.mjs';