fauna-api 0.0.0-stage → 1.0.676

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 (171) hide show
  1. package/dist/brands.d.ts +2 -0
  2. package/dist/brands.js +2 -0
  3. package/dist/index.d.ts +64 -0
  4. package/dist/index.js +121 -0
  5. package/dist/src/ant/chat.d.ts +130 -0
  6. package/dist/src/ant/chat.js +467 -0
  7. package/dist/src/ant/format.d.ts +40 -0
  8. package/dist/src/ant/format.js +143 -0
  9. package/dist/src/ant/graph.d.ts +130 -0
  10. package/dist/src/ant/graph.js +449 -0
  11. package/dist/src/ant/index.d.ts +16 -0
  12. package/dist/src/ant/index.js +61 -0
  13. package/dist/src/ant/persona.d.ts +151 -0
  14. package/dist/src/ant/persona.js +136 -0
  15. package/dist/src/ant/timeline.d.ts +283 -0
  16. package/dist/src/ant/timeline.js +1025 -0
  17. package/dist/src/authentification.d.ts +45 -0
  18. package/dist/src/authentification.js +194 -0
  19. package/dist/src/billing.d.ts +135 -0
  20. package/dist/src/billing.js +128 -0
  21. package/dist/src/calendar.d.ts +83 -0
  22. package/dist/src/calendar.js +133 -0
  23. package/dist/src/chats.d.ts +113 -0
  24. package/dist/src/chats.js +100 -0
  25. package/dist/src/cicada/contacts.d.ts +31 -0
  26. package/dist/src/cicada/contacts.js +28 -0
  27. package/dist/src/cicada/conversations.d.ts +73 -0
  28. package/dist/src/cicada/conversations.js +236 -0
  29. package/dist/src/cicada/inboxes.d.ts +48 -0
  30. package/dist/src/cicada/inboxes.js +82 -0
  31. package/dist/src/cicada/index.d.ts +16 -0
  32. package/dist/src/cicada/index.js +61 -0
  33. package/dist/src/cicada/phone.d.ts +48 -0
  34. package/dist/src/cicada/phone.js +306 -0
  35. package/dist/src/drive.d.ts +80 -0
  36. package/dist/src/drive.js +472 -0
  37. package/dist/src/extensions/index.d.ts +4 -0
  38. package/dist/src/extensions/index.js +5 -0
  39. package/dist/src/extensions/web/index.d.ts +6 -0
  40. package/dist/src/extensions/web/index.js +7 -0
  41. package/dist/src/extensions/web/session.d.ts +106 -0
  42. package/dist/src/extensions/web/session.js +469 -0
  43. package/dist/src/extensions/web/tools.d.ts +13 -0
  44. package/dist/src/extensions/web/tools.js +72 -0
  45. package/dist/src/friends.d.ts +39 -0
  46. package/dist/src/friends.js +119 -0
  47. package/dist/src/groups.d.ts +82 -0
  48. package/dist/src/groups.js +269 -0
  49. package/dist/src/inbox.d.ts +11 -0
  50. package/dist/src/inbox.js +35 -0
  51. package/dist/src/integrations.d.ts +52 -0
  52. package/dist/src/integrations.js +205 -0
  53. package/dist/src/magpie/explorer.d.ts +14 -0
  54. package/dist/src/magpie/explorer.js +36 -0
  55. package/dist/src/magpie/index.d.ts +16 -0
  56. package/dist/src/magpie/index.js +61 -0
  57. package/dist/src/magpie/portfolio.d.ts +52 -0
  58. package/dist/src/magpie/portfolio.js +179 -0
  59. package/dist/src/magpie/quotes.d.ts +35 -0
  60. package/dist/src/magpie/quotes.js +47 -0
  61. package/dist/src/magpie/room.d.ts +61 -0
  62. package/dist/src/magpie/room.js +238 -0
  63. package/dist/src/maps.d.ts +159 -0
  64. package/dist/src/maps.js +171 -0
  65. package/dist/src/marmot/browser.d.ts +139 -0
  66. package/dist/src/marmot/browser.js +389 -0
  67. package/dist/src/marmot/index.d.ts +20 -0
  68. package/dist/src/marmot/index.js +65 -0
  69. package/dist/src/marmot/media.d.ts +56 -0
  70. package/dist/src/marmot/media.js +265 -0
  71. package/dist/src/marmot/research.d.ts +337 -0
  72. package/dist/src/marmot/research.js +1138 -0
  73. package/dist/src/marmot/scraper.d.ts +59 -0
  74. package/dist/src/marmot/scraper.js +94 -0
  75. package/dist/src/marmot/web.d.ts +402 -0
  76. package/dist/src/marmot/web.js +2586 -0
  77. package/dist/src/marmot/workspace.d.ts +81 -0
  78. package/dist/src/marmot/workspace.js +263 -0
  79. package/dist/src/parrot/agent.d.ts +53 -0
  80. package/dist/src/parrot/agent.js +93 -0
  81. package/dist/src/parrot/chat.d.ts +84 -0
  82. package/dist/src/parrot/chat.js +237 -0
  83. package/dist/src/parrot/format.d.ts +128 -0
  84. package/dist/src/parrot/format.js +639 -0
  85. package/dist/src/parrot/generative.d.ts +261 -0
  86. package/dist/src/parrot/generative.js +185 -0
  87. package/dist/src/parrot/index.d.ts +22 -0
  88. package/dist/src/parrot/index.js +67 -0
  89. package/dist/src/parrot/room.d.ts +225 -0
  90. package/dist/src/parrot/room.js +466 -0
  91. package/dist/src/parrot/routing.d.ts +90 -0
  92. package/dist/src/parrot/routing.js +78 -0
  93. package/dist/src/parrot/share.d.ts +126 -0
  94. package/dist/src/parrot/share.js +261 -0
  95. package/dist/src/parrot/socket.d.ts +41 -0
  96. package/dist/src/parrot/socket.js +478 -0
  97. package/dist/src/payments.d.ts +73 -0
  98. package/dist/src/payments.js +107 -0
  99. package/dist/src/private/cards.css +75 -0
  100. package/dist/src/rooms.d.ts +76 -0
  101. package/dist/src/rooms.js +168 -0
  102. package/dist/src/shared/schema.d.ts +24 -0
  103. package/dist/src/shared/schema.js +1 -0
  104. package/dist/src/shared/server.d.ts +65 -0
  105. package/dist/src/shared/server.js +302 -0
  106. package/dist/src/termite/environment.d.ts +110 -0
  107. package/dist/src/termite/environment.js +263 -0
  108. package/dist/src/termite/index.d.ts +14 -0
  109. package/dist/src/termite/index.js +59 -0
  110. package/dist/src/termite/os.d.ts +326 -0
  111. package/dist/src/termite/os.js +572 -0
  112. package/dist/src/termite/versioning.d.ts +94 -0
  113. package/dist/src/termite/versioning.js +217 -0
  114. package/dist/src/tickets.d.ts +43 -0
  115. package/dist/src/tickets.js +138 -0
  116. package/dist/src/travel.d.ts +85 -0
  117. package/dist/src/travel.js +44 -0
  118. package/dist/src/ui/authentification.d.ts +24 -0
  119. package/dist/src/ui/authentification.js +177 -0
  120. package/dist/src/ui/brands.css +11 -0
  121. package/dist/src/ui/brands.d.ts +7 -0
  122. package/dist/src/ui/brands.js +14 -0
  123. package/dist/src/ui/browser.d.ts +74 -0
  124. package/dist/src/ui/browser.js +470 -0
  125. package/dist/src/ui/chat.d.ts +183 -0
  126. package/dist/src/ui/chat.js +2379 -0
  127. package/dist/src/ui/chatPanel.d.ts +109 -0
  128. package/dist/src/ui/chatPanel.js +768 -0
  129. package/dist/src/ui/chatSequence.d.ts +36 -0
  130. package/dist/src/ui/chatSequence.js +42 -0
  131. package/dist/src/ui/crown.d.ts +19 -0
  132. package/dist/src/ui/crown.js +199 -0
  133. package/dist/src/ui/cursor.d.ts +73 -0
  134. package/dist/src/ui/cursor.js +175 -0
  135. package/dist/src/ui/device.d.ts +33 -0
  136. package/dist/src/ui/device.js +49 -0
  137. package/dist/src/ui/drive.d.ts +69 -0
  138. package/dist/src/ui/drive.js +1243 -0
  139. package/dist/src/ui/generative.d.ts +39 -0
  140. package/dist/src/ui/generative.js +313 -0
  141. package/dist/src/ui/hover.d.ts +6 -0
  142. package/dist/src/ui/hover.js +210 -0
  143. package/dist/src/ui/index.d.ts +42 -0
  144. package/dist/src/ui/index.js +87 -0
  145. package/dist/src/ui/integrations.d.ts +13 -0
  146. package/dist/src/ui/integrations.js +175 -0
  147. package/dist/src/ui/maps.d.ts +87 -0
  148. package/dist/src/ui/maps.js +547 -0
  149. package/dist/src/ui/roster.d.ts +32 -0
  150. package/dist/src/ui/roster.js +163 -0
  151. package/dist/src/ui/talk.d.ts +12 -0
  152. package/dist/src/ui/talk.js +560 -0
  153. package/dist/src/ui/tickets.d.ts +13 -0
  154. package/dist/src/ui/tickets.js +966 -0
  155. package/dist/src/ui/toast.d.ts +7 -0
  156. package/dist/src/ui/toast.js +258 -0
  157. package/dist/src/ui/tokenText.d.ts +18 -0
  158. package/dist/src/ui/tokenText.js +96 -0
  159. package/dist/src/ui/tokenized.d.ts +42 -0
  160. package/dist/src/ui/tokenized.js +622 -0
  161. package/dist/src/ui/ui.css +4763 -0
  162. package/dist/src/ui/view.d.ts +23 -0
  163. package/dist/src/ui/view.js +584 -0
  164. package/dist/src/view.d.ts +113 -0
  165. package/dist/src/view.js +386 -0
  166. package/dist/src/webhooks.d.ts +66 -0
  167. package/dist/src/webhooks.js +78 -0
  168. package/dist/ui.d.ts +1 -0
  169. package/dist/ui.js +1 -0
  170. package/package.json +89 -6
  171. package/README.md +0 -3
