@instincthub/react-ui 0.1.53 → 0.1.55

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 (88) hide show
  1. package/dist/src/assets/css/ui/content-viewer.css +171 -1
  2. package/dist/src/components/auth/LoginForm.js +1 -1
  3. package/dist/src/components/ui/viewer/ContentViewOrEdit.js +1 -1
  4. package/dist/src/components/ui/viewer/ContentViewer.js +1 -1
  5. package/dist/src/components/ui/viewer/codeCopyEnhancer.js +2 -0
  6. package/dist/src/components/ui/viewer/codeCopyEnhancer.js.map +1 -0
  7. package/dist/src/types/__examples__/.next/types/app/api/auth/[...nextauth]/route.d.ts +13 -0
  8. package/dist/src/types/__examples__/.next/types/app/api/auth/login/route.d.ts +13 -0
  9. package/dist/src/types/__examples__/.next/types/app/api/components/docs/route.d.ts +13 -0
  10. package/dist/src/types/__examples__/.next/types/app/api/components/recommend/route.d.ts +13 -0
  11. package/dist/src/types/__examples__/.next/types/app/api/components/search/route.d.ts +13 -0
  12. package/dist/src/types/__examples__/.next/types/app/api/fallback/route.d.ts +13 -0
  13. package/dist/src/types/__examples__/.next/types/app/api/generate/route.d.ts +13 -0
  14. package/dist/src/types/__examples__/.next/types/app/api/help/route.d.ts +13 -0
  15. package/dist/src/types/__examples__/.next/types/app/api/mcp/route.d.ts +13 -0
  16. package/dist/src/types/__examples__/.next/types/app/auth/layout.d.ts +13 -0
  17. package/dist/src/types/__examples__/.next/types/app/auth/login/page.d.ts +13 -0
  18. package/dist/src/types/__examples__/.next/types/app/auth/password-match/page.d.ts +13 -0
  19. package/dist/src/types/__examples__/.next/types/app/code-display/layout.d.ts +13 -0
  20. package/dist/src/types/__examples__/.next/types/app/code-display/page.d.ts +13 -0
  21. package/dist/src/types/__examples__/.next/types/app/components/auth/client-detector/page.d.ts +13 -0
  22. package/dist/src/types/__examples__/.next/types/app/components/auth/login-form/page.d.ts +13 -0
  23. package/dist/src/types/__examples__/.next/types/app/components/auth/signup-form/page.d.ts +13 -0
  24. package/dist/src/types/__examples__/.next/types/app/components/auth/username-email-checker/page.d.ts +13 -0
  25. package/dist/src/types/__examples__/.next/types/app/components/charts/page.d.ts +13 -0
  26. package/dist/src/types/__examples__/.next/types/app/components/forms/action-dropdown/page.d.ts +13 -0
  27. package/dist/src/types/__examples__/.next/types/app/components/forms/animated-box/page.d.ts +13 -0
  28. package/dist/src/types/__examples__/.next/types/app/components/forms/checkboxes/page.d.ts +13 -0
  29. package/dist/src/types/__examples__/.next/types/app/components/forms/chips-input/page.d.ts +13 -0
  30. package/dist/src/types/__examples__/.next/types/app/components/forms/date-input/page.d.ts +13 -0
  31. package/dist/src/types/__examples__/.next/types/app/components/forms/date-input-picker/page.d.ts +13 -0
  32. package/dist/src/types/__examples__/.next/types/app/components/forms/date-range-picker/page.d.ts +13 -0
  33. package/dist/src/types/__examples__/.next/types/app/components/forms/drop-file/page.d.ts +13 -0
  34. package/dist/src/types/__examples__/.next/types/app/components/forms/email-list/page.d.ts +13 -0
  35. package/dist/src/types/__examples__/.next/types/app/components/forms/file-uploader/page.d.ts +13 -0
  36. package/dist/src/types/__examples__/.next/types/app/components/forms/filter-array/page.d.ts +13 -0
  37. package/dist/src/types/__examples__/.next/types/app/components/forms/filter-objects/page.d.ts +13 -0
  38. package/dist/src/types/__examples__/.next/types/app/components/forms/form-error/page.d.ts +13 -0
  39. package/dist/src/types/__examples__/.next/types/app/components/forms/input-amount/page.d.ts +13 -0
  40. package/dist/src/types/__examples__/.next/types/app/components/forms/input-number/page.d.ts +13 -0
  41. package/dist/src/types/__examples__/.next/types/app/components/forms/input-text/page.d.ts +13 -0
  42. package/dist/src/types/__examples__/.next/types/app/components/forms/input-textarea/page.d.ts +13 -0
  43. package/dist/src/types/__examples__/.next/types/app/components/forms/message-display/page.d.ts +13 -0
  44. package/dist/src/types/__examples__/.next/types/app/components/forms/multiple-email/page.d.ts +13 -0
  45. package/dist/src/types/__examples__/.next/types/app/components/forms/password-field/page.d.ts +13 -0
  46. package/dist/src/types/__examples__/.next/types/app/components/forms/radio-button/page.d.ts +13 -0
  47. package/dist/src/types/__examples__/.next/types/app/components/forms/search-field/page.d.ts +13 -0
  48. package/dist/src/types/__examples__/.next/types/app/components/forms/search-objects-from-db/page.d.ts +13 -0
  49. package/dist/src/types/__examples__/.next/types/app/components/forms/searchable-dropdown/page.d.ts +13 -0
  50. package/dist/src/types/__examples__/.next/types/app/components/forms/time-picker/page.d.ts +13 -0
  51. package/dist/src/types/__examples__/.next/types/app/components/forms/toggle-button/page.d.ts +13 -0
  52. package/dist/src/types/__examples__/.next/types/app/components/forms/uploads/ihub-file-uploader/page.d.ts +13 -0
  53. package/dist/src/types/__examples__/.next/types/app/components/navbars/breadcrumb/page.d.ts +13 -0
  54. package/dist/src/types/__examples__/.next/types/app/components/navbars/responsive-navbar/page.d.ts +13 -0
  55. package/dist/src/types/__examples__/.next/types/app/components/navbars/sidenav/page.d.ts +13 -0
  56. package/dist/src/types/__examples__/.next/types/app/components/navbars/tabs/page.d.ts +13 -0
  57. package/dist/src/types/__examples__/.next/types/app/components/ui/actions/page.d.ts +13 -0
  58. package/dist/src/types/__examples__/.next/types/app/components/ui/badges/page.d.ts +13 -0
  59. package/dist/src/types/__examples__/.next/types/app/components/ui/card-grid/page.d.ts +13 -0
  60. package/dist/src/types/__examples__/.next/types/app/components/ui/card-list/page.d.ts +13 -0
  61. package/dist/src/types/__examples__/.next/types/app/components/ui/cards/page.d.ts +13 -0
  62. package/dist/src/types/__examples__/.next/types/app/components/ui/color-picker/page.d.ts +13 -0
  63. package/dist/src/types/__examples__/.next/types/app/components/ui/content-view-or-edit/page.d.ts +13 -0
  64. package/dist/src/types/__examples__/.next/types/app/components/ui/content-viewer/page.d.ts +13 -0
  65. package/dist/src/types/__examples__/.next/types/app/components/ui/create-button/page.d.ts +13 -0
  66. package/dist/src/types/__examples__/.next/types/app/components/ui/dangerous-renderer/page.d.ts +13 -0
  67. package/dist/src/types/__examples__/.next/types/app/components/ui/dialogs/page.d.ts +13 -0
  68. package/dist/src/types/__examples__/.next/types/app/components/ui/dropdowns/page.d.ts +13 -0
  69. package/dist/src/types/__examples__/.next/types/app/components/ui/ihub-text-editor/page.d.ts +13 -0
  70. package/dist/src/types/__examples__/.next/types/app/components/ui/modals/page.d.ts +13 -0
  71. package/dist/src/types/__examples__/.next/types/app/components/ui/or-divider/page.d.ts +13 -0
  72. package/dist/src/types/__examples__/.next/types/app/components/ui/pagination/page.d.ts +13 -0
  73. package/dist/src/types/__examples__/.next/types/app/components/ui/random-gradient-image/page.d.ts +13 -0
  74. package/dist/src/types/__examples__/.next/types/app/components/ui/table-examples/page.d.ts +13 -0
  75. package/dist/src/types/__examples__/.next/types/app/components/ui/table-server-examples/page.d.ts +13 -0
  76. package/dist/src/types/__examples__/.next/types/app/components/ui/text-editor/page.d.ts +13 -0
  77. package/dist/src/types/__examples__/.next/types/app/cursors/page.d.ts +13 -0
  78. package/dist/src/types/__examples__/.next/types/app/examples/page.d.ts +13 -0
  79. package/dist/src/types/__examples__/.next/types/app/libs/examples/loadscript/page.d.ts +13 -0
  80. package/dist/src/types/__examples__/.next/types/app/libs/examples/modals/page.d.ts +13 -0
  81. package/dist/src/types/__examples__/.next/types/app/libs/examples/paystacks/page.d.ts +13 -0
  82. package/dist/src/types/__examples__/.next/types/app/libs/page.d.ts +13 -0
  83. package/dist/src/types/components/ui/viewer/ContentViewOrEdit.d.ts +23 -0
  84. package/dist/src/types/components/ui/viewer/ContentViewer.d.ts +8 -1
  85. package/dist/src/types/components/ui/viewer/codeCopyEnhancer.d.ts +58 -0
  86. package/dist/tsconfig.build.tsbuildinfo +1 -1
  87. package/dist/tsconfig.tsbuildinfo +1 -1
  88. package/package.json +1 -1
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
3
+ [K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
4
+ } : T;
5
+ export interface PageProps {
6
+ params?: Promise<SegmentParams>;
7
+ searchParams?: Promise<any>;
8
+ }
9
+ export interface LayoutProps {
10
+ children?: React.ReactNode;
11
+ params?: Promise<SegmentParams>;
12
+ }
13
+ export {};
@@ -9,6 +9,29 @@ interface ContentViewOrEditProps {
9
9
  lastUpdated?: string;
10
10
  showEditBtn?: boolean;
11
11
  showPreviewBtn?: boolean;
12
+ /** Show a copy button on fenced code blocks (default: true) */
13
+ enableCodeCopy?: boolean;
14
+ /** Allow inline `code` snippets to be copied on click (default: true) */
15
+ enableInlineCodeCopy?: boolean;
16
+ /** Draw a line-number gutter on multi-line code blocks (default: true) */
17
+ showCodeLineNumbers?: boolean;
12
18
  }
