@estiva-app/ui 0.72.0-widgets2.2 → 0.72.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 (49) hide show
  1. package/dist/CommentHighlights.d.ts +100 -0
  2. package/dist/CommentHighlights.d.ts.map +1 -0
  3. package/dist/ComposeBox.d.ts +55 -0
  4. package/dist/ComposeBox.d.ts.map +1 -0
  5. package/dist/ComposerTriggers.d.ts.map +1 -1
  6. package/dist/SelectionToolbar.d.ts +17 -1
  7. package/dist/SelectionToolbar.d.ts.map +1 -1
  8. package/dist/editor.d.ts +3 -1
  9. package/dist/editor.d.ts.map +1 -1
  10. package/dist/editor.js +618 -217
  11. package/dist/editor.js.map +4 -4
  12. package/dist/index.js.map +1 -1
  13. package/dist/looks.d.ts +6 -0
  14. package/dist/looks.d.ts.map +1 -1
  15. package/package.json +1 -5
  16. package/registry.json +309 -3
  17. package/src/CommentHighlights.mdx +61 -0
  18. package/src/CommentHighlights.stories.tsx +72 -0
  19. package/src/CommentHighlights.test.ts +100 -0
  20. package/src/CommentHighlights.ts +413 -0
  21. package/src/ComposeBox.mdx +58 -0
  22. package/src/ComposeBox.stories.tsx +81 -0
  23. package/src/ComposeBox.tsx +183 -0
  24. package/src/ComposerTriggers.tsx +9 -3
  25. package/src/SelectionToolbar.actions.test.tsx +44 -0
  26. package/src/SelectionToolbar.mdx +1 -0
  27. package/src/SelectionToolbar.tsx +36 -2
  28. package/src/editor.ts +15 -1
  29. package/src/looks.ts +8 -0
  30. package/src/registry/app.test.ts +7 -1
  31. package/src/registry/registry.test.ts +6 -6
  32. package/stories/Choosing.mdx +2 -0
  33. package/dist/widgets-2/fixtures.d.ts +0 -102
  34. package/dist/widgets-2/fixtures.d.ts.map +0 -1
  35. package/dist/widgets-2/places.d.ts +0 -105
  36. package/dist/widgets-2/places.d.ts.map +0 -1
  37. package/dist/widgets-2/proposed.d.ts +0 -130
  38. package/dist/widgets-2/proposed.d.ts.map +0 -1
  39. package/dist/widgets-2.d.ts +0 -12
  40. package/dist/widgets-2.d.ts.map +0 -1
  41. package/dist/widgets-2.js +0 -585
  42. package/dist/widgets-2.js.map +0 -7
  43. package/src/widgets-2/fixtures.ts +0 -161
  44. package/src/widgets-2/places.tsx +0 -316
  45. package/src/widgets-2/proposed.tsx +0 -596
  46. package/src/widgets-2.ts +0 -11
  47. package/stories/widgets-2/ReadMe.mdx +0 -60
  48. package/stories/widgets-2/Widgets.stories.tsx +0 -504
  49. package/stories/widgets-2/today.tsx +0 -352
