@surrealdb/ui 1.0.76 → 1.0.77

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.
package/dist/ui.d.ts CHANGED
@@ -30,10 +30,13 @@ import { PaperProps } from '@mantine/core';
30
30
  import type * as React_2 from 'react';
31
31
  import { ReactNode } from 'react';
32
32
  import { RefObject } from 'react';
33
+ import { SelectProps } from '@mantine/core';
33
34
  import { SlateElement } from '@yoopta/editor';
34
35
  import { StackProps } from '@mantine/core';
35
36
  import { StateField } from '@codemirror/state';
37
+ import { TabsListProps } from '@mantine/core';
36
38
  import { TabsProps as TabsProps_2 } from '@mantine/core';
39
+ import { TabsTabProps } from '@mantine/core';
37
40
  import { VideoHTMLAttributes } from 'react';
38
41
  import { YooEditor } from '@yoopta/editor';
39
42
  import { YooptaContentValue } from '@yoopta/editor';
@@ -92,6 +95,15 @@ export declare type BlockOptionsComponent = FC<{
92
95
  blockId: string;
93
96
  }>;
94
97
 
98
+ export declare const BlockOptionsContext: React.Context<BlockOptionsContextValue>;
99
+
100
+ export declare interface BlockOptionsContextValue {
101
+ headingLinks?: boolean;
102
+ checkable?: boolean;
103
+ }
104
+
105
+ export declare const BlockOptionsProvider: React.Provider<BlockOptionsContextValue>;
106
+
95
107
  declare type BlockquoteElementMap = {
96
108
  blockquote: BlockquoteElement;
97
109
  };
@@ -112,7 +124,7 @@ export declare interface BlockRendererProps {
112
124
  value: YooptaContentValue;
113
125
  marks?: YooptaMark<any>[];
114
126
  plugins?: YooptaPlugin<Record<string, SlateElement>, Record<string, unknown>>[];
115
- withHeadingLinks?: boolean;
127
+ blockOptions?: BlockOptionsContextValue;
116
128
  className?: string;
117
129
  }
118
130
 
@@ -565,8 +577,6 @@ export declare function getBrandsafeImageURL(imageId: string | undefined, width?
565
577
 
566
578
  export declare function getBrandsafeVideoURL(videoId: string | undefined, format?: "mp4" | "webm" | "mov", controls?: boolean): string | undefined;
567
579
 
568
- export declare const HeadingLinksProvider: React.Provider<boolean>;
569
-
570
580
  export declare interface HeadingNode {
571
581
  type: "heading";
572
582
  depth: 1 | 2 | 3 | 4 | 5 | 6;
@@ -1815,6 +1825,28 @@ export declare interface RenderMarkdownProps extends StackProps {
1815
1825
  componentProps?: MarkdownComponentProps;
1816
1826
  }
1817
1827
 
1828
+ export declare interface ResponsiveTabItem {
1829
+ value: string;
1830
+ label: ReactNode;
1831
+ selectLabel?: string;
1832
+ tabProps?: Omit<TabsTabProps, "value" | "children">;
1833
+ }
1834
+
1835
+ export declare function ResponsiveTabs({ tabs, value, defaultValue, onChange, breakpoint, showSelectWhen, mediaQuery, tabsListProps, tabProps, selectProps, ...tabsProps }: ResponsiveTabsProps): ReactNode;
1836
+
1837
+ export declare interface ResponsiveTabsProps extends Omit<TabsProps_2, "children" | "value" | "defaultValue" | "onChange"> {
1838
+ tabs: ResponsiveTabItem[];
1839
+ value?: string;
1840
+ defaultValue?: string;
1841
+ onChange?: (value: string | null) => void;
1842
+ breakpoint?: number | string;
1843
+ showSelectWhen?: "above" | "below";
1844
+ mediaQuery?: string;
1845
+ tabsListProps?: TabsListProps;
1846
+ tabProps?: Omit<TabsTabProps, "value" | "children">;
1847
+ selectProps?: Omit<SelectProps, "data" | "value" | "defaultValue" | "onChange">;
1848
+ }
1849
+
1818
1850
  export declare interface Root {
1819
1851
  type: "root";
1820
1852
  children: BlockNode[];
@@ -2069,6 +2101,8 @@ export declare interface ThemedImageProps extends ImageProps {
2069
2101
  */
2070
2102
  export declare type TypeVisitor<T extends AnyNode> = (node: T, index: number | undefined, parent: AnyNode | Root | null) => undefined | boolean | void;
2071
2103
 
2104
+ export declare function useBlockOptions(): BlockOptionsContextValue;
2105
+
2072
2106
  export declare function useEditor(options?: EditorOptions): EditorController;
2073
2107
 
2074
2108
  /**