@gild-ui/react-markdown 0.1.0-alpha.3 → 0.1.0-alpha.5
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/CodeBlock.d.cts +1 -1
- package/dist/CodeBlock.d.mts +2 -2
- package/dist/Control.d.cts +1 -1
- package/dist/Control.d.mts +1 -1
- package/dist/Editor.cjs +10 -5
- package/dist/Editor.d.cts +15 -4
- package/dist/Editor.d.mts +15 -4
- package/dist/Editor.mjs +10 -5
- package/dist/{LiveEdit-CXw-vQpD.cjs → LiveEdit-BBcr_mge.cjs} +12 -3
- package/dist/{LiveEdit-CzJcNsEo.mjs → LiveEdit-uducMq29.mjs} +12 -3
- package/dist/LiveEdit.cjs +1 -1
- package/dist/LiveEdit.d.cts +9 -2
- package/dist/LiveEdit.d.mts +10 -3
- package/dist/LiveEdit.mjs +1 -1
- package/dist/Mermaid.d.cts +1 -1
- package/dist/Mermaid.d.mts +1 -1
- package/dist/{Preview-CIbu-nRm.cjs → Preview-Bw3UKRXQ.cjs} +6 -2
- package/dist/{Preview-DQOQ1NKJ.mjs → Preview-Cwt9XkR9.mjs} +6 -2
- package/dist/Preview.cjs +1 -1
- package/dist/Preview.d.cts +5 -3
- package/dist/Preview.d.mts +1 -1
- package/dist/Preview.mjs +1 -1
- package/dist/{Toolbar-gk3KJhCE.cjs → Toolbar-BEAa38F8.cjs} +11 -4
- package/dist/{Toolbar-Eg7KmYbK.mjs → Toolbar-Dc_muf5J.mjs} +11 -4
- package/dist/Toolbar.cjs +1 -1
- package/dist/Toolbar.d.cts +10 -3
- package/dist/Toolbar.d.mts +10 -3
- package/dist/Toolbar.mjs +1 -1
- package/dist/{index-BVYb370O.d.cts → index-A4_MxHTR.d.mts} +1 -1
- package/dist/{index-BBkHCbE7.d.mts → index-BmM5Spox.d.mts} +1 -1
- package/dist/{index-CyddYU7P.d.mts → index-CiqCEi2L.d.cts} +1 -1
- package/dist/{index-CfPKWPpM.d.mts → index-PvfUBX5-.d.mts} +6 -4
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +3 -3
- package/dist/{themeTypes-C4kTtkIA.d.cts → themeTypes-CzljGwN0.d.cts} +4 -4
- package/dist/{themeTypes-C4kTtkIA.d.mts → themeTypes-CzljGwN0.d.mts} +4 -4
- package/package.json +6 -6
package/dist/CodeBlock.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ThemeSyntax, o as syntaxDark, s as syntaxLight, t as CodeBlockSlot } from "./themeTypes-
|
|
1
|
+
import { a as ThemeSyntax, o as syntaxDark, s as syntaxLight, t as CodeBlockSlot } from "./themeTypes-CzljGwN0.cjs";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { SlotProps } from "@gild-ui/react";
|
|
4
4
|
import { ViewProps } from "@gild-ui/react/View";
|
package/dist/CodeBlock.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as ThemeSyntax, o as syntaxDark, s as syntaxLight } from "./themeTypes-
|
|
2
|
-
import { n as CodeBlockProps, t as CodeBlock } from "./index-
|
|
1
|
+
import { a as ThemeSyntax, o as syntaxDark, s as syntaxLight } from "./themeTypes-CzljGwN0.mjs";
|
|
2
|
+
import { n as CodeBlockProps, t as CodeBlock } from "./index-BmM5Spox.mjs";
|
|
3
3
|
export { CodeBlock, CodeBlockProps, ThemeSyntax, syntaxDark, syntaxLight };
|
package/dist/Control.d.cts
CHANGED
package/dist/Control.d.mts
CHANGED
package/dist/Editor.cjs
CHANGED
|
@@ -25,9 +25,10 @@ const noop = () => {};
|
|
|
25
25
|
/**
|
|
26
26
|
* The source `<textarea>`, with selection tracking and Tab-to-indent. Inside a `Control` it is
|
|
27
27
|
* driven by context (so the `Toolbar` can act on it); on its own it is a plain controlled field
|
|
28
|
-
* via `value`/`onChange`.
|
|
28
|
+
* via `value`/`onChange`. `style` and `className` go to the root, the box around the field; `id`,
|
|
29
|
+
* `data-*` and `aria-*` go to the textarea, the element a user types in and assistive tech names.
|
|
29
30
|
*/
|
|
30
|
-
function Editor({ value: valueProp, onChange: onChangeProp, placeholder = "Write your article in Markdown...", minRows = 16, maxRows, variant, color, textColor: textColorProp, size, name, id, error, required, disabled, showShortcutHint = true, style, slotProps }) {
|
|
31
|
+
function Editor({ value: valueProp, onChange: onChangeProp, placeholder = "Write your article in Markdown...", minRows = 16, maxRows, variant, color, textColor: textColorProp, size, name, id, error, required, disabled, showShortcutHint = true, "aria-label": ariaLabel = "Markdown source", "aria-describedby": ariaDescribedby, className, style, slotProps, ...attributes }) {
|
|
31
32
|
const context = (0, react.useContext)(require_MarkdownContext.MarkdownContext);
|
|
32
33
|
const theme = (0, _gild_ui_react.useTheme)();
|
|
33
34
|
const textColor = textColorProp ?? (0, _gild_ui_core_theme.themeDefault)(theme, "textColor", "initial");
|
|
@@ -93,7 +94,10 @@ function Editor({ value: valueProp, onChange: onChangeProp, placeholder = "Write
|
|
|
93
94
|
flex: 1,
|
|
94
95
|
minWidth: 0,
|
|
95
96
|
gap: 1,
|
|
96
|
-
...require_mergeOverrides.mergeOverrides(slotProps?.root, {
|
|
97
|
+
...require_mergeOverrides.mergeOverrides(slotProps?.root, {
|
|
98
|
+
style,
|
|
99
|
+
className
|
|
100
|
+
}),
|
|
97
101
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_gild_ui_react_TextInput.TextInput, {
|
|
98
102
|
multiline: true,
|
|
99
103
|
resize: true,
|
|
@@ -113,8 +117,9 @@ function Editor({ value: valueProp, onChange: onChangeProp, placeholder = "Write
|
|
|
113
117
|
placeholder,
|
|
114
118
|
onChange: (event) => onChange(event.target.value),
|
|
115
119
|
inputProps: {
|
|
116
|
-
|
|
117
|
-
"aria-
|
|
120
|
+
...attributes,
|
|
121
|
+
"aria-label": ariaLabel,
|
|
122
|
+
"aria-describedby": [ariaDescribedby, showShortcutHint ? hintId : void 0].filter(Boolean).join(" ") || void 0,
|
|
118
123
|
onSelect: rememberSelection,
|
|
119
124
|
onBlur: rememberSelection,
|
|
120
125
|
onKeyDown: handleKeyDown
|
package/dist/Editor.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./themeTypes-
|
|
1
|
+
import "./themeTypes-CzljGwN0.cjs";
|
|
2
2
|
import { SlotProps, StyleOverride } from "@gild-ui/react";
|
|
3
3
|
import { TextInputColor, TextInputSize, TextInputTextColor, TextInputVariant } from "@gild-ui/react/TextInput";
|
|
4
4
|
export interface EditorProps {
|
|
@@ -35,14 +35,25 @@ export interface EditorProps {
|
|
|
35
35
|
disabled?: boolean;
|
|
36
36
|
/** Shows a one-line hint about the Tab / focus-release shortcuts under the field. Default: `true`. */
|
|
37
37
|
showShortcutHint?: boolean;
|
|
38
|
+
/** The accessible name of the textarea. Default: `'Markdown source'`. */
|
|
39
|
+
'aria-label'?: string;
|
|
40
|
+
/** Ids of elements that describe the textarea, read before the shortcut hint's. */
|
|
41
|
+
'aria-describedby'?: string;
|
|
42
|
+
/** The class name of the root, the box that holds the field and its hint. */
|
|
43
|
+
className?: string;
|
|
38
44
|
/** Overrides the CSS of the root: an entry of `StyleSheet.create`, or a list of them. It wins over `slotProps.root.style`. */
|
|
39
45
|
style?: StyleOverride;
|
|
40
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Overrides of the root, the box that holds the field and its hint: `style`, `className`, `data-*`
|
|
48
|
+
* and `aria-*`. The component's own `data-*` and `aria-*` go to the textarea, so this is the way to
|
|
49
|
+
* put them on the box.
|
|
50
|
+
*/
|
|
41
51
|
slotProps?: SlotProps<'root'>;
|
|
42
52
|
}
|
|
43
53
|
/**
|
|
44
54
|
* The source `<textarea>`, with selection tracking and Tab-to-indent. Inside a `Control` it is
|
|
45
55
|
* driven by context (so the `Toolbar` can act on it); on its own it is a plain controlled field
|
|
46
|
-
* via `value`/`onChange`.
|
|
56
|
+
* via `value`/`onChange`. `style` and `className` go to the root, the box around the field; `id`,
|
|
57
|
+
* `data-*` and `aria-*` go to the textarea, the element a user types in and assistive tech names.
|
|
47
58
|
*/
|
|
48
|
-
export declare function Editor({ value: valueProp, onChange: onChangeProp, placeholder, minRows, maxRows, variant, color, textColor: textColorProp, size, name, id, error, required, disabled, showShortcutHint, style, slotProps }: Readonly<EditorProps>): import("react").JSX.Element;
|
|
59
|
+
export declare function Editor({ value: valueProp, onChange: onChangeProp, placeholder, minRows, maxRows, variant, color, textColor: textColorProp, size, name, id, error, required, disabled, showShortcutHint, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedby, className, style, slotProps, ...attributes }: Readonly<EditorProps>): import("react").JSX.Element;
|
package/dist/Editor.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./themeTypes-
|
|
1
|
+
import "./themeTypes-CzljGwN0.mjs";
|
|
2
2
|
import { SlotProps, StyleOverride } from "@gild-ui/react";
|
|
3
3
|
import { TextInputColor, TextInputSize, TextInputTextColor, TextInputVariant } from "@gild-ui/react/TextInput";
|
|
4
4
|
export interface EditorProps {
|
|
@@ -35,14 +35,25 @@ export interface EditorProps {
|
|
|
35
35
|
disabled?: boolean;
|
|
36
36
|
/** Shows a one-line hint about the Tab / focus-release shortcuts under the field. Default: `true`. */
|
|
37
37
|
showShortcutHint?: boolean;
|
|
38
|
+
/** The accessible name of the textarea. Default: `'Markdown source'`. */
|
|
39
|
+
'aria-label'?: string;
|
|
40
|
+
/** Ids of elements that describe the textarea, read before the shortcut hint's. */
|
|
41
|
+
'aria-describedby'?: string;
|
|
42
|
+
/** The class name of the root, the box that holds the field and its hint. */
|
|
43
|
+
className?: string;
|
|
38
44
|
/** Overrides the CSS of the root: an entry of `StyleSheet.create`, or a list of them. It wins over `slotProps.root.style`. */
|
|
39
45
|
style?: StyleOverride;
|
|
40
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Overrides of the root, the box that holds the field and its hint: `style`, `className`, `data-*`
|
|
48
|
+
* and `aria-*`. The component's own `data-*` and `aria-*` go to the textarea, so this is the way to
|
|
49
|
+
* put them on the box.
|
|
50
|
+
*/
|
|
41
51
|
slotProps?: SlotProps<'root'>;
|
|
42
52
|
}
|
|
43
53
|
/**
|
|
44
54
|
* The source `<textarea>`, with selection tracking and Tab-to-indent. Inside a `Control` it is
|
|
45
55
|
* driven by context (so the `Toolbar` can act on it); on its own it is a plain controlled field
|
|
46
|
-
* via `value`/`onChange`.
|
|
56
|
+
* via `value`/`onChange`. `style` and `className` go to the root, the box around the field; `id`,
|
|
57
|
+
* `data-*` and `aria-*` go to the textarea, the element a user types in and assistive tech names.
|
|
47
58
|
*/
|
|
48
|
-
export declare function Editor({ value: valueProp, onChange: onChangeProp, placeholder, minRows, maxRows, variant, color, textColor: textColorProp, size, name, id, error, required, disabled, showShortcutHint, style, slotProps }: Readonly<EditorProps>): import("react").JSX.Element;
|
|
59
|
+
export declare function Editor({ value: valueProp, onChange: onChangeProp, placeholder, minRows, maxRows, variant, color, textColor: textColorProp, size, name, id, error, required, disabled, showShortcutHint, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedby, className, style, slotProps, ...attributes }: Readonly<EditorProps>): import("react").JSX.Element;
|
package/dist/Editor.mjs
CHANGED
|
@@ -24,9 +24,10 @@ const noop = () => {};
|
|
|
24
24
|
/**
|
|
25
25
|
* The source `<textarea>`, with selection tracking and Tab-to-indent. Inside a `Control` it is
|
|
26
26
|
* driven by context (so the `Toolbar` can act on it); on its own it is a plain controlled field
|
|
27
|
-
* via `value`/`onChange`.
|
|
27
|
+
* via `value`/`onChange`. `style` and `className` go to the root, the box around the field; `id`,
|
|
28
|
+
* `data-*` and `aria-*` go to the textarea, the element a user types in and assistive tech names.
|
|
28
29
|
*/
|
|
29
|
-
function Editor({ value: valueProp, onChange: onChangeProp, placeholder = "Write your article in Markdown...", minRows = 16, maxRows, variant, color, textColor: textColorProp, size, name, id, error, required, disabled, showShortcutHint = true, style, slotProps }) {
|
|
30
|
+
function Editor({ value: valueProp, onChange: onChangeProp, placeholder = "Write your article in Markdown...", minRows = 16, maxRows, variant, color, textColor: textColorProp, size, name, id, error, required, disabled, showShortcutHint = true, "aria-label": ariaLabel = "Markdown source", "aria-describedby": ariaDescribedby, className, style, slotProps, ...attributes }) {
|
|
30
31
|
const context = useContext(MarkdownContext);
|
|
31
32
|
const theme = useTheme();
|
|
32
33
|
const textColor = textColorProp ?? themeDefault(theme, "textColor", "initial");
|
|
@@ -92,7 +93,10 @@ function Editor({ value: valueProp, onChange: onChangeProp, placeholder = "Write
|
|
|
92
93
|
flex: 1,
|
|
93
94
|
minWidth: 0,
|
|
94
95
|
gap: 1,
|
|
95
|
-
...mergeOverrides(slotProps?.root, {
|
|
96
|
+
...mergeOverrides(slotProps?.root, {
|
|
97
|
+
style,
|
|
98
|
+
className
|
|
99
|
+
}),
|
|
96
100
|
children: [/* @__PURE__ */ jsx(TextInput, {
|
|
97
101
|
multiline: true,
|
|
98
102
|
resize: true,
|
|
@@ -112,8 +116,9 @@ function Editor({ value: valueProp, onChange: onChangeProp, placeholder = "Write
|
|
|
112
116
|
placeholder,
|
|
113
117
|
onChange: (event) => onChange(event.target.value),
|
|
114
118
|
inputProps: {
|
|
115
|
-
|
|
116
|
-
"aria-
|
|
119
|
+
...attributes,
|
|
120
|
+
"aria-label": ariaLabel,
|
|
121
|
+
"aria-describedby": [ariaDescribedby, showShortcutHint ? hintId : void 0].filter(Boolean).join(" ") || void 0,
|
|
117
122
|
onSelect: rememberSelection,
|
|
118
123
|
onBlur: rememberSelection,
|
|
119
124
|
onKeyDown: handleKeyDown
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-CmQyd0Gu.cjs");
|
|
2
2
|
const require_MarkdownContext = require("./MarkdownContext-DS1X9B6N.cjs");
|
|
3
|
-
const require_Preview = require("./Preview-
|
|
3
|
+
const require_Preview = require("./Preview-Bw3UKRXQ.cjs");
|
|
4
4
|
const require_mergeOverrides = require("./mergeOverrides-D2btS1Jb.cjs");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -158,8 +158,11 @@ function EditableBlock({ index, source, isEditable, placeholder, slotProps, bloc
|
|
|
158
158
|
* Blur (or Escape) re-splits the document. Mermaid blocks are read-only -
|
|
159
159
|
* a diagram has no text to edit in place. Inside a `Control` it is driven by
|
|
160
160
|
* context; standalone it is a plain controlled component.
|
|
161
|
+
*
|
|
162
|
+
* The root is the editor as a whole, a `role="group"` named by `aria-label`: its `style`,
|
|
163
|
+
* `className`, `data-*` and `aria-*` go there. Each block keeps its own name, "Edit block".
|
|
161
164
|
*/
|
|
162
|
-
function LiveEdit({ value: valueProp, onChange: onChangeProp, placeholder = "Click to start writing...", slotProps, style }) {
|
|
165
|
+
function LiveEdit({ value: valueProp, onChange: onChangeProp, placeholder = "Click to start writing...", slotProps, "aria-label": ariaLabel = "Markdown document", className, style, ...attributes }) {
|
|
163
166
|
const { root, block: blockSlot, ...elementProps } = slotProps ?? {};
|
|
164
167
|
const context = (0, react.useContext)(require_MarkdownContext.MarkdownContext);
|
|
165
168
|
const value = context?.value ?? valueProp ?? "";
|
|
@@ -203,7 +206,13 @@ function LiveEdit({ value: valueProp, onChange: onChangeProp, placeholder = "Cli
|
|
|
203
206
|
};
|
|
204
207
|
const handleDone = () => resplit(syncedValueRef.current);
|
|
205
208
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LiveEditRoot, {
|
|
206
|
-
...require_mergeOverrides.mergeOverrides(root, {
|
|
209
|
+
...require_mergeOverrides.mergeOverrides(root, {
|
|
210
|
+
style,
|
|
211
|
+
className
|
|
212
|
+
}),
|
|
213
|
+
role: "group",
|
|
214
|
+
"aria-label": ariaLabel,
|
|
215
|
+
...attributes,
|
|
207
216
|
children: blocks.map((block, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EditableBlock, {
|
|
208
217
|
index,
|
|
209
218
|
source: block.source,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as MarkdownContext } from "./MarkdownContext-D28Czdll.mjs";
|
|
2
|
-
import { t as Preview } from "./Preview-
|
|
2
|
+
import { t as Preview } from "./Preview-Cwt9XkR9.mjs";
|
|
3
3
|
import { t as mergeOverrides } from "./mergeOverrides-DEbU7yDg.mjs";
|
|
4
4
|
import { useContext, useRef, useState } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -154,8 +154,11 @@ function EditableBlock({ index, source, isEditable, placeholder, slotProps, bloc
|
|
|
154
154
|
* Blur (or Escape) re-splits the document. Mermaid blocks are read-only -
|
|
155
155
|
* a diagram has no text to edit in place. Inside a `Control` it is driven by
|
|
156
156
|
* context; standalone it is a plain controlled component.
|
|
157
|
+
*
|
|
158
|
+
* The root is the editor as a whole, a `role="group"` named by `aria-label`: its `style`,
|
|
159
|
+
* `className`, `data-*` and `aria-*` go there. Each block keeps its own name, "Edit block".
|
|
157
160
|
*/
|
|
158
|
-
function LiveEdit({ value: valueProp, onChange: onChangeProp, placeholder = "Click to start writing...", slotProps, style }) {
|
|
161
|
+
function LiveEdit({ value: valueProp, onChange: onChangeProp, placeholder = "Click to start writing...", slotProps, "aria-label": ariaLabel = "Markdown document", className, style, ...attributes }) {
|
|
159
162
|
const { root, block: blockSlot, ...elementProps } = slotProps ?? {};
|
|
160
163
|
const context = useContext(MarkdownContext);
|
|
161
164
|
const value = context?.value ?? valueProp ?? "";
|
|
@@ -199,7 +202,13 @@ function LiveEdit({ value: valueProp, onChange: onChangeProp, placeholder = "Cli
|
|
|
199
202
|
};
|
|
200
203
|
const handleDone = () => resplit(syncedValueRef.current);
|
|
201
204
|
return /* @__PURE__ */ jsx(LiveEditRoot, {
|
|
202
|
-
...mergeOverrides(root, {
|
|
205
|
+
...mergeOverrides(root, {
|
|
206
|
+
style,
|
|
207
|
+
className
|
|
208
|
+
}),
|
|
209
|
+
role: "group",
|
|
210
|
+
"aria-label": ariaLabel,
|
|
211
|
+
...attributes,
|
|
203
212
|
children: blocks.map((block, index) => /* @__PURE__ */ jsx(EditableBlock, {
|
|
204
213
|
index,
|
|
205
214
|
source: block.source,
|
package/dist/LiveEdit.cjs
CHANGED
package/dist/LiveEdit.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as MarkdownLiveEditSlot } from "./themeTypes-
|
|
1
|
+
import { n as MarkdownLiveEditSlot } from "./themeTypes-CzljGwN0.cjs";
|
|
2
2
|
import { PreviewSlotProps } from "./Preview.cjs";
|
|
3
3
|
import { SlotProps, StyleOverride } from "@gild-ui/react";
|
|
4
4
|
export interface LiveEditProps {
|
|
@@ -13,6 +13,10 @@ export interface LiveEditProps {
|
|
|
13
13
|
* style: `root` and `block` (each block), taking a `style`, a `className` and `data-*` and `aria-*`.
|
|
14
14
|
*/
|
|
15
15
|
slotProps?: PreviewSlotProps & SlotProps<MarkdownLiveEditSlot>;
|
|
16
|
+
/** The accessible name of the document, the group of blocks. Default: `'Markdown document'`. */
|
|
17
|
+
'aria-label'?: string;
|
|
18
|
+
/** The class name of the root. */
|
|
19
|
+
className?: string;
|
|
16
20
|
/** Overrides the CSS of the root: an entry of `StyleSheet.create`, or a list of them. It wins over `slotProps.root.style`. */
|
|
17
21
|
style?: StyleOverride;
|
|
18
22
|
}
|
|
@@ -25,5 +29,8 @@ export interface LiveEditProps {
|
|
|
25
29
|
* Blur (or Escape) re-splits the document. Mermaid blocks are read-only -
|
|
26
30
|
* a diagram has no text to edit in place. Inside a `Control` it is driven by
|
|
27
31
|
* context; standalone it is a plain controlled component.
|
|
32
|
+
*
|
|
33
|
+
* The root is the editor as a whole, a `role="group"` named by `aria-label`: its `style`,
|
|
34
|
+
* `className`, `data-*` and `aria-*` go there. Each block keeps its own name, "Edit block".
|
|
28
35
|
*/
|
|
29
|
-
export declare function LiveEdit({ value: valueProp, onChange: onChangeProp, placeholder, slotProps, style }: Readonly<LiveEditProps>): import("react").JSX.Element;
|
|
36
|
+
export declare function LiveEdit({ value: valueProp, onChange: onChangeProp, placeholder, slotProps, 'aria-label': ariaLabel, className, style, ...attributes }: Readonly<LiveEditProps>): import("react").JSX.Element;
|
package/dist/LiveEdit.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as MarkdownLiveEditSlot } from "./themeTypes-
|
|
2
|
-
import { r as PreviewSlotProps } from "./index-
|
|
1
|
+
import { n as MarkdownLiveEditSlot } from "./themeTypes-CzljGwN0.mjs";
|
|
2
|
+
import { r as PreviewSlotProps } from "./index-PvfUBX5-.mjs";
|
|
3
3
|
import { SlotProps, StyleOverride } from "@gild-ui/react";
|
|
4
4
|
export interface LiveEditProps {
|
|
5
5
|
/** Standalone source value - used when rendered outside a `Control`. Ignored inside one. */
|
|
@@ -13,6 +13,10 @@ export interface LiveEditProps {
|
|
|
13
13
|
* style: `root` and `block` (each block), taking a `style`, a `className` and `data-*` and `aria-*`.
|
|
14
14
|
*/
|
|
15
15
|
slotProps?: PreviewSlotProps & SlotProps<MarkdownLiveEditSlot>;
|
|
16
|
+
/** The accessible name of the document, the group of blocks. Default: `'Markdown document'`. */
|
|
17
|
+
'aria-label'?: string;
|
|
18
|
+
/** The class name of the root. */
|
|
19
|
+
className?: string;
|
|
16
20
|
/** Overrides the CSS of the root: an entry of `StyleSheet.create`, or a list of them. It wins over `slotProps.root.style`. */
|
|
17
21
|
style?: StyleOverride;
|
|
18
22
|
}
|
|
@@ -25,5 +29,8 @@ export interface LiveEditProps {
|
|
|
25
29
|
* Blur (or Escape) re-splits the document. Mermaid blocks are read-only -
|
|
26
30
|
* a diagram has no text to edit in place. Inside a `Control` it is driven by
|
|
27
31
|
* context; standalone it is a plain controlled component.
|
|
32
|
+
*
|
|
33
|
+
* The root is the editor as a whole, a `role="group"` named by `aria-label`: its `style`,
|
|
34
|
+
* `className`, `data-*` and `aria-*` go there. Each block keeps its own name, "Edit block".
|
|
28
35
|
*/
|
|
29
|
-
export declare function LiveEdit({ value: valueProp, onChange: onChangeProp, placeholder, slotProps, style }: Readonly<LiveEditProps>): import("react").JSX.Element;
|
|
36
|
+
export declare function LiveEdit({ value: valueProp, onChange: onChangeProp, placeholder, slotProps, 'aria-label': ariaLabel, className, style, ...attributes }: Readonly<LiveEditProps>): import("react").JSX.Element;
|
package/dist/LiveEdit.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as LiveEdit } from "./LiveEdit-
|
|
1
|
+
export { t as LiveEdit } from "./LiveEdit-uducMq29.mjs";
|
package/dist/Mermaid.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-
|
|
1
|
+
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-CiqCEi2L.cjs";
|
|
2
2
|
export { DiagramProps, Mermaid, MermaidProps };
|
package/dist/Mermaid.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-
|
|
1
|
+
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-A4_MxHTR.mjs";
|
|
2
2
|
export { DiagramProps, Mermaid, MermaidProps };
|
|
@@ -246,9 +246,13 @@ const components = {
|
|
|
246
246
|
}))
|
|
247
247
|
};
|
|
248
248
|
/** Renders a markdown string with every element mapped to a design-system primitive. */
|
|
249
|
-
function Preview({ children, slotProps, style }) {
|
|
249
|
+
function Preview({ children, slotProps, className, style, ...attributes }) {
|
|
250
250
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PreviewRoot, {
|
|
251
|
-
...require_mergeOverrides.mergeOverrides(slotProps?.root, {
|
|
251
|
+
...require_mergeOverrides.mergeOverrides(slotProps?.root, {
|
|
252
|
+
style,
|
|
253
|
+
className
|
|
254
|
+
}),
|
|
255
|
+
...attributes,
|
|
252
256
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SlotPropsContext.Provider, {
|
|
253
257
|
value: slotProps ?? EMPTY_SLOT_PROPS,
|
|
254
258
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_markdown.default, {
|
|
@@ -241,9 +241,13 @@ const components = {
|
|
|
241
241
|
}))
|
|
242
242
|
};
|
|
243
243
|
/** Renders a markdown string with every element mapped to a design-system primitive. */
|
|
244
|
-
function Preview({ children, slotProps, style }) {
|
|
244
|
+
function Preview({ children, slotProps, className, style, ...attributes }) {
|
|
245
245
|
return /* @__PURE__ */ jsx(PreviewRoot, {
|
|
246
|
-
...mergeOverrides(slotProps?.root, {
|
|
246
|
+
...mergeOverrides(slotProps?.root, {
|
|
247
|
+
style,
|
|
248
|
+
className
|
|
249
|
+
}),
|
|
250
|
+
...attributes,
|
|
247
251
|
children: /* @__PURE__ */ jsx(SlotPropsContext.Provider, {
|
|
248
252
|
value: slotProps ?? EMPTY_SLOT_PROPS,
|
|
249
253
|
children: /* @__PURE__ */ jsx(ReactMarkdown, {
|
package/dist/Preview.cjs
CHANGED
package/dist/Preview.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./themeTypes-
|
|
1
|
+
import "./themeTypes-CzljGwN0.cjs";
|
|
2
2
|
import { CodeBlockProps } from "./CodeBlock.cjs";
|
|
3
|
-
import { r as MermaidProps } from "./index-
|
|
3
|
+
import { r as MermaidProps } from "./index-CiqCEi2L.cjs";
|
|
4
4
|
import { SlotProps, StyleOverride } from "@gild-ui/react";
|
|
5
5
|
import { QuoteProps } from "@gild-ui/react/Quote";
|
|
6
6
|
import { CheckboxProps } from "@gild-ui/react/Checkbox";
|
|
@@ -49,8 +49,10 @@ export interface PreviewProps {
|
|
|
49
49
|
children: string;
|
|
50
50
|
/** Per-element prop overrides, merged over the defaults. */
|
|
51
51
|
slotProps?: PreviewSlotProps;
|
|
52
|
+
/** The class name of the root. */
|
|
53
|
+
className?: string;
|
|
52
54
|
/** Overrides the CSS of the root: an entry of `StyleSheet.create`, or a list of them. It wins over `slotProps.root.style`. */
|
|
53
55
|
style?: StyleOverride;
|
|
54
56
|
}
|
|
55
57
|
/** Renders a markdown string with every element mapped to a design-system primitive. */
|
|
56
|
-
export declare function Preview({ children, slotProps, style }: Readonly<PreviewProps>): import("react").JSX.Element;
|
|
58
|
+
export declare function Preview({ children, slotProps, className, style, ...attributes }: Readonly<PreviewProps>): import("react").JSX.Element;
|
package/dist/Preview.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-
|
|
1
|
+
import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-PvfUBX5-.mjs";
|
|
2
2
|
export { Preview, PreviewProps, PreviewSlotProps };
|
package/dist/Preview.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as Preview } from "./Preview-
|
|
1
|
+
export { t as Preview } from "./Preview-Cwt9XkR9.mjs";
|
|
@@ -521,8 +521,11 @@ function ActionLabel({ action, slotProps }) {
|
|
|
521
521
|
});
|
|
522
522
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: action.label });
|
|
523
523
|
}
|
|
524
|
-
/**
|
|
525
|
-
|
|
524
|
+
/**
|
|
525
|
+
* Formatting buttons, heading + code-language selects, and the table-size picker. The root is the
|
|
526
|
+
* `role="toolbar"`: its `style`, `className`, `data-*` and `aria-*` go there.
|
|
527
|
+
*/
|
|
528
|
+
function Toolbar({ "aria-label": ariaLabel = "Markdown formatting", className, style, slotProps, ...attributes }) {
|
|
526
529
|
const { dispatch } = require_MarkdownContext.useMarkdownContext();
|
|
527
530
|
const renderButton = (action) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_gild_ui_react_Button.Button, {
|
|
528
531
|
type: "button",
|
|
@@ -536,12 +539,16 @@ function Toolbar({ style, slotProps }) {
|
|
|
536
539
|
})
|
|
537
540
|
}, action.id);
|
|
538
541
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ToolbarRoot, {
|
|
539
|
-
...require_mergeOverrides.mergeOverrides(slotProps?.root, {
|
|
542
|
+
...require_mergeOverrides.mergeOverrides(slotProps?.root, {
|
|
543
|
+
style,
|
|
544
|
+
className
|
|
545
|
+
}),
|
|
540
546
|
flexDirection: "row",
|
|
541
547
|
flexWrap: "wrap",
|
|
542
548
|
gap: 1,
|
|
543
549
|
role: "toolbar",
|
|
544
|
-
"aria-label":
|
|
550
|
+
"aria-label": ariaLabel,
|
|
551
|
+
...attributes,
|
|
545
552
|
children: [
|
|
546
553
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_gild_ui_react_Select.Select, {
|
|
547
554
|
native: true,
|
|
@@ -521,8 +521,11 @@ function ActionLabel({ action, slotProps }) {
|
|
|
521
521
|
});
|
|
522
522
|
return /* @__PURE__ */ jsx(Fragment, { children: action.label });
|
|
523
523
|
}
|
|
524
|
-
/**
|
|
525
|
-
|
|
524
|
+
/**
|
|
525
|
+
* Formatting buttons, heading + code-language selects, and the table-size picker. The root is the
|
|
526
|
+
* `role="toolbar"`: its `style`, `className`, `data-*` and `aria-*` go there.
|
|
527
|
+
*/
|
|
528
|
+
function Toolbar({ "aria-label": ariaLabel = "Markdown formatting", className, style, slotProps, ...attributes }) {
|
|
526
529
|
const { dispatch } = useMarkdownContext();
|
|
527
530
|
const renderButton = (action) => /* @__PURE__ */ jsx(Button, {
|
|
528
531
|
type: "button",
|
|
@@ -536,12 +539,16 @@ function Toolbar({ style, slotProps }) {
|
|
|
536
539
|
})
|
|
537
540
|
}, action.id);
|
|
538
541
|
return /* @__PURE__ */ jsxs(ToolbarRoot, {
|
|
539
|
-
...mergeOverrides(slotProps?.root, {
|
|
542
|
+
...mergeOverrides(slotProps?.root, {
|
|
543
|
+
style,
|
|
544
|
+
className
|
|
545
|
+
}),
|
|
540
546
|
flexDirection: "row",
|
|
541
547
|
flexWrap: "wrap",
|
|
542
548
|
gap: 1,
|
|
543
549
|
role: "toolbar",
|
|
544
|
-
"aria-label":
|
|
550
|
+
"aria-label": ariaLabel,
|
|
551
|
+
...attributes,
|
|
545
552
|
children: [
|
|
546
553
|
/* @__PURE__ */ jsx(Select, {
|
|
547
554
|
native: true,
|
package/dist/Toolbar.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_Toolbar = require("./Toolbar-
|
|
2
|
+
const require_Toolbar = require("./Toolbar-BEAa38F8.cjs");
|
|
3
3
|
exports.TablePicker = require_Toolbar.TablePicker;
|
|
4
4
|
exports.Toolbar = require_Toolbar.Toolbar;
|
package/dist/Toolbar.d.cts
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import { r as MarkdownToolbarSlot } from "./themeTypes-
|
|
1
|
+
import { r as MarkdownToolbarSlot } from "./themeTypes-CzljGwN0.cjs";
|
|
2
2
|
import { SlotProps, StyleOverride } from "@gild-ui/react";
|
|
3
3
|
export interface ToolbarProps {
|
|
4
|
+
/** The accessible name of the toolbar. Default: `'Markdown formatting'`. */
|
|
5
|
+
'aria-label'?: string;
|
|
6
|
+
/** The class name of the root. */
|
|
7
|
+
className?: string;
|
|
4
8
|
/** Overrides the CSS of the root: an entry of `StyleSheet.create`, or a list of them. It wins over `slotProps.root.style`. */
|
|
5
9
|
style?: StyleOverride;
|
|
6
10
|
/** Overrides for the slots a theme can style: `style`, `className`, `data-*` and `aria-*`. */
|
|
7
11
|
slotProps?: SlotProps<MarkdownToolbarSlot>;
|
|
8
12
|
}
|
|
9
|
-
/**
|
|
10
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Formatting buttons, heading + code-language selects, and the table-size picker. The root is the
|
|
15
|
+
* `role="toolbar"`: its `style`, `className`, `data-*` and `aria-*` go there.
|
|
16
|
+
*/
|
|
17
|
+
export declare function Toolbar({ 'aria-label': ariaLabel, className, style, slotProps, ...attributes }: Readonly<ToolbarProps>): import("react").JSX.Element;
|
|
11
18
|
export interface TablePickerProps {
|
|
12
19
|
/** Fired with the chosen (rows, cols) when a grid cell is picked. */
|
|
13
20
|
onSelect: (rows: number, cols: number) => void;
|
package/dist/Toolbar.d.mts
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import { r as MarkdownToolbarSlot } from "./themeTypes-
|
|
1
|
+
import { r as MarkdownToolbarSlot } from "./themeTypes-CzljGwN0.mjs";
|
|
2
2
|
import { SlotProps, StyleOverride } from "@gild-ui/react";
|
|
3
3
|
export interface ToolbarProps {
|
|
4
|
+
/** The accessible name of the toolbar. Default: `'Markdown formatting'`. */
|
|
5
|
+
'aria-label'?: string;
|
|
6
|
+
/** The class name of the root. */
|
|
7
|
+
className?: string;
|
|
4
8
|
/** Overrides the CSS of the root: an entry of `StyleSheet.create`, or a list of them. It wins over `slotProps.root.style`. */
|
|
5
9
|
style?: StyleOverride;
|
|
6
10
|
/** Overrides for the slots a theme can style: `style`, `className`, `data-*` and `aria-*`. */
|
|
7
11
|
slotProps?: SlotProps<MarkdownToolbarSlot>;
|
|
8
12
|
}
|
|
9
|
-
/**
|
|
10
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Formatting buttons, heading + code-language selects, and the table-size picker. The root is the
|
|
15
|
+
* `role="toolbar"`: its `style`, `className`, `data-*` and `aria-*` go there.
|
|
16
|
+
*/
|
|
17
|
+
export declare function Toolbar({ 'aria-label': ariaLabel, className, style, slotProps, ...attributes }: Readonly<ToolbarProps>): import("react").JSX.Element;
|
|
11
18
|
export interface TablePickerProps {
|
|
12
19
|
/** Fired with the chosen (rows, cols) when a grid cell is picked. */
|
|
13
20
|
onSelect: (rows: number, cols: number) => void;
|
package/dist/Toolbar.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as TablePicker, t as Toolbar } from "./Toolbar-
|
|
1
|
+
export { n as TablePicker, t as Toolbar } from "./Toolbar-Dc_muf5J.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./themeTypes-
|
|
2
|
-
import { n as CodeBlockProps } from "./index-
|
|
3
|
-
import { r as MermaidProps } from "./index-
|
|
1
|
+
import "./themeTypes-CzljGwN0.mjs";
|
|
2
|
+
import { n as CodeBlockProps } from "./index-BmM5Spox.mjs";
|
|
3
|
+
import { r as MermaidProps } from "./index-A4_MxHTR.mjs";
|
|
4
4
|
import { TypographyProps } from "@gild-ui/react/Typography";
|
|
5
5
|
import { SlotProps, StyleOverride } from "@gild-ui/react";
|
|
6
6
|
import { ViewProps } from "@gild-ui/react/View";
|
|
@@ -49,9 +49,11 @@ interface PreviewProps {
|
|
|
49
49
|
children: string;
|
|
50
50
|
/** Per-element prop overrides, merged over the defaults. */
|
|
51
51
|
slotProps?: PreviewSlotProps;
|
|
52
|
+
/** The class name of the root. */
|
|
53
|
+
className?: string;
|
|
52
54
|
/** Overrides the CSS of the root: an entry of `StyleSheet.create`, or a list of them. It wins over `slotProps.root.style`. */
|
|
53
55
|
style?: StyleOverride;
|
|
54
56
|
}
|
|
55
57
|
/** Renders a markdown string with every element mapped to a design-system primitive. */
|
|
56
|
-
declare function Preview({ children, slotProps, style }: Readonly<PreviewProps>): import("react").JSX.Element;
|
|
58
|
+
declare function Preview({ children, slotProps, className, style, ...attributes }: Readonly<PreviewProps>): import("react").JSX.Element;
|
|
57
59
|
export { PreviewProps as n, PreviewSlotProps as r, Preview as t };
|
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_MarkdownContext = require("./MarkdownContext-DS1X9B6N.cjs");
|
|
3
3
|
const require_Control = require("./Control.cjs");
|
|
4
|
-
const require_Toolbar = require("./Toolbar-
|
|
4
|
+
const require_Toolbar = require("./Toolbar-BEAa38F8.cjs");
|
|
5
5
|
const require_Editor = require("./Editor.cjs");
|
|
6
6
|
const require_CodeBlock = require("./CodeBlock-BaMe7CiF.cjs");
|
|
7
7
|
const require_Mermaid = require("./Mermaid-d1a5LqcK.cjs");
|
|
8
|
-
const require_Preview = require("./Preview-
|
|
9
|
-
const require_LiveEdit = require("./LiveEdit-
|
|
8
|
+
const require_Preview = require("./Preview-Bw3UKRXQ.cjs");
|
|
9
|
+
const require_LiveEdit = require("./LiveEdit-BBcr_mge.cjs");
|
|
10
10
|
exports.CodeBlock = require_CodeBlock.CodeBlock;
|
|
11
11
|
exports.Control = require_Control.Control;
|
|
12
12
|
exports.Editor = require_Editor.Editor;
|
package/dist/index.d.cts
CHANGED
|
@@ -4,8 +4,8 @@ import { Editor, EditorProps } from "./Editor.cjs";
|
|
|
4
4
|
import { LiveEdit, LiveEditProps } from "./LiveEdit.cjs";
|
|
5
5
|
import { Preview, PreviewProps, PreviewSlotProps } from "./Preview.cjs";
|
|
6
6
|
import { CodeBlock, CodeBlockProps } from "./CodeBlock.cjs";
|
|
7
|
-
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-
|
|
8
|
-
import { a as ThemeSyntax, i as MermaidThemeVariables, n as MarkdownLiveEditSlot, o as syntaxDark, r as MarkdownToolbarSlot, s as syntaxLight, t as CodeBlockSlot } from "./themeTypes-
|
|
7
|
+
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-CiqCEi2L.cjs";
|
|
8
|
+
import { a as ThemeSyntax, i as MermaidThemeVariables, n as MarkdownLiveEditSlot, o as syntaxDark, r as MarkdownToolbarSlot, s as syntaxLight, t as CodeBlockSlot } from "./themeTypes-CzljGwN0.cjs";
|
|
9
9
|
import { IconName } from "@gild-ui/react/Icon";
|
|
10
10
|
/** How a text label is rendered - mirrors the mark it inserts. */
|
|
11
11
|
type ToolbarLabelEmphasis = 'bold' | 'italic' | 'strike';
|
package/dist/index.d.mts
CHANGED
|
@@ -2,10 +2,10 @@ import { Control, ControlProps } from "./Control.mjs";
|
|
|
2
2
|
import { TablePicker, TablePickerProps, Toolbar, ToolbarProps } from "./Toolbar.mjs";
|
|
3
3
|
import { Editor, EditorProps } from "./Editor.mjs";
|
|
4
4
|
import { LiveEdit, LiveEditProps } from "./LiveEdit.mjs";
|
|
5
|
-
import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-
|
|
6
|
-
import { n as CodeBlockProps, t as CodeBlock } from "./index-
|
|
7
|
-
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-
|
|
8
|
-
import { a as ThemeSyntax, i as MermaidThemeVariables, n as MarkdownLiveEditSlot, o as syntaxDark, r as MarkdownToolbarSlot, s as syntaxLight, t as CodeBlockSlot } from "./themeTypes-
|
|
5
|
+
import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-PvfUBX5-.mjs";
|
|
6
|
+
import { n as CodeBlockProps, t as CodeBlock } from "./index-BmM5Spox.mjs";
|
|
7
|
+
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-A4_MxHTR.mjs";
|
|
8
|
+
import { a as ThemeSyntax, i as MermaidThemeVariables, n as MarkdownLiveEditSlot, o as syntaxDark, r as MarkdownToolbarSlot, s as syntaxLight, t as CodeBlockSlot } from "./themeTypes-CzljGwN0.mjs";
|
|
9
9
|
import { IconName } from "@gild-ui/react/Icon";
|
|
10
10
|
/** How a text label is rendered - mirrors the mark it inserts. */
|
|
11
11
|
type ToolbarLabelEmphasis = 'bold' | 'italic' | 'strike';
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as useMarkdownContext, t as MarkdownContext } from "./MarkdownContext-D28Czdll.mjs";
|
|
2
2
|
import { Control } from "./Control.mjs";
|
|
3
|
-
import { n as TablePicker, t as Toolbar } from "./Toolbar-
|
|
3
|
+
import { n as TablePicker, t as Toolbar } from "./Toolbar-Dc_muf5J.mjs";
|
|
4
4
|
import { Editor } from "./Editor.mjs";
|
|
5
5
|
import { n as syntaxLight, r as CodeBlock, t as syntaxDark } from "./CodeBlock-BFqv_nVv.mjs";
|
|
6
6
|
import { t as Mermaid } from "./Mermaid-DR4XzGaY.mjs";
|
|
7
|
-
import { t as Preview } from "./Preview-
|
|
8
|
-
import { t as LiveEdit } from "./LiveEdit-
|
|
7
|
+
import { t as Preview } from "./Preview-Cwt9XkR9.mjs";
|
|
8
|
+
import { t as LiveEdit } from "./LiveEdit-uducMq29.mjs";
|
|
9
9
|
export { CodeBlock, Control, Editor, LiveEdit, MarkdownContext, Mermaid, Preview, TablePicker, Toolbar, syntaxDark, syntaxLight, useMarkdownContext };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Syntax-highlighting tokens for `CodeBlock` - mapped onto highlight.js token classes.
|
|
3
3
|
* Not part of design-system's own scales; `../themeTypes.ts` augments
|
|
4
|
-
* `@gild-ui/core/
|
|
4
|
+
* `@gild-ui/core/internal` so `theme.syntax` is available wherever this
|
|
5
5
|
* package is imported. Merge one of the presets below into your theme via
|
|
6
6
|
* `createTheme(baseTheme, { syntax: syntaxDark })`, or supply your own.
|
|
7
7
|
*/
|
|
@@ -68,13 +68,13 @@ declare module '@gild-ui/react' {
|
|
|
68
68
|
CodeBlock?: import('@gild-ui/react').ComponentConfig<Record<string, unknown>, CodeBlockSlot>;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
declare module '@gild-ui/core/
|
|
72
|
-
interface
|
|
71
|
+
declare module '@gild-ui/core/internal' {
|
|
72
|
+
interface ThemeShape {
|
|
73
73
|
/** Per-theme overrides for the `Mermaid` renderer's mermaid `themeVariables`. */
|
|
74
74
|
mermaid?: MermaidThemeVariables;
|
|
75
75
|
/**
|
|
76
76
|
* Syntax-highlighting tokens for `CodeBlock` - see `syntaxDark`/`syntaxLight`. Optional
|
|
77
|
-
* only so `design-system`'s own `baseTheme` literal still satisfies `
|
|
77
|
+
* only so `design-system`'s own `baseTheme` literal still satisfies `ThemeShape` in this
|
|
78
78
|
* monorepo's source-consuming builds; `CodeBlock` requires it in practice (no fallback).
|
|
79
79
|
*/
|
|
80
80
|
syntax?: ThemeSyntax;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Syntax-highlighting tokens for `CodeBlock` - mapped onto highlight.js token classes.
|
|
3
3
|
* Not part of design-system's own scales; `../themeTypes.ts` augments
|
|
4
|
-
* `@gild-ui/core/
|
|
4
|
+
* `@gild-ui/core/internal` so `theme.syntax` is available wherever this
|
|
5
5
|
* package is imported. Merge one of the presets below into your theme via
|
|
6
6
|
* `createTheme(baseTheme, { syntax: syntaxDark })`, or supply your own.
|
|
7
7
|
*/
|
|
@@ -68,13 +68,13 @@ declare module '@gild-ui/react' {
|
|
|
68
68
|
CodeBlock?: import('@gild-ui/react').ComponentConfig<Record<string, unknown>, CodeBlockSlot>;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
declare module '@gild-ui/core/
|
|
72
|
-
interface
|
|
71
|
+
declare module '@gild-ui/core/internal' {
|
|
72
|
+
interface ThemeShape {
|
|
73
73
|
/** Per-theme overrides for the `Mermaid` renderer's mermaid `themeVariables`. */
|
|
74
74
|
mermaid?: MermaidThemeVariables;
|
|
75
75
|
/**
|
|
76
76
|
* Syntax-highlighting tokens for `CodeBlock` - see `syntaxDark`/`syntaxLight`. Optional
|
|
77
|
-
* only so `design-system`'s own `baseTheme` literal still satisfies `
|
|
77
|
+
* only so `design-system`'s own `baseTheme` literal still satisfies `ThemeShape` in this
|
|
78
78
|
* monorepo's source-consuming builds; `CodeBlock` requires it in practice (no fallback).
|
|
79
79
|
*/
|
|
80
80
|
syntax?: ThemeSyntax;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gild-ui/react-markdown",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.5",
|
|
4
4
|
"description": "A markdown editor and renderer for @gild-ui/react - Control, Toolbar, Editor, Preview, LiveEdit, CodeBlock and a themed, zoomable diagram viewer.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown",
|
|
@@ -124,13 +124,13 @@
|
|
|
124
124
|
"remark-gfm": "^4.0.1",
|
|
125
125
|
"remark-stringify": "^11.0.0",
|
|
126
126
|
"unified": "^11.0.5",
|
|
127
|
-
"@gild-ui/core": "^0.1.0-alpha.
|
|
128
|
-
"@gild-ui/hooks": "^0.1.0-alpha.
|
|
127
|
+
"@gild-ui/core": "^0.1.0-alpha.5",
|
|
128
|
+
"@gild-ui/hooks": "^0.1.0-alpha.5"
|
|
129
129
|
},
|
|
130
130
|
"peerDependencies": {
|
|
131
131
|
"react": "^19.2.8",
|
|
132
132
|
"react-dom": "^19.2.8",
|
|
133
|
-
"@gild-ui/react": "^0.1.0-alpha.
|
|
133
|
+
"@gild-ui/react": "^0.1.0-alpha.5"
|
|
134
134
|
},
|
|
135
135
|
"devDependencies": {
|
|
136
136
|
"@storybook/react-vite": "^10.6.10",
|
|
@@ -151,8 +151,8 @@
|
|
|
151
151
|
"tsdown": "^0.23.7",
|
|
152
152
|
"typescript": "~7.0.2",
|
|
153
153
|
"vitest": "^5.1.2",
|
|
154
|
-
"@
|
|
155
|
-
"@
|
|
154
|
+
"@gild-ui/react": "0.1.0-alpha.5",
|
|
155
|
+
"@soroush.tech/eslint-config": "0.0.0"
|
|
156
156
|
},
|
|
157
157
|
"scripts": {
|
|
158
158
|
"build": "tsdown",
|