@frontmcp/ui 0.12.2 → 1.0.0-beta.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.
- package/README.md +279 -72
- package/bridge/adapters/claude.adapter.d.ts.map +1 -1
- package/bridge/adapters/gemini.adapter.d.ts.map +1 -1
- package/bridge/index.js +2 -36
- package/components/Alert/Alert.d.ts +11 -0
- package/components/Alert/Alert.d.ts.map +1 -0
- package/components/Alert/index.d.ts +4 -0
- package/components/Alert/index.d.ts.map +1 -0
- package/components/Alert/index.js +61 -0
- package/components/Avatar/Avatar.d.ts +10 -0
- package/components/Avatar/Avatar.d.ts.map +1 -0
- package/components/Avatar/index.d.ts +4 -0
- package/components/Avatar/index.d.ts.map +1 -0
- package/components/Avatar/index.js +43 -0
- package/components/Badge/Badge.d.ts +13 -0
- package/components/Badge/Badge.d.ts.map +1 -0
- package/components/Badge/index.d.ts +4 -0
- package/components/Badge/index.d.ts.map +1 -0
- package/{render → components/Badge}/index.js +54 -42
- package/components/Button/Button.d.ts +16 -0
- package/components/Button/Button.d.ts.map +1 -0
- package/components/Button/index.d.ts +4 -0
- package/components/Button/index.d.ts.map +1 -0
- package/components/Button/index.js +91 -0
- package/components/Card/Card.d.ts +25 -0
- package/components/Card/Card.d.ts.map +1 -0
- package/components/Card/index.d.ts +4 -0
- package/components/Card/index.d.ts.map +1 -0
- package/components/Card/index.js +110 -0
- package/components/List/List.d.ts +15 -0
- package/components/List/List.d.ts.map +1 -0
- package/components/List/index.d.ts +4 -0
- package/components/List/index.d.ts.map +1 -0
- package/components/List/index.js +58 -0
- package/components/Loader/Loader.d.ts +28 -0
- package/components/Loader/Loader.d.ts.map +1 -0
- package/components/Loader/LoaderContext.d.ts +20 -0
- package/components/Loader/LoaderContext.d.ts.map +1 -0
- package/components/Loader/index.d.ts +6 -0
- package/components/Loader/index.d.ts.map +1 -0
- package/components/Loader/index.js +174 -0
- package/components/Modal/Modal.d.ts +22 -0
- package/components/Modal/Modal.d.ts.map +1 -0
- package/components/Modal/index.d.ts +4 -0
- package/components/Modal/index.d.ts.map +1 -0
- package/components/Modal/index.js +80 -0
- package/components/Select/Select.d.ts +21 -0
- package/components/Select/Select.d.ts.map +1 -0
- package/components/Select/index.d.ts +4 -0
- package/components/Select/index.d.ts.map +1 -0
- package/components/Select/index.js +78 -0
- package/components/Table/Table.d.ts +15 -0
- package/components/Table/Table.d.ts.map +1 -0
- package/components/Table/index.d.ts +4 -0
- package/components/Table/index.d.ts.map +1 -0
- package/components/Table/index.js +70 -0
- package/components/TextField/TextField.d.ts +19 -0
- package/components/TextField/TextField.d.ts.map +1 -0
- package/components/TextField/index.d.ts +4 -0
- package/components/TextField/index.d.ts.map +1 -0
- package/components/TextField/index.js +77 -0
- package/components/index.d.ts +22 -28
- package/components/index.d.ts.map +1 -1
- package/components/index.js +523 -2521
- package/esm/bridge/index.mjs +2 -6
- package/esm/components/Alert/index.mjs +28 -0
- package/esm/components/Avatar/index.mjs +10 -0
- package/esm/components/Badge/index.mjs +56 -0
- package/esm/components/Button/index.mjs +58 -0
- package/esm/components/Card/index.mjs +77 -0
- package/esm/components/List/index.mjs +25 -0
- package/esm/components/Loader/index.mjs +141 -0
- package/esm/components/Modal/index.mjs +47 -0
- package/esm/components/Select/index.mjs +45 -0
- package/esm/components/Table/index.mjs +37 -0
- package/esm/components/TextField/index.mjs +44 -0
- package/esm/components/index.mjs +513 -2415
- package/esm/index.mjs +62 -4652
- package/esm/package.json +372 -16
- package/esm/react/index.mjs +2 -285
- package/esm/renderer/charts/index.mjs +336 -0
- package/esm/renderer/common/index.mjs +135 -0
- package/esm/renderer/csv/index.mjs +193 -0
- package/esm/renderer/flow/index.mjs +259 -0
- package/esm/renderer/html/index.mjs +99 -0
- package/esm/renderer/image/index.mjs +125 -0
- package/esm/renderer/index.mjs +2173 -0
- package/esm/renderer/maps/index.mjs +217 -0
- package/esm/renderer/math/index.mjs +229 -0
- package/esm/renderer/mdx/index.mjs +261 -0
- package/esm/renderer/media/index.mjs +235 -0
- package/esm/renderer/mermaid/index.mjs +220 -0
- package/esm/renderer/pdf/index.mjs +229 -0
- package/esm/renderer/react/index.mjs +230 -0
- package/esm/runtime/index.mjs +194 -0
- package/esm/theme/index.mjs +93 -0
- package/index.d.ts +10 -18
- package/index.d.ts.map +1 -1
- package/index.js +63 -4806
- package/package.json +372 -16
- package/react/index.d.ts +8 -54
- package/react/index.d.ts.map +1 -1
- package/react/index.js +2 -295
- package/renderer/auto-detect.d.ts +39 -0
- package/renderer/auto-detect.d.ts.map +1 -0
- package/renderer/charts/index.d.ts +22 -0
- package/renderer/charts/index.d.ts.map +1 -0
- package/renderer/charts/index.js +367 -0
- package/renderer/common/index.d.ts +5 -0
- package/renderer/common/index.d.ts.map +1 -0
- package/renderer/common/index.js +158 -0
- package/renderer/common/inject-stylesheet.d.ts +9 -0
- package/renderer/common/inject-stylesheet.d.ts.map +1 -0
- package/renderer/common/lazy-import.d.ts +85 -0
- package/renderer/common/lazy-import.d.ts.map +1 -0
- package/renderer/common/use-lazy-module.d.ts +13 -0
- package/renderer/common/use-lazy-module.d.ts.map +1 -0
- package/renderer/common/use-renderer-theme.d.ts +35 -0
- package/renderer/common/use-renderer-theme.d.ts.map +1 -0
- package/renderer/csv/index.d.ts +12 -0
- package/renderer/csv/index.d.ts.map +1 -0
- package/renderer/csv/index.js +224 -0
- package/renderer/flow/index.d.ts +40 -0
- package/renderer/flow/index.d.ts.map +1 -0
- package/renderer/flow/index.js +290 -0
- package/renderer/html/index.d.ts +12 -0
- package/renderer/html/index.d.ts.map +1 -0
- package/renderer/html/index.js +130 -0
- package/renderer/image/index.d.ts +11 -0
- package/renderer/image/index.d.ts.map +1 -0
- package/renderer/image/index.js +156 -0
- package/renderer/index.d.ts +32 -0
- package/renderer/index.d.ts.map +1 -0
- package/renderer/index.js +2206 -0
- package/renderer/maps/index.d.ts +27 -0
- package/renderer/maps/index.d.ts.map +1 -0
- package/renderer/maps/index.js +248 -0
- package/renderer/math/index.d.ts +11 -0
- package/renderer/math/index.d.ts.map +1 -0
- package/renderer/math/index.js +260 -0
- package/renderer/mdx/index.d.ts +10 -0
- package/renderer/mdx/index.d.ts.map +1 -0
- package/renderer/mdx/index.js +292 -0
- package/renderer/media/index.d.ts +20 -0
- package/renderer/media/index.d.ts.map +1 -0
- package/renderer/media/index.js +266 -0
- package/renderer/mermaid/index.d.ts +11 -0
- package/renderer/mermaid/index.d.ts.map +1 -0
- package/renderer/mermaid/index.js +251 -0
- package/renderer/pdf/index.d.ts +10 -0
- package/renderer/pdf/index.d.ts.map +1 -0
- package/renderer/pdf/index.js +260 -0
- package/renderer/react/index.d.ts +45 -0
- package/renderer/react/index.d.ts.map +1 -0
- package/renderer/react/index.js +261 -0
- package/renderer/types.d.ts +24 -0
- package/renderer/types.d.ts.map +1 -0
- package/runtime/babel-runtime.d.ts +70 -0
- package/runtime/babel-runtime.d.ts.map +1 -0
- package/runtime/content-detector.d.ts +43 -0
- package/runtime/content-detector.d.ts.map +1 -0
- package/runtime/index.d.ts +10 -0
- package/runtime/index.d.ts.map +1 -0
- package/runtime/index.js +217 -0
- package/theme/FrontMcpThemeProvider.d.ts +4 -0
- package/theme/FrontMcpThemeProvider.d.ts.map +1 -0
- package/theme/create-theme.d.ts +9 -0
- package/theme/create-theme.d.ts.map +1 -0
- package/theme/index.d.ts +5 -0
- package/theme/index.d.ts.map +1 -0
- package/theme/index.js +126 -0
- package/theme/types.d.ts +28 -0
- package/theme/types.d.ts.map +1 -0
- package/theme/use-theme.d.ts +3 -0
- package/theme/use-theme.d.ts.map +1 -0
- package/bundler/browser-components.d.ts +0 -42
- package/bundler/browser-components.d.ts.map +0 -1
- package/bundler/bundler.d.ts +0 -282
- package/bundler/bundler.d.ts.map +0 -1
- package/bundler/index.d.ts +0 -43
- package/bundler/index.d.ts.map +0 -1
- package/bundler/index.js +0 -3168
- package/bundler/types.d.ts +0 -883
- package/bundler/types.d.ts.map +0 -1
- package/components/alert.d.ts +0 -83
- package/components/alert.d.ts.map +0 -1
- package/components/alert.schema.d.ts +0 -98
- package/components/alert.schema.d.ts.map +0 -1
- package/components/avatar.d.ts +0 -77
- package/components/avatar.d.ts.map +0 -1
- package/components/avatar.schema.d.ts +0 -170
- package/components/avatar.schema.d.ts.map +0 -1
- package/components/badge.d.ts +0 -78
- package/components/badge.d.ts.map +0 -1
- package/components/badge.schema.d.ts +0 -91
- package/components/badge.schema.d.ts.map +0 -1
- package/components/button.d.ts +0 -100
- package/components/button.d.ts.map +0 -1
- package/components/button.schema.d.ts +0 -120
- package/components/button.schema.d.ts.map +0 -1
- package/components/card.d.ts +0 -76
- package/components/card.d.ts.map +0 -1
- package/components/card.schema.d.ts +0 -93
- package/components/card.schema.d.ts.map +0 -1
- package/components/form.d.ts +0 -227
- package/components/form.d.ts.map +0 -1
- package/components/form.schema.d.ts +0 -365
- package/components/form.schema.d.ts.map +0 -1
- package/components/list.d.ts +0 -121
- package/components/list.d.ts.map +0 -1
- package/components/list.schema.d.ts +0 -129
- package/components/list.schema.d.ts.map +0 -1
- package/components/modal.d.ts +0 -100
- package/components/modal.d.ts.map +0 -1
- package/components/modal.schema.d.ts +0 -151
- package/components/modal.schema.d.ts.map +0 -1
- package/components/table.d.ts +0 -91
- package/components/table.d.ts.map +0 -1
- package/components/table.schema.d.ts +0 -123
- package/components/table.schema.d.ts.map +0 -1
- package/esm/bundler/index.mjs +0 -3136
- package/esm/layouts/index.mjs +0 -409
- package/esm/render/index.mjs +0 -45
- package/esm/renderers/index.mjs +0 -621
- package/esm/universal/index.mjs +0 -1946
- package/esm/web-components/index.mjs +0 -2023
- package/layouts/base.d.ts +0 -86
- package/layouts/base.d.ts.map +0 -1
- package/layouts/index.d.ts +0 -8
- package/layouts/index.d.ts.map +0 -1
- package/layouts/index.js +0 -437
- package/layouts/presets.d.ts +0 -134
- package/layouts/presets.d.ts.map +0 -1
- package/react/Alert.d.ts +0 -101
- package/react/Alert.d.ts.map +0 -1
- package/react/Badge.d.ts +0 -100
- package/react/Badge.d.ts.map +0 -1
- package/react/Button.d.ts +0 -108
- package/react/Button.d.ts.map +0 -1
- package/react/Card.d.ts +0 -103
- package/react/Card.d.ts.map +0 -1
- package/react/types.d.ts +0 -105
- package/react/types.d.ts.map +0 -1
- package/render/index.d.ts +0 -8
- package/render/index.d.ts.map +0 -1
- package/render/prerender.d.ts +0 -57
- package/render/prerender.d.ts.map +0 -1
- package/renderers/index.d.ts +0 -26
- package/renderers/index.d.ts.map +0 -1
- package/renderers/index.js +0 -666
- package/renderers/mdx.renderer.d.ts +0 -99
- package/renderers/mdx.renderer.d.ts.map +0 -1
- package/renderers/react.adapter.d.ts +0 -70
- package/renderers/react.adapter.d.ts.map +0 -1
- package/renderers/react.renderer.d.ts +0 -105
- package/renderers/react.renderer.d.ts.map +0 -1
- package/renderers/transpiler.d.ts +0 -49
- package/renderers/transpiler.d.ts.map +0 -1
- package/universal/UniversalApp.d.ts +0 -108
- package/universal/UniversalApp.d.ts.map +0 -1
- package/universal/cached-runtime.d.ts +0 -139
- package/universal/cached-runtime.d.ts.map +0 -1
- package/universal/context.d.ts +0 -122
- package/universal/context.d.ts.map +0 -1
- package/universal/index.d.ts +0 -57
- package/universal/index.d.ts.map +0 -1
- package/universal/index.js +0 -2032
- package/universal/renderers/html.renderer.d.ts +0 -36
- package/universal/renderers/html.renderer.d.ts.map +0 -1
- package/universal/renderers/index.d.ts +0 -112
- package/universal/renderers/index.d.ts.map +0 -1
- package/universal/renderers/markdown.renderer.d.ts +0 -33
- package/universal/renderers/markdown.renderer.d.ts.map +0 -1
- package/universal/renderers/mdx.renderer.d.ts +0 -38
- package/universal/renderers/mdx.renderer.d.ts.map +0 -1
- package/universal/renderers/react.renderer.d.ts +0 -46
- package/universal/renderers/react.renderer.d.ts.map +0 -1
- package/universal/runtime-builder.d.ts +0 -33
- package/universal/runtime-builder.d.ts.map +0 -1
- package/universal/store.d.ts +0 -135
- package/universal/store.d.ts.map +0 -1
- package/universal/types.d.ts +0 -199
- package/universal/types.d.ts.map +0 -1
- package/web-components/core/attribute-parser.d.ts +0 -82
- package/web-components/core/attribute-parser.d.ts.map +0 -1
- package/web-components/core/base-element.d.ts +0 -197
- package/web-components/core/base-element.d.ts.map +0 -1
- package/web-components/core/index.d.ts +0 -9
- package/web-components/core/index.d.ts.map +0 -1
- package/web-components/elements/fmcp-alert.d.ts +0 -46
- package/web-components/elements/fmcp-alert.d.ts.map +0 -1
- package/web-components/elements/fmcp-badge.d.ts +0 -47
- package/web-components/elements/fmcp-badge.d.ts.map +0 -1
- package/web-components/elements/fmcp-button.d.ts +0 -117
- package/web-components/elements/fmcp-button.d.ts.map +0 -1
- package/web-components/elements/fmcp-card.d.ts +0 -53
- package/web-components/elements/fmcp-card.d.ts.map +0 -1
- package/web-components/elements/fmcp-input.d.ts +0 -96
- package/web-components/elements/fmcp-input.d.ts.map +0 -1
- package/web-components/elements/fmcp-select.d.ts +0 -100
- package/web-components/elements/fmcp-select.d.ts.map +0 -1
- package/web-components/elements/index.d.ts +0 -13
- package/web-components/elements/index.d.ts.map +0 -1
- package/web-components/index.d.ts +0 -49
- package/web-components/index.d.ts.map +0 -1
- package/web-components/index.js +0 -2058
- package/web-components/register.d.ts +0 -57
- package/web-components/register.d.ts.map +0 -1
- package/web-components/types.d.ts +0 -122
- package/web-components/types.d.ts.map +0 -1
package/react/Alert.d.ts
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Alert.tsx
|
|
3
|
-
* @description React Alert component with static HTML rendering support.
|
|
4
|
-
*
|
|
5
|
-
* This is the single source of truth for the Alert component. It can be used:
|
|
6
|
-
* 1. As a React component: `<Alert variant="success" title="Success!">Message</Alert>`
|
|
7
|
-
* 2. As a static HTML generator: `await renderAlert({ variant: 'success', children: 'Message' })`
|
|
8
|
-
*
|
|
9
|
-
* @example React usage
|
|
10
|
-
* ```tsx
|
|
11
|
-
* import { Alert } from '@frontmcp/ui/react';
|
|
12
|
-
*
|
|
13
|
-
* function App() {
|
|
14
|
-
* return (
|
|
15
|
-
* <Alert variant="success" title="Success!">
|
|
16
|
-
* Your changes have been saved.
|
|
17
|
-
* </Alert>
|
|
18
|
-
* );
|
|
19
|
-
* }
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* @example Dismissible alert
|
|
23
|
-
* ```tsx
|
|
24
|
-
* <Alert variant="warning" dismissible onDismiss={() => setShow(false)}>
|
|
25
|
-
* This action cannot be undone.
|
|
26
|
-
* </Alert>
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* @example Static HTML generation
|
|
30
|
-
* ```typescript
|
|
31
|
-
* import { renderAlert } from '@frontmcp/ui/react';
|
|
32
|
-
*
|
|
33
|
-
* const html = await renderAlert({
|
|
34
|
-
* variant: 'info',
|
|
35
|
-
* title: 'Note',
|
|
36
|
-
* children: 'Please review before submitting.',
|
|
37
|
-
* });
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* @module @frontmcp/ui/react/Alert
|
|
41
|
-
*/
|
|
42
|
-
import type { ReactNode, ReactElement } from 'react';
|
|
43
|
-
import { type AlertVariant } from '@frontmcp/uipack/styles';
|
|
44
|
-
/**
|
|
45
|
-
* Alert component props
|
|
46
|
-
*/
|
|
47
|
-
export interface AlertProps {
|
|
48
|
-
/** Alert variant */
|
|
49
|
-
variant?: AlertVariant;
|
|
50
|
-
/** Alert title */
|
|
51
|
-
title?: string;
|
|
52
|
-
/** Custom icon (React element) */
|
|
53
|
-
icon?: ReactNode;
|
|
54
|
-
/** Show default icon based on variant */
|
|
55
|
-
showIcon?: boolean;
|
|
56
|
-
/** Dismissible alert */
|
|
57
|
-
dismissible?: boolean;
|
|
58
|
-
/** Dismiss callback */
|
|
59
|
-
onDismiss?: () => void;
|
|
60
|
-
/** Additional CSS classes */
|
|
61
|
-
className?: string;
|
|
62
|
-
/** Alert content */
|
|
63
|
-
children?: ReactNode;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Alert component.
|
|
67
|
-
*
|
|
68
|
-
* A notification component for displaying important messages.
|
|
69
|
-
* Uses Tailwind CSS classes for styling.
|
|
70
|
-
*/
|
|
71
|
-
export declare function Alert({ variant, title, icon, showIcon, dismissible, onDismiss, className, children, }: AlertProps): ReactElement;
|
|
72
|
-
/**
|
|
73
|
-
* Props for static render functions (children is always a string)
|
|
74
|
-
*/
|
|
75
|
-
export interface AlertRenderProps extends Omit<AlertProps, 'children' | 'icon' | 'onDismiss'> {
|
|
76
|
-
/** Alert content as string */
|
|
77
|
-
children?: string;
|
|
78
|
-
/** Icon as HTML string */
|
|
79
|
-
icon?: string;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Render Alert component to static HTML string (async).
|
|
83
|
-
*
|
|
84
|
-
* Uses React 19's prerender API for optimal static HTML generation.
|
|
85
|
-
*
|
|
86
|
-
* @param props - Alert props (with string children)
|
|
87
|
-
* @returns Promise resolving to HTML string
|
|
88
|
-
*/
|
|
89
|
-
export declare function renderAlert(props: AlertRenderProps): Promise<string>;
|
|
90
|
-
/**
|
|
91
|
-
* Render Alert component to static HTML string (sync).
|
|
92
|
-
*
|
|
93
|
-
* Uses React's renderToStaticMarkup for synchronous rendering.
|
|
94
|
-
* Does NOT wait for Suspense boundaries.
|
|
95
|
-
*
|
|
96
|
-
* @param props - Alert props (with string children)
|
|
97
|
-
* @returns HTML string
|
|
98
|
-
*/
|
|
99
|
-
export declare function renderAlertSync(props: AlertRenderProps): string;
|
|
100
|
-
export default Alert;
|
|
101
|
-
//# sourceMappingURL=Alert.d.ts.map
|
package/react/Alert.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../src/react/Alert.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CA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TML rendering support.
|
|
4
|
-
*
|
|
5
|
-
* This is the single source of truth for the Badge component. It can be used:
|
|
6
|
-
* 1. As a React component: `<Badge variant="success">Active</Badge>`
|
|
7
|
-
* 2. As a static HTML generator: `await renderBadge({ variant: 'success', children: 'Active' })`
|
|
8
|
-
*
|
|
9
|
-
* @example React usage
|
|
10
|
-
* ```tsx
|
|
11
|
-
* import { Badge } from '@frontmcp/ui/react';
|
|
12
|
-
*
|
|
13
|
-
* function App() {
|
|
14
|
-
* return (
|
|
15
|
-
* <Badge variant="success">Active</Badge>
|
|
16
|
-
* );
|
|
17
|
-
* }
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* @example Pill badge
|
|
21
|
-
* ```tsx
|
|
22
|
-
* <Badge variant="info" pill>
|
|
23
|
-
* New Feature
|
|
24
|
-
* </Badge>
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @example Static HTML generation
|
|
28
|
-
* ```typescript
|
|
29
|
-
* import { renderBadge } from '@frontmcp/ui/react';
|
|
30
|
-
*
|
|
31
|
-
* const html = await renderBadge({
|
|
32
|
-
* variant: 'success',
|
|
33
|
-
* children: 'Active',
|
|
34
|
-
* });
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* @module @frontmcp/ui/react/Badge
|
|
38
|
-
*/
|
|
39
|
-
import type { ReactNode, ReactElement } from 'react';
|
|
40
|
-
import { type BadgeVariant, type BadgeSize } from '@frontmcp/uipack/styles';
|
|
41
|
-
/**
|
|
42
|
-
* Badge component props
|
|
43
|
-
*/
|
|
44
|
-
export interface BadgeProps {
|
|
45
|
-
/** Badge variant */
|
|
46
|
-
variant?: BadgeVariant;
|
|
47
|
-
/** Badge size */
|
|
48
|
-
size?: BadgeSize;
|
|
49
|
-
/** Rounded pill style */
|
|
50
|
-
pill?: boolean;
|
|
51
|
-
/** Icon before text (React element) */
|
|
52
|
-
icon?: ReactNode;
|
|
53
|
-
/** Dot indicator (no text) */
|
|
54
|
-
dot?: boolean;
|
|
55
|
-
/** Additional CSS classes */
|
|
56
|
-
className?: string;
|
|
57
|
-
/** Removable badge */
|
|
58
|
-
removable?: boolean;
|
|
59
|
-
/** Remove callback */
|
|
60
|
-
onRemove?: () => void;
|
|
61
|
-
/** Badge content */
|
|
62
|
-
children?: ReactNode;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Badge component.
|
|
66
|
-
*
|
|
67
|
-
* A small status indicator or label component.
|
|
68
|
-
* Uses Tailwind CSS classes for styling.
|
|
69
|
-
*/
|
|
70
|
-
export declare function Badge({ variant, size, pill, icon, dot, className, removable, onRemove, children, }: BadgeProps): ReactElement;
|
|
71
|
-
/**
|
|
72
|
-
* Props for static render functions (children is always a string)
|
|
73
|
-
*/
|
|
74
|
-
export interface BadgeRenderProps extends Omit<BadgeProps, 'children' | 'icon' | 'onRemove'> {
|
|
75
|
-
/** Badge content as string */
|
|
76
|
-
children?: string;
|
|
77
|
-
/** Icon as HTML string */
|
|
78
|
-
icon?: string;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Render Badge component to static HTML string (async).
|
|
82
|
-
*
|
|
83
|
-
* Uses React 19's prerender API for optimal static HTML generation.
|
|
84
|
-
*
|
|
85
|
-
* @param props - Badge props (with string children)
|
|
86
|
-
* @returns Promise resolving to HTML string
|
|
87
|
-
*/
|
|
88
|
-
export declare function renderBadge(props: BadgeRenderProps): Promise<string>;
|
|
89
|
-
/**
|
|
90
|
-
* Render Badge component to static HTML string (sync).
|
|
91
|
-
*
|
|
92
|
-
* Uses React's renderToStaticMarkup for synchronous rendering.
|
|
93
|
-
* Does NOT wait for Suspense boundaries.
|
|
94
|
-
*
|
|
95
|
-
* @param props - Badge props (with string children)
|
|
96
|
-
* @returns HTML string
|
|
97
|
-
*/
|
|
98
|
-
export declare function renderBadgeSync(props: BadgeRenderProps): string;
|
|
99
|
-
export default Badge;
|
|
100
|
-
//# sourceMappingURL=Badge.d.ts.map
|
package/react/Badge.d.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GAOG;AACH,wBAAsB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ1E;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAQ/D;AAID,eAAe,KAAK,CAAC"}
|
package/react/Button.d.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Button.tsx
|
|
3
|
-
* @description React Button component with static HTML rendering support.
|
|
4
|
-
*
|
|
5
|
-
* This is the single source of truth for the Button component. It can be used:
|
|
6
|
-
* 1. As a React component: `<Button variant="primary">Click Me</Button>`
|
|
7
|
-
* 2. As a static HTML generator: `await renderButton({ variant: 'primary', children: 'Click Me' })`
|
|
8
|
-
*
|
|
9
|
-
* @example React usage
|
|
10
|
-
* ```tsx
|
|
11
|
-
* import { Button } from '@frontmcp/ui/react';
|
|
12
|
-
*
|
|
13
|
-
* function App() {
|
|
14
|
-
* return (
|
|
15
|
-
* <Button variant="primary" onClick={() => alert('Clicked!')}>
|
|
16
|
-
* Click Me
|
|
17
|
-
* </Button>
|
|
18
|
-
* );
|
|
19
|
-
* }
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* @example With loading state
|
|
23
|
-
* ```tsx
|
|
24
|
-
* <Button variant="primary" loading>
|
|
25
|
-
* Saving...
|
|
26
|
-
* </Button>
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* @example Static HTML generation
|
|
30
|
-
* ```typescript
|
|
31
|
-
* import { renderButton } from '@frontmcp/ui/react';
|
|
32
|
-
*
|
|
33
|
-
* const html = await renderButton({
|
|
34
|
-
* variant: 'primary',
|
|
35
|
-
* children: 'Submit',
|
|
36
|
-
* });
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @module @frontmcp/ui/react/Button
|
|
40
|
-
*/
|
|
41
|
-
import type { ReactNode, ReactElement } from 'react';
|
|
42
|
-
import { type ButtonVariant, type ButtonSize } from '@frontmcp/uipack/styles';
|
|
43
|
-
/**
|
|
44
|
-
* Button component props
|
|
45
|
-
*/
|
|
46
|
-
export interface ButtonProps {
|
|
47
|
-
/** Button variant */
|
|
48
|
-
variant?: ButtonVariant;
|
|
49
|
-
/** Button size */
|
|
50
|
-
size?: ButtonSize;
|
|
51
|
-
/** Disabled state */
|
|
52
|
-
disabled?: boolean;
|
|
53
|
-
/** Loading state */
|
|
54
|
-
loading?: boolean;
|
|
55
|
-
/** Full width */
|
|
56
|
-
fullWidth?: boolean;
|
|
57
|
-
/** Icon position */
|
|
58
|
-
iconPosition?: 'left' | 'right';
|
|
59
|
-
/** Icon content (React element) */
|
|
60
|
-
icon?: ReactNode;
|
|
61
|
-
/** Icon only (no text) */
|
|
62
|
-
iconOnly?: boolean;
|
|
63
|
-
/** Button type */
|
|
64
|
-
type?: 'button' | 'submit' | 'reset';
|
|
65
|
-
/** Additional CSS classes */
|
|
66
|
-
className?: string;
|
|
67
|
-
/** Click handler */
|
|
68
|
-
onClick?: () => void;
|
|
69
|
-
/** Button content */
|
|
70
|
-
children?: ReactNode;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Button component.
|
|
74
|
-
*
|
|
75
|
-
* A versatile button component with multiple variants, sizes, and states.
|
|
76
|
-
* Uses Tailwind CSS classes for styling.
|
|
77
|
-
*/
|
|
78
|
-
export declare function Button({ variant, size, disabled, loading, fullWidth, iconPosition, icon, iconOnly, type, className, onClick, children, }: ButtonProps): ReactElement;
|
|
79
|
-
/**
|
|
80
|
-
* Props for static render functions (children is always a string)
|
|
81
|
-
*/
|
|
82
|
-
export interface ButtonRenderProps extends Omit<ButtonProps, 'children' | 'icon' | 'onClick'> {
|
|
83
|
-
/** Button content as string */
|
|
84
|
-
children?: string;
|
|
85
|
-
/** Icon as HTML string */
|
|
86
|
-
icon?: string;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Render Button component to static HTML string (async).
|
|
90
|
-
*
|
|
91
|
-
* Uses React 19's prerender API for optimal static HTML generation.
|
|
92
|
-
*
|
|
93
|
-
* @param props - Button props (with string children)
|
|
94
|
-
* @returns Promise resolving to HTML string
|
|
95
|
-
*/
|
|
96
|
-
export declare function renderButton(props: ButtonRenderProps): Promise<string>;
|
|
97
|
-
/**
|
|
98
|
-
* Render Button component to static HTML string (sync).
|
|
99
|
-
*
|
|
100
|
-
* Uses React's renderToStaticMarkup for synchronous rendering.
|
|
101
|
-
* Does NOT wait for Suspense boundaries.
|
|
102
|
-
*
|
|
103
|
-
* @param props - Button props (with string children)
|
|
104
|
-
* @returns HTML string
|
|
105
|
-
*/
|
|
106
|
-
export declare function renderButtonSync(props: ButtonRenderProps): string;
|
|
107
|
-
export default Button;
|
|
108
|
-
//# sourceMappingURL=Button.d.ts.map
|
package/react/Button.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/react/Button.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,UAAU,EAMhB,MAAM,yBAAyB,CAAC;AAGjC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,qBAAqB;IACrB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,kBAAkB;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iBAAiB;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB;IACpB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,mCAAmC;IACnC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB;IAClB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,EACrB,OAAmB,EACnB,IAAW,EACX,QAAgB,EAChB,OAAe,EACf,SAAiB,EACjB,YAAqB,EACrB,IAAI,EACJ,QAAgB,EAChB,IAAe,EACf,SAAS,EACT,OAAO,EACP,QAAQ,GACT,EAAE,WAAW,GAAG,YAAY,CAmB5B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3F,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAQjE;AAID,eAAe,MAAM,CAAC"}
|
package/react/Card.d.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Card.tsx
|
|
3
|
-
* @description React Card component with static HTML rendering support.
|
|
4
|
-
*
|
|
5
|
-
* This is the single source of truth for the Card component. It can be used:
|
|
6
|
-
* 1. As a React component: `<Card title="Hello">Content</Card>`
|
|
7
|
-
* 2. As a static HTML generator: `await renderCard({ title: 'Hello', children: 'Content' })`
|
|
8
|
-
*
|
|
9
|
-
* @example React usage
|
|
10
|
-
* ```tsx
|
|
11
|
-
* import { Card } from '@frontmcp/ui/react';
|
|
12
|
-
*
|
|
13
|
-
* function App() {
|
|
14
|
-
* return (
|
|
15
|
-
* <Card title="Welcome" variant="elevated">
|
|
16
|
-
* <p>Card content goes here</p>
|
|
17
|
-
* </Card>
|
|
18
|
-
* );
|
|
19
|
-
* }
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* @example Static HTML generation
|
|
23
|
-
* ```typescript
|
|
24
|
-
* import { renderCard } from '@frontmcp/ui/react';
|
|
25
|
-
*
|
|
26
|
-
* const html = await renderCard({
|
|
27
|
-
* title: 'Product',
|
|
28
|
-
* subtitle: 'Details',
|
|
29
|
-
* variant: 'elevated',
|
|
30
|
-
* children: '<p>Product description...</p>',
|
|
31
|
-
* });
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* @module @frontmcp/ui/react/Card
|
|
35
|
-
*/
|
|
36
|
-
import type { ReactNode, ReactElement } from 'react';
|
|
37
|
-
import { type CardVariant, type CardSize } from '@frontmcp/uipack/styles';
|
|
38
|
-
/**
|
|
39
|
-
* Card component props
|
|
40
|
-
*/
|
|
41
|
-
export interface CardProps {
|
|
42
|
-
/** Card title */
|
|
43
|
-
title?: string;
|
|
44
|
-
/** Card subtitle/description */
|
|
45
|
-
subtitle?: string;
|
|
46
|
-
/** Header actions (React elements) */
|
|
47
|
-
headerActions?: ReactNode;
|
|
48
|
-
/** Footer content (React elements) */
|
|
49
|
-
footer?: ReactNode;
|
|
50
|
-
/** Card variant */
|
|
51
|
-
variant?: CardVariant;
|
|
52
|
-
/** Card size (padding) */
|
|
53
|
-
size?: CardSize;
|
|
54
|
-
/** Additional CSS classes */
|
|
55
|
-
className?: string;
|
|
56
|
-
/** Card ID */
|
|
57
|
-
id?: string;
|
|
58
|
-
/** Clickable card (adds hover effects) */
|
|
59
|
-
clickable?: boolean;
|
|
60
|
-
/** Click handler URL */
|
|
61
|
-
href?: string;
|
|
62
|
-
/** Card content */
|
|
63
|
-
children?: ReactNode;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Card component.
|
|
67
|
-
*
|
|
68
|
-
* A versatile container component for grouping related content.
|
|
69
|
-
* Uses Tailwind CSS classes for styling.
|
|
70
|
-
*/
|
|
71
|
-
export declare function Card({ title, subtitle, headerActions, footer, variant, size, className, id, clickable, href, children, }: CardProps): ReactElement;
|
|
72
|
-
/**
|
|
73
|
-
* Props for static render functions (children is always a string)
|
|
74
|
-
*/
|
|
75
|
-
export interface CardRenderProps extends Omit<CardProps, 'children' | 'headerActions' | 'footer'> {
|
|
76
|
-
/** Card content as HTML string */
|
|
77
|
-
children?: string;
|
|
78
|
-
/** Header actions as HTML string */
|
|
79
|
-
headerActions?: string;
|
|
80
|
-
/** Footer content as HTML string */
|
|
81
|
-
footer?: string;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Render Card component to static HTML string (async).
|
|
85
|
-
*
|
|
86
|
-
* Uses React 19's prerender API for optimal static HTML generation.
|
|
87
|
-
*
|
|
88
|
-
* @param props - Card props (with string children)
|
|
89
|
-
* @returns Promise resolving to HTML string
|
|
90
|
-
*/
|
|
91
|
-
export declare function renderCard(props: CardRenderProps): Promise<string>;
|
|
92
|
-
/**
|
|
93
|
-
* Render Card component to static HTML string (sync).
|
|
94
|
-
*
|
|
95
|
-
* Uses React's renderToStaticMarkup for synchronous rendering.
|
|
96
|
-
* Does NOT wait for Suspense boundaries.
|
|
97
|
-
*
|
|
98
|
-
* @param props - Card props (with string children)
|
|
99
|
-
* @returns HTML string
|
|
100
|
-
*/
|
|
101
|
-
export declare function renderCardSync(props: CardRenderProps): string;
|
|
102
|
-
export default Card;
|
|
103
|
-
//# sourceMappingURL=Card.d.ts.map
|
package/react/Card.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../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AC;IACvB,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAYxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAY7D;AAID,eAAe,IAAI,CAAC"}
|
package/react/types.d.ts
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file types.ts
|
|
3
|
-
* @description TypeScript types for React wrapper components.
|
|
4
|
-
*
|
|
5
|
-
* Re-exports element types from web-components for use with React refs,
|
|
6
|
-
* and defines React-specific prop interfaces.
|
|
7
|
-
*
|
|
8
|
-
* @module @frontmcp/ui/react/types
|
|
9
|
-
*/
|
|
10
|
-
import type { ReactNode } from 'react';
|
|
11
|
-
import type { CardVariant, CardSize, BadgeVariant, BadgeSize } from '../components';
|
|
12
|
-
export type { FmcpButton, FmcpCard, FmcpAlert, FmcpBadge, FmcpInput, FmcpSelect } from '../web-components';
|
|
13
|
-
/**
|
|
14
|
-
* React props for Card component
|
|
15
|
-
*/
|
|
16
|
-
export interface CardProps {
|
|
17
|
-
/** Card title */
|
|
18
|
-
title?: string;
|
|
19
|
-
/** Card subtitle/description */
|
|
20
|
-
subtitle?: string;
|
|
21
|
-
/** Header actions content */
|
|
22
|
-
headerActions?: ReactNode;
|
|
23
|
-
/** Footer content */
|
|
24
|
-
footer?: ReactNode;
|
|
25
|
-
/** Card variant */
|
|
26
|
-
variant?: CardVariant;
|
|
27
|
-
/** Card size (padding) */
|
|
28
|
-
size?: CardSize;
|
|
29
|
-
/** Additional CSS classes */
|
|
30
|
-
className?: string;
|
|
31
|
-
/** Card ID */
|
|
32
|
-
id?: string;
|
|
33
|
-
/** Clickable card (adds hover effects) */
|
|
34
|
-
clickable?: boolean;
|
|
35
|
-
/** Click handler URL */
|
|
36
|
-
href?: string;
|
|
37
|
-
/** Card content */
|
|
38
|
-
children: ReactNode;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* React props for Badge component
|
|
42
|
-
*/
|
|
43
|
-
export interface BadgeProps {
|
|
44
|
-
/** Badge variant */
|
|
45
|
-
variant?: BadgeVariant;
|
|
46
|
-
/** Badge size */
|
|
47
|
-
size?: BadgeSize;
|
|
48
|
-
/** Rounded pill style */
|
|
49
|
-
pill?: boolean;
|
|
50
|
-
/** Icon before text (ReactNode) */
|
|
51
|
-
icon?: ReactNode;
|
|
52
|
-
/** Dot indicator (no text) */
|
|
53
|
-
dot?: boolean;
|
|
54
|
-
/** Additional CSS classes */
|
|
55
|
-
className?: string;
|
|
56
|
-
/** Removable badge */
|
|
57
|
-
removable?: boolean;
|
|
58
|
-
/** Badge content */
|
|
59
|
-
children?: ReactNode;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* React props for Button component
|
|
63
|
-
*/
|
|
64
|
-
export interface ButtonProps {
|
|
65
|
-
/** Button variant */
|
|
66
|
-
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger' | 'success';
|
|
67
|
-
/** Button size */
|
|
68
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
69
|
-
/** Disabled state */
|
|
70
|
-
disabled?: boolean;
|
|
71
|
-
/** Loading state */
|
|
72
|
-
loading?: boolean;
|
|
73
|
-
/** Full width */
|
|
74
|
-
fullWidth?: boolean;
|
|
75
|
-
/** Icon position */
|
|
76
|
-
iconPosition?: 'left' | 'right';
|
|
77
|
-
/** Icon content */
|
|
78
|
-
icon?: ReactNode;
|
|
79
|
-
/** Button type */
|
|
80
|
-
type?: 'button' | 'submit' | 'reset';
|
|
81
|
-
/** Additional CSS classes */
|
|
82
|
-
className?: string;
|
|
83
|
-
/** Click handler */
|
|
84
|
-
onClick?: () => void;
|
|
85
|
-
/** Button content */
|
|
86
|
-
children: ReactNode;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* React props for Alert component
|
|
90
|
-
*/
|
|
91
|
-
export interface AlertProps {
|
|
92
|
-
/** Alert variant */
|
|
93
|
-
variant?: 'info' | 'success' | 'warning' | 'danger';
|
|
94
|
-
/** Alert title */
|
|
95
|
-
title?: string;
|
|
96
|
-
/** Icon content */
|
|
97
|
-
icon?: ReactNode;
|
|
98
|
-
/** Dismissible */
|
|
99
|
-
dismissible?: boolean;
|
|
100
|
-
/** Additional CSS classes */
|
|
101
|
-
className?: string;
|
|
102
|
-
/** Alert content */
|
|
103
|
-
children: ReactNode;
|
|
104
|
-
}
|
|
105
|
-
//# sourceMappingURL=types.d.ts.map
|
package/react/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/react/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAGpF,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAM3G;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,iBAAiB;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,qBAAqB;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,mBAAmB;IACnB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc;IACd,EAAE,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AC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qBAAqB;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAMD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACpD,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,kBAAkB;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,QAAQ,EAAE,SAAS,CAAC;CACrB"}
|
package/render/index.d.ts
DELETED
package/render/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/render/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
|
package/render/prerender.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file prerender.ts
|
|
3
|
-
* @description React 19 static rendering utilities.
|
|
4
|
-
*
|
|
5
|
-
* Provides both async (prerender) and sync (renderToStaticMarkup) methods
|
|
6
|
-
* for converting React elements to HTML strings.
|
|
7
|
-
*
|
|
8
|
-
* @example Async rendering (recommended)
|
|
9
|
-
* ```typescript
|
|
10
|
-
* import { renderToString } from '@frontmcp/ui/render';
|
|
11
|
-
* import { Card } from '@frontmcp/ui/components';
|
|
12
|
-
*
|
|
13
|
-
* const html = await renderToString(<Card title="Hello">Content</Card>);
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* @example Sync rendering (backwards compatible)
|
|
17
|
-
* ```typescript
|
|
18
|
-
* import { renderToStringSync } from '@frontmcp/ui/render';
|
|
19
|
-
*
|
|
20
|
-
* const html = renderToStringSync(<Card title="Hello">Content</Card>);
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* @module @frontmcp/ui/render
|
|
24
|
-
*/
|
|
25
|
-
import type { ReactElement } from 'react';
|
|
26
|
-
/**
|
|
27
|
-
* Render a React element to static HTML string using React 19's prerender API.
|
|
28
|
-
*
|
|
29
|
-
* This is the recommended async method that:
|
|
30
|
-
* - Waits for all Suspense boundaries to resolve
|
|
31
|
-
* - Uses React 19's streaming prerender API
|
|
32
|
-
* - Returns clean static HTML without hydration markers
|
|
33
|
-
*
|
|
34
|
-
* @param element - The React element to render
|
|
35
|
-
* @returns Promise resolving to HTML string
|
|
36
|
-
*/
|
|
37
|
-
export declare function renderToString(element: ReactElement): Promise<string>;
|
|
38
|
-
/**
|
|
39
|
-
* Render a React element to static HTML string synchronously.
|
|
40
|
-
*
|
|
41
|
-
* This is the sync method for backwards compatibility that:
|
|
42
|
-
* - Does NOT wait for Suspense boundaries
|
|
43
|
-
* - Uses React's renderToStaticMarkup
|
|
44
|
-
* - Returns clean static HTML without hydration markers
|
|
45
|
-
*
|
|
46
|
-
* @param element - The React element to render
|
|
47
|
-
* @returns HTML string
|
|
48
|
-
*/
|
|
49
|
-
export declare function renderToStringSync(element: ReactElement): string;
|
|
50
|
-
/**
|
|
51
|
-
* Check if React and react-dom are available.
|
|
52
|
-
* Useful for conditional rendering in environments where React may not be installed.
|
|
53
|
-
*
|
|
54
|
-
* @returns true if React and react-dom are available
|
|
55
|
-
*/
|
|
56
|
-
export declare function isReactAvailable(): boolean;
|
|
57
|
-
//# sourceMappingURL=prerender.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prerender.d.ts","sourceRoot":"","sources":["../../src/render/prerender.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CA0B3E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAKhE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAQ1C"}
|
package/renderers/index.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* React Renderer Module
|
|
3
|
-
*
|
|
4
|
-
* Provides the React renderer and MDX server-side renderer for template processing.
|
|
5
|
-
* For React-free renderers (HTML, client-side MDX) use @frontmcp/uipack/renderers.
|
|
6
|
-
*
|
|
7
|
-
* @module @frontmcp/ui/renderers
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```typescript
|
|
11
|
-
* import { reactRenderer, ReactRenderer, mdxRenderer, MdxRenderer } from '@frontmcp/ui/renderers';
|
|
12
|
-
* import { rendererRegistry } from '@frontmcp/uipack/renderers';
|
|
13
|
-
*
|
|
14
|
-
* // Register React renderer
|
|
15
|
-
* rendererRegistry.register(reactRenderer);
|
|
16
|
-
*
|
|
17
|
-
* // Use MDX server-side renderer
|
|
18
|
-
* const html = await mdxRenderer.render('# Hello {output.name}', context);
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export type { RendererType, UIRenderer, ToolUIProps, HydratedToolUIProps, TranspileResult, TranspileOptions, RenderOptions, RuntimeScripts, RenderResult, RendererRegistryOptions, DetectionResult, ReactComponentType, WrapperContext, ExtendedToolUIConfig, } from '@frontmcp/uipack/renderers';
|
|
22
|
-
export { ReactRenderer, reactRenderer } from './react.renderer';
|
|
23
|
-
export { ReactRendererAdapter, createReactAdapter, loadReactAdapter } from './react.adapter';
|
|
24
|
-
export { MdxRenderer, mdxRenderer } from './mdx.renderer';
|
|
25
|
-
export { executeTranspiledCode, transpileAndExecute } from './transpiler';
|
|
26
|
-
//# sourceMappingURL=index.d.ts.map
|
package/renderers/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/renderers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,YAAY,EACV,YAAY,EACZ,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGhE,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAI7F,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI1D,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC"}
|