@windrun-huaiin/third-ui 6.2.0 → 6.2.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.
@@ -131,4 +131,68 @@ type TagRenderers = Record<string, TagRenderer>;
131
131
  declare function createRichTextRenderer(customRenderers?: TagRenderers): (t: any, key: string) => any;
132
132
  declare const richText: (t: any, key: string) => any;
133
133
 
134
- export { AIPromptTextarea, AdsAlertDialog, GoToTop, Loading, NProgressBar, XButton, createRichTextRenderer, richText };
134
+ interface FAQData {
135
+ title: string;
136
+ description: string;
137
+ items: Array<{
138
+ id: string;
139
+ question: string;
140
+ answer: string;
141
+ }>;
142
+ }
143
+ declare function FAQInteractive({ data }: {
144
+ data: FAQData;
145
+ }): null;
146
+
147
+ interface BillingOption {
148
+ key: string;
149
+ discount: number;
150
+ }
151
+ interface Prices {
152
+ [key: string]: number | string;
153
+ }
154
+ interface PricePlanAppConfig {
155
+ billingOptions: BillingOption[];
156
+ prices: Prices;
157
+ minPlanFeaturesCount: number;
158
+ }
159
+ interface PricePlanData {
160
+ title: string;
161
+ subtitle: string;
162
+ billingSwitch: {
163
+ options: Array<{
164
+ key: string;
165
+ name: string;
166
+ unit: string;
167
+ discountText: string;
168
+ subTitle?: string;
169
+ }>;
170
+ defaultKey: string;
171
+ };
172
+ plans: Array<any>;
173
+ currency: string;
174
+ pricePlanConfig: PricePlanAppConfig;
175
+ }
176
+ declare function PricePlanInteractive({ data }: {
177
+ data: PricePlanData;
178
+ }): react_jsx_runtime.JSX.Element;
179
+
180
+ interface GalleryItem {
181
+ id: string;
182
+ url: string;
183
+ altMsg: string;
184
+ }
185
+ interface GalleryData {
186
+ titleL: string;
187
+ eyesOn: string;
188
+ titleR: string;
189
+ description: string;
190
+ items: GalleryItem[];
191
+ defaultImgUrl: string;
192
+ downloadPrefix: string;
193
+ }
194
+ declare function GalleryInteractive({ data }: {
195
+ data: GalleryData;
196
+ }): null;
197
+
198
+ export { AIPromptTextarea, AdsAlertDialog, FAQInteractive, GalleryInteractive, GoToTop, Loading, NProgressBar, PricePlanInteractive, XButton, createRichTextRenderer, richText };
@@ -131,4 +131,68 @@ type TagRenderers = Record<string, TagRenderer>;
131
131
  declare function createRichTextRenderer(customRenderers?: TagRenderers): (t: any, key: string) => any;
132
132
  declare const richText: (t: any, key: string) => any;
133
133
 
