@estiva-app/ui 0.101.0 → 0.102.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/AskedBlocks.d.ts +30 -0
  2. package/dist/AskedBlocks.d.ts.map +1 -0
  3. package/dist/DeletedNotice.d.ts +17 -0
  4. package/dist/DeletedNotice.d.ts.map +1 -0
  5. package/dist/DocumentEditor.d.ts +39 -6
  6. package/dist/DocumentEditor.d.ts.map +1 -1
  7. package/dist/LinkRow.d.ts +9 -10
  8. package/dist/LinkRow.d.ts.map +1 -1
  9. package/dist/NoAccessNotice.d.ts +13 -0
  10. package/dist/NoAccessNotice.d.ts.map +1 -0
  11. package/dist/PartCard.d.ts +3 -3
  12. package/dist/PartCard.d.ts.map +1 -1
  13. package/dist/editor.d.ts +1 -1
  14. package/dist/editor.d.ts.map +1 -1
  15. package/dist/editor.js +311 -8
  16. package/dist/editor.js.map +4 -4
  17. package/dist/index.d.ts +2 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +117 -82
  20. package/dist/index.js.map +4 -4
  21. package/dist/linked.d.ts +4 -2
  22. package/dist/linked.d.ts.map +1 -1
  23. package/dist/linkedFrom.d.ts.map +1 -1
  24. package/package.json +1 -1
  25. package/registry.json +83 -7
  26. package/src/AskedBlocks.ts +158 -0
  27. package/src/DeletedNotice.mdx +43 -0
  28. package/src/DeletedNotice.stories.tsx +29 -0
  29. package/src/DeletedNotice.test.tsx +46 -0
  30. package/src/DeletedNotice.tsx +47 -0
  31. package/src/DocumentEditor.mdx +5 -1
  32. package/src/DocumentEditor.stories.tsx +84 -0
  33. package/src/DocumentEditor.test.tsx +188 -0
  34. package/src/DocumentEditor.tsx +294 -14
  35. package/src/LinkCard.test.tsx +4 -6
  36. package/src/LinkCard.tsx +1 -1
  37. package/src/LinkRow.mdx +1 -1
  38. package/src/LinkRow.stories.tsx +3 -3
  39. package/src/LinkRow.test.tsx +2 -2
  40. package/src/LinkRow.tsx +13 -20
  41. package/src/NoAccessNotice.mdx +40 -0
  42. package/src/NoAccessNotice.stories.tsx +17 -0
  43. package/src/NoAccessNotice.tsx +18 -0
  44. package/src/PartCard.test.tsx +2 -2
  45. package/src/PartCard.tsx +5 -4
  46. package/src/editor.ts +1 -0
  47. package/src/index.ts +2 -0
  48. package/src/linked.ts +4 -2
  49. package/src/linkedFrom.test.tsx +9 -7
  50. package/src/linkedFrom.ts +4 -3
  51. package/src/registry/registry.test.ts +4 -4
  52. package/stories/Choosing.mdx +2 -0
package/src/LinkRow.mdx CHANGED
@@ -17,7 +17,7 @@ A link alone on its line: its kind in a file's tile, the title and its key under
17
17
  - **width** — at most 480px, in a box being written in too.
18
18
  - **unread** — the count is brighter, with its dot.
19
19
  - **loading** — the row in bars, in the row's own shape.
20
- - **unavailable** — a row's shape, "Issue not available", with where it may still open (`openIn`): a small `Button` "Open" with an open-out icon, a link to a new tab, the app in its name and tooltip ("Open in Ship"), as Peek's file header has it. It is the one way there: the words are not a link. This is also what a card draws when it is not available: **LinkUnavailable**, from this file.
20
+ - **unavailable** — not the reader's to see: a row's shape, "You can't open this issue", and no way out, since there is nothing for them to open (`openIn` is no longer drawn). This is also what a card draws when it is not available: **LinkUnavailable**, from this file. The page the link opens draws **NoAccessNotice**, in the same words.
21
21
  - **deleted** — `deleted` on the state, when a trusted deletion names it (SPEC §13.6.1): the same row, "Issue deleted", and no way out.
22
22
  - **written as a URL** — `url` on the state: the URL as it was written, a plain link in the row's place, deleted or not available alike (SPEC §13.1).
23
23
 
