@estiva-app/ui 0.66.0 → 0.68.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.
Files changed (54) hide show
  1. package/dist/BlockNodes.d.ts +12 -1
  2. package/dist/BlockNodes.d.ts.map +1 -1
  3. package/dist/EditorTableControls.d.ts +38 -0
  4. package/dist/EditorTableControls.d.ts.map +1 -0
  5. package/dist/LinkChips.d.ts +82 -0
  6. package/dist/LinkChips.d.ts.map +1 -0
  7. package/dist/NavItem.d.ts +11 -1
  8. package/dist/NavItem.d.ts.map +1 -1
  9. package/dist/ReferenceCards.d.ts +77 -0
  10. package/dist/ReferenceCards.d.ts.map +1 -0
  11. package/dist/ReferenceMenu.d.ts +18 -0
  12. package/dist/ReferenceMenu.d.ts.map +1 -0
  13. package/dist/RichText.d.ts +9 -2
  14. package/dist/RichText.d.ts.map +1 -1
  15. package/dist/SelectionToolbar.d.ts +9 -1
  16. package/dist/SelectionToolbar.d.ts.map +1 -1
  17. package/dist/editor.d.ts +4 -0
  18. package/dist/editor.d.ts.map +1 -1
  19. package/dist/editor.js +750 -27
  20. package/dist/editor.js.map +4 -4
  21. package/dist/index.js +62 -33
  22. package/dist/index.js.map +4 -4
  23. package/package.json +2 -1
  24. package/registry.json +414 -4
  25. package/src/BlockNodes.test.tsx +2 -1
  26. package/src/BlockNodes.tsx +51 -9
  27. package/src/EditorTableControls.mdx +78 -0
  28. package/src/EditorTableControls.stories.tsx +63 -0
  29. package/src/EditorTableControls.test.tsx +288 -0
  30. package/src/EditorTableControls.tsx +255 -0
  31. package/src/LinkChips.mdx +57 -0
  32. package/src/LinkChips.stories.tsx +67 -0
  33. package/src/LinkChips.test.tsx +178 -0
  34. package/src/LinkChips.ts +243 -0
  35. package/src/NavItem.mdx +10 -0
  36. package/src/NavItem.stories.tsx +23 -1
  37. package/src/NavItem.test.tsx +36 -0
  38. package/src/NavItem.tsx +40 -16
  39. package/src/ReferenceCards.mdx +79 -0
  40. package/src/ReferenceCards.stories.tsx +64 -0
  41. package/src/ReferenceCards.test.tsx +143 -0
  42. package/src/ReferenceCards.ts +225 -0
  43. package/src/ReferenceMenu.mdx +75 -0
  44. package/src/ReferenceMenu.stories.tsx +59 -0
  45. package/src/ReferenceMenu.test.tsx +289 -0
  46. package/src/ReferenceMenu.tsx +346 -0
  47. package/src/RichText.test.tsx +17 -0
  48. package/src/RichText.tsx +36 -4
  49. package/src/SelectionToolbar.tsx +10 -2
  50. package/src/editor.ts +14 -0
  51. package/src/pages.test.ts +3 -0
  52. package/src/registry/registry.test.ts +7 -7
  53. package/src/registry/siblings.test.ts +2 -2
  54. package/stories/Choosing.mdx +4 -0
@@ -44,9 +44,10 @@ import { type Transaction } from '@tiptap/pm/state';
44
44
  * loaded from a stored document has none.
45
45
  */
46
46
  export declare const BlockId: Extension<any, any>;
47
- /** What a reference's view is handed: the `nostr:` URI it stands for. */
47
+ /** What a reference's view is handed: the `nostr:` URI it stands for, and the URL a URL chip was written as. */
48
48
  export interface ReferenceViewProps {
49
49
  uri: string;
50
+ href?: string;
50
51
  }
