@optilogic/core 1.0.0-beta.8 → 1.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.
- package/dist/index.cjs +1115 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +326 -1
- package/dist/index.d.ts +326 -1
- package/dist/index.js +1097 -46
- package/dist/index.js.map +1 -1
- package/dist/styles.css +22 -0
- package/dist/tailwind-preset.cjs +17 -2
- package/dist/tailwind-preset.cjs.map +1 -1
- package/dist/tailwind-preset.js +17 -2
- package/dist/tailwind-preset.js.map +1 -1
- package/package.json +15 -1
- package/src/components/autocomplete.tsx +2 -1
- package/src/components/button.tsx +10 -8
- package/src/components/calendar.tsx +7 -7
- package/src/components/data-grid/DataGrid.tsx +6 -1
- package/src/components/data-grid/components/CellEditor.tsx +3 -3
- package/src/components/data-grid/hooks/useDataGridState.ts +18 -3
- package/src/components/data-grid/types.ts +4 -0
- package/src/components/data-grid/utils/dataProcessing.ts +40 -11
- package/src/components/date-picker.tsx +2 -1
- package/src/components/dropdown-menu.tsx +1 -1
- package/src/components/file-view/FileView.tsx +147 -0
- package/src/components/file-view/components/CodeRenderer.tsx +97 -0
- package/src/components/file-view/components/CsvRenderer.tsx +127 -0
- package/src/components/file-view/components/HtmlRenderer.tsx +24 -0
- package/src/components/file-view/components/ImageRenderer.tsx +67 -0
- package/src/components/file-view/components/MarkdownRenderer.tsx +304 -0
- package/src/components/file-view/components/PlainTextRenderer.tsx +27 -0
- package/src/components/file-view/components/index.ts +4 -0
- package/src/components/file-view/hooks/index.ts +5 -0
- package/src/components/file-view/hooks/useContentType.ts +34 -0
- package/src/components/file-view/hooks/useDarkMode.ts +62 -0
- package/src/components/file-view/hooks/useHighlightedTokens.ts +83 -0
- package/src/components/file-view/hooks/useShikiHighlighter.ts +69 -0
- package/src/components/file-view/index.ts +47 -0
- package/src/components/file-view/types.ts +180 -0
- package/src/components/file-view/utils/contentTypeDetection.ts +157 -0
- package/src/components/file-view/utils/index.ts +12 -0
- package/src/components/file-view/utils/languageMapping.ts +78 -0
- package/src/components/file-view/utils/rendererRegistry.ts +42 -0
- package/src/components/input.tsx +1 -1
- package/src/components/popover.tsx +1 -1
- package/src/components/select.tsx +1 -1
- package/src/components/switch.tsx +5 -3
- package/src/components/textarea.tsx +1 -1
- package/src/index.ts +39 -0
- package/src/styles.css +22 -0
- package/src/tailwind-preset.ts +17 -1
- package/src/theme/index.ts +5 -0
- package/src/theme/presets.ts +112 -2
- package/src/theme/types.ts +35 -0
- package/src/theme/utils.ts +231 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
|
+
import { MutableRefObject } from 'react';
|
|
4
5
|
import { VariantProps } from 'class-variance-authority';
|
|
5
6
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
6
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -1488,6 +1489,8 @@ interface ColumnDef<T = Record<string, CellValue>> {
|
|
|
1488
1489
|
cell?: (row: T, rowIndex: number) => React$1.ReactNode;
|
|
1489
1490
|
/** Accessor function to get cell value (defaults to row[key]) */
|
|
1490
1491
|
accessor?: (row: T) => CellValue;
|
|
1492
|
+
/** Data type hint for sorting/comparison (auto-detected from values if omitted) */
|
|
1493
|
+
dataType?: "string" | "number" | "date" | "boolean";
|
|
1491
1494
|
/** Whether this column is sortable */
|
|
1492
1495
|
sortable?: boolean;
|
|
1493
1496
|
/** Custom sort comparator function */
|
|
@@ -1874,6 +1877,8 @@ interface UseDataGridStateReturn {
|
|
|
1874
1877
|
commitEdit: (value?: CellValue) => void;
|
|
1875
1878
|
cancelEdit: () => void;
|
|
1876
1879
|
};
|
|
1880
|
+
/** Ref that DataGrid should populate with the current processedData array */
|
|
1881
|
+
processedDataRef: MutableRefObject<unknown[]>;
|
|
1877
1882
|
isControlled: {
|
|
1878
1883
|
sorting: boolean;
|
|
1879
1884
|
filters: boolean;
|
|
@@ -2223,12 +2228,25 @@ interface Theme {
|
|
|
2223
2228
|
border: string;
|
|
2224
2229
|
input: string;
|
|
2225
2230
|
ring: string;
|
|
2231
|
+
/** Interactive control colors (optional, with fallbacks) */
|
|
2232
|
+
toggleTrack?: string;
|
|
2233
|
+
toggleTrackForeground?: string;
|
|
2234
|
+
inputHover?: string;
|
|
2226
2235
|
/** Chart colors */
|
|
2227
2236
|
chart1: string;
|
|
2228
2237
|
chart2: string;
|
|
2229
2238
|
chart3: string;
|
|
2230
2239
|
chart4: string;
|
|
2231
2240
|
chart5: string;
|
|
2241
|
+
chart6: string;
|
|
2242
|
+
chart7: string;
|
|
2243
|
+
chart8: string;
|
|
2244
|
+
chart9: string;
|
|
2245
|
+
chart10: string;
|
|
2246
|
+
chart11: string;
|
|
2247
|
+
chart12: string;
|
|
2248
|
+
/** Disabled state */
|
|
2249
|
+
disabledOpacity?: string;
|
|
2232
2250
|
/** Border radius */
|
|
2233
2251
|
radius?: string;
|
|
2234
2252
|
}
|
|
@@ -2270,11 +2288,21 @@ interface ThemeHSL extends Omit<Theme, keyof ThemeColorFields> {
|
|
|
2270
2288
|
border: string;
|
|
2271
2289
|
input: string;
|
|
2272
2290
|
ring: string;
|
|
2291
|
+
toggleTrack?: string;
|
|
2292
|
+
toggleTrackForeground?: string;
|
|
2293
|
+
inputHover?: string;
|
|
2273
2294
|
chart1: string;
|
|
2274
2295
|
chart2: string;
|
|
2275
2296
|
chart3: string;
|
|
2276
2297
|
chart4: string;
|
|
2277
2298
|
chart5: string;
|
|
2299
|
+
chart6: string;
|
|
2300
|
+
chart7: string;
|
|
2301
|
+
chart8: string;
|
|
2302
|
+
chart9: string;
|
|
2303
|
+
chart10: string;
|
|
2304
|
+
chart11: string;
|
|
2305
|
+
chart12: string;
|
|
2278
2306
|
}
|
|
2279
2307
|
type ThemeColorFields = {
|
|
2280
2308
|
background: string;
|
|
@@ -2302,11 +2330,21 @@ type ThemeColorFields = {
|
|
|
2302
2330
|
border: string;
|
|
2303
2331
|
input: string;
|
|
2304
2332
|
ring: string;
|
|
2333
|
+
toggleTrack?: string;
|
|
2334
|
+
toggleTrackForeground?: string;
|
|
2335
|
+
inputHover?: string;
|
|
2305
2336
|
chart1: string;
|
|
2306
2337
|
chart2: string;
|
|
2307
2338
|
chart3: string;
|
|
2308
2339
|
chart4: string;
|
|
2309
2340
|
chart5: string;
|
|
2341
|
+
chart6: string;
|
|
2342
|
+
chart7: string;
|
|
2343
|
+
chart8: string;
|
|
2344
|
+
chart9: string;
|
|
2345
|
+
chart10: string;
|
|
2346
|
+
chart11: string;
|
|
2347
|
+
chart12: string;
|
|
2310
2348
|
};
|
|
2311
2349
|
/**
|
|
2312
2350
|
* Color field configuration for editors
|
|
@@ -2706,6 +2744,293 @@ interface UseContextMenuResult<T = unknown> {
|
|
|
2706
2744
|
}
|
|
2707
2745
|
declare function useContextMenu<T = unknown>(): UseContextMenuResult<T>;
|
|
2708
2746
|
|
|
2747
|
+
/**
|
|
2748
|
+
* Built-in content types that FileView can render.
|
|
2749
|
+
*/
|
|
2750
|
+
type BuiltInContentType = "code" | "markdown" | "image" | "pdf" | "csv" | "html" | "plaintext" | "unknown";
|
|
2751
|
+
/**
|
|
2752
|
+
* Content type - either a built-in type or a custom string.
|
|
2753
|
+
* The `(string & {})` pattern preserves autocomplete for built-in types
|
|
2754
|
+
* while accepting arbitrary strings for custom renderers.
|
|
2755
|
+
*/
|
|
2756
|
+
type ContentType = BuiltInContentType | (string & {});
|
|
2757
|
+
/**
|
|
2758
|
+
* Callback to resolve image `src` values to renderable URLs.
|
|
2759
|
+
* Called for non-remote, non-data-URI image sources in markdown content.
|
|
2760
|
+
* Can return a blob URL, data URL, or any string that works as an `<img>` src.
|
|
2761
|
+
*/
|
|
2762
|
+
type ResolveImageUrl = (src: string) => Promise<string> | string;
|
|
2763
|
+
/**
|
|
2764
|
+
* Props passed to every renderer component.
|
|
2765
|
+
* All renderers receive a consistent contract regardless of content type.
|
|
2766
|
+
*/
|
|
2767
|
+
interface FileRendererProps {
|
|
2768
|
+
/** Text content of the file. Null when content is binary/URL-based. */
|
|
2769
|
+
content: string | null;
|
|
2770
|
+
/** URL for binary content (images, PDFs). Null for text-based content. */
|
|
2771
|
+
url: string | null;
|
|
2772
|
+
/** The file name, used for display and language detection. */
|
|
2773
|
+
fileName: string;
|
|
2774
|
+
/** The resolved content type. */
|
|
2775
|
+
contentType: ContentType;
|
|
2776
|
+
/** Optional className for the renderer container. */
|
|
2777
|
+
className?: string;
|
|
2778
|
+
/** Optional callback to resolve relative image URLs in markdown content. */
|
|
2779
|
+
resolveImageUrl?: ResolveImageUrl;
|
|
2780
|
+
}
|
|
2781
|
+
/**
|
|
2782
|
+
* A renderer component that can render file content.
|
|
2783
|
+
*/
|
|
2784
|
+
type FileRenderer = React$1.ComponentType<FileRendererProps>;
|
|
2785
|
+
/**
|
|
2786
|
+
* Registry mapping content types to renderer components.
|
|
2787
|
+
* Users can override individual renderers by providing their own map.
|
|
2788
|
+
*/
|
|
2789
|
+
type RendererRegistry = Partial<Record<ContentType, FileRenderer>>;
|
|
2790
|
+
/**
|
|
2791
|
+
* Error information for the FileView.
|
|
2792
|
+
*/
|
|
2793
|
+
interface FileViewError {
|
|
2794
|
+
/** Error message to display. */
|
|
2795
|
+
message: string;
|
|
2796
|
+
/** Optional retry callback. If provided, a retry button is shown. */
|
|
2797
|
+
onRetry?: () => void;
|
|
2798
|
+
}
|
|
2799
|
+
/**
|
|
2800
|
+
* Props for the FileView component.
|
|
2801
|
+
*/
|
|
2802
|
+
interface FileViewProps {
|
|
2803
|
+
/**
|
|
2804
|
+
* Text content of the file.
|
|
2805
|
+
* For text-based files (code, markdown, plaintext, csv), pass the string content.
|
|
2806
|
+
* For binary files (images, PDFs), pass null and use `url` instead.
|
|
2807
|
+
*/
|
|
2808
|
+
content: string | null;
|
|
2809
|
+
/**
|
|
2810
|
+
* URL for binary content.
|
|
2811
|
+
* Used for images, PDFs, and other non-text content.
|
|
2812
|
+
* Can be an object URL, data URL, or HTTP URL.
|
|
2813
|
+
*/
|
|
2814
|
+
url?: string | null;
|
|
2815
|
+
/**
|
|
2816
|
+
* The file name including extension.
|
|
2817
|
+
* Used for content type detection and display context.
|
|
2818
|
+
* @example "README.md", "app.tsx", "photo.png"
|
|
2819
|
+
*/
|
|
2820
|
+
fileName: string;
|
|
2821
|
+
/**
|
|
2822
|
+
* Explicit content type override.
|
|
2823
|
+
* When provided, bypasses automatic detection from fileName.
|
|
2824
|
+
*/
|
|
2825
|
+
contentType?: ContentType;
|
|
2826
|
+
/**
|
|
2827
|
+
* Custom renderer overrides.
|
|
2828
|
+
* Merges with (and overrides) the default renderer registry.
|
|
2829
|
+
* Only the types you specify are overridden; others use defaults.
|
|
2830
|
+
*
|
|
2831
|
+
* @example
|
|
2832
|
+
* renderers={{ code: MyCustomCodeRenderer }}
|
|
2833
|
+
*/
|
|
2834
|
+
renderers?: RendererRegistry;
|
|
2835
|
+
/** Loading state. When true, shows loading indicator. */
|
|
2836
|
+
loading?: boolean;
|
|
2837
|
+
/** Error state. When provided, shows error message with optional retry. */
|
|
2838
|
+
error?: FileViewError | null;
|
|
2839
|
+
/** Custom loading component. Replaces the default spinner. */
|
|
2840
|
+
loadingComponent?: React$1.ReactNode;
|
|
2841
|
+
/** Custom empty state component. Shown when content is null/empty and not loading/error. */
|
|
2842
|
+
emptyComponent?: React$1.ReactNode;
|
|
2843
|
+
/**
|
|
2844
|
+
* Empty state message. Used when no custom emptyComponent is provided.
|
|
2845
|
+
* @default "No content to display"
|
|
2846
|
+
*/
|
|
2847
|
+
emptyMessage?: string;
|
|
2848
|
+
/** Custom error component. Replaces the default error display. */
|
|
2849
|
+
errorComponent?: React$1.ComponentType<{
|
|
2850
|
+
error: FileViewError;
|
|
2851
|
+
}>;
|
|
2852
|
+
/** Additional class name for the outermost container. */
|
|
2853
|
+
className?: string;
|
|
2854
|
+
/** Additional class name passed to the active renderer. */
|
|
2855
|
+
rendererClassName?: string;
|
|
2856
|
+
/**
|
|
2857
|
+
* Optional callback to resolve image `src` values to renderable URLs.
|
|
2858
|
+
* Used by MarkdownRenderer for relative/non-remote image paths.
|
|
2859
|
+
* Remote URLs (http/https) and data URIs are passed through unchanged.
|
|
2860
|
+
*/
|
|
2861
|
+
resolveImageUrl?: ResolveImageUrl;
|
|
2862
|
+
}
|
|
2863
|
+
/**
|
|
2864
|
+
* Content type detection result.
|
|
2865
|
+
*/
|
|
2866
|
+
interface ContentTypeDetectionResult {
|
|
2867
|
+
/** The detected content type. */
|
|
2868
|
+
type: ContentType;
|
|
2869
|
+
/** The file extension that was matched, if any. */
|
|
2870
|
+
extension: string | null;
|
|
2871
|
+
}
|
|
2872
|
+
|
|
2873
|
+
/**
|
|
2874
|
+
* FileView
|
|
2875
|
+
*
|
|
2876
|
+
* A configurable file viewer that detects content type from the file name
|
|
2877
|
+
* and delegates rendering to a pluggable renderer system.
|
|
2878
|
+
*
|
|
2879
|
+
* Built-in renderers: Code, Markdown, Image, PlainText.
|
|
2880
|
+
* Users can override any renderer or add custom ones via the `renderers` prop.
|
|
2881
|
+
*
|
|
2882
|
+
* @example
|
|
2883
|
+
* <FileView fileName="app.tsx" content={sourceCode} />
|
|
2884
|
+
*
|
|
2885
|
+
* @example
|
|
2886
|
+
* <FileView fileName="photo.png" content={null} url={imageUrl} />
|
|
2887
|
+
*
|
|
2888
|
+
* @example
|
|
2889
|
+
* <FileView
|
|
2890
|
+
* fileName="data.txt"
|
|
2891
|
+
* content={jsonContent}
|
|
2892
|
+
* contentType="code"
|
|
2893
|
+
* renderers={{ code: MyCustomCodeRenderer }}
|
|
2894
|
+
* />
|
|
2895
|
+
*/
|
|
2896
|
+
declare function FileView({ content, url, fileName, contentType: contentTypeOverride, renderers: userRenderers, loading, error, loadingComponent, emptyComponent, emptyMessage, errorComponent: ErrorComponent, className, rendererClassName, resolveImageUrl, }: FileViewProps): react_jsx_runtime.JSX.Element;
|
|
2897
|
+
declare namespace FileView {
|
|
2898
|
+
var displayName: string;
|
|
2899
|
+
}
|
|
2900
|
+
|
|
2901
|
+
/**
|
|
2902
|
+
* CodeRenderer
|
|
2903
|
+
*
|
|
2904
|
+
* Renders text content as code with line numbers in a left gutter.
|
|
2905
|
+
* Uses shiki for syntax highlighting when available, falling back to
|
|
2906
|
+
* plain monospace text otherwise.
|
|
2907
|
+
*
|
|
2908
|
+
* Layout:
|
|
2909
|
+
* ┌─────────────────────────────────────────┐
|
|
2910
|
+
* │ 1 │ import React from "react"; │
|
|
2911
|
+
* │ 2 │ │
|
|
2912
|
+
* │ 3 │ export function App() { │
|
|
2913
|
+
* │ 4 │ return <div>Hello</div>; │
|
|
2914
|
+
* │ 5 │ } │
|
|
2915
|
+
* └─────────────────────────────────────────┘
|
|
2916
|
+
*/
|
|
2917
|
+
declare function CodeRenderer({ content, fileName, className, }: FileRendererProps): react_jsx_runtime.JSX.Element;
|
|
2918
|
+
declare namespace CodeRenderer {
|
|
2919
|
+
var displayName: string;
|
|
2920
|
+
}
|
|
2921
|
+
|
|
2922
|
+
/**
|
|
2923
|
+
* MarkdownRenderer
|
|
2924
|
+
*
|
|
2925
|
+
* Renders markdown content using react-markdown + remark-gfm.
|
|
2926
|
+
* Fenced code blocks use shiki syntax highlighting when available.
|
|
2927
|
+
* Styled with Tailwind using semantic CSS variables for theme support.
|
|
2928
|
+
*
|
|
2929
|
+
* Requires `react-markdown` and `remark-gfm` as peer dependencies of @optilogic/core.
|
|
2930
|
+
*/
|
|
2931
|
+
declare function MarkdownRenderer({ content, className, resolveImageUrl, }: FileRendererProps): react_jsx_runtime.JSX.Element;
|
|
2932
|
+
declare namespace MarkdownRenderer {
|
|
2933
|
+
var displayName: string;
|
|
2934
|
+
}
|
|
2935
|
+
|
|
2936
|
+
/**
|
|
2937
|
+
* ImageRenderer
|
|
2938
|
+
*
|
|
2939
|
+
* Renders an image from a URL, centered in its container.
|
|
2940
|
+
* Handles load errors with a fallback message.
|
|
2941
|
+
*/
|
|
2942
|
+
declare function ImageRenderer({ url, fileName, className, }: FileRendererProps): react_jsx_runtime.JSX.Element;
|
|
2943
|
+
declare namespace ImageRenderer {
|
|
2944
|
+
var displayName: string;
|
|
2945
|
+
}
|
|
2946
|
+
|
|
2947
|
+
/**
|
|
2948
|
+
* PlainTextRenderer
|
|
2949
|
+
*
|
|
2950
|
+
* Renders plain text content without line numbers.
|
|
2951
|
+
* Used for .txt, .log, and as the ultimate fallback renderer.
|
|
2952
|
+
*/
|
|
2953
|
+
declare function PlainTextRenderer({ content, className }: FileRendererProps): react_jsx_runtime.JSX.Element;
|
|
2954
|
+
declare namespace PlainTextRenderer {
|
|
2955
|
+
var displayName: string;
|
|
2956
|
+
}
|
|
2957
|
+
|
|
2958
|
+
/**
|
|
2959
|
+
* CsvRenderer
|
|
2960
|
+
*
|
|
2961
|
+
* Parses CSV/TSV content and renders it in a DataGrid
|
|
2962
|
+
* with sorting, filtering, resizable columns, and virtualization.
|
|
2963
|
+
*/
|
|
2964
|
+
declare function CsvRenderer({ content, className }: FileRendererProps): react_jsx_runtime.JSX.Element;
|
|
2965
|
+
declare namespace CsvRenderer {
|
|
2966
|
+
var displayName: string;
|
|
2967
|
+
}
|
|
2968
|
+
|
|
2969
|
+
/**
|
|
2970
|
+
* HtmlRenderer
|
|
2971
|
+
*
|
|
2972
|
+
* Renders HTML content in a fully sandboxed iframe.
|
|
2973
|
+
*/
|
|
2974
|
+
declare function HtmlRenderer({ content, fileName, className, }: FileRendererProps): react_jsx_runtime.JSX.Element;
|
|
2975
|
+
declare namespace HtmlRenderer {
|
|
2976
|
+
var displayName: string;
|
|
2977
|
+
}
|
|
2978
|
+
|
|
2979
|
+
interface UseContentTypeOptions {
|
|
2980
|
+
fileName: string;
|
|
2981
|
+
contentTypeOverride?: ContentType;
|
|
2982
|
+
}
|
|
2983
|
+
interface UseContentTypeReturn extends ContentTypeDetectionResult {
|
|
2984
|
+
/** Whether the type was explicitly overridden. */
|
|
2985
|
+
isOverridden: boolean;
|
|
2986
|
+
}
|
|
2987
|
+
/**
|
|
2988
|
+
* Hook to determine the content type for a file.
|
|
2989
|
+
* Uses explicit override if provided, otherwise auto-detects from fileName.
|
|
2990
|
+
*/
|
|
2991
|
+
declare function useContentType({ fileName, contentTypeOverride, }: UseContentTypeOptions): UseContentTypeReturn;
|
|
2992
|
+
|
|
2993
|
+
/**
|
|
2994
|
+
* Extract the file extension from a file name.
|
|
2995
|
+
* Handles dotfiles (e.g., ".gitignore" -> "gitignore") and
|
|
2996
|
+
* compound extensions (e.g., "file.test.ts" -> "ts").
|
|
2997
|
+
*/
|
|
2998
|
+
declare function getFileExtension(fileName: string): string | null;
|
|
2999
|
+
/**
|
|
3000
|
+
* Detect content type from a file name.
|
|
3001
|
+
*
|
|
3002
|
+
* @example
|
|
3003
|
+
* detectContentType("app.tsx") // { type: "code", extension: "tsx" }
|
|
3004
|
+
* detectContentType("README.md") // { type: "markdown", extension: "md" }
|
|
3005
|
+
* detectContentType("photo.png") // { type: "image", extension: "png" }
|
|
3006
|
+
* detectContentType("unknown.xyz") // { type: "unknown", extension: "xyz" }
|
|
3007
|
+
*/
|
|
3008
|
+
declare function detectContentType(fileName: string): ContentTypeDetectionResult;
|
|
3009
|
+
/**
|
|
3010
|
+
* Check if a content type is text-based (uses `content` string).
|
|
3011
|
+
*/
|
|
3012
|
+
declare function isTextContentType(contentType: ContentType): boolean;
|
|
3013
|
+
/**
|
|
3014
|
+
* Check if a content type is URL-based (uses `url` string).
|
|
3015
|
+
*/
|
|
3016
|
+
declare function isUrlContentType(contentType: ContentType): boolean;
|
|
3017
|
+
|
|
3018
|
+
/**
|
|
3019
|
+
* Default renderer registry.
|
|
3020
|
+
* Maps built-in content types to their default renderer components.
|
|
3021
|
+
*/
|
|
3022
|
+
declare const DEFAULT_RENDERERS: RendererRegistry;
|
|
3023
|
+
/**
|
|
3024
|
+
* Merge user-provided renderers with defaults.
|
|
3025
|
+
* User renderers override defaults for the same content type.
|
|
3026
|
+
*/
|
|
3027
|
+
declare function mergeRenderers(userRenderers?: RendererRegistry): RendererRegistry;
|
|
3028
|
+
/**
|
|
3029
|
+
* Resolve a renderer for a given content type.
|
|
3030
|
+
* Falls back to PlainTextRenderer if no match found.
|
|
3031
|
+
*/
|
|
3032
|
+
declare function resolveRenderer(registry: RendererRegistry, contentType: string): FileRenderer;
|
|
3033
|
+
|
|
2709
3034
|
/** @deprecated Use SortConfig instead */
|
|
2710
3035
|
type SortingConfig = {
|
|
2711
3036
|
field: string;
|
|
@@ -2713,4 +3038,4 @@ type SortingConfig = {
|
|
|
2713
3038
|
onSort: (field: string) => void;
|
|
2714
3039
|
};
|
|
2715
3040
|
|
|
2716
|
-
export { ALL_THEMES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Autocomplete, type AutocompleteOption, type AutocompleteProps, Badge, type BadgeProps, Board, BoardContent, type BoardContentProps, BoardHeader, type BoardHeaderProps, type BoardProps, Button, type ButtonProps, CYBERPUNK_THEME, Calendar, type CalendarProps, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardGrid, type CardGridProps, CardHeader, type CardHeaderProps, CardImage, type CardImageProps, CardList, type CardListProps, type CardProps, CardTitle, type CardTitleProps, type CellEditEvent, CellEditor, type CellEditorProps$1 as CellEditorProps, type CellPosition, Checkbox, type CheckboxProps, Chip, type ChipProps, type ColorFieldConfig, type ColumnDef, ConfirmationModal, type ConfirmationModalProps, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, DARK_ELEGANT_THEME, DataGrid, type DataGridContextValue, type DataGridInternalState, type DataGridProps, type DataGridState, DataTable, type DataTableColumn, type DataTableProps, type DataTableSort, type DateFilterOperator, DatePicker, DatePickerInput, type DatePickerInputProps, type DatePickerProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type EditingCell, type EditorType, FOREST_THEME, FUTURISTIC_THEME, type FilterConfig, type FilterOperator, FilterPopover, type FilterPopoverProps$1 as FilterPopoverProps, type FilterType, GREEN_THEME, type GridCellProps, HeaderCell, type HeaderCellProps$1 as HeaderCellProps, IconButton, type IconButtonProps, Input, type InputProps, Label, type LabelProps, LoadingSpinner, type LoadingSpinnerProps, MINIMALIST_LIGHT_THEME, Modal, ModalButton, type ModalButtonProps, type ModalProps, NATURE_THEME, type NumberFilterOperator, OCEAN_THEME, OPTILOGIC_LEGACY_THEME, PRESET_THEMES, type PaginationConfig, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, Progress, type ProgressProps, ResizablePanel, type ResizablePanelProps, ResizeHandle, type ResizeHandleProps, SCIFI_THEME, SUNSET_THEME, type SearchConfig, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, SelectableCard, type SelectableCardProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SortConfig, type SortingConfig, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, type TextFilterOperator, Textarea, type TextareaProps, type Theme, type ThemeHSL, type ThemeHex, ThemePicker, type ThemePickerProps, Toaster, type ToasterProps, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UseContextMenuResult, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, applyFilterOperator, applyFilters, applySorting, applyTheme, areThemesEqual, badgeVariants, boardVariants, buttonVariants, cardActionsVariants, cardGridVariants, cardImageVariants, cardListVariants, cardVariants, cloneTheme, cn, exportTheme, getCellValue, getCurrentTheme, getDefaultTheme, getPresetTheme, hexToHsl, iconButtonVariants, importTheme, isPresetTheme, labelVariants, loadingSpinnerVariants, themeToHsl, useColumnResize, useColumnResizeManager, useConfirmation, useContextMenu, useDataGridState, useKeyboardNavigation, validateTheme };
|
|
3041
|
+
export { ALL_THEMES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Autocomplete, type AutocompleteOption, type AutocompleteProps, Badge, type BadgeProps, Board, BoardContent, type BoardContentProps, BoardHeader, type BoardHeaderProps, type BoardProps, type BuiltInContentType, Button, type ButtonProps, CYBERPUNK_THEME, Calendar, type CalendarProps, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardGrid, type CardGridProps, CardHeader, type CardHeaderProps, CardImage, type CardImageProps, CardList, type CardListProps, type CardProps, CardTitle, type CardTitleProps, type CellEditEvent, CellEditor, type CellEditorProps$1 as CellEditorProps, type CellPosition, Checkbox, type CheckboxProps, Chip, type ChipProps, CodeRenderer, type ColorFieldConfig, type ColumnDef, ConfirmationModal, type ConfirmationModalProps, type ContentType, type ContentTypeDetectionResult, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, CsvRenderer, DARK_ELEGANT_THEME, DEFAULT_RENDERERS, DataGrid, type DataGridContextValue, type DataGridInternalState, type DataGridProps, type DataGridState, DataTable, type DataTableColumn, type DataTableProps, type DataTableSort, type DateFilterOperator, DatePicker, DatePickerInput, type DatePickerInputProps, type DatePickerProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type EditingCell, type EditorType, FOREST_THEME, FUTURISTIC_THEME, type FileRenderer, type FileRendererProps, FileView, type FileViewError, type FileViewProps, type FilterConfig, type FilterOperator, FilterPopover, type FilterPopoverProps$1 as FilterPopoverProps, type FilterType, GREEN_THEME, type GridCellProps, HeaderCell, type HeaderCellProps$1 as HeaderCellProps, HtmlRenderer, IconButton, type IconButtonProps, ImageRenderer, Input, type InputProps, Label, type LabelProps, LoadingSpinner, type LoadingSpinnerProps, MINIMALIST_LIGHT_THEME, MarkdownRenderer, Modal, ModalButton, type ModalButtonProps, type ModalProps, NATURE_THEME, type NumberFilterOperator, OCEAN_THEME, OPTILOGIC_LEGACY_THEME, PRESET_THEMES, type PaginationConfig, PlainTextRenderer, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, Progress, type ProgressProps, type RendererRegistry, ResizablePanel, type ResizablePanelProps, ResizeHandle, type ResizeHandleProps, type ResolveImageUrl, SCIFI_THEME, SUNSET_THEME, type SearchConfig, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, SelectableCard, type SelectableCardProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SortConfig, type SortingConfig, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, type TextFilterOperator, Textarea, type TextareaProps, type Theme, type ThemeHSL, type ThemeHex, ThemePicker, type ThemePickerProps, Toaster, type ToasterProps, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UseContentTypeOptions, type UseContentTypeReturn, type UseContextMenuResult, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, applyFilterOperator, applyFilters, applySorting, applyTheme, areThemesEqual, badgeVariants, boardVariants, buttonVariants, cardActionsVariants, cardGridVariants, cardImageVariants, cardListVariants, cardVariants, cloneTheme, cn, detectContentType, exportTheme, getCellValue, getCurrentTheme, getDefaultTheme, getFileExtension, getPresetTheme, hexToHsl, iconButtonVariants, importTheme, isPresetTheme, isTextContentType, isUrlContentType, labelVariants, loadingSpinnerVariants, mergeRenderers, resolveRenderer, themeToHsl, useColumnResize, useColumnResizeManager, useConfirmation, useContentType, useContextMenu, useDataGridState, useKeyboardNavigation, validateTheme };
|