@@ -0,0 +1,109 @@
1
+ import React from "react";
2
+ import { Fauna } from "../../index.js";
3
+ import type { ChatRoom } from "../parrot/room.js";
4
+ import type { Attachment } from "../parrot/share.js";
5
+ /** How a chat's engine and its side panel talk: files to open, and new files to list. */
6
+ export type PanelBus = {
7
+ /** A person opened a file (a card, or a row): a tab for them only. */
8
+ open(attachment: Attachment): void;
9
+ /** The reply pointed everyone to a file: open the panel and focus its tab. */
10
+ point(attachment: Attachment): void;
11
+ /** New files landed in the chat. */
12
+ added(): void;
13
+ listen(handlers: Partial<{
14
+ open(a: Attachment): void;
15
+ point(a: Attachment): void;
16
+ added(): void;
17
+ }>): () => void;
18
+ };
19
+ export declare function createPanelBus(): PanelBus;
20
+ /** A file part from a message as an attachment of this chat. */
21
+ export declare function attachmentOf(room: ChatRoom, part: any, message?: number): Attachment;
22
+ /** A file whose server preview a card shows, and the key every card of that file shares. */
23
+ export type PreviewSource = {
24
+ key: string;
25
+ file: Fauna.Drive.File;
26
+ };
27
+ type PreviewListener = (url: string | null) => void;
28
+ /**
29
+ * Tell `onUrl` the file's preview once `target` nears the screen, and again whenever
30
+ * it's refreshed. Returns a function that stops listening.
31
+ */
32
+ export declare function watchPreview(target: Element, source: PreviewSource, onUrl: PreviewListener): () => void;
33
+ /** The file changed: fetch its preview again and show it everywhere it's shown. */
34
+ export declare function refreshPreview(source: PreviewSource): void;
35
+ /** Show `url` in a holder that keeps its type icon underneath for when there's none. */
36
+ export declare function paintPreview(holder: HTMLElement, url: string | null): void;
37
+ /** A file's preview in a holder built outside React; it stops listening once the holder leaves the page. */
38
+ export declare function showPreview(holder: HTMLElement, source: PreviewSource): void;
39
+ /** A file card for a message: its preview when the file has one, else its type icon. Click opens it. */
40
+ export declare function buildAttachmentCard(name: string, contentType: string, onOpen?: () => void, iconMap?: Record<string, string>, preview?: PreviewSource): HTMLElement;
41
+ /** A file's view in a popup, for hosts without a side panel. */
42
+ export declare function openViewModal(target: Fauna.View.Target): void;
43
+ export declare function ChatPanel({ room, bus, open, onOpenChange }: {
44
+ room: ChatRoom;
45
+ bus: PanelBus;
46
+ open: boolean;
47
+ onOpenChange(open: boolean): void;
48
+ }): React.JSX.Element | null;
49
+ type Repository = Fauna.Termite.Versioning.Repository;
50
+ /**
51
+ * Anything that holds one repository: a Parrot chat room, an Ant timeline or chat,
52
+ * or a pick an app keeps in a form until it saves. Repositories are listed and made
53
+ * for its group when a group owns it, else for the person signed in.
54
+ */
55
+ export type RepositoryHolder = {
56
+ readonly repository: number | null;
57
+ readonly group?: Fauna.Groups.Group;
58
+ getAuthorization(): Fauna.Authentification.Credentials | Fauna.Authentification.ApiKey;
59
+ setRepository(repository: Repository | null): Promise<void>;
60
+ /** Hear about every change; returns a function that stops listening. */
61
+ watchRepository(listener: (repository: number | null) => void): () => void;
62
+ };
63
+ /** A holder that only keeps its pick, for a form that saves it later (a new timeline's repository). */
64
+ export declare function pickedRepository(authorization: Fauna.Authentification.Credentials | Fauna.Authentification.ApiKey, group?: Fauna.Groups.Group): RepositoryHolder & {
65
+ picked: Repository | null;
66
+ };
67
+ /** Resolves once the room has `repository` (an app passes it on), or after a while either way. */
68
+ export declare function roomHas(room: ChatRoom, repository: number, signal?: AbortSignal, ms?: number): Promise<void>;
69
+ /**
70
+ * The chat's repository in the message box: a button to attach one (pick or make
71
+ * one of the chat owner's), and once attached a chip with its name and whether its
72
+ * machine is running, with Open in Termite and Detach. While a reply runs it
73
+ * rests, faded and out of reach: the reply finishes on the repository it started with.
74
+ */
75
+ export declare function RepositoryControl({ holder, replying, onOpenRepository, onChange, suggestedName, placement }: {
76
+ holder: RepositoryHolder;
77
+ replying?: boolean;
78
+ onOpenRepository?: (repository: number) => void;
79
+ onChange?: (repository: number | null) => void;
80
+ /** What a new repository is called to start, like the timeline's name. */
81
+ suggestedName?: string;
82
+ /** Where the menu opens: above the button (a message box) or below it (a header or a form). */
83
+ placement?: "up" | "down";
84
+ }): React.JSX.Element;
85
+ /** The repository control in a node the chat engine owns; `setReplying` rests it while a reply runs. */
86
+ export declare function mountRepositoryControl(container: HTMLElement, holder: RepositoryHolder, onOpenRepository?: (repository: number) => void, onChange?: (repository: number | null) => void): {
87
+ setReplying(replying: boolean): void;
88
+ unmount(): void;
89
+ };
90
+ /**
91
+ * Ask the person to make a repository so `asker` (Parrot, an Ant persona) can use
92
+ * a computer, named `suggested` to start. Resolves with the new repository, attached
93
+ * to `holder`, or null when they say no (or `signal` aborts first).
94
+ */
95
+ export declare function askForComputer(holder: RepositoryHolder, suggested: string, signal?: AbortSignal, asker?: string): Promise<Repository | null>;
96
+ /** The icon and words for a chat's file and repository tools, or null for other tools. */
97
+ export declare function chatToolLabel(call: {
98
+ name: string;
99
+ args: Record<string, unknown>;
100
+ status?: string;
101
+ progress?: unknown;
102
+ result?: unknown;
103
+ }): {
104
+ icon: string;
105
+ label: string;
106
+ } | null;
107
+ /** What an exec printed, from its result, for the chip's details. */
108
+ export declare function execOutput(result: string | undefined): string;
109
+ export {};