oneslash-design-system 2.23.1 → 2.25.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/README.md +1 -1
- package/dist/DESIGN.md +20 -5
- package/dist/cases/activity-timeline/activity.d.ts +1 -0
- package/dist/cases/activity-timeline/activity.jsx +43 -0
- package/dist/cases/activity-timeline/versions.d.ts +1 -0
- package/dist/cases/activity-timeline/versions.jsx +130 -0
- package/dist/cases/activity-timeline.md +315 -0
- package/dist/cases/agent-plan-proposal.md +1 -0
- package/dist/cases/ask-page/answered.d.ts +1 -0
- package/dist/cases/ask-page/answered.jsx +248 -0
- package/dist/cases/ask-page/first-visit.d.ts +1 -0
- package/dist/cases/ask-page/first-visit.jsx +118 -0
- package/dist/cases/ask-page.md +551 -0
- package/dist/cases/billing-page/self-serve.jsx +4 -4
- package/dist/cases/billing-page/trial.d.ts +1 -0
- package/dist/cases/billing-page/trial.jsx +115 -0
- package/dist/cases/billing-page.md +166 -5
- package/dist/cases/chart/bars.d.ts +1 -0
- package/dist/cases/chart/bars.jsx +83 -0
- package/dist/cases/chart/lines.d.ts +1 -0
- package/dist/cases/chart/lines.jsx +71 -0
- package/dist/cases/chart.md +258 -0
- package/dist/cases/collapsible-search/popover.jsx +1 -1
- package/dist/cases/collapsible-search.md +2 -2
- package/dist/cases/comment-thread/card.d.ts +1 -0
- package/dist/cases/comment-thread/card.jsx +141 -0
- package/dist/cases/comment-thread/thread.d.ts +1 -0
- package/dist/cases/comment-thread/thread.jsx +87 -0
- package/dist/cases/comment-thread.md +349 -0
- package/dist/cases/cookie-choice/banner.d.ts +1 -0
- package/dist/cases/cookie-choice/banner.jsx +82 -0
- package/dist/cases/cookie-choice/settings.d.ts +1 -0
- package/dist/cases/cookie-choice/settings.jsx +75 -0
- package/dist/cases/cookie-choice.md +234 -0
- package/dist/cases/dashboard/numbers-first.jsx +63 -2
- package/dist/cases/dashboard/work-first.jsx +1 -1
- package/dist/cases/dashboard.md +77 -5
- package/dist/cases/data-table-page/all-rows.jsx +1 -1
- package/dist/cases/data-table-page/paged.jsx +1 -1
- package/dist/cases/data-table-page.md +2 -2
- package/dist/cases/invoice-list/table.jsx +21 -9
- package/dist/cases/invoice-list.md +27 -12
- package/dist/cases/leaderboard/ranked.d.ts +1 -0
- package/dist/cases/leaderboard/ranked.jsx +44 -0
- package/dist/cases/leaderboard/table.d.ts +1 -0
- package/dist/cases/leaderboard/table.jsx +87 -0
- package/dist/cases/leaderboard.md +177 -0
- package/dist/cases/message-reactions/picker.jsx +1 -1
- package/dist/cases/message-reactions.md +2 -2
- package/dist/cases/message-row.md +2 -1
- package/dist/cases/newsletter-signup/inline.d.ts +1 -0
- package/dist/cases/newsletter-signup/inline.jsx +72 -0
- package/dist/cases/newsletter-signup/section.d.ts +1 -0
- package/dist/cases/newsletter-signup/section.jsx +72 -0
- package/dist/cases/newsletter-signup.md +234 -0
- package/dist/cases/number-format.md +9 -3
- package/dist/cases/onboarding/checklist.d.ts +1 -0
- package/dist/cases/onboarding/checklist.jsx +92 -0
- package/dist/cases/onboarding/steps.d.ts +3 -0
- package/dist/cases/onboarding/steps.jsx +177 -0
- package/dist/cases/onboarding.md +368 -0
- package/dist/cases/people-row/stack.jsx +1 -1
- package/dist/cases/people-row.md +2 -2
- package/dist/cases/plan-comparison/table.d.ts +1 -0
- package/dist/cases/plan-comparison/table.jsx +47 -0
- package/dist/cases/plan-comparison.md +94 -0
- package/dist/cases/plan-picker.md +1 -0
- package/dist/cases/plan-sign-off/one-approver.d.ts +1 -0
- package/dist/cases/plan-sign-off/one-approver.jsx +129 -0
- package/dist/cases/plan-sign-off/team.d.ts +1 -0
- package/dist/cases/plan-sign-off/team.jsx +213 -0
- package/dist/cases/plan-sign-off.md +541 -0
- package/dist/cases/pricing-section.md +1 -1
- package/dist/cases/site-footer/columns.jsx +2 -1
- package/dist/cases/site-footer.md +3 -1
- package/dist/cases/stat-row/tiles.jsx +2 -1
- package/dist/cases/stat-row.md +5 -2
- package/dist/cases/task-header/agent-sets-status.d.ts +1 -0
- package/dist/cases/task-header/agent-sets-status.jsx +164 -0
- package/dist/cases/task-header/people-change-status.d.ts +1 -0
- package/dist/cases/task-header/people-change-status.jsx +175 -0
- package/dist/cases/task-header.md +576 -0
- package/dist/cases.json +883 -30
- package/dist/components/alert.d.ts +3 -1
- package/dist/components/alert.jsx +5 -5
- package/dist/components/barChart.d.ts +35 -0
- package/dist/components/barChart.jsx +92 -0
- package/dist/components/dateField.jsx +1 -1
- package/dist/components/formatNumber.d.ts +10 -2
- package/dist/components/formatNumber.js +44 -9
- package/dist/components/heading.d.ts +2 -2
- package/dist/components/heading.jsx +5 -3
- package/dist/components/layout.d.ts +4 -2
- package/dist/components/layout.jsx +13 -2
- package/dist/components/lineChart.d.ts +39 -0
- package/dist/components/lineChart.jsx +128 -0
- package/dist/components/markdown.d.ts +24 -0
- package/dist/components/markdown.jsx +81 -0
- package/dist/components/pageShell.d.ts +3 -3
- package/dist/components/pageShell.jsx +6 -5
- package/dist/components/popover.d.ts +5 -1
- package/dist/components/popover.jsx +3 -2
- package/dist/components/progress.jsx +1 -1
- package/dist/components/select.jsx +5 -2
- package/dist/components/statTile.d.ts +1 -1
- package/dist/components/statTile.jsx +7 -2
- package/dist/components/tableCell.d.ts +4 -3
- package/dist/components/tableCell.jsx +2 -2
- package/dist/components/timeline.d.ts +32 -0
- package/dist/components/timeline.jsx +54 -0
- package/dist/components/titleBar.d.ts +3 -1
- package/dist/components/titleBar.jsx +9 -4
- package/dist/components/toaster.jsx +81 -11
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/internal/chart.d.ts +39 -0
- package/dist/internal/chart.js +110 -0
- package/dist/internal/chartFrame.d.ts +29 -0
- package/dist/internal/chartFrame.jsx +57 -0
- package/dist/internal/markdown.d.ts +40 -0
- package/dist/internal/markdown.js +577 -0
- package/dist/internal/toaster.d.ts +2 -0
- package/dist/internal/toaster.js +8 -0
- package/dist/native-mapping.json +28 -4
- package/dist/stories/BarChart.stories.d.ts +10 -0
- package/dist/stories/BarChart.stories.jsx +104 -0
- package/dist/stories/Cases.generated.stories.d.ts +22 -0
- package/dist/stories/Cases.generated.stories.jsx +44 -0
- package/dist/stories/Heading.stories.d.ts +1 -0
- package/dist/stories/Heading.stories.jsx +17 -0
- package/dist/stories/LineChart.stories.d.ts +9 -0
- package/dist/stories/LineChart.stories.jsx +34 -0
- package/dist/stories/Markdown.stories.d.ts +9 -0
- package/dist/stories/Markdown.stories.jsx +66 -0
- package/dist/stories/Onboarding.probe.stories.d.ts +6 -0
- package/dist/stories/Onboarding.probe.stories.jsx +12 -0
- package/dist/stories/Popover.stories.d.ts +2 -0
- package/dist/stories/Popover.stories.jsx +33 -0
- package/dist/stories/StatTile.stories.d.ts +4 -0
- package/dist/stories/StatTile.stories.jsx +47 -2
- package/dist/stories/Timeline.stories.d.ts +8 -0
- package/dist/stories/Timeline.stories.jsx +49 -0
- package/dist/stories/TitleBar.stories.d.ts +1 -0
- package/dist/stories/TitleBar.stories.jsx +13 -0
- package/dist/stories/Toaster.stories.d.ts +4 -0
- package/dist/stories/Toaster.stories.jsx +30 -0
- package/package.json +1 -1
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Pure helpers behind BarChart and LineChart: the y ticks, which x labels to print, the keys that move
|
|
2
|
+
// the highlighted point, a line's SVG path and the number text. No DOM: the server and the browser
|
|
3
|
+
// draw the same markup.
|
|
4
|
+
import { formatCount, formatMoney } from '../components/formatNumber';
|
|
5
|
+
var MANTISSAS = [1, 2, 2.5, 5, 10];
|
|
6
|
+
// Float steps (0.1 * 3) would print '0.30000000000000004'
|
|
7
|
+
var clean = function (n) { return Number(n.toPrecision(12)); };
|
|
8
|
+
/**
|
|
9
|
+
* The y ticks from 0: round steps of 1, 2, 2.5 or 5 × 10ⁿ, the last tick at or above `max`, 3 to 5 ticks.
|
|
10
|
+
* `max` 0 (or below, or not a number) gives `[0, 1]`. With `integer` (counts) the step is a whole number of
|
|
11
|
+
* at least 1, so max 1 gives `[0, 1]`, max 2 `[0, 1, 2]` and max 10 `[0, 5, 10]`.
|
|
12
|
+
*/
|
|
13
|
+
export function niceTicks(max, count, _a) {
|
|
14
|
+
if (count === void 0) { count = 4; }
|
|
15
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.integer, integer = _c === void 0 ? false : _c;
|
|
16
|
+
if (!Number.isFinite(max) || max <= 0)
|
|
17
|
+
return [0, 1];
|
|
18
|
+
var raw = max / count;
|
|
19
|
+
var power = Math.pow(10, Math.floor(Math.log10(raw)));
|
|
20
|
+
var fits = function (m) { return power * m >= raw - 1e-12 && (!integer || Number.isInteger(clean(power * m))); };
|
|
21
|
+
var step = integer && raw <= 1 ? 1 : clean(power * MANTISSAS.find(fits));
|
|
22
|
+
var last = Math.ceil(clean(max / step));
|
|
23
|
+
return Array.from({ length: last + 1 }, function (_, i) { return clean(i * step); });
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The indexes of the x labels to print: the first, the last and every `ceil(n / most)`th. When the run
|
|
27
|
+
* misses the last, the last replaces the run's final label: it is right-aligned and takes up to a step of
|
|
28
|
+
* room, so beside a label less than a step away it would always overlap.
|
|
29
|
+
*/
|
|
30
|
+
export function labelEvery(n, most) {
|
|
31
|
+
if (most === void 0) { most = 6; }
|
|
32
|
+
if (n <= 0)
|
|
33
|
+
return [];
|
|
34
|
+
var step = Math.ceil(n / most);
|
|
35
|
+
var out = [];
|
|
36
|
+
for (var i = 0; i < n; i += step)
|
|
37
|
+
out.push(i);
|
|
38
|
+
var last = n - 1;
|
|
39
|
+
// The run starts at 0, so it can only miss the last when it has more than one label
|
|
40
|
+
if (out[out.length - 1] !== last)
|
|
41
|
+
out[out.length - 1] = last;
|
|
42
|
+
return out;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The point a key moves to: Left and Right by one with no wrap, Home the first, End the last. Any other key
|
|
46
|
+
* keeps `current`. `current` -1 is no point yet: Right and Home start at the first, Left and End at the last.
|
|
47
|
+
*/
|
|
48
|
+
export function nextPoint(key, current, count) {
|
|
49
|
+
if (count <= 0)
|
|
50
|
+
return current;
|
|
51
|
+
var lastIndex = count - 1;
|
|
52
|
+
switch (key) {
|
|
53
|
+
case 'ArrowRight':
|
|
54
|
+
return current < 0 ? 0 : Math.min(lastIndex, current + 1);
|
|
55
|
+
case 'ArrowLeft':
|
|
56
|
+
return current < 0 ? lastIndex : Math.max(0, current - 1);
|
|
57
|
+
case 'Home':
|
|
58
|
+
return 0;
|
|
59
|
+
case 'End':
|
|
60
|
+
return lastIndex;
|
|
61
|
+
default:
|
|
62
|
+
return current;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
var short = function (n) { return String(Math.round(n * 100) / 100); };
|
|
66
|
+
/** The x of point `i` of `n` in a 0 to 100 box. One point sits in the middle. */
|
|
67
|
+
export var pointX = function (i, n) { return (n <= 1 ? 50 : (i / (n - 1)) * 100); };
|
|
68
|
+
/**
|
|
69
|
+
* An SVG `d` in a 0 to 100 box, 0 at the bottom and `top` at the top. Each run of values starts with `M`, so a
|
|
70
|
+
* `null` breaks the line. The axis starts at 0, so a value below 0 is drawn at 0 and never below the plot.
|
|
71
|
+
*/
|
|
72
|
+
export function linePath(values, top) {
|
|
73
|
+
var d = '';
|
|
74
|
+
var drawing = false;
|
|
75
|
+
values.forEach(function (v, i) {
|
|
76
|
+
if (v === null || !Number.isFinite(v)) {
|
|
77
|
+
drawing = false;
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
var y = 100 - (top > 0 ? (Math.max(0, v) / top) * 100 : 0);
|
|
81
|
+
d += "".concat(drawing ? 'L' : 'M').concat(short(pointX(i, values.length)), " ").concat(short(y));
|
|
82
|
+
drawing = true;
|
|
83
|
+
});
|
|
84
|
+
return d;
|
|
85
|
+
}
|
|
86
|
+
/** A tick: compact from 10,000 up ('12.4K', '$12.4K'), else exact. */
|
|
87
|
+
export function axisText(n, format) {
|
|
88
|
+
if (format === void 0) { format = 'count'; }
|
|
89
|
+
return format === 'money' ? formatMoney(n, { compact: true }) : formatCount(n, { compact: true });
|
|
90
|
+
}
|
|
91
|
+
/** The exact value with its unit, for the readout and the table: '1,234,567 comments', '$18.40', 'No data'. */
|
|
92
|
+
export function exactText(n, format, unit) {
|
|
93
|
+
if (format === void 0) { format = 'count'; }
|
|
94
|
+
if (n === null || !Number.isFinite(n))
|
|
95
|
+
return 'No data';
|
|
96
|
+
var text = format === 'money' ? formatMoney(n) : formatCount(n);
|
|
97
|
+
return unit ? "".concat(text, " ").concat(unit) : text;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* A point of named series in words, each value's exact text before its name: 'Nov 14: 58 opened, 41 done'.
|
|
101
|
+
* A gap in one series reads 'No data for done'; a point with no value in any series reads 'Nov 14: No data'.
|
|
102
|
+
*/
|
|
103
|
+
export function seriesReadout(label, points, format, unit) {
|
|
104
|
+
if (format === void 0) { format = 'count'; }
|
|
105
|
+
var has = function (v) { return v !== null && Number.isFinite(v); };
|
|
106
|
+
if (!points.some(function (p) { return has(p.value); }))
|
|
107
|
+
return "".concat(label, ": No data");
|
|
108
|
+
var parts = points.map(function (p) { return (has(p.value) ? "".concat(exactText(p.value, format, unit), " ").concat(p.name) : "No data for ".concat(p.name)); });
|
|
109
|
+
return "".concat(label, ": ").concat(parts.join(', '));
|
|
110
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const plotTop = "pt-3";
|
|
3
|
+
export declare const labelRow = "relative mt-3 h-[18px]";
|
|
4
|
+
export interface ChartTable {
|
|
5
|
+
/** The first column names the labels; the rest name the values and are right-aligned */
|
|
6
|
+
columns: string[];
|
|
7
|
+
/** One row per point: the label, then the exact values as text */
|
|
8
|
+
rows: string[][];
|
|
9
|
+
}
|
|
10
|
+
export interface ChartFrameProps {
|
|
11
|
+
/** The base id: the figure's id, and `<id>-title`, `<id>-summary`, `<id>-table` inside */
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
/** One sentence the caller writes from the data, saying what changed */
|
|
15
|
+
summary: string;
|
|
16
|
+
/** The highlighted point in words ('Nov 14: 58 comments'), or '' when none is chosen */
|
|
17
|
+
readout: string;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
/** No point has a value: the empty text shows in the plot's place and there is no table */
|
|
20
|
+
empty?: boolean;
|
|
21
|
+
emptyText: string;
|
|
22
|
+
table: ChartTable;
|
|
23
|
+
/** The drawing, a `role="group"` tab stop the chart builds */
|
|
24
|
+
plot: React.ReactNode;
|
|
25
|
+
/** The plot's drawn height in px, so the loading Skeleton keeps the chart's size */
|
|
26
|
+
height: number;
|
|
27
|
+
legend?: React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export default function ChartFrame({ id, title, summary, readout, loading, empty, emptyText, table, plot, height, legend }: ChartFrameProps): React.JSX.Element;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import Heading from '../components/heading';
|
|
4
|
+
import Button from '../components/button';
|
|
5
|
+
import EmptyBox from '../components/emptyBox';
|
|
6
|
+
import Skeleton from '../components/skeleton';
|
|
7
|
+
import TableContainer from '../components/tableContainer';
|
|
8
|
+
import TableHeader from '../components/tableHeader';
|
|
9
|
+
import TableHeaderCell from '../components/tableHeaderCell';
|
|
10
|
+
import TableRow from '../components/tableRow';
|
|
11
|
+
import TableCell from '../components/tableCell';
|
|
12
|
+
// The plot's frame around its drawing, shared so a chart and its loading Skeleton are the same height:
|
|
13
|
+
// room above for the top tick, which hangs half a line over its gridline, and the x label row below,
|
|
14
|
+
// clear of the 0 tick that hangs half a line under the plot.
|
|
15
|
+
export var plotTop = 'pt-3';
|
|
16
|
+
export var labelRow = 'relative mt-3 h-[18px]';
|
|
17
|
+
// The frame both charts share: the title, the summary, the legend, a polite readout line, the plot,
|
|
18
|
+
// and 'Show Table' with the exact values. Not exported from the package; BarChart and LineChart use it.
|
|
19
|
+
export default function ChartFrame(_a) {
|
|
20
|
+
var id = _a.id, title = _a.title, summary = _a.summary, readout = _a.readout, _b = _a.loading, loading = _b === void 0 ? false : _b, _c = _a.empty, empty = _c === void 0 ? false : _c, emptyText = _a.emptyText, table = _a.table, plot = _a.plot, height = _a.height, legend = _a.legend;
|
|
21
|
+
var _d = useState(false), open = _d[0], setOpen = _d[1];
|
|
22
|
+
var titleId = "".concat(id, "-title");
|
|
23
|
+
var tableId = "".concat(id, "-table");
|
|
24
|
+
var ready = !loading && !empty;
|
|
25
|
+
return (<figure id={id} aria-labelledby={titleId} aria-busy={loading || undefined} className="flex w-full min-w-0 flex-col gap-small">
|
|
26
|
+
<Heading level={3} size="subtitle1" id={titleId}>{title}</Heading>
|
|
27
|
+
<p id={"".concat(id, "-summary")} className="text-body2 text-fg-secondary">{summary}</p>
|
|
28
|
+
{legend}
|
|
29
|
+
{/* Kept mounted so each change is announced; it holds a line's height so the plot does not move */}
|
|
30
|
+
<p role="status" aria-live="polite" className="min-h-[21px] break-words text-body2 text-fg-primary">{ready ? readout : ''}</p>
|
|
31
|
+
{loading ? (
|
|
32
|
+
// The plot's frame with the Skeleton in the drawing's place, so nothing moves when it loads
|
|
33
|
+
<div className={plotTop}>
|
|
34
|
+
<div className="[&>div]:h-full" style={{ height: height }}>
|
|
35
|
+
<Skeleton variant="block" label={"Loading ".concat(title)}/>
|
|
36
|
+
</div>
|
|
37
|
+
<div className={labelRow}/>
|
|
38
|
+
</div>) : empty ? (<EmptyBox size="small" text={emptyText}/>) : (plot)}
|
|
39
|
+
{ready && (<>
|
|
40
|
+
<div className="flex">
|
|
41
|
+
<Button type="tertiary" size="small" state="enabled" label={open ? 'Hide Table' : 'Show Table'} aria-expanded={open} aria-controls={tableId} onClickButton={function () { return setOpen(function (o) { return !o; }); }}/>
|
|
42
|
+
</div>
|
|
43
|
+
<div id={tableId}>
|
|
44
|
+
{open && (<TableContainer aria-label={title}>
|
|
45
|
+
<TableHeader>
|
|
46
|
+
<TableRow>
|
|
47
|
+
{table.columns.map(function (c, i) { return (<TableHeaderCell key={c} align={i === 0 ? 'left' : 'right'}>{c}</TableHeaderCell>); })}
|
|
48
|
+
</TableRow>
|
|
49
|
+
</TableHeader>
|
|
50
|
+
{table.rows.map(function (row, r) { return (<TableRow key={r}>
|
|
51
|
+
{row.map(function (cell, i) { return (<TableCell key={i} align={i === 0 ? 'left' : 'right'}>{cell}</TableCell>); })}
|
|
52
|
+
</TableRow>); })}
|
|
53
|
+
</TableContainer>)}
|
|
54
|
+
</div>
|
|
55
|
+
</>)}
|
|
56
|
+
</figure>);
|
|
57
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type MdInline = {
|
|
2
|
+
type: 'text';
|
|
3
|
+
text: string;
|
|
4
|
+
} | {
|
|
5
|
+
type: 'strong' | 'em';
|
|
6
|
+
children: MdInline[];
|
|
7
|
+
} | {
|
|
8
|
+
type: 'code';
|
|
9
|
+
text: string;
|
|
10
|
+
} | {
|
|
11
|
+
type: 'link';
|
|
12
|
+
href: string;
|
|
13
|
+
children: MdInline[];
|
|
14
|
+
};
|
|
15
|
+
export type MdBlock = {
|
|
16
|
+
type: 'heading';
|
|
17
|
+
depth: 1 | 2 | 3;
|
|
18
|
+
children: MdInline[];
|
|
19
|
+
} | {
|
|
20
|
+
type: 'paragraph';
|
|
21
|
+
children: MdInline[];
|
|
22
|
+
} | {
|
|
23
|
+
type: 'list';
|
|
24
|
+
ordered: boolean;
|
|
25
|
+
items: MdBlock[][];
|
|
26
|
+
} | {
|
|
27
|
+
type: 'code';
|
|
28
|
+
language?: string;
|
|
29
|
+
code: string;
|
|
30
|
+
table?: boolean;
|
|
31
|
+
} | {
|
|
32
|
+
type: 'rule';
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Only `http:`, `https:` and `mailto:` links, with the scheme in lower case. Anything else gives null:
|
|
36
|
+
* `javascript:`, `data:`, `vbscript:`, relative paths, and any URL with a space or a control character
|
|
37
|
+
* in it (which a browser would strip before it reads the scheme). Entities are never decoded.
|
|
38
|
+
*/
|
|
39
|
+
export declare function safeHref(href: string): string | null;
|
|
40
|
+
export declare function parseMarkdown(text: string): MdBlock[];
|