@brdgapp/ui 0.1.0 → 0.1.2
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.
- package/README.md +46 -38
- package/package.json +2 -2
- package/src/index.ts +12 -6
- package/src/network-people-helper/README.md +130 -0
- package/src/{api.ts → network-people-helper/api.ts} +2 -1
- package/src/network-people-helper/index.ts +6 -0
- package/src/{network-people-helper.tsx → network-people-helper/network-people-helper.tsx} +1 -1
- package/src/{network-people-nudge.tsx → network-people-helper/network-people-nudge.tsx} +1 -1
- package/src/{person-menu.tsx → network-people-helper/person-menu.tsx} +2 -1
- package/src/network-people-helper/styles.css +848 -0
- package/src/{types.ts → network-people-helper/types.ts} +0 -7
- package/src/{use-network-people-list.ts → network-people-helper/use-network-people-list.ts} +1 -1
- package/src/{use-network-preview.ts → network-people-helper/use-network-preview.ts} +1 -1
- package/src/provider.tsx +7 -1
- package/src/styles.css +1 -848
- /package/src/{contact-avatar.tsx → network-people-helper/contact-avatar.tsx} +0 -0
- /package/src/{domain.ts → network-people-helper/domain.ts} +0 -0
- /package/src/{icons.tsx → network-people-helper/icons.tsx} +0 -0
- /package/src/{open-helper.ts → network-people-helper/open-helper.ts} +0 -0
|
@@ -21,10 +21,3 @@ export type NetworkPersonAction = {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export type HelperPlacement = "bottom-end" | "bottom-start" | "top-end" | "top-start"
|
|
24
|
-
|
|
25
|
-
export type BridgeClientConfig = {
|
|
26
|
-
apiBaseUrl: string
|
|
27
|
-
getAccessToken: () => Promise<string | null> | string | null
|
|
28
|
-
introInboxUrl: string
|
|
29
|
-
profileUrlForUsername: (username: string) => string
|
|
30
|
-
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useCallback, useEffect, useRef, useState } from "react"
|
|
4
4
|
import { fetchNetworkPage, PAGE_SIZE } from "./api"
|
|
5
5
|
import { cleanDomain } from "./domain"
|
|
6
|
-
import { useBridgeUI } from "
|
|
6
|
+
import { useBridgeUI } from "../provider"
|
|
7
7
|
import type { NetworkContact } from "./types"
|
|
8
8
|
|
|
9
9
|
type Options = {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useEffect, useState } from "react"
|
|
4
4
|
import { fetchNetworkPreview } from "./api"
|
|
5
5
|
import { cleanDomain } from "./domain"
|
|
6
|
-
import { useBridgeUI } from "
|
|
6
|
+
import { useBridgeUI } from "../provider"
|
|
7
7
|
import type { NetworkContact } from "./types"
|
|
8
8
|
|
|
9
9
|
export type NetworkPreviewState = {
|
package/src/provider.tsx
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import { createContext, useContext, useMemo, useRef, type ReactNode } from "react"
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
export type BridgeClientConfig = {
|
|
6
|
+
apiBaseUrl: string
|
|
7
|
+
getAccessToken: () => Promise<string | null> | string | null
|
|
8
|
+
introInboxUrl: string
|
|
9
|
+
profileUrlForUsername: (username: string) => string
|
|
10
|
+
}
|
|
5
11
|
|
|
6
12
|
/** Production Bridge API, including the `/api/v4` prefix. */
|
|
7
13
|
export const DEFAULT_API_BASE_URL = "https://api.brdg.app/api/v4"
|