@@ -50,12 +50,12 @@ export const Deleted: Story = { args: { link: DELETED } }
50
50
  /** Written as a URL that cannot be shown: it stays that URL, a plain link, in the row's place. */
51
51
  export const WrittenAsAUrl: Story = { args: { link: WRITTEN_AS_A_URL } }
52
52
 
53
- /** The not-available line on its own, as a card or a part draws it too; without `openIn`, no way out. */
53
+ /** The not-available line on its own, as a card or a part draws it too, and the deleted one: no way out from either. */
54
54
  export const NotAvailableLine: Story = {
55
55
  render: () => (
56
56
  <div className="flex flex-col gap-2">
57
- <LinkUnavailable kind="issue" noun="Issue" openIn={{ app: 'App one', href: '#elsewhere' }} />
58
- <LinkUnavailable kind="page" noun="Document" />
57
+ <LinkUnavailable kind="issue" noun="Item" />
58
+ <LinkUnavailable kind="page" noun="Item" deleted />
59
59
  </div>
60
60
  ),
61
61
  }
@@ -31,9 +31,9 @@ describe('LinkRow', () => {
31
31
  expect(screen.queryByRole('link')).toBeNull()
32
32
  })
33
33
 
34
- it('says it is not available in one line', () => {
34
+ it('says you cannot open it, in one line', () => {
35
35
  render(<LinkRow link={UNAVAILABLE} />)
36
- expect(screen.getByText('Issue not available')).toBeTruthy()
36
+ expect(screen.getByText("You can't open this issue")).toBeTruthy()
37
37
  })
38
38
 
39
39
  it('says its count whole, one comment or several, never the figure run into the noun', () => {
package/src/LinkRow.tsx CHANGED
@@ -9,10 +9,8 @@
9
9
  * At most 480px wide, as a card is, in a box being written in too.
10
10
  */
11
11
  import { useContext } from 'react'
12
- import { IconExternalLink } from '@tabler/icons-react'
13
12
  import { Avatar } from './Avatar'
14
13
  import { AvatarGroup } from './AvatarGroup'
15
- import { Button } from './Button'
16
14
  import { Card } from './Card'
17
15
  import { cn } from './cn'
18
16
  import { Link } from './Link'
@@ -21,13 +19,14 @@ import { CommentCount, kindNounOf, LinkedIcon, LinkTile, ProgressRing, StatusMar
21
19
  import { LinkPreview } from './LinkPreview'
22
20
  import { TIME_CLASSES, TYPE_TILE_CLASSES } from './looks'
23
21
  import { SkeletonBar } from './Skeleton'
24
- import { WithTooltip } from './Tooltip'
25
22
 
26
23
  export interface LinkUnavailableProps {
27
24
  kind: LinkedKind
28
- /** What it is, in a word: "Issue". Drawn as "Issue not available". */
25
+ /** What it is, in a word: "Issue". Drawn as "You can't open this issue", or "Issue deleted". */
29
26
  noun: string
30
- /** Where it may still open, for someone who can: its app and address. */
27
+ /** `noun` is its app's name ("App one"), its type having none: kept as written, "You can't open this App one". */
28
+ named?: boolean
29
+ /** @deprecated Not drawn since 0.102.0: someone who can't open it has nowhere to go. */
31
30
  openIn?: { app: string; href: string }
32
31
  /** In a card's place: a card's 12px round it. Default a row's. */
33
32
  card?: boolean
@@ -42,15 +41,18 @@ const ROW_CLASSES = 'flex items-center gap-3 p-1.5 pr-3'
42
41
  * Not available: not this reader's to see, or deleted, which says so (SPEC
43
42
  * §13.6.1: deleted is not not-permitted). Drawn as the row or the card it
44
43
  * would have been, on the same fill and edge (Katerina, 29 Oct: "same styling
45
- * as the linkcard default"), its words muted. The way out stays, since the app
46
- * it lives in may still open it for you; a deleted one has none.
44
+ * as the linkcard default"), its words muted. Not this reader's: "You can't
45
+ * open this issue", the approved story's words, with no way out, since there
46
+ * is nothing for them to open (Miky, ALO-4's review, 3 November).
47
47
  */
48
- export function LinkUnavailable({ kind, noun, openIn, card = false, deleted = false }: LinkUnavailableProps) {
49
- return <UnavailableRow kind={kind} words={`${noun} ${deleted ? 'deleted' : 'not available'}`} openIn={deleted ? undefined : openIn} card={card} />
48
+ export function LinkUnavailable({ kind, noun, named = false, card = false, deleted = false }: LinkUnavailableProps) {
49
+ // A word ("Issue") reads in the sentence in small letters; an app's name ("Peek", "Estiva Ship") keeps its own.
50
+ const word = !named && /^[A-Z][a-z]*$/.test(noun) ? noun.toLowerCase() : noun
51
+ return <UnavailableRow kind={kind} words={deleted ? `${noun} deleted` : `You can't open this ${word}`} card={card} />
50
52
  }
51
53
 
52
54
  /** The not-available row with the words it is given; `href` makes the words a link (a part that can't be shown opens its whole file). */
53
- export function UnavailableRow({ kind, words, href, openIn, card = false }: { kind: LinkedKind; words: string; href?: string; openIn?: { app: string; href: string }; card?: boolean }) {
55
+ export function UnavailableRow({ kind, words, href, card = false }: { kind: LinkedKind; words: string; href?: string; card?: boolean }) {
54
56
  const wide = useContext(inTheBox)
55
57
  return (
56
58
  <Card fill={wide ? 'elevated' : 'inset'} className={cn(card ? 'flex items-center gap-3 p-3' : ROW_CLASSES, 'max-w-[480px]')}>
@@ -66,15 +68,6 @@ export function UnavailableRow({ kind, words, href, openIn, card = false }: { ki
66
68
  words
67
69
  )}
68
70
  </span>
69
- {/* The kit's Button as a link, as Peek's file header has it (Katerina, 31 Oct): "Open", the app in its name and
70
- tooltip, in place of a text link with a typed arrow. */}
71
- {openIn && (
72
- <WithTooltip label={`Open in ${openIn.app}`}>
73
- <Button href={openIn.href} external size="small" className="shrink-0" leadingIcon={<IconExternalLink stroke={1.5} className="size-3.5" />} aria-label={`Open in ${openIn.app}`}>
74
- Open
75
- </Button>
76
- </WithTooltip>
77
- )}
78
71
  </Card>
79
72
  )
80
73
  }
@@ -124,7 +117,7 @@ export function LinkRow({ link, preview = true }: LinkRowProps) {
124
117
  }
125
118
  if (link.state === 'unavailable') {
126
119
  if (link.url) return <WrittenUrl url={link.url} block />
127
- return <LinkUnavailable kind={link.kind} noun={link.noun} openIn={link.openIn} deleted={link.deleted} />
120
+ return <LinkUnavailable kind={link.kind} noun={link.noun} named={link.named} deleted={link.deleted} />
128
121
  }
129
122
  const { linked } = link
130
123
  const status = chosenOf(linked.status)
@@ -0,0 +1,40 @@
1
+ import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks'
2
+ import * as Stories from './NoAccessNotice.stories'
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # NoAccessNotice
7
+
8
+ Where a link to a file you can't read opens: "You can't open this …", and no title.
9
+
10
+ <Canvas of={Stories.Page} />
11
+
12
+ ## When
13
+
14
+ - The page a link opens, when the file is not yours to read. The page holds the line alone.
15
+
16
+ ## When not
17
+
18
+ - Under a message → **LinkRow** or **LinkCard** with the link unavailable: the same words, on the link's own card.
19
+ - A file that was deleted → **DeletedNotice**, which says who deleted it.
20
+ - A page with nothing in it yet → **EmptyState**.
21
+
22
+ ## How
23
+
24
+ ```tsx
25
+ import { NoAccessNotice } from '@estiva-app/ui'
26
+
27
+ <NoAccessNotice what="page" />
28
+ ```
29
+
30
+ - `what` is the kind of file, in the app's words. Never pass its title: the line exists so a link tells someone who can't read the file nothing about it.
31
+
32
+ ## What it owns
33
+
34
+ | It does | So you never write | Refused when written by hand |
35
+ |---|---|---|
36
+ | The line, its lock and its place, the same in every app | the sentence | |
37
+
38
+ ## Props
39
+
40
+ <Controls />
@@ -0,0 +1,17 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite'
2
+ import { NoAccessNotice } from './NoAccessNotice'
3
+
4
+ /** Where a link to a file you can't read opens. */
5
+ const meta = {
6
+ title: 'Status & feedback/NoAccessNotice',
7
+ component: NoAccessNotice,
8
+ parameters: { layout: 'padded' },
9
+ args: { what: 'item' },
10
+ decorators: [(Story) => <div className="max-w-xl">{Story()}</div>],
11
+ } satisfies Meta<typeof NoAccessNotice>
12
+
13
+ export default meta
14
+ type Story = StoryObj<typeof meta>
15
+
16
+ /** Where the link opens: the page holds the line alone. */
17
+ export const Page: Story = {}
@@ -0,0 +1,18 @@
1
+ import { IconLock } from '@tabler/icons-react'
2
+ import { EmptyState } from './EmptyState'
3
+
4
+ export interface NoAccessNoticeProps {
5
+ /** What the link names, in the app's words: "project", "page". The line never says which one: no title. */
6
+ what: string
7
+ }
8
+
9
+ /**
10
+ * Where a link to a file you can't read opens: "You can't open this …", with no title, so a link tells someone who
11
+ * can't read the file nothing about it (the story `Project changes`, approved 2 November). Under a message the same
12
+ * moment is `LinkRow`'s and `LinkCard`'s own card, in the same words (Miky, ALO-4's review, 3 November).
13
+ *
14
+ * why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/a-file-is-named-by-its-id-in-a-capital-and-small-tag.md
15
+ */
16
+ export function NoAccessNotice({ what }: NoAccessNoticeProps) {
17
+ return <EmptyState scope="page" icon={<IconLock size={16} stroke={1.5} />} message={`You can't open this ${what}`} />
18
+ }
@@ -31,9 +31,9 @@ describe('PartCard', () => {
31
31
  tall.mockRestore()
32
32
  })
33
33
 
34
- it('says a part is not available in words', () => {
34
+ it('says a part you cannot read is a file you cannot open', () => {
35
35
  render(<PartCard state="unavailable" kind="issue" noun="Issue" />)
36
- expect(screen.getByText('A part of this issue not available')).toBeTruthy()
36
+ expect(screen.getByText("You can't open this issue")).toBeTruthy()
37
37
  })
38
38
 
39
39
  it('says what became of a part in the SPEC’s words: deleted with its file, its block deleted, or no part to show', () => {
package/src/PartCard.tsx CHANGED
@@ -42,9 +42,9 @@ export interface PartCardProps {
42
42
  href?: string
43
43
  /** The key of what it is part of: "ABC-2". */
44
44
  partKey?: string
45
- /** What it is part of, in a word, for "A part of this issue not available". Absent, its kind's word. */
45
+ /** What it is part of, in a word, for "You can't open this issue". Absent, its kind's word. */
46
46
  noun?: string
47
- /** Where it may still open, for someone who can, when it is not available. */
47
+ /** @deprecated Not drawn since 0.102.0: someone who can't open it has nowhere to go. */
48
48
  openIn?: { app: string; href: string }
49
49
  /** The part's blocks, drawn by the app. */
50
50
  children?: ReactNode
@@ -52,12 +52,13 @@ export interface PartCardProps {
52
52
  maxHeight?: number
53
53
  }
54
54
 
55
- export function PartCard({ state = 'ready', kind, heading, href, partKey, noun, openIn, children, maxHeight }: PartCardProps) {
55
+ export function PartCard({ state = 'ready', kind, heading, href, partKey, noun, children, maxHeight }: PartCardProps) {
56
56
  const word = noun ?? kindNounOf({ kind }) ?? 'File'
57
57
  const boxed = useContext(inTheBox)
58
58
  if (state === 'loading') return <LinkCardLoading kind={kind} shape={{ summary: true, rows: 0, footer: 'none' }} />
59
59
  if (state === 'unavailable' || state === 'deleted') {
60
- return <LinkUnavailable kind={kind} noun={`A part of this ${word.toLowerCase()}`} openIn={openIn} deleted={state === 'deleted'} card />
60
+ // A part you can't read is one whose file you can't read: "You can't open this issue".
61
+ return <LinkUnavailable kind={kind} noun={state === 'deleted' ? `A part of this ${word.toLowerCase()}` : word} deleted={state === 'deleted'} card />
61
62
  }
62
63
  // The SPEC's words (§13.6.1): what it is part of is still there; the part is not, or cannot be one.
63
64
  if (state === 'detached') return <UnavailableRow kind={kind} words="This part was deleted" card />
package/src/editor.ts CHANGED
@@ -116,6 +116,7 @@ export { ReferenceMenu, ReferenceMenuView, isReferenceMenuOpen, referenceMenuCli
116
116
  export {
117
117
  DocumentEditor,
118
118
  type DocumentEditorProps,
119
+ type DocumentAsks,
119
120
  type DocumentCodec,
120
121
  type DocumentReferences,
121
122
  type DocumentMentions,
package/src/index.ts CHANGED
@@ -154,6 +154,8 @@ export { ResolveDialog, type ResolveDialogProps } from './ResolveDialog'
154
154
  export { PinnedComment, type PinnedCommentProps } from './PinnedComment'
155
155
  export { ArchiveDialog, type ArchiveDialogProps } from './ArchiveDialog'
156
156
  export { ArchivedNotice, type ArchivedNoticeProps } from './ArchivedNotice'
157
+ export { DeletedNotice, type DeletedNoticeProps } from './DeletedNotice'
158
+ export { NoAccessNotice, type NoAccessNoticeProps } from './NoAccessNotice'
157
159
  export { Thread, type ThreadProps, type ThreadStart } from './Thread'
158
160
  export { useSeenOnScreen, type SeenOnScreen } from './seenOnScreen'
159
161
  export { showInConversation, showInConversationWhenDrawn, type ShowOptions, type ShowWhenDrawnOptions } from './showInConversation'
package/src/linked.ts CHANGED
@@ -147,7 +147,7 @@ export interface LoadingShape {
147
147
  /**
148
148
  * Where a link's lookup stands. `loading` knows the kind from the address, and
149
149
  * a shape when the app remembers one; `unavailable` is not the reader's to see
150
- * ("Issue not available"), or `deleted` ("Issue deleted"), which a reader tells
150
+ * ("You can't open this issue"), or `deleted` ("Issue deleted"), which a reader tells
151
151
  * apart by a deletion naming the address (SPEC §13.6.1: deleted is not
152
152
  * not-permitted). Written as a URL, it is that URL either way (`url`).
153
153
  */
@@ -158,7 +158,9 @@ export type LinkState =
158
158
  kind: LinkedKind
159
159
  /** What it is, in a word: "Item". */
160
160
  noun: string
161
- /** Where it may still open for someone who can: the app that owns it, and its address. */
161
+ /** `noun` is its app's name ("Notes"), its type having none: kept as written, never "this notes". */
162
+ named?: boolean
163
+ /** @deprecated Not drawn since 0.102.0: someone who can't open it has nowhere to go (Miky, ALO-4's review). */
162
164
  openIn?: { app: string; href: string }
163
165
  /** Deleted, as a trusted deletion naming its address says (SPEC §13.6.1): "Issue deleted", with no way out. */
164
166
  deleted?: boolean
@@ -224,24 +224,26 @@ describe('when it changed, and who made it', () => {
224
224
  })
225
225
 
226
226
  describe('a file the reader cannot read', () => {
227
- it('is not available, and opens in its app only at an https address', () => {
227
+ it('says you cannot open it, with nowhere to go, even where its app names an address', () => {
228
228
  const stub: LinkedSource = { ...GROUP, unreachable: true, noun: 'group', appName: 'App one', openUrl: 'https://app.example/x' }
229
229
  render(<LinkCard link={linkStateFrom(stub, UNREAD, options())} />)
230
- expect(screen.getByText(/Group not available/)).toBeTruthy()
231
- expect(screen.getByRole('link', { name: /App one/ }).getAttribute('href')).toBe('https://app.example/x')
232
- cleanup()
233
- render(<LinkCard link={linkStateFrom({ ...stub, openUrl: 'javascript:alert(1)' }, UNREAD, options())} />)
230
+ expect(screen.getByText("You can't open this group")).toBeTruthy()
234
231
  expect(screen.queryByRole('link')).toBeNull()
235
232
  })
236
233
 
237
234
  it('is named by its app when its type has no name, as the record a-file-is-labelled-by-its-type-not-its-app says', () => {
238
235
  render(<LinkCard link={linkStateFrom({ ...GROUP, unreachable: true, appName: 'App one' }, { kind: 'file', noun: 'Record' }, options())} />)
239
- expect(screen.getByText('App one not available')).toBeTruthy()
236
+ expect(screen.getByText("You can't open this App one")).toBeTruthy()
237
+ })
238
+
239
+ it('keeps a one-word app name as it is written: "this Peek", never "this peek"', () => {
240
+ render(<LinkCard link={linkStateFrom({ ...GROUP, unreachable: true, appName: 'Peek' }, { kind: 'file', noun: 'Record' }, options())} />)
241
+ expect(screen.getByText("You can't open this Peek")).toBeTruthy()
240
242
  })
241
243
 
242
244
  it('reads as the address says while it loads and when nothing came back', () => {
243
245
  render(<LinkCard link={linkStateFrom(null, { kind: 'file', noun: 'Record' }, options())} />)
244
- expect(screen.getByText('Record not available')).toBeTruthy()
246
+ expect(screen.getByText("You can't open this record")).toBeTruthy()
245
247
  })
246
248
 
247
249
  it('says it was deleted when a trusted deletion names it, and offers no way out', () => {
package/src/linkedFrom.ts CHANGED
@@ -328,12 +328,13 @@ export function linkStateFrom<T extends LinkedSource>(
328
328
  const written = unread.url ? { url: unread.url } : {}
329
329
  if (object === null) return { state: 'unavailable', kind: unread.kind, noun: unread.noun, ...(unread.deleted ? { deleted: true } : {}), ...written }
330
330
  if (object.unreachable) {
331
- const href = object.openUrl && /^https:\/\//i.test(object.openUrl) ? object.openUrl : undefined
331
+ const noun = nounOf(object)
332
332
  return {
333
333
  state: 'unavailable',
334
334
  kind: linkedKindOfKind(object.kind),
335
- noun: nounOf(object) || unread.noun,
336
- ...(href ? { openIn: { app: object.appName ?? 'its app', href } } : {}),
335
+ noun: noun || unread.noun,
336
+ // Its app's name, its type having none: "You can't open this Notes", not "this notes".
337
+ ...(noun && !object.noun ? { named: true } : {}),
337
338
  ...written,
338
339
  }
339
340
  }
@@ -48,19 +48,19 @@ describe('the registry builds', () => {
48
48
  expect(registry.entries.map((one) => one.name).sort()).toEqual(values.map((one) => one.name).sort())
49
49
  })
50
50
 
51
- it('counts 243 names over 123 files: 160 components, 76 helpers and 7 hooks (useFormBusy, whether a Form around it is sending, read by the editor’s DocumentField from the main entry, in the review of 2 November; useLeftAt, sendsInLayout, useSeenOnScreen, showInConversation and showInConversationWhenDrawn, where a conversation scrolls, what was seen and a link landing on a comment, moved from Peek for every app, on 2 November; useRememberedOpen, the fold a section remembers, read by the app, and NAV_TREE_PENDING_MS and isPlainClick, Peek’s Folder timer and plain-click check, moved in, on 2 November; FormDialog, MoveDialog and ArchiveDialog, the dialogs Peek wired by hand, on 2 November; ConversationPlace, the line saying where a comment was said, and DocumentField, a rich-text field of a form, moved from Peek, on 2 November; ArchivedNotice, the card on an archived file, from Peek, Ship and Leaf, on 31 October; caretOnOpen, the box at a thread’s foot taking the caret when a ConversationLayout opens it, without scrolling, on 31 October; the conversation from Peek for every app, with PageHeader and PinnedComment, on 31 October, and ResolutionNote and ResolutionHistory gone with the resolved looks not picked, on 1 November; useSidebarFold, a folded sidebar kept folded in every app, on 31 October; cardShapeMemory, a card’s last shape on this device, lifted from Peek and Ship for Leaf, and ReferenceCards and useReferenceCards gone with their deprecated page, in the widget review, on 30 October; inTheBox, a card or part in a box being written in, on the files’ fill and in words, on 29 October; archivedLine, the line on an archived file in every app (PEEKM-2), on 23 October; keepCommentBoxWarm, a box built ahead, exported as 0.84.0 promised (PEEKM-1), on 21 October;linkedFrom and linkStateFrom, one card for a file in every app (5ebf2756), on 21 October; ComposeBox, ComposeKeys and COMPOSE_EDITOR_CLASSES gone into CommentBox’s own frame (one box), on 21 October; LinkPlaces with linkPlaceAt and staysChip, a link in a document drawn where it sits (WBD-4), on 20 October; DocumentEditor, one document editor for every app, and PersonReference, `@` in a document (WBD-3), on 20 October; toggleTableHeaderRow, a table’s header row on and off (LEAF-12), on 19 October;EntryShell, the screen while nobody is signed in, moved from Peek (AUT-3), on 17 October; CommentBox with commentBoxRows, and ReactionRow with AddReactionButton and whoReacted, the shared comment box and reaction row (COMM-2), on 17 October; the link widgets — LinkChip, LinkRow, LinkCard, CardUnder, PartCard, LinkPreview and their parts, with useCanHover, chosenOf, loadingShapeOf and unavailableMemory — from the Widgets 2 prototype, on 16 October; InlineText, a title or the line under it edited where it stands (SUM-4), on 16 October; ComposeBox with ComposeKeys and its classes, CommentHighlights with its five helpers, and keepSelection and releaseSelection, from the Leaf prototype (LEAF-4), on 16 October;NavTree, NavTreeSection, the composer triggers and UnreadDot joined on 2 October; BlockHandle and EditorBlockHandle (RIC-18) on 2 October, moveBlock and blockDropCursor, the drop in the gutter, on 5 October, MembersPill and MembersDialog, moved from Peek (SHI-31), on 6 October, ShowMore on 7 October, AppProvider on 8 October, and KindIcon, thingKindOf and PastedImages with its two helpers, moved from Peek, on 8 October; CodeBlockColours, the coloured code block of the editor, on 9 October; Checklist, Callout, isChecklistTick and calloutLook (RIC-19) on 13 October; EditorTableControls and its four actions (RIC-21) on 13 October; ReferenceCards, useReferenceCards and its three helpers, the card a chip in a document asks for, on 14 October; LinkChips and its two helpers, a URL in a document read as its chip, on 14 October; ReferenceMenu, ReferenceMenuView and three helpers, the menu of a chip while writing, on 14 October; PastedMarkdown, markdown pasted as the blocks it spells (LEAF-10), on 15 October; turnIntoRows, turnListInto and turnQuoteInto, the block menu’s Turn into for a list and a quote (LEAF-11), on 15 October)', () => {
51
+ it('counts 245 names over 125 files: 162 components, 76 helpers and 7 hooks (DeletedNotice and NoAccessNotice, the cards on a deleted file and on one you cannot open (ALO-4), on 3 November; useFormBusy, whether a Form around it is sending, read by the editor’s DocumentField from the main entry, in the review of 2 November; useLeftAt, sendsInLayout, useSeenOnScreen, showInConversation and showInConversationWhenDrawn, where a conversation scrolls, what was seen and a link landing on a comment, moved from Peek for every app, on 2 November; useRememberedOpen, the fold a section remembers, read by the app, and NAV_TREE_PENDING_MS and isPlainClick, Peek’s Folder timer and plain-click check, moved in, on 2 November; FormDialog, MoveDialog and ArchiveDialog, the dialogs Peek wired by hand, on 2 November; ConversationPlace, the line saying where a comment was said, and DocumentField, a rich-text field of a form, moved from Peek, on 2 November; ArchivedNotice, the card on an archived file, from Peek, Ship and Leaf, on 31 October; caretOnOpen, the box at a thread’s foot taking the caret when a ConversationLayout opens it, without scrolling, on 31 October; the conversation from Peek for every app, with PageHeader and PinnedComment, on 31 October, and ResolutionNote and ResolutionHistory gone with the resolved looks not picked, on 1 November; useSidebarFold, a folded sidebar kept folded in every app, on 31 October; cardShapeMemory, a card’s last shape on this device, lifted from Peek and Ship for Leaf, and ReferenceCards and useReferenceCards gone with their deprecated page, in the widget review, on 30 October; inTheBox, a card or part in a box being written in, on the files’ fill and in words, on 29 October; archivedLine, the line on an archived file in every app (PEEKM-2), on 23 October; keepCommentBoxWarm, a box built ahead, exported as 0.84.0 promised (PEEKM-1), on 21 October;linkedFrom and linkStateFrom, one card for a file in every app (5ebf2756), on 21 October; ComposeBox, ComposeKeys and COMPOSE_EDITOR_CLASSES gone into CommentBox’s own frame (one box), on 21 October; LinkPlaces with linkPlaceAt and staysChip, a link in a document drawn where it sits (WBD-4), on 20 October; DocumentEditor, one document editor for every app, and PersonReference, `@` in a document (WBD-3), on 20 October; toggleTableHeaderRow, a table’s header row on and off (LEAF-12), on 19 October;EntryShell, the screen while nobody is signed in, moved from Peek (AUT-3), on 17 October; CommentBox with commentBoxRows, and ReactionRow with AddReactionButton and whoReacted, the shared comment box and reaction row (COMM-2), on 17 October; the link widgets — LinkChip, LinkRow, LinkCard, CardUnder, PartCard, LinkPreview and their parts, with useCanHover, chosenOf, loadingShapeOf and unavailableMemory — from the Widgets 2 prototype, on 16 October; InlineText, a title or the line under it edited where it stands (SUM-4), on 16 October; ComposeBox with ComposeKeys and its classes, CommentHighlights with its five helpers, and keepSelection and releaseSelection, from the Leaf prototype (LEAF-4), on 16 October;NavTree, NavTreeSection, the composer triggers and UnreadDot joined on 2 October; BlockHandle and EditorBlockHandle (RIC-18) on 2 October, moveBlock and blockDropCursor, the drop in the gutter, on 5 October, MembersPill and MembersDialog, moved from Peek (SHI-31), on 6 October, ShowMore on 7 October, AppProvider on 8 October, and KindIcon, thingKindOf and PastedImages with its two helpers, moved from Peek, on 8 October; CodeBlockColours, the coloured code block of the editor, on 9 October; Checklist, Callout, isChecklistTick and calloutLook (RIC-19) on 13 October; EditorTableControls and its four actions (RIC-21) on 13 October; ReferenceCards, useReferenceCards and its three helpers, the card a chip in a document asks for, on 14 October; LinkChips and its two helpers, a URL in a document read as its chip, on 14 October; ReferenceMenu, ReferenceMenuView and three helpers, the menu of a chip while writing, on 14 October; PastedMarkdown, markdown pasted as the blocks it spells (LEAF-10), on 15 October; turnIntoRows, turnListInto and turnQuoteInto, the block menu’s Turn into for a list and a quote (LEAF-11), on 15 October)', () => {
52
52
  // The reconciliation GATES.md §24 explains. If this changes, that changes.
53
53
  // The `EDITOR_EXTENSIONS` count as components by their names; they are
54
54
  // editor extensions, documented on SelectionToolbar's, BlockNodes' and
55
55
  // ComposerTriggers' pages.
56
56
  const kinds = registry.entries.reduce<Record<string, number>>((all, one) => ({ ...all, [one.kind]: (all[one.kind] ?? 0) + 1 }), {})
57
- expect(kinds).toEqual({ component: 160, helper: 76, hook: 7 })
58
- expect(new Set(registry.entries.map((one) => one.sourceFile)).size).toBe(123)
57
+ expect(kinds).toEqual({ component: 162, helper: 76, hook: 7 })
58
+ expect(new Set(registry.entries.map((one) => one.sourceFile)).size).toBe(125)
59
59
  })
60
60
 
61
61
  it('gives every entry a purpose, from its own page or from the comment above it', () => {
62
62
  expect(registry.entries.filter((one) => one.purpose.trim() === '')).toEqual([])
63
- expect(registry.entries.filter((one) => one.purposeFrom === 'page').length).toBe(110)
63
+ expect(registry.entries.filter((one) => one.purposeFrom === 'page').length).toBe(112)
64
64
  expect(registry.entries.filter((one) => one.purposeFrom === 'comment').length).toBe(133)
65
65
  })
66
66
 
@@ -156,6 +156,8 @@ The same conversation in every app; only its colours are each app's.
156
156
  | It happened, and must not be missed | **Toast** with `durationMs: 0` and an action — it floats and stays until dismissed (D21) |
157
157
  | The whole surface has something to say | **Banner** — the strip under the top bar, full width; `onDismiss` if the reader closes it rather than the app |
158
158
  | The file is archived | **ArchivedNotice** — the grey card at the top of its page and in the comment box's place: who, when, the resolution, and Unarchive |
159
+ | The file was deleted, and a link to it opens | **DeletedNotice** — the same card: who deleted it, when, and Restore for someone who may edit it |
160
+ | A link names a file the person can't read | **NoAccessNotice** — "You can't open this …", no title, on the page a link opens; under a message, **LinkRow** or **LinkCard** unavailable says the same |
159
161
  | A part that breaks without taking the page with it | **ErrorBoundary** — around each column, panel or conversation, and once around the app; `label` says what it holds |
160
162
 
161
163
  ## The frame