@charcuterie/ui 3.12.0 → 3.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Avatar/Avatar.d.ts +163 -0
- package/dist/Avatar/Avatar.d.ts.map +1 -0
- package/dist/Avatar/Avatar.js +139 -0
- package/dist/Avatar/Avatar.js.map +1 -0
- package/dist/Board/BoardLaneList.d.ts +29 -0
- package/dist/Board/BoardLaneList.d.ts.map +1 -1
- package/dist/Board/BoardLaneList.js +2 -1
- package/dist/Board/BoardLaneList.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/markdownEditorCodeMirror/MarkdownView.d.ts +140 -0
- package/dist/markdownEditorCodeMirror/MarkdownView.d.ts.map +1 -0
- package/dist/markdownEditorCodeMirror/MarkdownView.js +268 -0
- package/dist/markdownEditorCodeMirror/MarkdownView.js.map +1 -0
- package/dist/markdownEditorCodeMirror/index.d.ts +14 -3
- package/dist/markdownEditorCodeMirror/index.d.ts.map +1 -1
- package/dist/markdownEditorCodeMirror/index.js +12 -3
- package/dist/markdownEditorCodeMirror/index.js.map +1 -1
- package/dist/markdownEditorCodeMirror/livePreview.d.ts +42 -2
- package/dist/markdownEditorCodeMirror/livePreview.d.ts.map +1 -1
- package/dist/markdownEditorCodeMirror/livePreview.js +243 -26
- package/dist/markdownEditorCodeMirror/livePreview.js.map +1 -1
- package/dist/markdownEditorCodeMirror/livePreviewRanges.d.ts.map +1 -1
- package/dist/markdownEditorCodeMirror/livePreviewRanges.js +49 -7
- package/dist/markdownEditorCodeMirror/livePreviewRanges.js.map +1 -1
- package/dist/markdownEditorCodeMirror/safeUrls.d.ts +46 -0
- package/dist/markdownEditorCodeMirror/safeUrls.d.ts.map +1 -0
- package/dist/markdownEditorCodeMirror/safeUrls.js +123 -0
- package/dist/markdownEditorCodeMirror/safeUrls.js.map +1 -0
- package/package.json +1 -1
- package/src/Avatar/Avatar.mdx +92 -0
- package/src/Avatar/Avatar.stories.tsx +254 -0
- package/src/Avatar/Avatar.test.tsx +143 -0
- package/src/Avatar/Avatar.tsx +270 -0
- package/src/Board/Board.mdx +26 -0
- package/src/Board/Board.stories.tsx +47 -21
- package/src/Board/Board.test.tsx +62 -0
- package/src/Board/BoardLaneList.tsx +52 -1
- package/src/MarkdownEditor/MarkdownEditor.mdx +5 -0
- package/src/index.ts +5 -0
- package/src/markdownEditorCodeMirror/MarkdownEditorCodeMirror.mdx +11 -0
- package/src/markdownEditorCodeMirror/MarkdownView.mdx +157 -0
- package/src/markdownEditorCodeMirror/MarkdownView.stories.tsx +314 -0
- package/src/markdownEditorCodeMirror/MarkdownView.test.tsx +288 -0
- package/src/markdownEditorCodeMirror/MarkdownView.tsx +373 -0
- package/src/markdownEditorCodeMirror/index.ts +17 -2
- package/src/markdownEditorCodeMirror/livePreview.ts +329 -33
- package/src/markdownEditorCodeMirror/livePreviewRanges.ts +64 -7
- package/src/markdownEditorCodeMirror/safeUrls.test.ts +0 -0
- package/src/markdownEditorCodeMirror/safeUrls.ts +142 -0
- package/src/sourceRules.test.ts +9 -1
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import type { CategoricalIndex } from "@charcuterie/tokens";
|
|
2
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
3
|
+
import type { IntentAppearance } from "../intentStyles.ts";
|
|
4
|
+
export type AvatarSize = keyof typeof AVATAR_SIZE_CLASS;
|
|
5
|
+
export type AvatarProps = Omit<ComponentPropsWithRef<"span">, "children"> & {
|
|
6
|
+
/**
|
|
7
|
+
* The same three the rest of the categorical family wears, minus
|
|
8
|
+
* `ghost` — a chip with no fill and no border is a floating
|
|
9
|
+
* letter, and the whole job here is to be a **shape** the eye
|
|
10
|
+
* finds in a list.
|
|
11
|
+
*/
|
|
12
|
+
appearance?: Exclude<IntentAppearance, "ghost">;
|
|
13
|
+
/**
|
|
14
|
+
* The colour, when somebody has chosen one. Omitted, it is derived
|
|
15
|
+
* — see `categoricalKey` — so an avatar always has a colour and
|
|
16
|
+
* never has to be given one.
|
|
17
|
+
*/
|
|
18
|
+
categorical?: CategoricalIndex;
|
|
19
|
+
/**
|
|
20
|
+
* What the derived colour is hashed from when `categorical` is
|
|
21
|
+
* absent. Defaults to `name`.
|
|
22
|
+
*
|
|
23
|
+
* Pass the **user's id** wherever one exists. `getCategoricalIndex`
|
|
24
|
+
* does no normalization on purpose, so hashing the name means a
|
|
25
|
+
* rename — or a trailing space — silently repaints a person the
|
|
26
|
+
* reader had already learned to recognise. An id does not move.
|
|
27
|
+
*/
|
|
28
|
+
categoricalKey?: string;
|
|
29
|
+
/**
|
|
30
|
+
* A glyph instead of the initials — a robot for an agent account,
|
|
31
|
+
* a lock for a service account. The library ships **no icons**, so
|
|
32
|
+
* this is the app's own
|
|
33
|
+
* ([decision](../../../docs/decisions/2026-07-29-ship-no-icons-and-no-symbol-glyphs.md)).
|
|
34
|
+
* It is decoration: the name still travels in `aria-label`, and a
|
|
35
|
+
* glyph the font cannot render must not be the only thing
|
|
36
|
+
* carrying who this is.
|
|
37
|
+
*/
|
|
38
|
+
icon?: ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* A photo. Optional, and **it is never the only thing** — a
|
|
41
|
+
* request that 404s, a signed URL that expired, or an app that
|
|
42
|
+
* simply has no photos falls back to the initials with no empty
|
|
43
|
+
* box in between.
|
|
44
|
+
*/
|
|
45
|
+
imageUrl?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The letters, when the derivation is wrong. Derived from `name`
|
|
48
|
+
* otherwise: the first character of each of the first two
|
|
49
|
+
* whitespace-separated words, upper-cased.
|
|
50
|
+
*
|
|
51
|
+
* Worth passing for a name the split gets wrong — a mononym that
|
|
52
|
+
* wants two letters, a name whose family part comes first, a
|
|
53
|
+
* handle with punctuation in it.
|
|
54
|
+
*/
|
|
55
|
+
initials?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Who this is. Read by assistive technology and shown on hover;
|
|
58
|
+
* **never printed as visible text**, which is the entire point of
|
|
59
|
+
* the component.
|
|
60
|
+
*
|
|
61
|
+
* Nullable, and that is a decision rather than a loose type — see
|
|
62
|
+
* the note on the component about what an unassigned row draws.
|
|
63
|
+
*/
|
|
64
|
+
name: string | null | undefined;
|
|
65
|
+
size?: AvatarSize;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* One rule: **the circle is 1.9 x its own type size**, and `size`
|
|
69
|
+
* picks which step of the type scale that is.
|
|
70
|
+
*
|
|
71
|
+
* 1.9 rather than a tighter number because a circle only offers its
|
|
72
|
+
* full width on the centre line. Two capitals measure about 1.25em
|
|
73
|
+
* in this face, and a chord taken at the cap height of a 1.75em
|
|
74
|
+
* circle is barely wider than that — measured, not guessed.
|
|
75
|
+
*
|
|
76
|
+
* It is em-based rather than a fixed `size-5` / `size-7` / `size-9`,
|
|
77
|
+
* and that is the whole of the design. Every length in this token
|
|
78
|
+
* set moves with the density axis — `--font-size-xs` is 0.88rem
|
|
79
|
+
* compact, 0.94rem at desktop and 1.11rem on the kiosk — so a chip
|
|
80
|
+
* pinned to 20px holds two letters at one density and clips them at
|
|
81
|
+
* the next. `controlStyles.ts` says the same thing about badges and
|
|
82
|
+
* dots: non-control sizing is type-relative on purpose, because a
|
|
83
|
+
* chip that stays 20px while the kiosk scales the prose around it
|
|
84
|
+
* reads as a rendering fault.
|
|
85
|
+
*
|
|
86
|
+
* The hand-rolled avatar this replaces is the worked example. It was
|
|
87
|
+
* `size-5` with `text-[0.625rem]` — a 10px font, which is **not a
|
|
88
|
+
* step of this type scale at any density**, because 20px is not
|
|
89
|
+
* enough room for two characters at the smallest size the tokens
|
|
90
|
+
* actually offer. A component that has to invent a font size to fit
|
|
91
|
+
* its own box has the wrong box.
|
|
92
|
+
*/
|
|
93
|
+
declare const AVATAR_SIZE_CLASS: {
|
|
94
|
+
readonly sm: "size-[1.9em] text-xs";
|
|
95
|
+
readonly md: "size-[1.9em] text-md";
|
|
96
|
+
readonly lg: "size-[1.9em] text-xl";
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* A person, as a coloured chip — a glyph or an initial, with the
|
|
100
|
+
* name attached where only assistive technology and a hover can
|
|
101
|
+
* reach it.
|
|
102
|
+
*
|
|
103
|
+
* It exists to delete a printed name. Docket's board put the word
|
|
104
|
+
* *"Owner"* on most of its cards, which is a column of identical
|
|
105
|
+
* text doing the work of a colour; the fleet's boards all want the
|
|
106
|
+
* same chip, and `Board.stories.tsx` had already hand-rolled one
|
|
107
|
+
* inside a story file.
|
|
108
|
+
*
|
|
109
|
+
* ### Unassigned draws **nothing**, and the component owns that
|
|
110
|
+
*
|
|
111
|
+
* `name` accepts `null` and `undefined`, and either renders `null`.
|
|
112
|
+
* A grey *"None"* placeholder is a decision the design system makes
|
|
113
|
+
* against the reader: it is a chip that says a fact nobody needed,
|
|
114
|
+
* repeated down every unassigned row, at the same weight as the
|
|
115
|
+
* chips that mean something.
|
|
116
|
+
*
|
|
117
|
+
* The alternative is a ternary at every call site, and the call
|
|
118
|
+
* sites are the whole problem — a board, a table, a card footer, a
|
|
119
|
+
* detail pane, each written on a different day. The one that forgets
|
|
120
|
+
* is the one that ships the grey circle. Absence is expressed once,
|
|
121
|
+
* here, which is the same call `Board` makes with `onMove`: no
|
|
122
|
+
* handler means no affordance, rather than a disabled one.
|
|
123
|
+
*
|
|
124
|
+
* A consumer that genuinely wants to *say* "unassigned" still can —
|
|
125
|
+
* that is text, or an `EmptyState`, and neither of them is an
|
|
126
|
+
* avatar.
|
|
127
|
+
*
|
|
128
|
+
* ### The name is never visible text
|
|
129
|
+
*
|
|
130
|
+
* `role="img"` with an `aria-label`, exactly as `Swatch` does, so
|
|
131
|
+
* `getByRole("img", { name })` is the one handle whether the chip is
|
|
132
|
+
* showing a photo, a glyph or two letters. `title` carries the same
|
|
133
|
+
* string for a pointer, which is the only channel a person browsing
|
|
134
|
+
* with their eyes has — the letters `KG` are not a name.
|
|
135
|
+
*
|
|
136
|
+
* That is also why there is no `isNameVisible`: an avatar whose name
|
|
137
|
+
* is printed beside it is a name with a decoration in front of it,
|
|
138
|
+
* and the layout that wants one should print the name and skip the
|
|
139
|
+
* chip.
|
|
140
|
+
*
|
|
141
|
+
* ### The colour is derived, never invented
|
|
142
|
+
*
|
|
143
|
+
* `categorical` is the ten-wide non-semantic scale — the same one
|
|
144
|
+
* `Badge` takes — and **not** an `intent`. An intent is a claim the
|
|
145
|
+
* design system makes; a person is not `danger`. With no
|
|
146
|
+
* `categorical` the index comes from `getCategoricalIndex`, which is
|
|
147
|
+
* a pure function of the key, so the same person is the same colour
|
|
148
|
+
* on every machine, every reload, and in a server render. Ten
|
|
149
|
+
* colours means collisions past ten people, and that is a property
|
|
150
|
+
* of the palette rather than a fault in the hash: the colour helps
|
|
151
|
+
* you *scan*, and the accessible name is what identifies.
|
|
152
|
+
*
|
|
153
|
+
* ### There is no `AvatarGroup`
|
|
154
|
+
*
|
|
155
|
+
* Deliberately. A stack of overlapping chips with a `+3` needs
|
|
156
|
+
* answers to which three survive, in what order, and what the
|
|
157
|
+
* overflow announces — and no consumer has asked the question yet. A
|
|
158
|
+
* row of `Avatar`s in a flex box is what a multi-assignee list looks
|
|
159
|
+
* like until one does.
|
|
160
|
+
*/
|
|
161
|
+
export declare const Avatar: ({ appearance, categorical, categoricalKey, className, icon, imageUrl, initials, name, size, title, ...spanProps }: AvatarProps) => ReactNode;
|
|
162
|
+
export {};
|
|
163
|
+
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE3D,OAAO,KAAK,EACV,qBAAqB,EACrB,SAAS,EACV,MAAM,OAAO,CAAA;AAId,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAG1D,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAEvD,MAAM,MAAM,WAAW,GAAG,IAAI,CAC5B,qBAAqB,CAAC,MAAM,CAAC,EAC7B,UAAU,CACX,GAAG;IACF;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAA;IAC/C;;;;OAIG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAA;IAC9B;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;;OAOG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAC/B,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,QAAA,MAAM,iBAAiB;;;;CAIb,CAAA;AAkBV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,eAAO,MAAM,MAAM,GAAI,mHAYpB,WAAW,KAAG,SAkEhB,CAAA"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getCategoricalIndex } from "@charcuterie/tokens";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { CATEGORICAL_APPEARANCE_CLASS } from "../categoricalStyles.js";
|
|
5
|
+
import { toClassName } from "../toClassName.js";
|
|
6
|
+
/**
|
|
7
|
+
* One rule: **the circle is 1.9 x its own type size**, and `size`
|
|
8
|
+
* picks which step of the type scale that is.
|
|
9
|
+
*
|
|
10
|
+
* 1.9 rather than a tighter number because a circle only offers its
|
|
11
|
+
* full width on the centre line. Two capitals measure about 1.25em
|
|
12
|
+
* in this face, and a chord taken at the cap height of a 1.75em
|
|
13
|
+
* circle is barely wider than that — measured, not guessed.
|
|
14
|
+
*
|
|
15
|
+
* It is em-based rather than a fixed `size-5` / `size-7` / `size-9`,
|
|
16
|
+
* and that is the whole of the design. Every length in this token
|
|
17
|
+
* set moves with the density axis — `--font-size-xs` is 0.88rem
|
|
18
|
+
* compact, 0.94rem at desktop and 1.11rem on the kiosk — so a chip
|
|
19
|
+
* pinned to 20px holds two letters at one density and clips them at
|
|
20
|
+
* the next. `controlStyles.ts` says the same thing about badges and
|
|
21
|
+
* dots: non-control sizing is type-relative on purpose, because a
|
|
22
|
+
* chip that stays 20px while the kiosk scales the prose around it
|
|
23
|
+
* reads as a rendering fault.
|
|
24
|
+
*
|
|
25
|
+
* The hand-rolled avatar this replaces is the worked example. It was
|
|
26
|
+
* `size-5` with `text-[0.625rem]` — a 10px font, which is **not a
|
|
27
|
+
* step of this type scale at any density**, because 20px is not
|
|
28
|
+
* enough room for two characters at the smallest size the tokens
|
|
29
|
+
* actually offer. A component that has to invent a font size to fit
|
|
30
|
+
* its own box has the wrong box.
|
|
31
|
+
*/
|
|
32
|
+
const AVATAR_SIZE_CLASS = {
|
|
33
|
+
sm: "size-[1.9em] text-xs",
|
|
34
|
+
md: "size-[1.9em] text-md",
|
|
35
|
+
lg: "size-[1.9em] text-xl",
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* The first character of each of the first two words.
|
|
39
|
+
*
|
|
40
|
+
* `Array.from` rather than `charAt`, so a name that starts outside
|
|
41
|
+
* the BMP contributes a whole character instead of half a surrogate
|
|
42
|
+
* pair and a replacement glyph.
|
|
43
|
+
*/
|
|
44
|
+
const toInitials = (name) => name
|
|
45
|
+
.trim()
|
|
46
|
+
.split(/\s+/)
|
|
47
|
+
.slice(0, 2)
|
|
48
|
+
.map((word) => Array.from(word)[0] ?? "")
|
|
49
|
+
.join("")
|
|
50
|
+
.toLocaleUpperCase();
|
|
51
|
+
/**
|
|
52
|
+
* A person, as a coloured chip — a glyph or an initial, with the
|
|
53
|
+
* name attached where only assistive technology and a hover can
|
|
54
|
+
* reach it.
|
|
55
|
+
*
|
|
56
|
+
* It exists to delete a printed name. Docket's board put the word
|
|
57
|
+
* *"Owner"* on most of its cards, which is a column of identical
|
|
58
|
+
* text doing the work of a colour; the fleet's boards all want the
|
|
59
|
+
* same chip, and `Board.stories.tsx` had already hand-rolled one
|
|
60
|
+
* inside a story file.
|
|
61
|
+
*
|
|
62
|
+
* ### Unassigned draws **nothing**, and the component owns that
|
|
63
|
+
*
|
|
64
|
+
* `name` accepts `null` and `undefined`, and either renders `null`.
|
|
65
|
+
* A grey *"None"* placeholder is a decision the design system makes
|
|
66
|
+
* against the reader: it is a chip that says a fact nobody needed,
|
|
67
|
+
* repeated down every unassigned row, at the same weight as the
|
|
68
|
+
* chips that mean something.
|
|
69
|
+
*
|
|
70
|
+
* The alternative is a ternary at every call site, and the call
|
|
71
|
+
* sites are the whole problem — a board, a table, a card footer, a
|
|
72
|
+
* detail pane, each written on a different day. The one that forgets
|
|
73
|
+
* is the one that ships the grey circle. Absence is expressed once,
|
|
74
|
+
* here, which is the same call `Board` makes with `onMove`: no
|
|
75
|
+
* handler means no affordance, rather than a disabled one.
|
|
76
|
+
*
|
|
77
|
+
* A consumer that genuinely wants to *say* "unassigned" still can —
|
|
78
|
+
* that is text, or an `EmptyState`, and neither of them is an
|
|
79
|
+
* avatar.
|
|
80
|
+
*
|
|
81
|
+
* ### The name is never visible text
|
|
82
|
+
*
|
|
83
|
+
* `role="img"` with an `aria-label`, exactly as `Swatch` does, so
|
|
84
|
+
* `getByRole("img", { name })` is the one handle whether the chip is
|
|
85
|
+
* showing a photo, a glyph or two letters. `title` carries the same
|
|
86
|
+
* string for a pointer, which is the only channel a person browsing
|
|
87
|
+
* with their eyes has — the letters `KG` are not a name.
|
|
88
|
+
*
|
|
89
|
+
* That is also why there is no `isNameVisible`: an avatar whose name
|
|
90
|
+
* is printed beside it is a name with a decoration in front of it,
|
|
91
|
+
* and the layout that wants one should print the name and skip the
|
|
92
|
+
* chip.
|
|
93
|
+
*
|
|
94
|
+
* ### The colour is derived, never invented
|
|
95
|
+
*
|
|
96
|
+
* `categorical` is the ten-wide non-semantic scale — the same one
|
|
97
|
+
* `Badge` takes — and **not** an `intent`. An intent is a claim the
|
|
98
|
+
* design system makes; a person is not `danger`. With no
|
|
99
|
+
* `categorical` the index comes from `getCategoricalIndex`, which is
|
|
100
|
+
* a pure function of the key, so the same person is the same colour
|
|
101
|
+
* on every machine, every reload, and in a server render. Ten
|
|
102
|
+
* colours means collisions past ten people, and that is a property
|
|
103
|
+
* of the palette rather than a fault in the hash: the colour helps
|
|
104
|
+
* you *scan*, and the accessible name is what identifies.
|
|
105
|
+
*
|
|
106
|
+
* ### There is no `AvatarGroup`
|
|
107
|
+
*
|
|
108
|
+
* Deliberately. A stack of overlapping chips with a `+3` needs
|
|
109
|
+
* answers to which three survive, in what order, and what the
|
|
110
|
+
* overflow announces — and no consumer has asked the question yet. A
|
|
111
|
+
* row of `Avatar`s in a flex box is what a multi-assignee list looks
|
|
112
|
+
* like until one does.
|
|
113
|
+
*/
|
|
114
|
+
export const Avatar = ({ appearance = "soft", categorical, categoricalKey, className, icon, imageUrl, initials, name, size = "md", title, ...spanProps }) => {
|
|
115
|
+
/**
|
|
116
|
+
* The URL that failed, rather than a `hasFailed` boolean.
|
|
117
|
+
*
|
|
118
|
+
* A boolean has to be *reset* when `imageUrl` changes, which is an
|
|
119
|
+
* effect syncing a prop into state — the shape this library
|
|
120
|
+
* refuses everywhere else
|
|
121
|
+
* ([decision](../../../docs/decisions/2026-07-29-logic-hooks-are-uncontrolled.md)).
|
|
122
|
+
* Storing the URL makes the comparison below derive the answer, so
|
|
123
|
+
* a second photo gets its own attempt and a re-render never
|
|
124
|
+
* resurrects a dead one.
|
|
125
|
+
*/
|
|
126
|
+
const [failedImageUrl, setFailedImageUrl] = useState(undefined);
|
|
127
|
+
const hasImageError = imageUrl !== undefined && failedImageUrl === imageUrl;
|
|
128
|
+
const trimmedName = name?.trim();
|
|
129
|
+
if (!trimmedName) {
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
const resolvedInitials = initials ?? toInitials(trimmedName);
|
|
133
|
+
const resolvedCategorical = categorical ??
|
|
134
|
+
getCategoricalIndex(categoricalKey ?? trimmedName);
|
|
135
|
+
return (_jsx("span", { ...spanProps, "aria-label": trimmedName, className: toClassName("inline-grid shrink-0 place-items-center overflow-hidden rounded-full border font-medium leading-none", AVATAR_SIZE_CLASS[size], CATEGORICAL_APPEARANCE_CLASS[resolvedCategorical][appearance], className), role: "img", title: title ?? trimmedName, children: imageUrl !== undefined && !hasImageError ? (_jsx("img", { alt: "", className: "size-full object-cover", onError: () => {
|
|
136
|
+
setFailedImageUrl(imageUrl);
|
|
137
|
+
}, src: imageUrl })) : (_jsx("span", { "aria-hidden": "true", children: icon ?? resolvedInitials })) }));
|
|
138
|
+
};
|
|
139
|
+
//# sourceMappingURL=Avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../src/Avatar/Avatar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAKzD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAA;AAEtE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAsE/C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,iBAAiB,GAAG;IACxB,EAAE,EAAE,sBAAsB;IAC1B,EAAE,EAAE,sBAAsB;IAC1B,EAAE,EAAE,sBAAsB;CAClB,CAAA;AAEV;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,CA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,CACV,EACD,IAAI,EAAC,KAAK,EACV,KAAK,EAAE,KAAK,IAAI,WAAW,YAE1B,QAAQ,KAAK,SAAS,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAI1C,cACE,GAAG,EAAC,EAAE,EACN,SAAS,EAAC,wBAAwB,EAClC,OAAO,EAAE,GAAG,EAAE;gBACZ,iBAAiB,CAAC,QAAQ,CAAC,CAAA;YAC7B,CAAC,EACD,GAAG,EAAE,QAAQ,GACb,CACH,CAAC,CAAC,CAAC,CACF,8BAAkB,MAAM,YACrB,IAAI,IAAI,gBAAgB,GACpB,CACR,GACI,CACR,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -12,6 +12,23 @@ export type BoardLane = {
|
|
|
12
12
|
* requirement and an empty lane is the one a person sees most.
|
|
13
13
|
*/
|
|
14
14
|
emptyState?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Where the lane's own heading navigates — a route showing this
|
|
17
|
+
* lane and nothing else.
|
|
18
|
+
*
|
|
19
|
+
* **A link inside the heading, never a heading replaced by a
|
|
20
|
+
* link.** The `<h3>` keeps its level, its id and its place in the
|
|
21
|
+
* document outline, so the lane stays a named `group` and the
|
|
22
|
+
* screen-reader outline is unchanged; the anchor sits inside it.
|
|
23
|
+
* Routed through `RouterLinkProvider` like every other `href` in
|
|
24
|
+
* this library, so an app with a client-side router navigates
|
|
25
|
+
* without a full page load and one without it still gets a real
|
|
26
|
+
* `<a href>`.
|
|
27
|
+
*
|
|
28
|
+
* Absent means the heading is plain text, which is what every
|
|
29
|
+
* existing consumer gets.
|
|
30
|
+
*/
|
|
31
|
+
href?: string;
|
|
15
32
|
/**
|
|
16
33
|
* The **true** size of the lane, when `items` is a truncated page
|
|
17
34
|
* of it. This is what the count badge shows, and the difference
|
|
@@ -23,6 +40,18 @@ export type BoardLane = {
|
|
|
23
40
|
itemCount?: number;
|
|
24
41
|
items: readonly BoardItem[];
|
|
25
42
|
key: string;
|
|
43
|
+
/**
|
|
44
|
+
* The lane's name, and it stays a **string** rather than widening
|
|
45
|
+
* to a `ReactNode`.
|
|
46
|
+
*
|
|
47
|
+
* It is not only a heading: the same value names the lane in the
|
|
48
|
+
* move menu on every card, in the Narrow View's segmented control,
|
|
49
|
+
* in the "+ n more in Todo" line, and in the sentence the live
|
|
50
|
+
* region reads out after a move. A `ReactNode` is not something
|
|
51
|
+
* any of those four can put in a string, so widening this would
|
|
52
|
+
* trade one linkable heading for four places that can no longer
|
|
53
|
+
* say which lane they mean. `href` buys the link without that.
|
|
54
|
+
*/
|
|
26
55
|
label: string;
|
|
27
56
|
/**
|
|
28
57
|
* What "+ n more in this lane" does. With no handler the line is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoardLaneList.d.ts","sourceRoot":"","sources":["../../src/Board/BoardLaneList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"BoardLaneList.d.ts","sourceRoot":"","sources":["../../src/Board/BoardLaneList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAGhD,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,SAAS,SAAS,EAAE,CAAA;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX;;;;;;;;;;;OAWG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;;;;OAMG;IACH,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC;;;;;;OAMG;IACH,YAAY,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAC3B,mBAAmB,EAAE,OAAO,CAAA;IAC5B,IAAI,EAAE,SAAS,CAAA;IACf,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,WAAW,EAAE,SAAS;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACtD,YAAY,CAAC,EAAE,CACb,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,KACd,IAAI,CAAA;IACT,WAAW,CAAC,EAAE,CACZ,YAAY,EAAE;QACZ,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;QACf,aAAa,EAAE,WAAW,GAAG,OAAO,CAAA;QACpC,SAAS,EAAE,MAAM,CAAA;KAClB,EACD,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAC3C,IAAI,CAAA;IACT,mBAAmB,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;CAC3D,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,aAAa,GAAI,0IAU3B,kBAAkB,KAAG,SA8KvB,CAAA"}
|
|
@@ -3,6 +3,7 @@ import { useUniqueId } from "@charcuterie/logic";
|
|
|
3
3
|
import { Badge } from "../Badge/Badge.js";
|
|
4
4
|
import { Button } from "../Button/Button.js";
|
|
5
5
|
import { EmptyState } from "../EmptyState/EmptyState.js";
|
|
6
|
+
import { TextLink } from "../TextLink/TextLink.js";
|
|
6
7
|
import { toClassName } from "../toClassName.js";
|
|
7
8
|
import { BoardCard } from "./BoardCard.js";
|
|
8
9
|
/**
|
|
@@ -48,7 +49,7 @@ export const BoardLaneList = ({ dropIndicatorOffset, headingLevel, isVisibleWhen
|
|
|
48
49
|
// queries the **board**, not the list below — an element
|
|
49
50
|
// carrying `container-type` still resolves its own container
|
|
50
51
|
// queries against its nearest ancestor container.
|
|
51
|
-
isVisibleWhenNarrow ? "flex" : "hidden cq-lg:flex"), children: _jsx("div", { className: "@container", children: _jsxs("div", { className: "flex flex-col gap-2 rounded-lg border border-border-subtle bg-surface-raised px-3 py-2 cq-lg:border-0 cq-lg:bg-transparent cq-lg:p-0", children: [_jsxs("header", { className: "flex items-center gap-2", children: [_jsx(Heading, { className: "font-semibold text-content-primary text-sm", id: headingId, children: lane.label }), _jsx(Badge, { appearance: "soft", intent: "neutral", size: "sm", children: String(itemCount) }), _jsx("span", { className: "flex-1" }), lane.actions] }), _jsxs("ul", { className: "relative flex flex-col", ref: registerListElement, children: [lane.items.length === 0 ? (_jsx("li", { children: lane.emptyState ?? (_jsx(EmptyState, { description: "Nothing is waiting here.", heading: "Nothing here", headingLevel:
|
|
52
|
+
isVisibleWhenNarrow ? "flex" : "hidden cq-lg:flex"), children: _jsx("div", { className: "@container", children: _jsxs("div", { className: "flex flex-col gap-2 rounded-lg border border-border-subtle bg-surface-raised px-3 py-2 cq-lg:border-0 cq-lg:bg-transparent cq-lg:p-0", children: [_jsxs("header", { className: "flex items-center gap-2", children: [_jsx(Heading, { className: "font-semibold text-content-primary text-sm", id: headingId, children: lane.href ? (_jsx(TextLink, { appearance: "standalone", className: "font-semibold text-inherit", href: lane.href, children: lane.label })) : (lane.label) }), _jsx(Badge, { appearance: "soft", intent: "neutral", size: "sm", children: String(itemCount) }), _jsx("span", { className: "flex-1" }), lane.actions] }), _jsxs("ul", { className: "relative flex flex-col", ref: registerListElement, children: [lane.items.length === 0 ? (_jsx("li", { children: lane.emptyState ?? (_jsx(EmptyState, { description: "Nothing is waiting here.", heading: "Nothing here", headingLevel:
|
|
52
53
|
// One below the lane's own, so the outline
|
|
53
54
|
// stays whole wherever the board is mounted.
|
|
54
55
|
(headingLevel + 1), size: "sm" })) })) : (lane.items.map((item, index) => (_jsx(BoardCard, { item: item, laneLabel: lane.label, moveIcon: moveIcon, moveTargets: moveTargets, onMoveToLane: onMoveToLane
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoardLaneList.js","sourceRoot":"","sources":["../../src/Board/BoardLaneList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAGhD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAoB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA8B,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"BoardLaneList.js","sourceRoot":"","sources":["../../src/Board/BoardLaneList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAGhD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAoB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA8B,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAA0B,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAiB,CAAA;AAoG3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,WAAW,EACX,mBAAmB,GACA,E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AAM,EAAC,SAAS,EAChB,OAAO,EAAE,IAAI,CAAC,UAAU,EACxB,IAAI,EAAC,IAAI,YAER,KAAK,WAAW,YAAY,IAAI,CAAC,KAAK,EAAE,GAClC,CACV,CAAC,CAAC,CAAC,CACF,KAAK,WAAW,YAAY,IAAI,CAAC,KAAK,EAAE,CACzC,GACC,CACL,CAAC,CAAC,CAAC,IAAI,IACJ,GACF,GACF,CACP,CAAA;AACH,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ export type { BlockSizeResolver, ColumnPersistence, } from "./AdaptiveGrid/useAd
|
|
|
40
40
|
export { localStorageColumnPersistence, readStoredChoice, useAdaptiveColumns, viewportBlockSizeResolver, } from "./AdaptiveGrid/useAdaptiveColumns.ts";
|
|
41
41
|
export type { AlertProps, AlertSize, } from "./Alert/Alert.tsx";
|
|
42
42
|
export { Alert } from "./Alert/Alert.tsx";
|
|
43
|
+
export type { AvatarProps, AvatarSize, } from "./Avatar/Avatar.tsx";
|
|
44
|
+
export { Avatar } from "./Avatar/Avatar.tsx";
|
|
43
45
|
export type { BadgeProps } from "./Badge/Badge.tsx";
|
|
44
46
|
export { Badge } from "./Badge/Badge.tsx";
|
|
45
47
|
export type { BadgeShapeProps } from "./Badge/useBadgeShape.tsx";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,cAAc,GACf,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,YAAY,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,YAAY,EAAE,YAAY,EAAE,MA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B,EAAE,MAAM,qCAAqC,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -35,6 +35,7 @@ export { AdaptiveGrid } from "./AdaptiveGrid/AdaptiveGrid.js";
|
|
|
35
35
|
export { chooseColumns, DEFAULT_MAX_AUTO_COLUMNS, DEFAULT_MAX_MANUAL_COLUMNS, DEFAULT_MIN_COLUMN_INLINE_SIZE_PX, getColumnChoices, getContentMaxInlineSize, } from "./AdaptiveGrid/chooseColumns.js";
|
|
36
36
|
export { localStorageColumnPersistence, readStoredChoice, useAdaptiveColumns, viewportBlockSizeResolver, } from "./AdaptiveGrid/useAdaptiveColumns.js";
|
|
37
37
|
export { Alert } from "./Alert/Alert.js";
|
|
38
|
+
export { Avatar } from "./Avatar/Avatar.js";
|
|
38
39
|
export { Badge } from "./Badge/Badge.js";
|
|
39
40
|
export { BadgeButton } from "./BadgeButton/BadgeButton.js";
|
|
40
41
|
export { Board } from "./Board/Board.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAOH,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA2B,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAiC,CAAA;AAE9D,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,0BAA0B,EAC1B,iCAAiC,EACjC,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,iCAAiC,CAAA;AAKxC,OAAO,EACL,6BAA6B,EAC7B,gBAAgB,EAChB,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,sCAAsC,CAAA;AAK7C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"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,oCAAqC,CAAA"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { SlotProps } from "../slotProps.ts";
|
|
3
|
+
export type MarkdownViewProps = SlotProps & {
|
|
4
|
+
className?: string;
|
|
5
|
+
/**
|
|
6
|
+
* The accessible name of the region, as `aria-label`.
|
|
7
|
+
*
|
|
8
|
+
* Worth passing on anything that is not the only thing on the
|
|
9
|
+
* page. A read view is announced as an article, and "article" with
|
|
10
|
+
* no name tells a reader stepping through the page nothing about
|
|
11
|
+
* which article it is.
|
|
12
|
+
*/
|
|
13
|
+
label?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Called when the reader ticks a `- [ ]` box, with the **whole**
|
|
16
|
+
* next markdown document — the same shape the editors' `onChange`
|
|
17
|
+
* hands back, so the same autosave wires to both.
|
|
18
|
+
*
|
|
19
|
+
* **Passing it is what makes the checkboxes operable at all.**
|
|
20
|
+
* Leave it out and they render disabled: the state is still on
|
|
21
|
+
* screen, and nothing pretends the reader can change it. That is
|
|
22
|
+
* deliberate rather than defensive. Two of the three surfaces this
|
|
23
|
+
* component was built for — a rendered comment, and a repo file
|
|
24
|
+
* fetched at a commit hash — have nowhere to put a tick, and a
|
|
25
|
+
* checkbox that visibly toggles and then loses the change on
|
|
26
|
+
* reload is worse than one that says up front it cannot.
|
|
27
|
+
*
|
|
28
|
+
* The view still applies the tick to its own document
|
|
29
|
+
* immediately, so the box responds under the pointer. If the
|
|
30
|
+
* consumer rejects the change, the next `value` it passes puts it
|
|
31
|
+
* back.
|
|
32
|
+
*/
|
|
33
|
+
onToggleTask?: (nextValue: string) => void;
|
|
34
|
+
/**
|
|
35
|
+
* The markdown to render, and **controlled** — unlike either
|
|
36
|
+
* editor.
|
|
37
|
+
*
|
|
38
|
+
* The editors take `defaultValue` because reassigning their
|
|
39
|
+
* document from outside would throw away the undo history that
|
|
40
|
+
* belonged to it, which is a real cost and is why they ask for a
|
|
41
|
+
* `key` instead. A view has no undo history and no caret to
|
|
42
|
+
* protect, so it has nothing to lose by simply rendering what it
|
|
43
|
+
* is given: fetch a file at a different commit hash, pass the new
|
|
44
|
+
* string, and the page changes. No remount, no `key`, no stale
|
|
45
|
+
* document above a new title.
|
|
46
|
+
*/
|
|
47
|
+
value: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Rendered markdown, with no toolbar and nothing to type into.
|
|
51
|
+
*
|
|
52
|
+
* ## Why this is a component and not `isReadOnly` on the editors
|
|
53
|
+
*
|
|
54
|
+
* Both editors already have `isReadOnly`, and it means *an editor
|
|
55
|
+
* you cannot type in*: the nine formatting buttons are still in the
|
|
56
|
+
* DOM, still queryable, still in the accessibility tree, drawn in
|
|
57
|
+
* their disabled colours above a document nobody is editing. That is
|
|
58
|
+
* the right shape for a form field that is temporarily locked. It is
|
|
59
|
+
* the wrong shape for reading a file, and a `hasToolbar={false}`
|
|
60
|
+
* prop would not fix it — the type would still carry
|
|
61
|
+
* `onUploadImage`, `icons`, `placeholder` and `rawModeLabel`, none
|
|
62
|
+
* of which mean anything to a reader, and "no toolbar" would be a
|
|
63
|
+
* branch that could be got wrong rather than a thing that does not
|
|
64
|
+
* exist.
|
|
65
|
+
*
|
|
66
|
+
* So this is its own component, the way `Listbox`, `Combobox` and
|
|
67
|
+
* `Picker` are their own components rather than three modes of one.
|
|
68
|
+
* The props are the four a reader needs, and there is no code path
|
|
69
|
+
* in this file that could render a toolbar.
|
|
70
|
+
*
|
|
71
|
+
* ## Why it is in the CodeMirror subpath
|
|
72
|
+
*
|
|
73
|
+
* Because the requirement is that it renders **the same** as the
|
|
74
|
+
* editor a consumer edits the same document in — and the only way
|
|
75
|
+
* to guarantee that is to be the same code, not to be a second
|
|
76
|
+
* implementation that agrees today.
|
|
77
|
+
*
|
|
78
|
+
* A `react-markdown` reader in the main barrel was the obvious
|
|
79
|
+
* alternative and is the one that goes wrong slowly: two parsers,
|
|
80
|
+
* two table implementations, two answers to what a bare URL does,
|
|
81
|
+
* and a bug report six months later that says "the table changed
|
|
82
|
+
* when I saved it". This shares `livePreviewRanges.ts` — the 1,200
|
|
83
|
+
* lines that decide what a document *looks* like — with
|
|
84
|
+
* `MarkdownEditorCodeMirror`, and the theme with it too. There is no
|
|
85
|
+
* second renderer to keep in step.
|
|
86
|
+
*
|
|
87
|
+
* The cost is that it lives behind the same optional peers, so a
|
|
88
|
+
* consumer who wants only the reader still installs CodeMirror. That
|
|
89
|
+
* is the honest trade and it is the right way round: an app that
|
|
90
|
+
* renders markdown in three places and edits it in one should pay
|
|
91
|
+
* once.
|
|
92
|
+
*
|
|
93
|
+
* ## What differs from the editor, and why each one differs
|
|
94
|
+
*
|
|
95
|
+
* | | editor | this |
|
|
96
|
+
* | --- | --- | --- |
|
|
97
|
+
* | Toolbar | nine buttons | **none in the DOM** |
|
|
98
|
+
* | Value | `defaultValue`, uncontrolled | `value`, **controlled** |
|
|
99
|
+
* | Content role | `textbox` | **`article`** |
|
|
100
|
+
* | Headings | scaled text | scaled **and `role="heading"`** |
|
|
101
|
+
* | Links | painted span, opened by a handler | **real `<a href>`** |
|
|
102
|
+
* | Markers | revealed by the caret | never revealed |
|
|
103
|
+
* | Task boxes | always operable | **inert unless `onToggleTask`** |
|
|
104
|
+
*
|
|
105
|
+
* Every one of those follows from there being no caret. The editor
|
|
106
|
+
* paints a span instead of an anchor because an `<a href>` inside a
|
|
107
|
+
* `contenteditable` competes with the caret for the line; a document
|
|
108
|
+
* has no caret, so the link is simply a link — tabbable, activated
|
|
109
|
+
* by Enter, and copyable from the context menu. The editor reveals
|
|
110
|
+
* markup when the selection touches it because you cannot edit a URL
|
|
111
|
+
* you cannot see; there is nothing here to edit.
|
|
112
|
+
*
|
|
113
|
+
* ## Hostile markdown
|
|
114
|
+
*
|
|
115
|
+
* This renders files fetched from a git host, so the document is
|
|
116
|
+
* untrusted by default, and the answer is mostly structural rather
|
|
117
|
+
* than a sanitiser:
|
|
118
|
+
*
|
|
119
|
+
* - **Raw HTML in the source is never parsed as HTML.** There is no
|
|
120
|
+
* `innerHTML` in this subpath, no `dangerouslySetInnerHTML`, and
|
|
121
|
+
* no sanitiser to have a bug in. CodeMirror's state holds the
|
|
122
|
+
* source as *text*, and every rendered node is `createElement`
|
|
123
|
+
* plus `textContent`. A `<script>` in a fetched README is drawn
|
|
124
|
+
* as the characters `<script>`. `MarkdownView.test.tsx` asserts
|
|
125
|
+
* it against the tag most likely to be tried.
|
|
126
|
+
* - **A URL is checked before it is used as one**, because that was
|
|
127
|
+
* the one place the document reached the platform:
|
|
128
|
+
* `[click](javascript:…)` used to paint as a link and run. Both
|
|
129
|
+
* components now go through `safeUrls.ts`, which allowlists
|
|
130
|
+
* schemes the way a browser reads them.
|
|
131
|
+
* - **The reader is not a beacon.** Remote images carry
|
|
132
|
+
* `referrerpolicy="no-referrer"`, so a fetched image cannot learn
|
|
133
|
+
* which page loaded it.
|
|
134
|
+
*
|
|
135
|
+
* What is *not* claimed: this does not stop a document from linking
|
|
136
|
+
* somewhere unpleasant, and it does not fetch anything on the
|
|
137
|
+
* reader's behalf beyond the images the markdown names.
|
|
138
|
+
*/
|
|
139
|
+
export declare const MarkdownView: ({ className, label, onToggleTask, value, ...receivedSlotProps }: MarkdownViewProps) => ReactNode;
|
|
140
|
+
//# sourceMappingURL=MarkdownView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownView.d.ts","sourceRoot":"","sources":["../../src/markdownEditorCodeMirror/MarkdownView.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAOhD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;;;;;;;;;;;;;;OAkBG;IACH,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C;;;;;;;;;;;;OAYG;IACH,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AACH,eAAO,MAAM,YAAY,GAAI,iEAM1B,iBAAiB,KAAG,SAsMtB,CAAA"}
|