19
+ /**
20
+ * Toggles between an editable rich-text editor and a read-only ContentViewer.
21
+ *
22
+ * @component
23
+ * @example
24
+ * ```jsx
25
+ * import { ContentViewOrEdit } from "@instincthub/react-ui";
26
+ * <ContentViewOrEdit
27
+ * content={content}
28
+ * setContent={setContent}
29
+ * title="Lesson notes"
30
+ * showToolbar
31
+ * placeholder="Write something..."
32
+ * charLimit={5000}
33
+ * />
34
+ * ```
35
+ */
13
36
  export default function ContentViewOrEdit(props: ContentViewOrEditProps): JSX.Element;
14
37
  export {};
@@ -9,6 +9,9 @@ interface ContentViewerProps {
9
9
  showToolbar?: boolean;
10
10
  showEditBtn?: boolean;
11
11
  isMarkdown?: boolean;
12
+ enableCodeCopy?: boolean;
13
+ enableInlineCodeCopy?: boolean;
14
+ showCodeLineNumbers?: boolean;
12
15
  }
13
16
  /**
14
17
  *
@@ -28,6 +31,10 @@ interface ContentViewerProps {
28
31
  * @param {boolean} showToolbar - Whether to show the toolbar
29
32
  * @param {boolean} showEditBtn - Whether to show the edit button
30
33
  * @param {boolean} isMarkdown - Whether the content is Markdown
34
+ * @param {boolean} enableCodeCopy - Whether code blocks get a copy button
35
+ * @param {boolean} enableInlineCodeCopy - Whether inline code can be clicked to copy
36
+ * @param {boolean} showCodeLineNumbers - Whether multi-line code blocks get a line-number gutter
31
37
  */