134
- export { AIPromptTextarea, AdsAlertDialog, GoToTop, Loading, NProgressBar, XButton, createRichTextRenderer, richText };
134
+ interface FAQData {
135
+ title: string;
136
+ description: string;
137
+ items: Array<{
138
+ id: string;
139
+ question: string;
140
+ answer: string;
141
+ }>;
142
+ }
143
+ declare function FAQInteractive({ data }: {
144
+ data: FAQData;
145
+ }): null;
146
+
147
+ interface BillingOption {
148
+ key: string;
149
+ discount: number;
150
+ }
151
+ interface Prices {
152
+ [key: string]: number | string;
153
+ }
154
+ interface PricePlanAppConfig {
155
+ billingOptions: BillingOption[];
156
+ prices: Prices;
157
+ minPlanFeaturesCount: number;
158
+ }
159
+ interface PricePlanData {
160
+ title: string;
161
+ subtitle: string;
162
+ billingSwitch: {
163
+ options: Array<{
164
+ key: string;
165
+ name: string;
166
+ unit: string;
167
+ discountText: string;
168
+ subTitle?: string;
169
+ }>;
170
+ defaultKey: string;
171
+ };
172
+ plans: Array<any>;
173
+ currency: string;
174
+ pricePlanConfig: PricePlanAppConfig;
175
+ }
176
+ declare function PricePlanInteractive({ data }: {
177
+ data: PricePlanData;
178
+ }): react_jsx_runtime.JSX.Element;
179
+
180
+ interface GalleryItem {
181
+ id: string;
182
+ url: string;
183
+ altMsg: string;
184
+ }
185
+ interface GalleryData {
186
+ titleL: string;
187
+ eyesOn: string;
188
+ titleR: string;
189
+ description: string;
190
+ items: GalleryItem[];
191
+ defaultImgUrl: string;
192
+ downloadPrefix: string;
193
+ }
194
+ declare function GalleryInteractive({ data }: {
195
+ data: GalleryData;
196
+ }): null;
197
+
198
+ export { AIPromptTextarea, AdsAlertDialog, FAQInteractive, GalleryInteractive, GoToTop, Loading, NProgressBar, PricePlanInteractive, XButton, createRichTextRenderer, richText };
@@ -83,9 +83,12 @@ var main_exports = {};
83
83
  __export(main_exports, {
84
84
  AIPromptTextarea: () => AIPromptTextarea,
85
85
  AdsAlertDialog: () => AdsAlertDialog,
86
+ FAQInteractive: () => FAQInteractive,
87
+ GalleryInteractive: () => GalleryInteractive,
86
88
  GoToTop: () => GoToTop,
87
89
  Loading: () => Loading,
88
90
  NProgressBar: () => NProgressBar,
91
+ PricePlanInteractive: () => PricePlanInteractive,
89
92
  XButton: () => XButton,
90
93
  createRichTextRenderer: () => createRichTextRenderer,
91
94
  richText: () => richText
@@ -5737,13 +5740,374 @@ function createRichTextRenderer(customRenderers) {
5737
5740
  };
5738
5741
  }
5739
5742
  var richText = createRichTextRenderer();
5743
+
5744
+ // src/main/faq-interactive.tsx
5745
+ var import_react41 = require("react");
5746
+ function FAQInteractive({ data }) {
5747
+ const [openStates, setOpenStates] = (0, import_react41.useState)({});
5748
+ (0, import_react41.useEffect)(() => {
5749
+ data.items.forEach((item) => {
5750
+ const toggleButton = document.querySelector(`[data-faq-toggle="${item.id}"]`);
5751
+ const contentDiv = document.querySelector(`[data-faq-content="${item.id}"]`);
5752
+ const iconSvg = document.querySelector(`[data-faq-icon="${item.id}"]`);
5753
+ if (toggleButton && contentDiv && iconSvg) {
5754
+ const handleClick = () => {
5755
+ const isOpen = openStates[item.id] || false;
5756
+ const newOpenState = !isOpen;
5757
+ setOpenStates((prev) => __spreadProps(__spreadValues({}, prev), {
5758
+ [item.id]: newOpenState
5759
+ }));
5760
+ if (newOpenState) {
5761
+ contentDiv.classList.remove("hidden");
5762
+ toggleButton.setAttribute("aria-expanded", "true");
5763
+ iconSvg.style.transform = "rotate(90deg)";
5764
+ } else {
5765
+ contentDiv.classList.add("hidden");
5766
+ toggleButton.setAttribute("aria-expanded", "false");
5767
+ iconSvg.style.transform = "rotate(0deg)";
5768
+ }
5769
+ };
5770
+ toggleButton.addEventListener("click", handleClick);
5771
+ }
5772
+ });
5773
+ return () => {
5774
+ data.items.forEach((item) => {
5775
+ var _a;
5776
+ const toggleButton = document.querySelector(`[data-faq-toggle="${item.id}"]`);
5777
+ if (toggleButton) {
5778
+ const newButton = toggleButton.cloneNode(true);
5779
+ (_a = toggleButton.parentNode) == null ? void 0 : _a.replaceChild(newButton, toggleButton);
5780
+ }
5781
+ });
5782
+ };
5783
+ }, [data, openStates]);
5784
+ return null;
5785
+ }
5786
+
5787
+ // src/main/price-plan-interactive.tsx
5788
+ var import_react42 = require("react");
5789
+ var import_navigation2 = require("next/navigation");
5790
+ var import_jsx_runtime49 = require("react/jsx-runtime");
5791
+ function PricePlanInteractive({ data }) {
5792
+ const [billingKey, setBillingKey] = (0, import_react42.useState)(data.billingSwitch.defaultKey);
5793
+ const [tooltip, setTooltip] = (0, import_react42.useState)({ show: false, content: "", x: 0, y: 0 });
5794
+ const router = (0, import_navigation2.useRouter)();
5795
+ (0, import_react42.useEffect)(() => {
5796
+ const monthlyButton = document.querySelector('[data-billing-button="monthly"]');
5797
+ const yearlyButton = document.querySelector('[data-billing-button="yearly"]');
5798
+ const handleBillingSwitch = (newBillingKey) => {
5799
+ setBillingKey(newBillingKey);
5800
+ updatePrices(newBillingKey);
5801
+ updateDiscountInfo(newBillingKey);
5802
+ updateButtonStyles(newBillingKey);
5803
+ };
5804
+ if (monthlyButton) {
5805
+ monthlyButton.addEventListener("click", () => handleBillingSwitch("monthly"));
5806
+ }
5807
+ if (yearlyButton) {
5808
+ yearlyButton.addEventListener("click", () => handleBillingSwitch("yearly"));
5809
+ }
5810
+ data.plans.forEach((plan) => {
5811
+ var _a;
5812
+ (_a = plan.features) == null ? void 0 : _a.forEach((feature, i) => {
5813
+ if (feature == null ? void 0 : feature.tooltip) {
5814
+ const tooltipTrigger = document.querySelector(`[data-tooltip-trigger="${plan.key}-${i}"]`);
5815
+ if (tooltipTrigger) {
5816
+ const handleMouseEnter = (e) => {
5817
+ setTooltip({
5818
+ show: true,
5819
+ content: feature.tooltip,
5820
+ x: e.clientX,
5821
+ y: e.clientY
5822
+ });
5823
+ };
5824
+ const handleMouseMove = (e) => {
5825
+ setTooltip((prev) => __spreadProps(__spreadValues({}, prev), { x: e.clientX, y: e.clientY }));
5826
+ };
5827
+ const handleMouseLeave = () => {
5828
+ setTooltip((prev) => __spreadProps(__spreadValues({}, prev), { show: false }));
5829
+ };
5830
+ tooltipTrigger.addEventListener("mouseenter", handleMouseEnter);
5831
+ tooltipTrigger.addEventListener("mousemove", handleMouseMove);
5832
+ tooltipTrigger.addEventListener("mouseleave", handleMouseLeave);
5833
+ }
5834
+ }
5835
+ });
5836
+ });
5837
+ data.plans.forEach((plan) => {
5838
+ var _a;
5839
+ const planButton = document.querySelector(`[data-plan-button="${plan.key}"]`);
5840
+ if (planButton && !((_a = plan.button) == null ? void 0 : _a.disabled)) {
5841
+ planButton.addEventListener("click", () => {
5842
+ router.push("/");
5843
+ });
5844
+ }
5845
+ });
5846
+ return () => {
5847
+ var _a, _b;
5848
+ if (monthlyButton) {
5849
+ const newButton = monthlyButton.cloneNode(true);
5850
+ (_a = monthlyButton.parentNode) == null ? void 0 : _a.replaceChild(newButton, monthlyButton);
5851
+ }
5852
+ if (yearlyButton) {
5853
+ const newButton = yearlyButton.cloneNode(true);
5854
+ (_b = yearlyButton.parentNode) == null ? void 0 : _b.replaceChild(newButton, yearlyButton);
5855
+ }
5856
+ data.plans.forEach((plan) => {
5857
+ var _a2;
5858
+ (_a2 = plan.features) == null ? void 0 : _a2.forEach((_feature, i) => {
5859
+ var _a3;
5860
+ const tooltipTrigger = document.querySelector(`[data-tooltip-trigger="${plan.key}-${i}"]`);
5861
+ if (tooltipTrigger) {
5862
+ const newTrigger = tooltipTrigger.cloneNode(true);
5863
+ (_a3 = tooltipTrigger.parentNode) == null ? void 0 : _a3.replaceChild(newTrigger, tooltipTrigger);
5864
+ }
5865
+ });
5866
+ });
5867
+ };
5868
+ }, [data, router]);
5869
+ const updatePrices = (newBillingKey) => {
5870
+ const currentBilling = data.pricePlanConfig.billingOptions.find((opt) => opt.key === newBillingKey) || data.pricePlanConfig.billingOptions[0];
5871
+ const currentBillingDisplay = data.billingSwitch.options.find((opt) => opt.key === newBillingKey) || data.billingSwitch.options[0];
5872
+ data.plans.forEach((plan) => {
5873
+ const priceContainer = document.querySelector(`[data-price-container="${plan.key}"]`);
5874
+ const priceValue = data.pricePlanConfig.prices[plan.key];
5875
+ if (priceContainer) {
5876
+ const priceValueElement = document.querySelector(`[data-price-value="${plan.key}"]`);
5877
+ const priceUnitElement = document.querySelector(`[data-price-unit="${plan.key}"]`);
5878
+ const priceOriginalElement = document.querySelector(`[data-price-original="${plan.key}"]`);
5879
+ const priceDiscountElement = document.querySelector(`[data-price-discount="${plan.key}"]`);
5880
+ const priceSubtitleElement = document.querySelector(`[data-price-subtitle="${plan.key}"]`);
5881
+ if (typeof priceValue !== "number" || isNaN(priceValue)) {
5882
+ if (priceValueElement) priceValueElement.textContent = String(priceValue);
5883
+ if (priceSubtitleElement) priceSubtitleElement.textContent = plan.showBillingSubTitle === false ? "" : (currentBillingDisplay == null ? void 0 : currentBillingDisplay.subTitle) || "";
5884
+ } else {
5885
+ const originValue = Number(priceValue);
5886
+ const discount = currentBilling.discount;
5887
+ const hasDiscount = discount !== 0;
5888
+ const saleValue = originValue * (1 - discount);
5889
+ const formatPrice = (v) => Number(v.toFixed(2)).toString();
5890
+ const showNaN = saleValue < 0;
5891
+ if (priceValueElement) {
5892
+ priceValueElement.textContent = `${data.currency}${showNaN ? "NaN" : hasDiscount ? formatPrice(saleValue) : formatPrice(originValue)}`;
5893
+ }
5894
+ if (priceUnitElement) {
5895
+ priceUnitElement.textContent = currentBillingDisplay.unit || "";
5896
+ }
5897
+ if (hasDiscount) {
5898
+ if (priceOriginalElement) {
5899
+ priceOriginalElement.textContent = `${data.currency}${showNaN ? "NaN" : formatPrice(originValue)}`;
5900
+ priceOriginalElement.style.display = "inline";
5901
+ }
5902
+ if (priceDiscountElement && currentBillingDisplay.discountText) {
5903
+ const discountText = currentBillingDisplay.discountText.replace("{percent}", String(Math.round(Math.abs(discount) * 100)));
5904
+ priceDiscountElement.textContent = discountText;
5905
+ priceDiscountElement.style.display = "inline";
5906
+ }
5907
+ } else {
5908
+ if (priceOriginalElement) priceOriginalElement.style.display = "none";
5909
+ if (priceDiscountElement) priceDiscountElement.style.display = "none";
5910
+ }
5911
+ if (priceSubtitleElement) {
5912
+ priceSubtitleElement.textContent = plan.showBillingSubTitle === false ? "" : (currentBillingDisplay == null ? void 0 : currentBillingDisplay.subTitle) || "";
5913
+ }
5914
+ }
5915
+ }
5916
+ });
5917
+ };
5918
+ const updateDiscountInfo = (newBillingKey) => {
5919
+ const discountInfoElement = document.querySelector("[data-discount-info]");
5920
+ if (discountInfoElement) {
5921
+ const opt = data.billingSwitch.options.find((opt2) => opt2.key === newBillingKey);
5922
+ const bOpt = data.pricePlanConfig.billingOptions.find((opt2) => opt2.key === newBillingKey);
5923
+ if (opt && bOpt && opt.discountText && bOpt.discount !== 0) {
5924
+ const discountText = opt.discountText.replace("{percent}", String(Math.round(Math.abs(bOpt.discount) * 100)));
5925
+ discountInfoElement.innerHTML = `
5926
+ <span class="px-2 py-1 text-xs rounded bg-yellow-100 text-yellow-800 font-semibold align-middle text-center inline-flex items-center justify-center whitespace-nowrap">
5927
+ ${discountText}
5928
+ </span>
5929
+ `;
5930
+ } else {
5931
+ discountInfoElement.innerHTML = "";
5932
+ }
5933
+ }
5934
+ };
5935
+ const updateButtonStyles = (newBillingKey) => {
5936
+ const monthlyButton = document.querySelector('[data-billing-button="monthly"]');
5937
+ const yearlyButton = document.querySelector('[data-billing-button="yearly"]');
5938
+ if (monthlyButton) {
5939
+ if (newBillingKey === "monthly") {
5940
+ monthlyButton.className = cn(
5941
+ "min-w-[120px] px-6 py-2 font-medium transition text-lg relative",
5942
+ "text-white bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 rounded-full shadow-sm"
5943
+ );
5944
+ } else {
5945
+ monthlyButton.className = cn(
5946
+ "min-w-[120px] px-6 py-2 font-medium transition text-lg relative",
5947
+ "text-gray-800 dark:text-gray-200 hover:text-gray-900 dark:hover:text-gray-100 rounded-full"
5948
+ );
5949
+ }
5950
+ }
5951
+ if (yearlyButton) {
5952
+ if (newBillingKey === "yearly") {
5953
+ yearlyButton.className = cn(
5954
+ "min-w-[120px] px-6 py-2 font-medium transition text-lg relative",
5955
+ "text-white bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 rounded-full shadow-sm"
5956
+ );
5957
+ } else {
5958
+ yearlyButton.className = cn(
5959
+ "min-w-[120px] px-6 py-2 font-medium transition text-lg relative",
5960
+ "text-gray-800 dark:text-gray-200 hover:text-gray-900 dark:hover:text-gray-100 rounded-full"
5961
+ );
5962
+ }
5963
+ }
5964
+ };
5965
+ const Tooltip = ({ show, content, x, y }) => {
5966
+ if (!show) return null;
5967
+ const style = {
5968
+ position: "fixed",
5969
+ left: Math.max(8, x),
5970
+ top: Math.max(8, y),
5971
+ zIndex: 9999,
5972
+ maxWidth: 200,
5973
+ transform: "translateY(-50%)",
5974
+ pointerEvents: "none",
5975
+ whiteSpace: "pre-line"
5976
+ };
5977
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5978
+ "div",
5979
+ {
5980
+ style,
5981
+ className: "bg-gray-700 dark:bg-gray-200 text-gray-100 dark:text-gray-800 text-xs leading-relaxed px-3 py-2 rounded-lg shadow-lg border border-gray-300 dark:border-gray-600 backdrop-blur-sm",
5982
+ children: content
5983
+ }
5984
+ );
5985
+ };
5986
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Tooltip, __spreadValues({}, tooltip));
5987
+ }
5988
+
5989
+ // src/main/gallery-interactive.tsx
5990
+ var import_react43 = require("react");
5991
+ function GalleryInteractive({ data }) {
5992
+ const [imageErrors, setImageErrors] = (0, import_react43.useState)(/* @__PURE__ */ new Set());
5993
+ const [downloadingItems, setDownloadingItems] = (0, import_react43.useState)(/* @__PURE__ */ new Set());
5994
+ const cdnProxyUrl = process.env.NEXT_PUBLIC_STYLE_CDN_PROXY_URL;
5995
+ (0, import_react43.useEffect)(() => {
5996
+ data.items.forEach((item, index) => {
5997
+ const downloadButton = document.querySelector(`[data-gallery-download="${item.id}"]`);
5998
+ const imageElement = document.querySelector(`[data-gallery-image="${item.id}"]`);
5999
+ if (downloadButton) {
6000
+ const handleDownload = () => __async(null, null, function* () {
6001
+ var _a;
6002
+ if (downloadingItems.has(item.id)) {
6003
+ return;
6004
+ }
6005
+ setDownloadingItems((prev) => new Set(prev).add(item.id));
6006
+ try {
6007
+ if (!cdnProxyUrl) {
6008
+ throw new Error("CDN proxy URL not configured");
6009
+ }
6010
+ const originalUrl = new URL(item.url);
6011
+ const filename = originalUrl.pathname.substring(1);
6012
+ const proxyUrl = `${cdnProxyUrl}/${encodeURIComponent(filename)}`;
6013
+ const urlExtension = (_a = item.url.split(".").pop()) == null ? void 0 : _a.toLowerCase();
6014
+ let extension = ".webp";
6015
+ if (urlExtension && ["jpg", "jpeg", "png", "gif", "webp", "svg"].includes(urlExtension)) {
6016
+ extension = `.${urlExtension}`;
6017
+ }
6018
+ const response = yield fetch(proxyUrl);
6019
+ if (!response.ok) {
6020
+ throw new Error(`HTTP ${response.status}: ${response.statusText}`);
6021
+ }
6022
+ const blob = yield response.blob();
6023
+ const blobUrl = URL.createObjectURL(blob);
6024
+ const a = document.createElement("a");
6025
+ a.href = blobUrl;
6026
+ a.download = `${data.downloadPrefix}-${index + 1}${extension}`;
6027
+ a.style.display = "none";
6028
+ document.body.appendChild(a);
6029
+ a.click();
6030
+ setTimeout(() => {
6031
+ document.body.removeChild(a);
6032
+ URL.revokeObjectURL(blobUrl);
6033
+ }, 100);
6034
+ } catch (error) {
6035
+ console.error("Download failed:", error);
6036
+ } finally {
6037
+ setDownloadingItems((prev) => {
6038
+ const newSet = new Set(prev);
6039
+ newSet.delete(item.id);
6040
+ return newSet;
6041
+ });
6042
+ }
6043
+ });
6044
+ downloadButton.addEventListener("click", handleDownload);
6045
+ }
6046
+ if (imageElement) {
6047
+ const handleImageError = () => {
6048
+ setImageErrors((prev) => new Set(prev).add(item.id));
6049
+ imageElement.src = data.defaultImgUrl;
6050
+ };
6051
+ imageElement.addEventListener("error", handleImageError);
6052
+ }
6053
+ });
6054
+ const updateDownloadStates = () => {
6055
+ data.items.forEach((item) => {
6056
+ const downloadButton = document.querySelector(`[data-gallery-download="${item.id}"]`);
6057
+ if (downloadButton) {
6058
+ const isDownloading = downloadingItems.has(item.id);
6059
+ if (isDownloading) {
6060
+ downloadButton.disabled = true;
6061
+ downloadButton.classList.add("bg-black/30", "text-white/50");
6062
+ downloadButton.classList.remove("bg-black/50", "hover:bg-black/70", "text-white/80", "hover:text-white");
6063
+ downloadButton.innerHTML = `
6064
+ <svg class="h-5 w-5 text-white animate-spin" fill="none" viewBox="0 0 24 24">
6065
+ <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
6066
+ <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
6067
+ </svg>
6068
+ `;
6069
+ } else {
6070
+ downloadButton.disabled = false;
6071
+ downloadButton.classList.remove("bg-black/30", "text-white/50");
6072
+ downloadButton.classList.add("bg-black/50", "hover:bg-black/70", "text-white/80", "hover:text-white");
6073
+ downloadButton.innerHTML = `
6074
+ <svg class="h-5 w-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
6075
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
6076
+ </svg>
6077
+ `;
6078
+ }
6079
+ }
6080
+ });
6081
+ };
6082
+ updateDownloadStates();
6083
+ return () => {
6084
+ data.items.forEach((item) => {
6085
+ var _a, _b;
6086
+ const downloadButton = document.querySelector(`[data-gallery-download="${item.id}"]`);
6087
+ const imageElement = document.querySelector(`[data-gallery-image="${item.id}"]`);
6088
+ if (downloadButton) {
6089
+ const newButton = downloadButton.cloneNode(true);
6090
+ (_a = downloadButton.parentNode) == null ? void 0 : _a.replaceChild(newButton, downloadButton);
6091
+ }
6092
+ if (imageElement) {
6093
+ const newImage = imageElement.cloneNode(true);
6094
+ (_b = imageElement.parentNode) == null ? void 0 : _b.replaceChild(newImage, imageElement);
6095
+ }
6096
+ });
6097
+ };
6098
+ }, [data, downloadingItems, imageErrors, cdnProxyUrl]);
6099
+ return null;
6100
+ }
5740
6101
  // Annotate the CommonJS export names for ESM import in node:
5741
6102
  0 && (module.exports = {
5742
6103
  AIPromptTextarea,
5743
6104
  AdsAlertDialog,
6105
+ FAQInteractive,
6106
+ GalleryInteractive,
5744
6107
  GoToTop,
5745
6108
  Loading,
5746
6109
  NProgressBar,
6110
+ PricePlanInteractive,
5747
6111
  XButton,
5748
6112
  createRichTextRenderer,
5749
6113
  richText