@estiva-app/ui 0.98.0 → 0.99.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 (193) hide show
  1. package/README.md +1 -1
  2. package/dist/AppProvider.d.ts +6 -3
  3. package/dist/AppProvider.d.ts.map +1 -1
  4. package/dist/ArchiveDialog.d.ts +35 -0
  5. package/dist/ArchiveDialog.d.ts.map +1 -0
  6. package/dist/AttachedCard.d.ts +13 -2
  7. package/dist/AttachedCard.d.ts.map +1 -1
  8. package/dist/Card.d.ts +6 -1
  9. package/dist/Card.d.ts.map +1 -1
  10. package/dist/ChipInput.d.ts +3 -1
  11. package/dist/ChipInput.d.ts.map +1 -1
  12. package/dist/CollapsibleSection.d.ts +27 -2
  13. package/dist/CollapsibleSection.d.ts.map +1 -1
  14. package/dist/CommentBox.d.ts +2 -2
  15. package/dist/CommentBox.d.ts.map +1 -1
  16. package/dist/ConfirmDialog.d.ts +15 -2
  17. package/dist/ConfirmDialog.d.ts.map +1 -1
  18. package/dist/ConversationCard.d.ts +6 -1
  19. package/dist/ConversationCard.d.ts.map +1 -1
  20. package/dist/ConversationLayout.d.ts +19 -4
  21. package/dist/ConversationLayout.d.ts.map +1 -1
  22. package/dist/ConversationPlace.d.ts +17 -0
  23. package/dist/ConversationPlace.d.ts.map +1 -0
  24. package/dist/DocumentEditor.d.ts +38 -0
  25. package/dist/DocumentEditor.d.ts.map +1 -1
  26. package/dist/DocumentField.d.ts +50 -0
  27. package/dist/DocumentField.d.ts.map +1 -0
  28. package/dist/EditableText.d.ts +38 -4
  29. package/dist/EditableText.d.ts.map +1 -1
  30. package/dist/EmptyState.d.ts +10 -5
  31. package/dist/EmptyState.d.ts.map +1 -1
  32. package/dist/FormDialog.d.ts +38 -0
  33. package/dist/FormDialog.d.ts.map +1 -0
  34. package/dist/InlineText.d.ts.map +1 -1
  35. package/dist/MoveDialog.d.ts +61 -0
  36. package/dist/MoveDialog.d.ts.map +1 -0
  37. package/dist/NavItem.d.ts +9 -2
  38. package/dist/NavItem.d.ts.map +1 -1
  39. package/dist/NavTree.d.ts +16 -3
  40. package/dist/NavTree.d.ts.map +1 -1
  41. package/dist/PinnedComment.d.ts +3 -1
  42. package/dist/PinnedComment.d.ts.map +1 -1
  43. package/dist/ReactionHorizon.d.ts +5 -1
  44. package/dist/ReactionHorizon.d.ts.map +1 -1
  45. package/dist/ResolveDialog.d.ts +3 -1
  46. package/dist/ResolveDialog.d.ts.map +1 -1
  47. package/dist/SelectionToolbar.d.ts +2 -2
  48. package/dist/Thread.d.ts +6 -3
  49. package/dist/Thread.d.ts.map +1 -1
  50. package/dist/commentBoxFrame.d.ts.map +1 -1
  51. package/dist/conversation.examples.d.ts +4 -1
  52. package/dist/conversation.examples.d.ts.map +1 -1
  53. package/dist/conversationScroll.d.ts +80 -0
  54. package/dist/conversationScroll.d.ts.map +1 -0
  55. package/dist/editor.d.ts +1 -0
  56. package/dist/editor.d.ts.map +1 -1
  57. package/dist/editor.js +228 -69
  58. package/dist/editor.js.map +4 -4
  59. package/dist/eslint/index.js +2 -2
  60. package/dist/eslint/index.js.map +2 -2
  61. package/dist/eslint/no-field-outside-a-form.d.ts +2 -2
  62. package/dist/eslint/no-field-outside-a-form.d.ts.map +1 -1
  63. package/dist/eslint/no-native-title.d.ts +1 -1
  64. package/dist/eslint/no-native-title.d.ts.map +1 -1
  65. package/dist/formBusy.d.ts +5 -2
  66. package/dist/formBusy.d.ts.map +1 -1
  67. package/dist/index.d.ts +14 -6
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +2210 -1458
  70. package/dist/index.js.map +4 -4
  71. package/dist/looks.d.ts +8 -0
  72. package/dist/looks.d.ts.map +1 -1
  73. package/dist/seenOnScreen.d.ts +27 -0
  74. package/dist/seenOnScreen.d.ts.map +1 -0
  75. package/dist/showInConversation.d.ts +31 -0
  76. package/dist/showInConversation.d.ts.map +1 -0
  77. package/dist/threadCard.d.ts +13 -0
  78. package/dist/threadCard.d.ts.map +1 -1
  79. package/package.json +1 -1
  80. package/registry.json +904 -139
  81. package/src/AppProvider.mdx +4 -0
  82. package/src/AppProvider.test.tsx +34 -2
  83. package/src/AppProvider.tsx +17 -6
  84. package/src/ArchiveDialog.mdx +70 -0
  85. package/src/ArchiveDialog.stories.tsx +64 -0
  86. package/src/ArchiveDialog.test.tsx +90 -0
  87. package/src/ArchiveDialog.tsx +70 -0
  88. package/src/AttachedCard.mdx +6 -0
  89. package/src/AttachedCard.stories.tsx +9 -1
  90. package/src/AttachedCard.test.tsx +111 -2
  91. package/src/AttachedCard.tsx +77 -7
  92. package/src/Card.mdx +20 -1
  93. package/src/Card.stories.tsx +20 -0
  94. package/src/Card.test.tsx +87 -1
  95. package/src/Card.tsx +51 -3
  96. package/src/ChipInput.mdx +7 -1
  97. package/src/ChipInput.stories.tsx +9 -0
  98. package/src/ChipInput.test.tsx +42 -0
  99. package/src/ChipInput.tsx +7 -3
  100. package/src/CollapsibleSection.mdx +20 -1
  101. package/src/CollapsibleSection.stories.tsx +19 -1
  102. package/src/CollapsibleSection.test.tsx +85 -2
  103. package/src/CollapsibleSection.tsx +54 -15
  104. package/src/CommentBox.mdx +2 -1
  105. package/src/CommentBox.test.tsx +81 -1
  106. package/src/CommentBox.tsx +32 -11
  107. package/src/ConfirmDialog.mdx +25 -3
  108. package/src/ConfirmDialog.stories.tsx +27 -0
  109. package/src/ConfirmDialog.test.tsx +87 -1
  110. package/src/ConfirmDialog.tsx +39 -8
  111. package/src/ConversationCard.mdx +4 -0
  112. package/src/ConversationCard.stories.tsx +11 -1
  113. package/src/ConversationCard.test.tsx +116 -0
  114. package/src/ConversationCard.tsx +53 -36
  115. package/src/ConversationLayout.mdx +30 -4
  116. package/src/ConversationLayout.scroll.test.tsx +411 -0
  117. package/src/ConversationLayout.stories.tsx +79 -1
  118. package/src/ConversationLayout.test.tsx +79 -0
  119. package/src/ConversationLayout.tsx +136 -15
  120. package/src/ConversationPlace.mdx +53 -0
  121. package/src/ConversationPlace.stories.tsx +48 -0
  122. package/src/ConversationPlace.test.tsx +51 -0
  123. package/src/ConversationPlace.tsx +30 -0
  124. package/src/DocumentEditor.mdx +2 -1
  125. package/src/DocumentEditor.tsx +118 -64
  126. package/src/DocumentField.mdx +83 -0
  127. package/src/DocumentField.stories.tsx +110 -0
  128. package/src/DocumentField.test.tsx +281 -0
  129. package/src/DocumentField.tsx +199 -0
  130. package/src/EditableText.buttons.test.tsx +318 -0
  131. package/src/EditableText.mdx +50 -2
  132. package/src/EditableText.stories.tsx +96 -2
  133. package/src/EditableText.tsx +189 -5
  134. package/src/EmptyState.mdx +33 -8
  135. package/src/EmptyState.stories.tsx +26 -1
  136. package/src/EmptyState.test.tsx +63 -2
  137. package/src/EmptyState.tsx +28 -6
  138. package/src/Form.mdx +3 -1
  139. package/src/FormDialog.mdx +78 -0
  140. package/src/FormDialog.stories.tsx +90 -0
  141. package/src/FormDialog.test.tsx +183 -0
  142. package/src/FormDialog.tsx +93 -0
  143. package/src/InlineText.mdx +1 -0
  144. package/src/InlineText.tsx +2 -1
  145. package/src/MoveDialog.mdx +74 -0
  146. package/src/MoveDialog.stories.tsx +121 -0
  147. package/src/MoveDialog.test.tsx +203 -0
  148. package/src/MoveDialog.tsx +183 -0
  149. package/src/NavItem.mdx +15 -0
  150. package/src/NavItem.stories.tsx +15 -0
  151. package/src/NavItem.test.tsx +64 -1
  152. package/src/NavItem.tsx +10 -2
  153. package/src/NavTree.mdx +26 -4
  154. package/src/NavTree.stories.tsx +59 -0
  155. package/src/NavTree.test.tsx +232 -2
  156. package/src/NavTree.tsx +93 -43
  157. package/src/PinnedComment.mdx +6 -1
  158. package/src/PinnedComment.stories.tsx +11 -1
  159. package/src/PinnedComment.tsx +15 -2
  160. package/src/ReactionHorizon.mdx +3 -0
  161. package/src/ReactionHorizon.stories.tsx +3 -0
  162. package/src/ReactionHorizon.test.tsx +55 -0
  163. package/src/ReactionHorizon.tsx +30 -11
  164. package/src/ReplyCard.mdx +3 -0
  165. package/src/ReplyCard.stories.tsx +19 -1
  166. package/src/ResolveDialog.mdx +2 -0
  167. package/src/ResolveDialog.test.tsx +21 -0
  168. package/src/ResolveDialog.tsx +11 -39
  169. package/src/SelectionToolbar.tsx +2 -2
  170. package/src/Textarea.mdx +1 -0
  171. package/src/Thread.mdx +18 -1
  172. package/src/Thread.stories.tsx +55 -3
  173. package/src/Thread.test.tsx +11 -0
  174. package/src/Thread.tsx +53 -11
  175. package/src/commentBoxFrame.tsx +2 -2
  176. package/src/conversation.examples.tsx +10 -2
  177. package/src/conversationScroll.ts +155 -0
  178. package/src/editor.ts +1 -0
  179. package/src/editorSelection.test.tsx +53 -0
  180. package/src/eslint/no-field-outside-a-form.test.ts +4 -0
  181. package/src/eslint/no-field-outside-a-form.ts +2 -2
  182. package/src/eslint/no-native-title.ts +1 -1
  183. package/src/formBusy.ts +5 -2
  184. package/src/index.ts +16 -6
  185. package/src/looks.ts +10 -0
  186. package/src/registry/registry.test.ts +12 -6
  187. package/src/seenOnScreen.test.tsx +182 -0
  188. package/src/seenOnScreen.ts +146 -0
  189. package/src/showInConversation.test.tsx +168 -0
  190. package/src/showInConversation.ts +93 -0
  191. package/src/threadCard.ts +16 -0
  192. package/stories/Choosing.mdx +7 -2
  193. package/tailwind-preset.js +7 -0