32
- export default function ContentViewer({ content, title, className, editable, onContentChange, isEditing, setIsEditing, showToolbar, showEditBtn, isMarkdown, }: ContentViewerProps): import("react/jsx-runtime").JSX.Element;
38
+ export default function ContentViewer({ content, title, className, editable, onContentChange, isEditing, setIsEditing, showToolbar, showEditBtn, isMarkdown, // Default to false for backward compatibility
39
+ enableCodeCopy, enableInlineCodeCopy, showCodeLineNumbers, }: ContentViewerProps): import("react/jsx-runtime").JSX.Element;
33
40
  export {};
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Helpers that upgrade the plain `<pre>` / `<code>` markup rendered by
3
+ * ContentViewer into accessible, click-to-copy code blocks.
4
+ *
5
+ * The markup is injected with `dangerouslySetInnerHTML`, so the copy controls
6
+ * are built as real DOM nodes here and driven through event delegation on the
7
+ * viewer container instead of React event handlers.
8
+ */
9
+ export declare const CODE_COPY_ATTR = "data-ihub-copy";
10
+ export declare const CODE_BLOCK_WRAPPER_CLASS = "ihub-code-block-wrapper";
11
+ export declare const INLINE_COPIED_CLASS = "ihub-inline-copied";
12
+ export declare const COPIED_CLASS = "ihub-copied";
13
+ export declare const CODE_LINE_CLASS = "ihub-code-line";
14
+ export declare const LINE_NUMBERS_CLASS = "ihub-line-numbers";
15
+ /** Milliseconds the "Copied!" confirmation stays visible */
16
+ export declare const COPIED_FEEDBACK_MS = 2000;
17
+ export type CodeCopyKind = "block" | "inline";
18
+ export interface CodeCopyTarget {
19
+ /** Element that should receive the transient "copied" styling */
20
+ element: HTMLElement;
21
+ /** Text that should land on the clipboard */
22
+ text: string;
23
+ kind: CodeCopyKind;
24
+ }
25
+ interface EnhanceOptions {
26
+ /** Add a toolbar with a copy button above every fenced code block */
27
+ enableBlockCopy?: boolean;
28
+ /** Allow single-line `<code>` snippets to be copied on click */
29
+ enableInlineCopy?: boolean;
30
+ /** Draw a line-number gutter on code blocks with more than one line */
31
+ showLineNumbers?: boolean;
32
+ }
33
+ /**
34
+ * Read the language of a code block from the `language-*` / `lang-*` class that
35
+ * marked (and most editors) attach to `<pre>` or its inner `<code>`.
36
+ */
37
+ export declare const detectCodeLanguage: (pre: Element) => string;
38
+ /**
39
+ * Add copy affordances to every code block and inline snippet inside `root`.
40
+ * Safe to call repeatedly — already-enhanced nodes are skipped.
41
+ */
42
+ export declare const enhanceCodeBlocks: (root: HTMLElement, { enableBlockCopy, enableInlineCopy, showLineNumbers, }?: EnhanceOptions) => void;
43
+ /**
44
+ * Map a click/keyboard event target onto the code that should be copied.
45
+ * Returns null when the event did not originate from a copy affordance.
46
+ */
47
+ export declare const resolveCodeCopyTarget: (eventTarget: EventTarget | null) => CodeCopyTarget | null;
48
+ /**
49
+ * Write text to the clipboard, falling back to a hidden textarea when the
50
+ * async Clipboard API is unavailable (insecure origins, older browsers).
51
+ */
52
+ export declare const copyTextToClipboard: (text: string) => Promise<boolean>;
53
+ /**
54
+ * Flip a copy button (or inline snippet) into its confirmation state and
55
+ * restore it afterwards. Returns a cleanup timer id.
56
+ */
57
+ export declare const showCopiedFeedback: (target: CodeCopyTarget) => ReturnType<typeof setTimeout>;
58
+ export {};