@@ -1,130 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { Status, Thing } from './fixtures';
3
- /** A status as its shape: Ship's icons, which read without colour. */
4
- export declare function StatusMark({ status }: {
5
- status: Status;
6
- }): import("react").JSX.Element;
7
- /** The icon for a kind. A page gets its own (proposed): today every app draws it as "another app's file". */
8
- export declare function ThingIcon({ kind, size, tone }: {
9
- kind: Thing['kind'];
10
- size?: 14 | 16;
11
- tone?: 'secondary' | 'inherit';
12
- }): import("react").JSX.Element;
13
- /**
14
- * Progress as a small ring with the count beside it as a label (Miky, 15 Oct,
15
- * second round: the ring with the count inside was too big).
16
- */
17
- export declare function ProgressRing({ done, total }: {
18
- done: number;
19
- total: number;
20
- }): import("react").JSX.Element;
21
- export interface ReferenceChipProps {
22
- thing: Thing;
23
- state?: 'ready' | 'loading' | 'unavailable';
24
- /** Hovering the chip shows the detailed card. */
25
- preview?: boolean;
26
- }
27
- /**
28
- * A link in running text: the icon (or the author's face), the key, the
29
- * title cut at 24ch, the status as its shape. Loading keeps the icon (the
30
- * kind is known from the address); not available says so in words.
31
- */
32
- export declare function ReferenceChip({ thing, state, preview }: ReferenceChipProps): import("react").JSX.Element;
33
- export type CardLayout = 'compact' | 'detailed';
34
- /** Compact: one 36px line. Every kind, every app. Hovering it shows the detailed card. */
35
- export declare function CompactCard({ thing, preview }: {
36
- thing: Thing;
37
- preview?: boolean;
38
- }): import("react").JSX.Element;
39
- /**
40
- * Detailed: what compact cannot hold. The header is compact's line (icon, key,
41
- * title as the link; a project's ring or a topic's members in the corner),
42
- * then the summary, the kind's own extras (a project's issues, a topic's
43
- * latest conversation), and a footer: the pickers and the comments for an
44
- * issue or a project, who and when for a page and a topic.
45
- *
46
- * `bare` drops the card's frame, for the hover preview, which draws the
47
- * package's one elevated box around it.
48
- */
49
- export declare function DetailedCard({ thing, bare, readOnly }: {
50
- thing: Thing;
51
- bare?: boolean;
52
- readOnly?: boolean;
53
- }): import("react").JSX.Element;
54
- /** The detailed card, on hover over a chip or a compact card: the package's preview card. */
55
- export declare function HoverPreview({ thing, block, children }: {
56
- thing: Thing;
57
- block?: boolean;
58
- children: ReactNode;
59
- }): import("react").JSX.Element;
60
- /** The hover preview drawn open, for a still picture of it: the same box PreviewCard draws. */
61
- export declare function HoverPreviewOpen({ thing }: {
62
- thing: Thing;
63
- }): import("react").JSX.Element;
64
- /**
65
- * A linked message, detailed: a card, the frame every other detailed card has
66
- * (Miky, 15 Oct: "card it is", over a quote). The time is the link.
67
- */
68
- export declare function MessageCard({ thing }: {
69
- thing: Thing;
70
- }): import("react").JSX.Element;
71
- /** What a kind's detailed card will hold, known before it loads (the kind is in the address). */
72
- export interface LoadingShape {
73
- subtitle?: boolean;
74
- summary?: boolean;
75
- rows?: number;
76
- preview?: boolean;
77
- ring?: boolean;
78
- footer?: 'pickers' | 'people' | 'line' | 'none';
79
- }
80
- /** The shape a thing's detailed card takes, for its placeholder. */
81
- export declare function loadingShapeOf(thing: Thing): LoadingShape;
82
- /**
83
- * Loading: the card it will become, drawn in bars, at the card's own height,
84
- * so the conversation does not jump when it arrives.
85
- */
86
- export declare function CardLoading({ kind, layout, shape }: {
87
- kind: Thing['kind'];
88
- layout: CardLayout;
89
- shape?: LoadingShape;
90
- }): import("react").JSX.Element;
91
- /**
92
- * Not available: one line, at compact's height, whichever layout was chosen.
93
- * Deleted and unreadable read the same (Widgets 2, Not in scope). Here the
94
- * way out stays: there is no title to click, and the app it lives in may
95
- * still open it for you.
96
- */
97
- export declare function CardUnavailable({ kind, noun, app }: {
98
- kind: Thing['kind'];
99
- noun: string;
100
- app: string;
101
- }): import("react").JSX.Element;
102
- /**
103
- * A block of a description, shared live (a part). No compact or detailed:
104
- * a pasted block link inserts the part itself (the-author-chooses-a-links-card,
105
- * Accepted). The same header as a detailed card: the key and the title of
106
- * the file it is part of, as the link.
107
- */
108
- export declare function PartCard({ kind, heading, partKey, children, state, noun, app }: {
109
- kind: Thing['kind'];
110
- heading: string;
111
- partKey?: string;
112
- children?: ReactNode;
113
- state?: 'ready' | 'loading' | 'unavailable';
114
- noun: string;
115
- app: string;
116
- }): import("react").JSX.Element;
117
- /**
118
- * A comment's anchor: the part it is about, quoted above the comment.
119
- * Unchanged from today (the two apps already agree), with the deleted line in
120
- * the same muted voice as "not available.".
121
- */
122
- export declare function CommentAnchor({ text }: {
123
- text?: string;
124
- }): import("react").JSX.Element;
125
- /** An attachment's chip: a paperclip and the file's name. */
126
- export declare function AttachmentChip({ name, state }: {
127
- name: string;
128
- state?: 'ready' | 'loading' | 'unavailable';
129
- }): import("react").JSX.Element;
130
- //# sourceMappingURL=proposed.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proposed.d.ts","sourceRoot":"","sources":["../../src/widgets-2/proposed.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAatC,OAAO,KAAK,EAAE,MAAM,EAAgB,KAAK,EAAE,MAAM,YAAY,CAAA;AAc7D,sEAAsE;AACtE,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,+BAOxD;AAQD,6GAA6G;AAC7G,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,IAAS,EAAE,IAAkB,EAAE,EAAE;IAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,C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OAAO,GAAG,SAAS,GAAG,aAAa,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,+BAalP;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,+BAOxD;AAID,6DAA6D;AAC7D,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,KAAe,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,aAAa,CAAA;CAAE,+BAoBtH"}
@@ -1,12 +0,0 @@
1
- /**
2
- * `@estiva-app/ui/widgets-2` — the Widgets 2 prototype, unlisted (WID-3).
3
- *
4
- * Published only as a `concept` prerelease from `concept/widgets-2`, so Peek,
5
- * Ship and Leaf can draw every place a widget appears in their own Storybooks
6
- * from one copy, the one Katerina's look pass changes. Never in a release: the
7
- * build project shapes the real exports once the stories are approved.
8
- */
9
- export * from './widgets-2/proposed';
10
- export * from './widgets-2/fixtures';
11
- export * from './widgets-2/places';
12
- //# sourceMappingURL=widgets-2.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"widgets-2.d.ts","sourceRoot":"","sources":["../src/widgets-2.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA"}