package/dist/looks.d.ts CHANGED
@@ -27,6 +27,8 @@ export declare const FIELD_SIZE_CLASSES: {
27
27
  };
28
28
  /** The box around an input that sits inside it, before its focus look: SearchInput and ChipInput. */
29
29
  export declare const FIELD_SHELL_CLASSES = "bg-bg-field border border-border-field shadow-field hover:border-border-strong group-hover/field:border-border-strong rounded-lg transition-colors";
30
+ /** That box focused, while what is typed in it has the focus: the focus border, held under the pointer, and Signal's ring. ChipInput and DocumentField. */
31
+ export declare const FIELD_SHELL_FOCUS_CLASSES = "focus-within:border-border-focus focus-within:hover:border-border-focus group-hover/field:focus-within:border-border-focus signal:transition-shadow signal:focus-within:shadow-focus-ring";
30
32
  /** A panel that floats over the page: Menu's panel and Tooltip. */
31
33
  export declare const FLOATING_SURFACE_CLASSES = "rounded-lg border border-border-default bg-bg-elevated shadow-lg";
32
34
  /** A count beside a label, in the muted colour: NavItem's number and SectionHeader's `count`. */
@@ -71,6 +73,12 @@ export declare const COLLAPSIBLE_PANEL_CLASSES = "h-[var(--collapsible-panel-hei
71
73
  * 12px in, 16px between the text and the row under it; the focus ring in Signal.