51
52
  export interface ReferenceNodeOptions {
52
53
  /**
@@ -62,6 +63,16 @@ export interface ReferenceNodeOptions {
62
63
  * nobody edits half a `naddr`. Selecting it selects the whole reference, which
63
64
  * is also how deleting one works. `marks` carries the run's other marks, so a
64
65
  * bold reference comes back bold.
66
+ *
67
+ * `embed` is the card its writer chose to draw after its block — `compact`,
68
+ * `detailed`, or null for none (SPEC §13.3, "A reference's card") — and `extra`
69
+ * every key of the mark this version does not know. Both are declared so that
70
+ * ProseMirror keeps them: an undeclared attribute is dropped when the node is
71
+ * made, and the card with it. `ReferenceCards` draws the cards.
72
+ *
73
+ * `href` makes it a **URL chip**: an app URL that reads as the chip of what it
74
+ * names, and is that URL on the wire (§13.3). `uri` is what it names, filled in
75
+ * by `LinkChips` once the app has resolved it; until then it draws as the URL.
65
76
  */
66
77
  export declare const ReferenceNode: Node<ReferenceNodeOptions, any>;
67
78
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"BlockNodes.d.ts","sourceRoot":"","sources":["../src/BlockNodes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAa,IAAI,EAAe,MAAM,cAAc,CAAA;AAEtE,OAAO,EAAuC,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAgRxF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,OAAO,qBA+ClB,CAAA;AAEF,yEAAyE;AACzE,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,IAAI,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAA;CAC/C;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,iCAgCxB,CAAA;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,gBAqBvB,CAAA;AAgBF,uEAAuE;AACvE,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC,8FAA8F;IAC9F,IAAI,EAAE,aAAa,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAA;CAChD;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,kCAqCzB,CAAA;AAIF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAEjE;AAsFD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,SAAS,qBA+EpB,CAAA;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,qBAkBlB,CAAA"}
1
+ {"version":3,"file":"BlockNodes.d.ts","sourceRoot":"","sources":["../src/BlockNodes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,SAAS,EAAa,IAAI,EAAe,MAAM,cAAc,CAAA;AAEtE,OAAO,EAAuC,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAiRxF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,OAAO,qBA+ClB,CAAA;AAKF,gHAAgH;AAChH,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,IAAI,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAA;CAC/C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,aAAa,iCA2DxB,CAAA;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,gBAqBvB,CAAA;AAgBF,uEAAuE;AACvE,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC,8FAA8F;IAC9F,IAAI,EAAE,aAAa,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAA;CAChD;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,kCAqCzB,CAAA;AAIF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAEjE;AAsFD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,SAAS,qBA+EpB,CAAA;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,qBAkBlB,CAAA"}
@@ -0,0 +1,38 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { Editor } from '@tiptap/core';
3
+ export interface EditorTableControlsProps {
4
+ /** The editor, with TableKit (`@tiptap/extension-table`) in its extensions. Not editable, or not there yet: no controls. */
5
+ editor: Editor | null;
6
+ /** The `EditorContent`. */
7
+ children: ReactNode;
8
+ className?: string;
9
+ }
10
+ /**
11
+ * The cell's row, or the whole table when it is its only one: a table holds at
12
+ * least one row (prosemirror-tables refuses to delete it). Deleting the header
13
+ * row makes the next row the header, so the table still opens with one.
14
+ */
15
+ export declare function deleteTableRow(editor: Editor, cell: HTMLTableCellElement): boolean;
16
+ /** The same for a column: the last one deletes the table. */
17
+ export declare function deleteTableColumn(editor: Editor, cell: HTMLTableCellElement): boolean;
18
+ /** A row after the last one: the ➕ under the table. */
19
+ export declare function appendTableRow(editor: Editor, table: HTMLTableElement): boolean;
20
+ /** A column after the last one: the ➕ right of the table. */
21
+ export declare function appendTableColumn(editor: Editor, table: HTMLTableElement): boolean;
22
+ /**
23
+ * A table's own controls in an editor, as in Notion: point at a cell and a
24
+ * handle sits on its row's left edge and on its column's top edge; press one
25
+ * for Insert above and below (left and right), Delete, and Delete table. On
26
+ * the last row a ➕ bar under the table adds a row, and on the last column one
27
+ * right of it adds a column. Tab in
28
+ * the last cell adds a row too — that is TableKit's own.
29
+ *
30
+ * Deleting a table's only row or only column deletes the table, which cannot
31
+ * be left with none.
32
+ *
33
+ * Built on the editor library's own table commands; the controls are ours.
34
+ * Wrap the `EditorContent` in it, inside an `EditorBlockHandle` if there is
35
+ * one: the block handle stays the table's, in the gutter.
36
+ */
37
+ export declare function EditorTableControls({ editor, children, className }: EditorTableControlsProps): import("react").JSX.Element;
38
+ //# sourceMappingURL=EditorTableControls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorTableControls.d.ts","sourceRoot":"","sources":["../src/EditorTableControls.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACjG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAS1C,MAAM,WAAW,wBAAwB;IACvC,4HAA4H;IAC5H,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,2BAA2B;IAC3B,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAwCD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAMlF;AAED,6DAA6D;AAC7D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAGrF;AAED,uDAAuD;AACvD,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAG/E;AAED,6DAA6D;AAC7D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAIlF;AA2BD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,wBAAwB,+BA8H5F"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * An app URL in a document reads as the chip of what it names — SPEC §13.3,
3
+ * "A reference's card", and §7.7.
4
+ *
5
+ * The URL stays the URL: the chip is the `reference` node with `href` set (a
6
+ * URL chip, `ReferenceNode`), which a document writes back as the URL it was,
7
+ * plain text with no card and a `link` mark with one. Never a `nostr:`
8
+ * reference in its place: the URL is how a person addresses the object.
9
+ *
10
+ * What a URL names is the app's to say — its manifests and its relay — so the
11
+ * app hands this extension two functions: `referenceOf`, what it has resolved
12
+ * so far, and `ask`, to look up the URLs it has not. A URL that names nothing,
13
+ * or whose answer has not come back, stays text; when `ask` settles the
14
+ * document is looked at again.
15
+ *
16
+ * The URL being typed stays text while the caret is in it or at its end, so a
17
+ * half-typed address never turns into a chip under the person's fingers. A
18
+ * pasted URL is whole, so it is asked about and made a chip at once, the caret
19
+ * still at its end — where `ReferenceMenu` opens its menu.
20
+ */
21
+ import { Extension, type Editor } from '@tiptap/core';
22
+ import type { Node as PmNode } from '@tiptap/pm/model';
23
+ import { type Selection } from '@tiptap/pm/state';
24
+ export interface LinkChipsOptions {
25
+ /**
26
+ * The `nostr:` reference an app URL names, from what the app has resolved
27
+ * (§7.7) — protocol's `referenceOfLink(url, resolveLink)`. Undefined while it
28
+ * names nothing, or its answer has not come back.
29
+ */
30
+ referenceOf: ((url: string) => string | undefined) | null;
31
+ /** Look up what these URLs name. When it settles, the document is looked at again. */
32
+ ask: ((urls: string[]) => Promise<unknown> | void) | null;
33
+ /**
34
+ * How many URLs one editor asks about in its life, the first ones; the rest
35
+ * stay text. An app's answer can cost a relay query, and a document pasted
36
+ * full of links must not spend the writer's quota. Default 24.
37
+ */
38
+ limit: number;
39
+ }
40
+ /** The meta on the transaction that made chips: `{ pasted }`. */
41
+ export declare const CHIPS_MADE = "linkChipsMade";
42
+ interface Found {
43
+ /** Text URLs that name something: made chips. */
44
+ chips: {
45
+ from: number;
46
+ to: number;
47
+ url: string;
48
+ uri: string;
49
+ marks: string[];
50
+ pasted: boolean;
51
+ }[];
52
+ /** URL chips whose URL is answered now: given their reference. */
53
+ fills: {
54
+ pos: number;
55
+ uri: string;
56
+ }[];
57
+ /** Every URL still waiting for an answer, or naming nothing. */
58
+ open: string[];
59
+ }
60
+ /** Where something was pasted: a URL wholly inside one was not typed, so the caret at its end does not hold it as text. */
61
+ export interface PastedRange {
62
+ from: number;
63
+ to: number;
64
+ }
65
+ /**
66
+ * What to change in a document, and what to ask. `selection` null treats no
67
+ * URL as being typed; a URL inside one of `pasted` is never being typed.
68
+ */
69
+ export declare function findLinkChips(doc: PmNode, selection: Selection | null, referenceOf: LinkChipsOptions['referenceOf'], pasted?: readonly PastedRange[]): Found;
70
+ /**
71
+ * Look at the document again — after the app learned what more URLs name some
72
+ * other way. Dispatches only when there is a chip to make: an empty
73
+ * transaction would wake every other plugin (a trailing paragraph appears).
74
+ */
75
+ export declare function refreshLinkChips(editor: Editor): void;
76
+ /**
77
+ * Turns the app URLs in a document into URL chips. Pair it with `ReferenceNode`;
78
+ * `ReferenceCards` then draws a card a URL chip asks for.
79
+ */
80
+ export declare const LinkChips: Extension<LinkChipsOptions, any>;
81
+ export {};
82
+ //# sourceMappingURL=LinkChips.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkChips.d.ts","sourceRoot":"","sources":["../src/LinkChips.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,KAAK,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAuC,KAAK,SAAS,EAAoB,MAAM,kBAAkB,CAAA;AAExG,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,WAAW,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC,GAAG,IAAI,CAAA;IACzD,sFAAsF;IACtF,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAA;IACzD;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAA;CACd;AAUD,iEAAiE;AACjE,eAAO,MAAM,UAAU,kBAAkB,CAAA;AA4BzC,UAAU,KAAK;IACb,iDAAiD;IACjD,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;IACjG,kEAAkE;IAClE,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACrC,gEAAgE;IAChE,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,2HAA2H;AAC3H,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;CACX;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,EAAE,WAAW,EAAE,gBAAgB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAE,SAAS,WAAW,EAAO,GAAG,KAAK,CAmChK;AAoBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAMrD;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,kCAyEpB,CAAA"}
package/dist/NavItem.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
+ import type { SectionAction } from './SectionHeader';
2
3
  /**
3
4
  * One row of a sidebar: a label, an optional count, an active state
4
5
  * (Ship's NavItem, 2026-09-02, verbatim).
@@ -23,6 +24,13 @@ import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
23
24
  * link, like the ⋮. The rows slide as `CollapsibleSection`'s do, indented
24
25
  * past the icon so their icons start under this row's label.
25
26
  *
27
+ * `action` is one button of its own beside the ⋮ — any icon, with its tooltip
28
+ * (Katerina, 14 October: Peek's Open work keeps its ✕ "Remove from list" in
29
+ * sight, not inside a menu). The same shape as a `SectionHeader`'s actions,
30
+ * and drawn the same way: an `IconButton` that shows with the ⋮, in the
31
+ * count's place, before the ⋮ when there is one. One, never a row of them: a
32
+ * second thing to do goes in the menu.
33
+ *
26
34
  * `hint` is shown only while the row is pointed at or focused, left of the
27
35
  * count — a neutral `Chip`, typically. It takes its own room while it shows,
28
36
  * so the label ends with "…" before it instead of running under it.
@@ -50,6 +58,8 @@ export interface NavItemProps extends Omit<ComponentPropsWithoutRef<'a'>, 'href'
50
58
  menu?: ReactNode;
51
59
  /** The ⋮'s accessible name and tooltip. Default "More options for {label}". */
52
60
  menuLabel?: string;
61
+ /** One button beside the ⋮, shown with it: any 16px icon, its tooltip and its handler — a `SectionHeader` action's shape. With a menu too, it sits before the ⋮. */
62
+ action?: SectionAction;
53
63
  /** Shown only while the row is pointed at or focused, left of the count: a neutral `Chip`, typically. */
54
64
  hint?: ReactNode;
55
65
  /** Something new here: brighter words, the label in medium, and the `UnreadDot` at the right. Say so in the row's own words for assistive tech too. */
@@ -65,5 +75,5 @@ export interface NavItemProps extends Omit<ComponentPropsWithoutRef<'a'>, 'href'
65
75
  onOpenChange?: (open: boolean) => void;
66
76
  className?: string;
67
77
  }
68
- export declare function NavItem({ label, href, count, countLabel, active, icon, menu, menuLabel, hint, unread, urgent, children, defaultOpen, open: openProp, onOpenChange, className, onClick, ...props }: NavItemProps): import("react").JSX.Element;
78
+ export declare function NavItem({ label, href, count, countLabel, active, icon, menu, menuLabel, action, hint, unread, urgent, children, defaultOpen, open: openProp, onOpenChange, className, onClick, ...props }: NavItemProps): import("react").JSX.Element;
69
79
  //# sourceMappingURL=NavItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavItem.d.ts","sourceRoot":"","sources":["../src/NavItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAWtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5F,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAA;IAC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AM,GAAG,UAAU,CAAC;IAC5F,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,wBAAwB;IACxB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,4GAA4G;IAC5G,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,oKAAoK;IACpK,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,yGAAyG;IACzG,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,uJAAuJ;IACvJ,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,6HAA6H;IAC7H,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,mDAAmD;IACnD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kDAAkD;IAClD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,UAAU,EACV,MAAc,EACd,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,MAAM,EACN,IAAI,EACJ,MAAc,EACd,MAAc,EACd,QAAQ,EACR,WAAkB,EAClB,IAAI,EAAE,QAAQ,EACd,YAAY,EACZ,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,YAAY,+BAwKd"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * The cards a block document's writer chose, drawn after the line that holds
3
+ * each reference — SPEC §13.3, "A reference's card".
4
+ *
5
+ * The choice is `embed` on the `reference` node (`ReferenceNode`), so the card
6
+ * moves and goes with its chip. What a card looks like is the app's — it knows
7
+ * how to resolve an object and draw its row or its card — so this extension
8
+ * draws nothing itself: after every textblock whose chips ask for a card it
9
+ * places one empty, non-editable slot, and `useReferenceCards` hands the app
10
+ * those slots to portal its cards into. A portal, rather than a React root per
11
+ * slot, keeps the app's providers around the card.
12
+ *
13
+ * **A slot keeps its element while its block lives.** It is keyed by the
14
+ * nearest block id (the `blockId` attribute), so typing above a card does not
15
+ * re-make its element, and the card does not reload on every keystroke.
16
+ *
17
+ * The slot sits at the end of the textblock, inside it: a paragraph's card is
18
+ * under the paragraph, a list item's under the item at its indent, a table
19
+ * cell's in the cell.
20
+ */
21
+ import { Extension, type Editor } from '@tiptap/core';
22
+ import type { Node as PmNode } from '@tiptap/pm/model';
23
+ import { type EditorState } from '@tiptap/pm/state';
24
+ /** A layout a writer can choose; `none` is no card. */
25
+ export type ReferenceCardLayout = 'none' | 'compact' | 'detailed';
26
+ /** One card to draw: the reference's `nostr:` URI and how much to show. */
27
+ export interface ReferenceCard {
28
+ uri: string;
29
+ layout: Exclude<ReferenceCardLayout, 'none'>;
30
+ }
31
+ /** One slot: where an app draws the cards of one line. */
32
+ export interface ReferenceCardSlot {
33
+ key: string;
34
+ element: HTMLElement;
35
+ cards: ReferenceCard[];
36
+ }
37
+ interface Placement {
38
+ key: string;
39
+ /** The end of the textblock's content, where the slot goes. */
40
+ pos: number;
41
+ cards: ReferenceCard[];
42
+ }
43
+ /** Every line that asks for a card, in document order. */
44
+ export declare function referenceCardPlacements(doc: PmNode): Placement[];
45
+ interface ReferenceCardsStorage {
46
+ /** One element per slot key, made once and reused, so the app's portal stays put. */
47
+ elements: Map<string, HTMLElement>;
48
+ }
49
+ /**
50
+ * Places a slot after each line whose chips ask for a card. Pair it with
51
+ * `ReferenceNode`, and draw the cards with `useReferenceCards`.
52
+ */
53
+ export declare const ReferenceCards: Extension<Record<string, never>, ReferenceCardsStorage>;
54
+ /**
55
+ * The slots to draw cards into, kept current as the document changes. Draw
56
+ * each with `createPortal(<cards/>, slot.element)`, keyed by `slot.key`.
57
+ */
58
+ export declare function useReferenceCards(editor: Editor | null): ReferenceCardSlot[];
59
+ /**
60
+ * The chip the person has selected, with what it names and its card — or null.
61
+ *
62
+ * Selected as a node (a click, where a click on the chip does not follow its
63
+ * link), or inside a selected range that holds that one chip and nothing but
64
+ * spaces besides (Shift+arrow over it, or a drag across it): an app whose chip
65
+ * is a link has no other way to select it.
66
+ */
67
+ export declare function referenceAtSelection(state: EditorState): {
68
+ pos: number;
69
+ uri: string;
70
+ layout: ReferenceCardLayout;
71
+ } | null;
72
+ /** Sets the card of the selected chip. `none` removes it. The selection stays as it was. */
73
+ export declare function setReferenceCard(editor: Editor, layout: ReferenceCardLayout): boolean;
74
+ /** Sets the card of the chip at `pos` — one that names something. `none` removes it. The selection stays as it was. */
75
+ export declare function setReferenceCardAt(editor: Editor, pos: number, layout: ReferenceCardLayout): boolean;
76
+ export {};
77
+ //# sourceMappingURL=ReferenceCards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReferenceCards.d.ts","sourceRoot":"","sources":["../src/ReferenceCards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,KAAK,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAoC,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAIrF,uDAAuD;AACvD,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAA;AAEjE,2EAA2E;AAC3E,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAA;CAC7C;AAED,0DAA0D;AAC1D,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,WAAW,CAAA;IACpB,KAAK,EAAE,aAAa,EAAE,CAAA;CACvB;AAED,UAAU,SAAS;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,+DAA+D;IAC/D,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,aAAa,EAAE,CAAA;CACvB;AAQD,0DAA0D;AAC1D,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,CAuBhE;AAED,UAAU,qBAAqB;IAC7B,qFAAqF;IACrF,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;CACnC;AAmBD;;;GAGG;AACH,eAAO,MAAM,cAAc,yDA+BzB,CAAA;AAEF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,iBAAiB,EAAE,CAyB5E;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,mBAAmB,CAAA;CAAE,GAAG,IAAI,CA2BzH;AAED,4FAA4F;AAC5F,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAGrF;AAED,uHAAuH;AACvH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CASpG"}
@@ -0,0 +1,18 @@
1
+ import { Extension, type Editor } from '@tiptap/core';
2
+ import { type EditorState } from '@tiptap/pm/state';
3
+ /** Whether the menu is open, for an editor's own Escape: while it is, Escape closes it rather than leaving. */
4
+ export declare function isReferenceMenuOpen(state: EditorState): boolean;
5
+ /**
6
+ * A click on the chip at `pos`, from its node view: while editing, with the
7
+ * menu installed, it opens the menu, and the caller stops the click there.
8
+ * Returns false when the click should go on to the chip.
9
+ */
10
+ export declare function referenceMenuClick(editor: Editor, pos: number): boolean;
11
+ /** Which chip the menu is open on: see the module comment. */
12
+ export declare const ReferenceMenu: Extension<any, any>;
13
+ export interface ReferenceMenuViewProps {
14
+ editor: Editor | null;
15
+ }
16
+ /** The menu `ReferenceMenu` holds, hung under its chip. Render it always, beside `EditorContent`. */
17
+ export declare function ReferenceMenuView({ editor }: ReferenceMenuViewProps): import("react").JSX.Element;
18
+ //# sourceMappingURL=ReferenceMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReferenceMenu.d.ts","sourceRoot":"","sources":["../src/ReferenceMenu.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAAE,SAAS,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAA;AAErD,OAAO,EAAmD,KAAK,WAAW,EAAoB,MAAM,kBAAkB,CAAA;AAmHtH,+GAA+G;AAC/G,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAMvE;AAWD,8DAA8D;AAC9D,eAAO,MAAM,aAAa,qBAuExB,CAAA;AAUF,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAED,qGAAqG;AACrG,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,EAAE,sBAAsB,+BAyFnE"}
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
2
  /**
3
3
  * Formatted text, drawn: headings, paragraphs, lists, a quote, code, a divider,
4
4
  * a table and links.
@@ -75,6 +75,13 @@ export interface RichTextProps {
75
75
  * `undefined` to leave it to the part, which draws its words.
76
76
  */
77
77
  renderBlock?: (block: RichTextBlock) => ReactNode | undefined;
78
+ /**
79
+ * Draws something after a line of text: after a paragraph, a heading or a
80
+ * quote, and inside a list item or a table cell after its words — where a
81
+ * document's chip asks for its card (SPEC §13.3). Asked of every such line;
82
+ * return nothing for most.
83
+ */
84
+ renderAfter?: (block: RichTextBlock) => ReactNode;
78
85
  /**
79
86
  * Ticks or unticks a checklist item, by its block id: its box is then a
80
87
  * control, one click where the text is read. Without it the box is a picture
@@ -89,5 +96,5 @@ export interface RichTextProps {
89
96
  export declare function richTextClassName(size?: RichTextSize, className?: string): string;
90
97
  /** The tone a callout is drawn in: its own, or `note` for one this part does not know (§13.3). */
91
98
  export declare function calloutLook(tone: string): string;
92
- export declare function RichText({ blocks, size, renderText, renderReference, renderBlock, onTick, }: RichTextProps): import("react").JSX.Element | null;
99
+ export declare function RichText({ blocks, size, renderText, renderReference, renderBlock, renderAfter, onTick, }: RichTextProps): import("react").JSX.Element | null;
93
100
  //# sourceMappingURL=RichText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../src/RichText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,OAAO,CAAA;AAMlD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,yEAAyE;AACzE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,0DAA0D;AAC1D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sEAAsE;IACtE,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;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C,IAAI,EAAE,MAAM,KAAK,SAAS,CAAA;IACxC,mEAAmE;IACnE,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,KAAK,SAAS,CAAA;IACpE;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,SAAS,GAAG,SAAS,CAAA;IAC7D;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,SAAS,CAAA;IACjD;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CACrD;AA6CD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,YAAwB,EAAE,SAAS,CAAC,EAAE,MAAM,UAGnF;AAmDD,kGAAkG;AAClG,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGhD;AA6ND,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,IAAgB,EAChB,UAA2B,EAC3B,eAA+C,EAC/C,WAAW,EACX,WAAW,EACX,MAAM,GACP,EAAE,aAAa,sCAQf"}
@@ -1,3 +1,4 @@
1
+ import { type ReactNode } from 'react';
1
2
  import type { Editor } from '@tiptap/react';
2
3
  import { Extension } from '@tiptap/core';
3
4
  import { PluginKey } from '@tiptap/pm/state';
@@ -57,6 +58,13 @@ export interface SelectionToolbarProps {
57
58
  marks?: readonly MarkId[];
58
59
  /** The Link button and its address field. Needs a link mark in the editor and `KeptSelection`. Default off. */
59
60
  link?: boolean;
61
+ /**
62
+ * More of the strip, after the marks: the app's own `ToolbarButton`s for what
63
+ * is selected — a chip's card, say. Each keeps the selection by preventing
64
+ * its press's default, as the marks do. Nothing is added when it renders
65
+ * nothing.
66
+ */
67
+ children?: ReactNode;
60
68
  }
61
- export declare function SelectionToolbar({ editor, marks, link }: SelectionToolbarProps): import("react").JSX.Element | null;
69
+ export declare function SelectionToolbar({ editor, marks, link, children }: SelectionToolbarProps): import("react").JSX.Element | null;
62
70
  //# sourceMappingURL=SelectionToolbar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionToolbar.d.ts","sourceRoot":"","sources":["../src/SelectionToolbar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAU,SAAS,EAAE,MAAM,kBAAkB,CAAA;AASpD;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;CACX;AAED,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB,6BAAmD,CAAA;AAEhF,mGAAmG;AACnG,eAAO,MAAM,aAAa,qBA8BxB,CAAA;AAEF,iEAAiE;AACjE,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,QAG3C;AAED,yDAAyD;AACzD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,QAG9C;AAED,oCAAoC;AACpC,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAE9D;AAED,wGAAwG;AACxG,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,CAAA;AAkB7D,iFAAiF;AACjF,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGlD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMxD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAQ9D;AA2ED,MAAM,WAAW,qBAAqB;IACpC,2EAA2E;IAC3E,MAAM,EAAE,M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AAG,IAAI,CAMxD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAQ9D;AA2ED,MAAM,WAAW,qBAAqB;IACpC,2EAA2E;IAC3E,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,gFAAgF;IAChF,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACzB,+GAA+G;IAC/G,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,KAAuC,EAAE,IAAY,EAAE,QAAQ,EAAE,EAAE,qBAAqB,sCAsQlI"}
package/dist/editor.d.ts CHANGED
@@ -12,6 +12,10 @@ export { PastedImages, pastedImages, pastedImageName, type PastedImagesOptions,
12
12
  export { CodeBlockColours } from './CodeBlockColours';
13
13
  export { suggestionPopup, isSuggestionActive, isSuggestionOpen, type SuggestionPopupOptions } from './suggestionPopup';
14
14
  export { EditorBlockHandle, blockDropCursor, deleteBlock, moveBlock, duplicateBlock, startBlockDrag, type EditorBlockHandleProps, type BlockTurnInto } from './EditorBlockHandle';
15
+ export { EditorTableControls, appendTableRow, appendTableColumn, deleteTableRow, deleteTableColumn, type EditorTableControlsProps } from './EditorTableControls';
15
16
  export { PersonMention, UrgentPersonMention, CaptionedReference, ReferenceTrigger, SlashCommands, peopleMenu, referenceMenu, filterPeople, urgentPubkeys, filterReferences, formatSection, applyFormat, typeTrigger, filterSlashSections, FORMATS, type MentionPerson, type PersonMentionOptions, type CaptionedItem, type CaptionedReferenceOptions, type ReferenceTriggerOptions, type ReferenceMenuOptions, type SlashCommand, type SlashSection, type SlashCommandsOptions, type FormatId, type FormatDef, type CodeFormat, } from './ComposerTriggers';
16
17
  export { BlockId, Checklist, Callout, isChecklistTick, UnknownBlock, ReferenceNode, AttachmentNode, type ReferenceNodeOptions, type ReferenceViewProps, type AttachmentNodeOptions, type AttachmentViewProps, } from './BlockNodes';
18
+ export { ReferenceCards, useReferenceCards, referenceAtSelection, referenceCardPlacements, setReferenceCard, setReferenceCardAt, type ReferenceCard, type ReferenceCardLayout, type ReferenceCardSlot, } from './ReferenceCards';
19
+ export { LinkChips, findLinkChips, refreshLinkChips, type LinkChipsOptions, type PastedRange } from './LinkChips';
20
+ export { ReferenceMenu, ReferenceMenuView, isReferenceMenuOpen, referenceMenuClick, type ReferenceMenuViewProps } from './ReferenceMenu';
17
21
  //# sourceMappingURL=editor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../src/editor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,KAAK,MAAM,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC5H,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,KAAK,mBAAmB,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAC5H,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AACtH,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,sBAAsB,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACjL,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,aAAa,EACb,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,OAAO,EACP,KAAK,aAAa,EAClB,KAAK,oBA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