import { default as React } from 'react'; import { ClassValue } from 'clsx'; /** * 合併 Tailwind CSS 的 class */ export declare const cn: (...args: ClassValue[]) => string; /** * 判斷是否為 iPhone */ export declare const isIphone: boolean; /** * 渲染 HTML 字串 */ export declare const renderHTML: (HTMLstring: string, allowJS?: boolean) => React.DetailedReactHTMLElement<{ dangerouslySetInnerHTML: { __html: string; }; }, HTMLElement>; /** * 轉換 HTML 實體 * @param text * @returns */ export declare function escapeHtml(text: string): string; /** * 取得可複製的 JSON 字串 */ export declare const getCopyableJson: (variable: object) => string; /** * 取得 URL 查詢字串 */ export declare const getQueryString: (name: string) => string | null; /** * 取得貨幣字串 */ export declare const getCurrencyString: ({ price, symbol, }: { price: number | string | undefined; symbol?: string | undefined; }) => string; /** * 過濾物件的鍵值 * 例如: 把一個深層物件 value 為 undefined 的 key 過濾掉 */ export declare const filterObjKeys: (obj: object, filterValues?: (string | number | boolean | undefined | null)[]) => object; /** * 將駝峰或蛇形字串轉換為單字 * Camel or snake case to word */ export declare const keyToWord: (str: string) => string; /** * 判斷是否使用區塊編輯器 */ export declare const isUsingBlockEditor: boolean; /** * 移除字串尾部的斜杠 */ export declare function removeTrailingSlash(str: string): string; /** * 取得物件陣列 item[][] 的最大公約數 */ export declare function getGCDItems(items: T[][], key?: string): T[]; /** * 取得檔案副檔名 */ export declare function getFileExtension(url: string): string; /** * 判斷是否為圖片檔案 */ export declare function isImageFile(url: string): boolean; /** * 判斷是否為音訊檔案 */ export declare function isAudioFile(url: string): boolean; /** * 判斷是否為影片檔案 */ export declare function isVideoFile(url: string): boolean; /** * 簡單解密 */ export declare function simpleDecrypt(str: string): any; /** * 取得 HTML 的純文字內容 */ export declare function getTextContent(html: string): string; /** * 將值轉換為字串 */ export declare function valueStringify(value: any): any;