72
74
  */
73
75
  export declare const WRITING_BOX_CLASSES = "relative bg-bg-field border border-border-field rounded-lg p-3 flex flex-col gap-4";
76
+ /**
77
+ * Selected words in an editor: the selected thing's fill, the colour the selection strip's kept selection paints
78
+ * while its link field has the focus (`KeptSelection`), so the words look the same selected and kept. Peek's
79
+ * composer rule (PEE-19), moved into every editor: the comment box, the document editor and InlineText.
80
+ */
81
+ export declare const EDITOR_SELECTION_CLASSES = "selection:bg-bg-selected";
74
82
  /** The keys under the send box, in words: "Enter to send · Shift+Enter new line". One line, cut when the room runs out; no key caps. The edit box writes none (Katerina, 1 November). */
75
83
  export declare const BOX_HINT_CLASSES = "min-w-0 truncate select-none text-caption text-text-muted signal:font-mono signal:text-menu signal:font-normal signal:tracking-wider";
76
84
  /** Signal's focus ring (the glow) on the send box, as on every field. The edit box has no glow and no accent edge (Katerina, 31 October, 1 November). */
@@ -1 +1 @@
1
- {"version":3,"file":"looks.d.ts","sourceRoot":"","sources":["../src/looks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB,2MAA2M,CAAA;AAEzO,wFAAwF;AACxF,eAAO,MAAM,kBAAkB,kDAAkD,CAAA;AAEjF,mEAAmE;AACnE,eAAO,MAAM,sBAAsB,iKAAiK,CAAA;AAEpM,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,4DAA4D,CAAA;AAEjG,kJAAkJ;AAClJ,eAAO,MAAM,kBAAkB;;;CAGrB,CAAA;AAEV,qGAAqG;AACrG,eAAO,MAAM,mBAAmB,uJAAuJ,CAA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H,eAAO,MAAM,wBAAwB,6BAA6B,CAAA;AAElE,yLAAyL;AACzL,eAAO,MAAM,gBAAgB,yIAAyI,CAAA;AAEtK,yJAAyJ;AACzJ,eAAO,MAAM,oBAAoB,2GAA2G,CAAA;AAE5I,qIAAqI;AACrI,eAAO,MAAM,iBAAiB,iGAAiG,CAAA;AAG/H,8GAA8G;AAC9G,eAAO,MAAM,iBAAiB,0CAA0C,CAAA;AAExE;;;;;;;;;;GAUG;AACH,wIAAwI;AACxI,eAAO,MAAM,sBAAsB,6GAA6G,CAAA;AAEhJ,eAAO,MAAM,gBAAgB,gyBAAitB,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { type RefObject } from 'react';
2
+ /** What has been seen of one conversation or thread: given to a `ConversationLayout`'s or a `Thread`'s `seen`. */
3
+ export interface SeenOnScreen {
4
+ /** The ids of the comments or replies that have been on screen a moment, for the key it was made with. */
5
+ readonly ids: ReadonlySet<string>;
6
+ }
7
+ /**
8
+ * The comments or replies that have been on screen for a moment: what reads them (Katerina, 30 October). Their "new"
9
+ * look goes once they have been seen, by scrolling to them or opening their thread, not when their conversation is
10
+ * opened. Peek's, moved with the conversation (C2 of the audit of 2 November).
11
+ *
12
+ * Hand what it returns to a `ConversationLayout`'s `seen` (its comments, by `data-conversation-item`) or a `Thread`'s
13
+ * (its replies, by `ReplyCard`'s `id`), and read back `ids`. On screen means half of the card shows, or 120px of a
14
+ * taller one, inside every scrolling pane round it, for 1.5 seconds without a break, in a tab that is not hidden.
15
+ * Scrolling past reads nothing. Where there is no IntersectionObserver (a test's page), everything drawn counts as on
16
+ * screen: the dwell alone decides.
17
+ *
18
+ * What has been seen is held for `key`, the conversation or the thread, and starts again empty when it changes;
19
+ * `null` watches nothing (before the app has judged what is new: what is seen first would be read).
20
+ */
21
+ export declare function useSeenOnScreen(key: string | null): SeenOnScreen;
22
+ /**
23
+ * A part's half: every draw, the comments under `root` that carry `attribute` are watched for `seen`. Used by
24
+ * ConversationLayout and Thread; nothing for an app to call.
25
+ */
26
+ export declare function useWatchSeen(seen: SeenOnScreen | undefined, root: RefObject<HTMLElement | null>, attribute: string): void;
27
+ //# sourceMappingURL=seenOnScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seenOnScreen.d.ts","sourceRoot":"","sources":["../src/seenOnScreen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAUpE,kHAAkH;AAClH,MAAM,WAAW,YAAY;IAC3B,0GAA0G;IAC1G,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAClC;AAUD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,YAAY,CAyFhE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,SAAS,EAAE,MAAM,QAYlH"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Showing one comment or reply: what a link to it does (Peek's INT-3 and INT-8, moved with the conversation for every
3
+ * app). It is scrolled to the middle of the view, the ones round it being what makes it checkable, and marked a moment
4
+ * (`data-shown`, the kit's flash: the accent's wash, fading), so the press lands on it and not near it.
5
+ *
6
+ * What it finds is what the kit draws: a reply's `data-reply-id` (`ReplyCard`'s `id`), a thread's pinned comment's
7
+ * `data-thread-start` (`Thread`'s `start.id`), and, asked for, a comment in a `ConversationLayout`'s list
8
+ * (`data-conversation-item`), after the open thread's.
9
+ */
10
+ export interface ShowOptions {
11
+ /** Look in the comments of a `ConversationLayout` too, after the open thread's pinned comment and replies. */
12
+ comments?: boolean;
13
+ }
14
+ export interface ShowWhenDrawnOptions extends ShowOptions {
15
+ /** How long to wait for it to be drawn, in ms: 3 seconds by default. */
16
+ wait?: number;
17
+ }
18
+ /**
19
+ * Scrolls a comment or reply drawn by the kit into the middle of the view and flashes it. `false` when it is not
20
+ * drawn (a thread whose older replies are not read yet, a thread not open): never a press that seems to work and does
21
+ * nothing, so the caller says it, or opens its thread and waits with `showInConversationWhenDrawn`.
22
+ */
23
+ export declare function showInConversation(id: string, options?: ShowOptions): boolean;
24
+ /**
25
+ * The same, for one that may not be drawn yet: its thread was just asked to open, and the page draws it a moment
26
+ * later. Looks every 50ms, for 3 seconds (`wait`), and answers whether it was shown: `false` must be said, since
27
+ * waiting forever and never working look the same to the person who pressed. A newer show, of any comment, stops the
28
+ * wait (`false` too): the reader's last link is the one that lands.
29
+ */
30
+ export declare function showInConversationWhenDrawn(id: string, { wait, ...options }?: ShowWhenDrawnOptions): Promise<boolean>;
31
+ //# sourceMappingURL=showInConversation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showInConversation.d.ts","sourceRoot":"","sources":["../src/showInConversation.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAoBH,MAAM,WAAW,WAAW;IAC1B,8GAA8G;IAC9G,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAUD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAGjF;AAoBD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,IAAc,EAAE,GAAG,OAAO,EAAE,GAAE,oBAAyB,GAAG,OAAO,CAAC,OAAO,CAAC,CAYnI"}
@@ -31,6 +31,19 @@ export declare const caretOnOpen: import("react").Context<number>;
31
31
  * comment's face to its thread's last reply. The card and the thread then draw no pieces of it.
32
32
  */
33
33
  export declare const LineByLayout: import("react").Context<boolean>;
34
+ /**
35
+ * A comment's exact date and time, from its moment (ms), in the reader's own way: what its time says under the pointer
36
+ * (Peek's words for it: `dateStyle: 'long'`, `timeStyle: 'short'`).
37
+ */
38
+ export declare const exactTime: (at: number) => string;
39
+ /** A comment's moment when it is one, else none: a moment that is not a number (a bad date read) draws the time as with none, rather than throwing. */
40
+ export declare const momentOf: (at: number | undefined) => number | undefined;
41
+ /**
42
+ * The flash on a comment or reply a link just showed (`data-shown`, set by `showInConversation`): the accent's wash,
43
+ * fading over 1.8s, in 8px corners; held still, without the fade, for a reader who asks for less motion. Peek's
44
+ * cited-flash, moved (INT-3). On every element the kit marks with an id a link can name.
45
+ */
46
+ export declare const SHOWN_CLASSES = "data-[shown]:animate-shown data-[shown]:rounded-lg motion-reduce:data-[shown]:animate-none motion-reduce:data-[shown]:bg-accent-wash";
34
47
  /**
35
48
  * The line from a face down, as ONE bar measured in `root`: from 4px under the comment's face (`[data-face]` in
36
49
  * `[data-comment-body]`: never a reply's, when the comment is deleted or being edited and shows none) — it never touches the
@@ -1 +1 @@
1
- {"version":3,"file":"threadCard.d.ts","sourceRoot":"","sources":["../src/threadCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEhF;;;GAGG;AACH,eAAO,MAAM,YAAY,kCAAuB,CAAA;AAEhD,mHAAmH;AACnH,MAAM,WAAW,qBAAqB;IACpC,4EAA4E;IAC5E,KAAK,EAAE,OAAO,CAAA;IACd,kCAAkC;IAClC,IAAI,EAAE,OAAO,CAAA;IACb,yGAAyG;IACzG,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,gDAAgD;IAChD,IAAI,EAAE,MAAM,IAAI,CAAA;CACjB;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,uDAAoD,CAAA;AAEnF;;;;GAIG;AACH,eAAO,MAAM,WAAW,iCAAmB,CAAA;AAE3C;;;GAGG;AACH,eAAO,MAAM,YAAY,kCAAuB,CAAA;AAKhD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,UAAQ;SACrD,MAAM;YAAU,MAAM;SAgC/D"}
1
+ {"version":3,"file":"threadCard.d.ts","sourceRoot":"","sources":["../src/threadCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEhF;;;GAGG;AACH,eAAO,MAAM,YAAY,kCAAuB,CAAA;AAEhD,mHAAmH;AACnH,MAAM,WAAW,qBAAqB;IACpC,4EAA4E;IAC5E,KAAK,EAAE,OAAO,CAAA;IACd,kCAAkC;IAClC,IAAI,EAAE,OAAO,CAAA;IACb,yGAAyG;IACzG,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,gDAAgD;IAChD,IAAI,EAAE,MAAM,IAAI,CAAA;CACjB;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,uDAAoD,CAAA;AAEnF;;;;GAIG;AACH,eAAO,MAAM,WAAW,iCAAmB,CAAA;AAE3C;;;GAGG;AACH,eAAO,MAAM,YAAY,kCAAuB,CAAA;AAEhD;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,IAAI,MAAM,WAAsF,CAAA;AAE1H,uJAAuJ;AACvJ,eAAO,MAAM,QAAQ,GAAI,IAAI,MAAM,GAAG,SAAS,uBAA+D,CAAA;AAE9G;;;;GAIG;AACH,eAAO,MAAM,aAAa,yIAAyI,CAAA;AAKnK;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,UAAQ;SACrD,MAAM;YAAU,MAAM;SAgC/D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@estiva-app/ui",
3
- "version": "0.98.0",
3
+ "version": "0.99.0",
4
4
  "description": "Estiva's design tokens (the contract) and a small set of primitives (a convenience) for every Estiva app.",
5
5
  "type": "module",
6
6
  "license": "MIT",