@aiquants/contact-map 0.21.1 → 0.22.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.
package/README.md CHANGED
@@ -29,6 +29,8 @@ Reusable, host-agnostic business contact map and corporate directory feature pac
29
29
  - リサイズハンドルを備えた数学的 2 カラムレスポンシブレイアウト。
30
30
  - Multi-script fuzzy search and normalization (`@aiquants/fuzzy-search`, `@aiquants/select-box`).
31
31
  - 多言語・クロス表記対応のあいまい検索および入力正規化。
32
+ - Stream status: the header's annotation (counts and progress), a failure notice with its retry below the header (`ContactMapStreamFailureNotice`), and one persistent live announcer of the stream's phase changes (`ContactMapStreamAnnouncer`).
33
+ - ストリームの状態の表示: 見出しの注記 (件数と受信の進み)、見出しの下の再試行付きの失敗の知らせ (`ContactMapStreamFailureNotice`)、ストリームの局面の移り変わりを知らせる常設の読み上げの部品 (`ContactMapStreamAnnouncer`) 1 つ。
32
34
 
33
35
  - **Server Layer (`@aiquants/contact-map/server`)**:
34
36
  - Dependency Injection (DI) port architecture decouples database connections, schemas, authentication, and loggers from host apps.
@@ -123,7 +125,8 @@ The chunk query checks both values by the rules below when it writes the cursor,
123
125
  The handler accepts only that form naming a real instant from year 1 on and a `cursor_person_id` holding a safe integer written in canonical decimal (`0`, or digits without a leading zero after an optional minus sign); anything else (`-0`, `+5`, `05`, `1e3`, …) gets 400 before authenticating.
124
126
  The next chunk compares the bare column with the cursor cast to `datetime2(7)`, so an index on (`is_active`, `contacted_at`, `person_id`) can seek. `createContactMapServer().getContactsStreamChunk(cursor)` checks the cursor by the same rules and throws a `TypeError` (a value of the wrong type or shape) or a `RangeError` (any other form) before connecting.
125
127
  `ContactMapStreamClient` sends the cursor back unchanged. When a resumed request gets 400 (the cursor was written by a server of another version), it drops the cursor and loads from the beginning again once, keeping the records it has (they are keyed by `person_id`); a 400 to a request without a cursor, or a second 400 in the same load, ends the load at once with `[contact-map] the server rejected the stream request (400); reload the page`.
126
- A 401 or 403 ends the load at once in phase `auth-required` with the error `Authentication required`, without retrying (`retryNow()` starts again from the last cursor, for example after the user signs in again). Any other failed response (the 500 of a throwing `authenticate` included) is retried with backoff (1 s, doubling up to 30 s; the annotation shows `annotationReconnecting` meanwhile) and sets the error to `[contact-map] the stream request failed (status <status>)`. The sixth failure in a row ends the load in phase `failed` (`retryNow()` starts again from the last cursor).
128
+ A 401 or 403 ends the load at once in phase `auth-required` with the error `Authentication required`, without retrying (`retryNow()` starts again from the last cursor, for example after the user signs in again; meanwhile the failure notice below the header shows `streamAuthRequired` and its retry button, see Stream Status).
129
+ Any other failed response (the 500 of a throwing `authenticate` included) is retried with backoff (1 s, doubling up to 30 s; the annotation shows `annotationReconnecting` meanwhile) and sets the error to `[contact-map] the stream request failed (status <status>)`. The sixth failure in a row ends the load in phase `failed` (`retryNow()` starts again from the last cursor; the failure notice shows `streamLoadFailed` and its retry button meanwhile).
127
130
 
128
131
  `db`・`table`・`ensureConnection`・`authenticate` は必須で、`db` か `table` が無い、`table.contacted_at` が無いか Drizzle の列でない、`ensureConnection` か `authenticate` が関数でない、または `firstBatchSize` / `nextBatchSize` が数値でなければ `createContactMapStreamHandler` / `createContactMapServer` は `TypeError` を、`table.contacted_at` が `datetime2` の列 (`datetime2` か `datetime2(0)` から `datetime2(7)`。`datetime`・`datetimeoffset`・`date` の列は断る) でないか、`firstBatchSize` か `nextBatchSize` が 1 から `Number.MAX_SAFE_INTEGER` までの整数でない数値なら `RangeError` を投げる。
129
132
  どの文言も設定を名指し、与えた値で終わる (`[contact-map] server config authenticate must be the function that returns the request's user (…); got undefined`、`[contact-map] server config table.contacted_at must be a Drizzle datetime2 column; got "datetime"`)。誰にでも開くストリームは user を返す `authenticate` で明示し、設定を書き漏らしても認証なしで連絡先を配ることはない。ハンドラーは再開カーソルを検査してから (不正な形は認証せずに 400) `authenticate(request, { failureRedirect: null })` を呼び、user が無ければ 401 を返し、返された `cookie` は 401 にもストリームの応答にも `Set-Cookie` で載せる (呼び出しが更新したセッションをブラウザへ届ける)。
@@ -133,7 +136,7 @@ A 401 or 403 ends the load at once in phase `auth-required` with the error `Auth
133
136
  チャンクの照会はカーソルを書くときに両方の値を下の規則で確かめるので、サーバーが書いたカーソルは次の要求が必ず受け入れる。最後の行の `person_id` が安全な整数でないチャンクは、その値を示すエラーで失敗する。
134
137
  ハンドラーは 1 年以降の実在する日時を表すこの形と、安全な整数を正規の 10 進 (`0` か、省略できる負の符号に続く先頭が 0 でない数字) で書いた `cursor_person_id` だけを受け入れ、それ以外 (`-0`・`+5`・`05`・`1e3` など) は認証の前に 400 で断る。次のチャンクは素の列と `datetime2(7)` へ CAST したカーソルを比べるので、(`is_active`, `contacted_at`, `person_id`) の索引でシークできる。`createContactMapServer().getContactsStreamChunk(cursor)` も同じ規則でカーソルを検査し、接続の前に `TypeError` (型や形の誤り) か `RangeError` (それ以外の形) を投げる。
135
138
  `ContactMapStreamClient` はカーソルをそのまま送り返す。再開した要求が 400 を受けたら (別の版のサーバーが書いたカーソル)、カーソルを捨てて最初から 1 回だけ読み直し、受信済みのレコードは残す (`person_id` で重ねる)。カーソルの無い要求への 400 と、同じ読み込みでの 2 回目の 400 は、`[contact-map] the server rejected the stream request (400); reload the page` で即座に読み込みを終える。
136
- 401 と 403 は再試行せず、段階 `auth-required`・エラー `Authentication required` で即座に読み込みを終える (`retryNow()` で最終カーソルから読み直す。たとえば再ログインの後)。それ以外の失敗の応答 (`authenticate` が投げたときの 500 を含む) はバックオフ (1 秒から倍々に最大 30 秒。その間、注記は `annotationReconnecting` を表示) で再試行し、エラーを `[contact-map] the stream request failed (status <status>)` にする。続けて 6 回目の失敗で、段階 `failed` として読み込みを終える (`retryNow()` で最終カーソルから始め直す)。
139
+ 401 と 403 は再試行せず、段階 `auth-required`・エラー `Authentication required` で即座に読み込みを終える (`retryNow()` で最終カーソルから読み直す。たとえば再ログインの後。その間、見出しの下の失敗の知らせが `streamAuthRequired` と再試行のボタンを見せる。ストリームの状態の表示の節を参照)。それ以外の失敗の応答 (`authenticate` が投げたときの 500 を含む) はバックオフ (1 秒から倍々に最大 30 秒。その間、注記は `annotationReconnecting` を表示) で再試行し、エラーを `[contact-map] the stream request failed (status <status>)` にする。続けて 6 回目の失敗で、段階 `failed` として読み込みを終える (`retryNow()` で最終カーソルから始め直す。その間、失敗の知らせが `streamLoadFailed` と再試行のボタンを見せる)。
137
140
 
138
141
  ### 2. Client Page Setup / クライアント側ページの設定
139
142
 
@@ -291,8 +294,8 @@ The package reads these host CSS variables, each `0px` while the host leaves it
291
294
 
292
295
  ## Pointer Targets / ポインターの的
293
296
 
294
- Every control the package draws is a target of at least 44 × 44 CSS px under every pointer (a mouse, a pen, a finger), WCAG 2.2's enhanced target size (SC 2.5.5, AAA): the search band's and the settings and statistics tabs' below, the header annotation's retry button, and the detail panel's and the long-press popup's (see their sections).
295
- パッケージが描く操作部品は、どのポインター (マウス・ペン・指) でも 44 × 44 CSS px 以上の的で、WCAG 2.2 の拡張の的の大きさ (SC 2.5.5、AAA) を満たす。下の検索の帯と検索設定・検索統計のタブ、ヘッダーの注記の再試行のボタン、詳細パネルと長押しのポップアップ (それぞれの節を参照) のもの。
297
+ Every control the package draws is a target of at least 44 × 44 CSS px under every pointer (a mouse, a pen, a finger), WCAG 2.2's enhanced target size (SC 2.5.5, AAA): the search band's and the settings and statistics tabs' below, the stream failure notice's retry button, and the detail panel's and the long-press popup's (see their sections).
298
+ パッケージが描く操作部品は、どのポインター (マウス・ペン・指) でも 44 × 44 CSS px 以上の的で、WCAG 2.2 の拡張の的の大きさ (SC 2.5.5、AAA) を満たす。下の検索の帯と検索設定・検索統計のタブ、ストリームの失敗の知らせの再試行のボタン、詳細パネルと長押しのポップアップ (それぞれの節を参照) のもの。
296
299
 
297
300
  - **The search band:** the tabs of the search page (fuzzy search, settings, statistics), the AND / OR switch, the search field and its clear button, the list / tree tabs, and the tree view's controls beside them (the whole-company switch, expand all, collapse all). The row of the list / tree tabs wraps, so on a narrow screen the tree view's controls take a line of their own instead of running past the screen's edge.
298
301
  - **The settings and statistics tabs:** their buttons (reset all, reset, rebuild index) and inner tabs are 44 × 44 px, and the selects 44 px high. A slider's box is 44 px high over its width, and a press anywhere on it moves the value; the thumb keeps the browser's drawing. A checkbox keeps its drawn 12 px box, and the label row around it, 44 px high over the panel's width, is its target: a press anywhere on the row toggles it.
@@ -320,18 +323,61 @@ The steps read these host CSS variables, each the step's value while the host le
320
323
 
321
324
  | Variable | Default | Read by |
322
325
  | --- | --- | --- |
323
- | `--aqcm-font-size-body` | `0.8125rem` (13 px) | The primary text of the controls: the search band, the settings' and statistics' buttons, tabs, selects, field names and checkbox rows, the detail panel's tabs and summary values, the annotation's retry button. Also the two counts in the count line. |
326
+ | `--aqcm-font-size-body` | `0.8125rem` (13 px) | The primary text of the controls: the search band, the settings' and statistics' buttons, tabs, selects, field names and checkbox rows, the detail panel's tabs and summary values, the stream failure notice's message and retry button. Also the two counts in the count line. |
324
327
  | `--aqcm-line-height-body` | `1.25rem` (20 px) | Their line. |
325
328
  | `--aqcm-font-size-caption` | `0.6875rem` (11 px) | The supplementary text: the count line (but not its two counts, which read the `body` step), the AND / OR hint, the tree header's badges, the settings' field hints, the detail panel's labels and hints, the list's column headings and rows' secondary lines, the popup's Gmail hint, the statistics history's times. |
326
329
  | `--aqcm-line-height-caption` | `1.25rem` (20 px) | Their line, except the list rows' secondary lines, which keep their tight line in the fixed 64 px row. |
327
330
 
328
331
  | 変数 | 既定 | 読むもの |
329
332
  | --- | --- | --- |
330
- | `--aqcm-font-size-body` | `0.8125rem` (13 px) | 操作部品の主の文字: 検索の帯、検索設定と検索統計のボタン・タブ・選択欄・欄の名前・チェックボックスの行、詳細パネルのタブと要約の値、注記の再試行のボタン。ほかに件数の行の 2 つの件数。 |
333
+ | `--aqcm-font-size-body` | `0.8125rem` (13 px) | 操作部品の主の文字: 検索の帯、検索設定と検索統計のボタン・タブ・選択欄・欄の名前・チェックボックスの行、詳細パネルのタブと要約の値、ストリームの失敗の知らせの文と再試行のボタン。ほかに件数の行の 2 つの件数。 |
331
334
  | `--aqcm-line-height-body` | `1.25rem` (20 px) | その行。 |
332
335
  | `--aqcm-font-size-caption` | `0.6875rem` (11 px) | 補足の文字: 件数の行 (2 つの件数は除く。`body` の段を読む)、AND / OR の手がかり、ツリーのヘッダーの札、設定の欄の説明、詳細パネルのラベルと説明、一覧の列見出しと行の補足の段、ポップアップの Gmail の手がかり、検索統計の履歴の時刻。 |
333
336
  | `--aqcm-line-height-caption` | `1.25rem` (20 px) | その行 (一覧の行の補足の段を除く。固定の 64 px の行の中で詰めた行を保つ)。 |
334
337
 
338
+ ## Stream Status / ストリームの状態の表示
339
+
340
+ `ContactMapAppView` shows the stream's state in three parts. A host may collapse its header (on a phone, for example), so the header holds nothing the user has to act on or to hear.
341
+ `ContactMapAppView` はストリームの状態を 3 つの部品で見せる。ホストは見出しを畳むことがある (スマホの幅など) ので、見出しには利用者が操作するものも聞くべきものも置かない。
342
+
343
+ - **The annotation** (`ContactMapAnnotation`, the `annotation` that `renderHeader` places): the record and company counts, a progress badge while the stream is idle or streaming, and a reconnecting badge (`annotationReconnecting`) while it waits to retry. It is not a live region and holds no control.
344
+ - **The failure notice** (`ContactMapStreamFailureNotice`): while the phase is `failed` or `auth-required`, a band in the flow right after the header (the host's `renderHeader` or the default heading) and before the search page shows the message (`streamLoadFailed` with the received count, or `streamAuthRequired`) and a retry button (`streamRetry`) that calls the stream's `retryNow()`.
345
+ The band is a group named by the message, which also describes the button; it is not a live region (the announcer tells the change). The `failed` message carries the client's English error text as its tooltip (`title`), supplementary detail drawn by the browser; `auth-required` carries none, since its message tells the cause.
346
+ The band overlaps neither the header nor the page: it pushes the page down by its height and 8 px, and a one-line band is 52 px tall (1 + 3 + 44 + 3 + 1), on the 4 px lattice. Its text is the rose tone's on the tone's tint (7.21:1 in the light scheme, 11.09:1 in the dark one); the button is a 44 × 44 px target on the surface (its text 7.92:1 and 12.59:1), outlined by the control outline (4.34:1 and 5.97:1 on the band) and ringed by the package's focus ring (6.22:1 and 9.42:1 on the band).
347
+ When the band leaves while it holds focus (the retry pressed, or another call of the stream's `retryNow()`, which a component mounting `useContactMapStream` makes for a stream that failed), focus goes to the search page beside it instead of falling to the body: to the search field, or to the selected page tab while the page shows its settings or its statistics (the field is then not rendered). Focus put elsewhere by then stays where it is.
348
+ - **The announcer** (`ContactMapStreamAnnouncer`): one per view, outside the header and the notice, a visually hidden box of one polite status region (`role="status"`) and one assertive alert region (`role="alert"`), both mounted empty.
349
+ It announces only the phase changes after mount, each with the text of the phase it entered, written once as it enters it: `retrying` as a status (`annotationReconnecting`), `failed` and `auth-required` as alerts (`streamLoadFailed`, `streamAuthRequired`), and the other phases empty both regions. A change of the received count within a phase is not announced, and neither is the phase at mount (the annotation and the notice show it). They are the package's only live regions.
350
+
351
+ - **注記** (`ContactMapAnnotation`。`renderHeader` が置く `annotation`): 登録件数と企業数、ストリームが待機中か受信中の間は進捗の札、再試行を待つ間は再接続中の札 (`annotationReconnecting`)。読み上げの領域ではなく、操作部品も持たない。
352
+ - **失敗の知らせ** (`ContactMapStreamFailureNotice`): 局面が `failed` か `auth-required` の間、見出し (ホストの `renderHeader` か既定の見出し) の直後・検索のページの前の流れの中の帯に、文 (受信済みの件数を持つ `streamLoadFailed` か `streamAuthRequired`) と、ストリームの `retryNow()` を呼ぶ再試行のボタン (`streamRetry`) を見せる。帯は文を名前に持つグループで、文はボタンの説明でもある。読み上げの領域ではない (移り変わりは読み上げの部品が知らせる)。`failed` の文はクライアントの英語のエラー文をツールチップ (`title`) に持つ (ブラウザーが描く補足)。`auth-required` の文は原因を自分で告げるので持たない。
353
+ 帯は見出しにもページにも重ならない: ページを帯の高さと 8 px だけ下へ押し、1 行の帯は高さ 52 px (1 + 3 + 44 + 3 + 1) で 4 px の格子に乗る。文字は rose の色調の淡い面の上の色調の文字 (明るい配色で 7.21:1、暗い配色で 11.09:1)。ボタンは面の上の 44 × 44 px の的 (文字は 7.92:1 と 12.59:1) で、操作部品の輪郭 (帯の上で 4.34:1 と 5.97:1) とパッケージのフォーカスの輪 (帯の上で 6.22:1 と 9.42:1) を持つ。
354
+ 帯がフォーカスを持ったまま外れると (再試行の押下か、ストリームの `retryNow()` のほかの呼び出し。`useContactMapStream` をマウントする部品は失敗したストリームを再試行する)、フォーカスは body へ落とさず傍らの検索のページへ渡す: 検索欄へ、ページが検索設定か検索統計を見せる間は (検索欄が描かれない) 選ばれたページのタブへ。それまでに別の所へ置かれたフォーカスはそのまま。
355
+ - **読み上げの部品** (`ContactMapStreamAnnouncer`): ビューに 1 つ、見出しと知らせの外に置く。画面に出さない箱に控えめな状態の領域 (`role="status"`) と割り込む警告の領域 (`role="alert"`) を 1 つずつ持ち、どちらも空のままマウントする。知らせるのはマウントの後の局面の移り変わりだけで、入った局面の文字を入ったときに 1 度だけ書く: `retrying` は状態 (`annotationReconnecting`)、`failed` と `auth-required` は警告 (`streamLoadFailed`・`streamAuthRequired`)、ほかの局面は両方の領域を空にする。局面の中での受信済みの件数の増減は知らせず、マウントの時点の局面も知らせない (注記と知らせが見せている)。パッケージの読み上げの領域はこの 2 つだけ。
356
+
357
+ A host that composes the page itself (`ContactMapSearchPage` under its own header) places the same parts: the announcer outside its header and the notice right after it, with the stream's `retryNow`.
358
+ ページを自分で組むホスト (自分の見出しの下に `ContactMapSearchPage`) も同じ部品を置く: 読み上げの部品を見出しの外に、知らせを見出しの直後に置き、ストリームの `retryNow` を渡す。
359
+
360
+ ```tsx
361
+ import { ContactMapAnnotation, ContactMapSearchPage, ContactMapStreamAnnouncer, ContactMapStreamFailureNotice, useStreamedContactMapContext } from "@aiquants/contact-map/client"
362
+
363
+ // rendered inside ContactMapConfigProvider and a router
364
+ function ContactMapScreen() {
365
+ const { context, retryNow } = useStreamedContactMapContext()
366
+ return (
367
+ <div className="flex h-full flex-col">
368
+ <ContactMapStreamAnnouncer phase={context.streamPhase} loadedCount={context.loadedCount} />
369
+ <header>
370
+ <ContactMapAnnotation recordCount={context.contactMapRecords.length} companyCount={context.companyCount} phase={context.streamPhase} loadedCount={context.loadedCount} totalCount={context.totalCount} />
371
+ </header>
372
+ <ContactMapStreamFailureNotice phase={context.streamPhase} loadedCount={context.loadedCount} errorMessage={context.errorMessage} onRetry={retryNow} />
373
+ <div className="min-h-0 flex-1">
374
+ <ContactMapSearchPage streamState={context} />
375
+ </div>
376
+ </div>
377
+ )
378
+ }
379
+ ```
380
+
335
381
  ## Mobile Detail Overlay / モバイルの詳細オーバーレイ
336
382
 
337
383
  When the list or the tree view is a single column (narrower than its two-column threshold), choosing a contact opens its details in an overlay, `SwipeOverlay`: a panel at the right edge, which renders the platform's modal dialog through `@aiquants/swipe-overlay`'s `useSwipeOverlayDialog`.
@@ -412,8 +458,8 @@ Each row is an `option` with `aria-selected`, `aria-posinset` / `aria-setsize` (
412
458
 
413
459
  ## DOM Hooks / DOM のフック
414
460
 
415
- Hosts and their tests find the package's overlays and the list's state by these attributes; the class names are styling and change freely.
416
- ホストとその試験は、パッケージのオーバーレイと一覧の状態を次の属性で見つける。クラス名は見た目のためのもので、自由に変わる。
461
+ Hosts and their tests find the package's overlays, the list's state, the stream's status parts and the search page's focus successors by these attributes; the class names are styling and change freely.
462
+ ホストとその試験は、パッケージのオーバーレイ・一覧の状態・ストリームの状態の部品・検索のページのフォーカスの後継を次の属性で見つける。クラス名は見た目のためのもので、自由に変わる。
417
463
 
418
464
  | Attribute | Element |
419
465
  | --- | --- |
@@ -425,6 +471,12 @@ Hosts and their tests find the package's overlays and the list's state by these
425
471
  | `data-contact-popup-card` | The long-press popup's card |
426
472
  | `data-selected` (`"true"` / `"false"`) | A list row: whether it is the selected contact, as its `aria-selected` says |
427
473
  | `data-contact-map-row-active` | The list's active option, the row the keyboard is on |
474
+ | `data-testid="contact-map-stream-failure-notice"` | The stream failure notice's band; `data-phase` is `"failed"` or `"auth-required"` |
475
+ | `data-testid="contact-map-retry-button"` | The failure notice's retry button |
476
+ | `data-testid="contact-map-stream-announcer"` | The stream announcer's visually hidden box, holding one `role="status"` and one `role="alert"` region |
477
+ | `data-contact-map-search-page` | The search page's root (where the failure notice hands focus as it leaves) |
478
+ | `data-contact-map-page-tabs` | The list of the search page's tabs (fuzzy search, settings, statistics) |
479
+ | `data-contact-map-search-field` | The search field |
428
480
 
429
481
  | 属性 | 要素 |
430
482
  | --- | --- |
@@ -436,6 +488,12 @@ Hosts and their tests find the package's overlays and the list's state by these
436
488
  | `data-contact-popup-card` | 長押しのポップアップのカード |
437
489
  | `data-selected` (`"true"` / `"false"`) | 一覧の行。選んだ連絡先か (`aria-selected` と同じ) |
438
490
  | `data-contact-map-row-active` | 一覧のアクティブな選択肢 (キーボードがいる行) |
491
+ | `data-testid="contact-map-stream-failure-notice"` | ストリームの失敗の知らせの帯。`data-phase` は `"failed"` か `"auth-required"` |
492
+ | `data-testid="contact-map-retry-button"` | 失敗の知らせの再試行のボタン |
493
+ | `data-testid="contact-map-stream-announcer"` | ストリームの読み上げの部品の画面に出さない箱 (`role="status"` と `role="alert"` の領域を 1 つずつ持つ) |
494
+ | `data-contact-map-search-page` | 検索のページの根 (失敗の知らせが外れるときにフォーカスを渡す先) |
495
+ | `data-contact-map-page-tabs` | 検索のページのタブ (あいまい検索・検索設定・検索統計) の並び |
496
+ | `data-contact-map-search-field` | 検索欄 |
439
497
 
440
498
  ## Search Normalization / 検索語の正規化
441
499
 
@@ -595,10 +653,10 @@ Function keys are shown with their arguments; the cells show sample output (`cou
595
653
  | `annotationCompaniesLabel` | `"Companies:"` | `"企業数:"` |
596
654
  | `annotationStreamingProgress({ loaded, total, percent })` | `"Streaming (1,200 / 4,800 · 25%)"` | `"ストリーミング読み込み中 (1,200 / 4,800 件・25%)"` |
597
655
  | `annotationStreamingCount(loaded)` | `"Streaming (1,200 loaded)"` | `"ストリーミング読み込み中 (1,200 件)"` |
598
- | `annotationLoadFailed(loaded)` | `"Failed to load (1,200 received)"` | `"読み込みに失敗しました (1,200 件受信済)"` |
656
+ | `streamLoadFailed(loaded)` | `"Failed to load (1,200 received)"` | `"読み込みに失敗しました (1,200 件受信済)"` |
599
657
  | `annotationReconnecting(loaded)` | `"Reconnecting (1,200 received)"` | `"再接続中 (1,200 件受信済)"` |
600
- | `annotationAuthRequired` | `"Session expired: sign in again, then retry"` | `"セッションが切れました。サインインし直してから再試行してください"` |
601
- | `annotationRetry` | `"Retry"` | `"再試行"` |
658
+ | `streamAuthRequired` | `"Session expired: sign in again, then retry"` | `"セッションが切れました。サインインし直してから再試行してください"` |
659
+ | `streamRetry` | `"Retry"` | `"再試行"` |
602
660
  | `recordUnit(displayed)` | `"records"` | `"件"` |
603
661
  | `companyUnit(displayed)` | `"companies"` | `"社"` |
604
662
  | `searchTab` | `"Fuzzy search"` | `"あいまい検索"` |
package/dist/client.d.mts CHANGED
@@ -67,8 +67,6 @@ interface ContactMapAnnotationProps {
67
67
  phase: ContactMapStreamPhase;
68
68
  loadedCount: number;
69
69
  totalCount: number | null;
70
- errorMessage: string | null;
71
- onRetry?: () => void;
72
70
  }
73
71
  declare const ContactMapAnnotation: react.NamedExoticComponent<ContactMapAnnotationProps>;
74
72
  type ContactMapLocale = VirtualScrollLocale;
@@ -91,10 +89,10 @@ type ContactMapOwnLabels = {
91
89
  readonly annotationCompaniesLabel: string;
92
90
  readonly annotationStreamingProgress: (progress: ContactMapStreamProgress) => string;
93
91
  readonly annotationStreamingCount: (loaded: number) => string;
94
- readonly annotationLoadFailed: (loaded: number) => string;
92
+ readonly streamLoadFailed: (loaded: number) => string;
95
93
  readonly annotationReconnecting: (loaded: number) => string;
96
- readonly annotationAuthRequired: string;
97
- readonly annotationRetry: string;
94
+ readonly streamAuthRequired: string;
95
+ readonly streamRetry: string;
98
96
  readonly recordUnit: (displayed: string) => string;
99
97
  readonly companyUnit: (displayed: string) => string;
100
98
  readonly searchTab: string;
@@ -471,6 +469,18 @@ declare const composeTreeVirtualScrollOptions: <T extends DirectoryTreeVirtualSc
471
469
  };
472
470
  };
473
471
  declare const ContactMapSearchTreeView: ({ context, controlsContainer }: ContactMapSearchTreeViewProps) => react.JSX.Element;
472
+ interface ContactMapStreamAnnouncerProps {
473
+ phase: ContactMapStreamPhase;
474
+ loadedCount: number;
475
+ }
476
+ declare const ContactMapStreamAnnouncer: react.NamedExoticComponent<ContactMapStreamAnnouncerProps>;
477
+ interface ContactMapStreamFailureNoticeProps {
478
+ phase: ContactMapStreamPhase;
479
+ loadedCount: number;
480
+ errorMessage: string | null;
481
+ onRetry: () => void;
482
+ }
483
+ declare const ContactMapStreamFailureNotice: react.NamedExoticComponent<ContactMapStreamFailureNoticeProps>;
474
484
  interface HighlightedTextProps {
475
485
  text: string;
476
486
  query: string;
@@ -729,4 +739,4 @@ declare const Tabs: react.ForwardRefExoticComponent<TabsPrimitive.TabsProps & re
729
739
  declare const TabsList: react.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
730
740
  declare const TabsTrigger: react.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
731
741
  declare const TabsContent: react.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
732
- export { AdvancedSearchSettings, type AdvancedSearchSettingsProps, BasicSearchSettings, type BasicSearchSettingsProps, CONTACT_MAP_LABEL_CATALOGS, CONTACT_MAP_LABEL_KEYS, ContactDetailGrid, type ContactDetailGridProps, type ContactDetailGridSkeletonProps, ContactDetailPanel, type ContactDetailPanelPlacement, type ContactDetailPanelProps, ContactDetailPopup, type ContactDetailPopupProps, ContactDetailRowLayout, type ContactDetailRowLayoutProps, ContactMapAnnotation, type ContactMapAnnotationProps, ContactMapAppView, type ContactMapAppViewProps, type ContactMapChromeSurface, type ContactMapConfig, ContactMapConfigProvider, type ContactMapHistoryEntry, type ContactMapLabelOverrides, type ContactMapLabels, type ContactMapLocale, type ContactMapOwnLabels, type ContactMapQueryLengthStat, ContactMapSearchListView, ContactMapSearchPage, type ContactMapSearchPageProps, ContactMapSearchTabGroup, type ContactMapSearchTabGroupProps, ContactMapSearchTreeView, type ContactMapSearchTreeViewProps, ContactMapStreamClient, type ContactMapStreamClientDeps, type ContactMapStreamHandle, ContactMapStreamPhase, type ContactMapStreamProgress, type ContactMapStreamState, type ContactMapTab, type ContactMapWorkerUrlKey, type ContactMapWorkerUrls, type ContactMapWorkerUrlsSurface, HighlightedText, type HighlightedTextProps, type HorizontalDragScrollHandlers, IndexWorkerSettings, type IndexWorkerSettingsProps, LIST_COLLAPSE_THRESHOLD, LIST_DETAIL_PANEL_MIN_WIDTH, LIST_EXPAND_THRESHOLD, LIST_PANEL_MIN_WIDTH, LIST_RESIZE_HANDLE_THICKNESS, LevenshteinWorkerSettings, type LevenshteinWorkerSettingsProps, Progress, type ProgressProps, SearchOptionsPanel, type SearchOptionsPanelProps, type SearchOptionsPanelTab, StatItem, type StatItemProps, StatisticsPanel, type StatisticsPanelProps, type StatisticsPanelTab, SwipeOverlay, type SwipeOverlayProps, TREE_COLLAPSE_THRESHOLD, TREE_DETAIL_PANEL_MIN_WIDTH, TREE_EXPAND_THRESHOLD, TREE_PANEL_MIN_WIDTH, TREE_RESIZE_HANDLE_THICKNESS, Tabs, TabsContent, TabsList, TabsTrigger, TreeWorkerSession, type TreeWorkerSessionOptions, type TreeWorkerSnapshot, type TreeWorkerSource, type TreeWorkerState, type UseDynamicViewportHeightOptions, type UseDynamicViewportHeightResult, type UseHorizontalDragScrollOptions, type UseLongPressPopupOptions, type UseLongPressPopupReturn, type UseResponsiveTwoColumnLayoutOptions, type UseResponsiveTwoColumnLayoutResult, type WorkerStatsKind, WorkerStatsSection, type WorkerStatsSectionProps, assertContactMapStreamEndpoint, assertContactMapTreeWorkerUrl, assertContactMapWorkerUrls, composeTreeVirtualScrollOptions, contactMapShouldRevalidate, countContactMapCompanies, deserializeStreamRecord, getContactMapStreamClient, getTreeWorkerSession, layerContactMapWorkerUrls, resetContactMapStreamClientForTesting, resetTreeWorkerSessionForTesting, resolveContactMapLabels, useAnimatedNumber, useContactMapConfig, useContactMapLabels, useContactMapStream, useContactPanelSizing, useDynamicViewportHeight, useHorizontalDragScroll, useLongPressPopup, useReportPopupVisibility, useResponsiveTwoColumnLayout, useRowPopupRegistry, useStreamedContactMapContext, useTreeWorker };
742
+ export { AdvancedSearchSettings, type AdvancedSearchSettingsProps, BasicSearchSettings, type BasicSearchSettingsProps, CONTACT_MAP_LABEL_CATALOGS, CONTACT_MAP_LABEL_KEYS, ContactDetailGrid, type ContactDetailGridProps, type ContactDetailGridSkeletonProps, ContactDetailPanel, type ContactDetailPanelPlacement, type ContactDetailPanelProps, ContactDetailPopup, type ContactDetailPopupProps, ContactDetailRowLayout, type ContactDetailRowLayoutProps, ContactMapAnnotation, type ContactMapAnnotationProps, ContactMapAppView, type ContactMapAppViewProps, type ContactMapChromeSurface, type ContactMapConfig, ContactMapConfigProvider, type ContactMapHistoryEntry, type ContactMapLabelOverrides, type ContactMapLabels, type ContactMapLocale, type ContactMapOwnLabels, type ContactMapQueryLengthStat, ContactMapSearchListView, ContactMapSearchPage, type ContactMapSearchPageProps, ContactMapSearchTabGroup, type ContactMapSearchTabGroupProps, ContactMapSearchTreeView, type ContactMapSearchTreeViewProps, ContactMapStreamAnnouncer, type ContactMapStreamAnnouncerProps, ContactMapStreamClient, type ContactMapStreamClientDeps, ContactMapStreamFailureNotice, type ContactMapStreamFailureNoticeProps, type ContactMapStreamHandle, ContactMapStreamPhase, type ContactMapStreamProgress, type ContactMapStreamState, type ContactMapTab, type ContactMapWorkerUrlKey, type ContactMapWorkerUrls, type ContactMapWorkerUrlsSurface, HighlightedText, type HighlightedTextProps, type HorizontalDragScrollHandlers, IndexWorkerSettings, type IndexWorkerSettingsProps, LIST_COLLAPSE_THRESHOLD, LIST_DETAIL_PANEL_MIN_WIDTH, LIST_EXPAND_THRESHOLD, LIST_PANEL_MIN_WIDTH, LIST_RESIZE_HANDLE_THICKNESS, LevenshteinWorkerSettings, type LevenshteinWorkerSettingsProps, Progress, type ProgressProps, SearchOptionsPanel, type SearchOptionsPanelProps, type SearchOptionsPanelTab, StatItem, type StatItemProps, StatisticsPanel, type StatisticsPanelProps, type StatisticsPanelTab, SwipeOverlay, type SwipeOverlayProps, TREE_COLLAPSE_THRESHOLD, TREE_DETAIL_PANEL_MIN_WIDTH, TREE_EXPAND_THRESHOLD, TREE_PANEL_MIN_WIDTH, TREE_RESIZE_HANDLE_THICKNESS, Tabs, TabsContent, TabsList, TabsTrigger, TreeWorkerSession, type TreeWorkerSessionOptions, type TreeWorkerSnapshot, type TreeWorkerSource, type TreeWorkerState, type UseDynamicViewportHeightOptions, type UseDynamicViewportHeightResult, type UseHorizontalDragScrollOptions, type UseLongPressPopupOptions, type UseLongPressPopupReturn, type UseResponsiveTwoColumnLayoutOptions, type UseResponsiveTwoColumnLayoutResult, type WorkerStatsKind, WorkerStatsSection, type WorkerStatsSectionProps, assertContactMapStreamEndpoint, assertContactMapTreeWorkerUrl, assertContactMapWorkerUrls, composeTreeVirtualScrollOptions, contactMapShouldRevalidate, countContactMapCompanies, deserializeStreamRecord, getContactMapStreamClient, getTreeWorkerSession, layerContactMapWorkerUrls, resetContactMapStreamClientForTesting, resetTreeWorkerSessionForTesting, resolveContactMapLabels, useAnimatedNumber, useContactMapConfig, useContactMapLabels, useContactMapStream, useContactPanelSizing, useDynamicViewportHeight, useHorizontalDragScroll, useLongPressPopup, useReportPopupVisibility, useResponsiveTwoColumnLayout, useRowPopupRegistry, useStreamedContactMapContext, useTreeWorker };
package/dist/client.d.ts CHANGED
@@ -67,8 +67,6 @@ interface ContactMapAnnotationProps {
67
67
  phase: ContactMapStreamPhase;
68
68
  loadedCount: number;
69
69
  totalCount: number | null;
70
- errorMessage: string | null;
71
- onRetry?: () => void;
72
70
  }
73
71
  declare const ContactMapAnnotation: react.NamedExoticComponent<ContactMapAnnotationProps>;
74
72
  type ContactMapLocale = VirtualScrollLocale;
@@ -91,10 +89,10 @@ type ContactMapOwnLabels = {
91
89
  readonly annotationCompaniesLabel: string;
92
90
  readonly annotationStreamingProgress: (progress: ContactMapStreamProgress) => string;
93
91
  readonly annotationStreamingCount: (loaded: number) => string;
94
- readonly annotationLoadFailed: (loaded: number) => string;
92
+ readonly streamLoadFailed: (loaded: number) => string;
95
93
  readonly annotationReconnecting: (loaded: number) => string;
96
- readonly annotationAuthRequired: string;
97
- readonly annotationRetry: string;
94
+ readonly streamAuthRequired: string;
95
+ readonly streamRetry: string;
98
96
  readonly recordUnit: (displayed: string) => string;
99
97
  readonly companyUnit: (displayed: string) => string;
100
98
  readonly searchTab: string;
@@ -471,6 +469,18 @@ declare const composeTreeVirtualScrollOptions: <T extends DirectoryTreeVirtualSc
471
469
  };
472
470
  };
473
471
  declare const ContactMapSearchTreeView: ({ context, controlsContainer }: ContactMapSearchTreeViewProps) => react.JSX.Element;
472
+ interface ContactMapStreamAnnouncerProps {
473
+ phase: ContactMapStreamPhase;
474
+ loadedCount: number;
475
+ }
476
+ declare const ContactMapStreamAnnouncer: react.NamedExoticComponent<ContactMapStreamAnnouncerProps>;
477
+ interface ContactMapStreamFailureNoticeProps {
478
+ phase: ContactMapStreamPhase;
479
+ loadedCount: number;
480
+ errorMessage: string | null;
481
+ onRetry: () => void;
482
+ }
483
+ declare const ContactMapStreamFailureNotice: react.NamedExoticComponent<ContactMapStreamFailureNoticeProps>;
474
484
  interface HighlightedTextProps {
475
485
  text: string;
476
486
  query: string;
@@ -729,4 +739,4 @@ declare const Tabs: react.ForwardRefExoticComponent<TabsPrimitive.TabsProps & re
729
739
  declare const TabsList: react.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
730
740
  declare const TabsTrigger: react.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
731
741
  declare const TabsContent: react.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
732
- export { AdvancedSearchSettings, type AdvancedSearchSettingsProps, BasicSearchSettings, type BasicSearchSettingsProps, CONTACT_MAP_LABEL_CATALOGS, CONTACT_MAP_LABEL_KEYS, ContactDetailGrid, type ContactDetailGridProps, type ContactDetailGridSkeletonProps, ContactDetailPanel, type ContactDetailPanelPlacement, type ContactDetailPanelProps, ContactDetailPopup, type ContactDetailPopupProps, ContactDetailRowLayout, type ContactDetailRowLayoutProps, ContactMapAnnotation, type ContactMapAnnotationProps, ContactMapAppView, type ContactMapAppViewProps, type ContactMapChromeSurface, type ContactMapConfig, ContactMapConfigProvider, type ContactMapHistoryEntry, type ContactMapLabelOverrides, type ContactMapLabels, type ContactMapLocale, type ContactMapOwnLabels, type ContactMapQueryLengthStat, ContactMapSearchListView, ContactMapSearchPage, type ContactMapSearchPageProps, ContactMapSearchTabGroup, type ContactMapSearchTabGroupProps, ContactMapSearchTreeView, type ContactMapSearchTreeViewProps, ContactMapStreamClient, type ContactMapStreamClientDeps, type ContactMapStreamHandle, ContactMapStreamPhase, type ContactMapStreamProgress, type ContactMapStreamState, type ContactMapTab, type ContactMapWorkerUrlKey, type ContactMapWorkerUrls, type ContactMapWorkerUrlsSurface, HighlightedText, type HighlightedTextProps, type HorizontalDragScrollHandlers, IndexWorkerSettings, type IndexWorkerSettingsProps, LIST_COLLAPSE_THRESHOLD, LIST_DETAIL_PANEL_MIN_WIDTH, LIST_EXPAND_THRESHOLD, LIST_PANEL_MIN_WIDTH, LIST_RESIZE_HANDLE_THICKNESS, LevenshteinWorkerSettings, type LevenshteinWorkerSettingsProps, Progress, type ProgressProps, SearchOptionsPanel, type SearchOptionsPanelProps, type SearchOptionsPanelTab, StatItem, type StatItemProps, StatisticsPanel, type StatisticsPanelProps, type StatisticsPanelTab, SwipeOverlay, type SwipeOverlayProps, TREE_COLLAPSE_THRESHOLD, TREE_DETAIL_PANEL_MIN_WIDTH, TREE_EXPAND_THRESHOLD, TREE_PANEL_MIN_WIDTH, TREE_RESIZE_HANDLE_THICKNESS, Tabs, TabsContent, TabsList, TabsTrigger, TreeWorkerSession, type TreeWorkerSessionOptions, type TreeWorkerSnapshot, type TreeWorkerSource, type TreeWorkerState, type UseDynamicViewportHeightOptions, type UseDynamicViewportHeightResult, type UseHorizontalDragScrollOptions, type UseLongPressPopupOptions, type UseLongPressPopupReturn, type UseResponsiveTwoColumnLayoutOptions, type UseResponsiveTwoColumnLayoutResult, type WorkerStatsKind, WorkerStatsSection, type WorkerStatsSectionProps, assertContactMapStreamEndpoint, assertContactMapTreeWorkerUrl, assertContactMapWorkerUrls, composeTreeVirtualScrollOptions, contactMapShouldRevalidate, countContactMapCompanies, deserializeStreamRecord, getContactMapStreamClient, getTreeWorkerSession, layerContactMapWorkerUrls, resetContactMapStreamClientForTesting, resetTreeWorkerSessionForTesting, resolveContactMapLabels, useAnimatedNumber, useContactMapConfig, useContactMapLabels, useContactMapStream, useContactPanelSizing, useDynamicViewportHeight, useHorizontalDragScroll, useLongPressPopup, useReportPopupVisibility, useResponsiveTwoColumnLayout, useRowPopupRegistry, useStreamedContactMapContext, useTreeWorker };
742
+ export { AdvancedSearchSettings, type AdvancedSearchSettingsProps, BasicSearchSettings, type BasicSearchSettingsProps, CONTACT_MAP_LABEL_CATALOGS, CONTACT_MAP_LABEL_KEYS, ContactDetailGrid, type ContactDetailGridProps, type ContactDetailGridSkeletonProps, ContactDetailPanel, type ContactDetailPanelPlacement, type ContactDetailPanelProps, ContactDetailPopup, type ContactDetailPopupProps, ContactDetailRowLayout, type ContactDetailRowLayoutProps, ContactMapAnnotation, type ContactMapAnnotationProps, ContactMapAppView, type ContactMapAppViewProps, type ContactMapChromeSurface, type ContactMapConfig, ContactMapConfigProvider, type ContactMapHistoryEntry, type ContactMapLabelOverrides, type ContactMapLabels, type ContactMapLocale, type ContactMapOwnLabels, type ContactMapQueryLengthStat, ContactMapSearchListView, ContactMapSearchPage, type ContactMapSearchPageProps, ContactMapSearchTabGroup, type ContactMapSearchTabGroupProps, ContactMapSearchTreeView, type ContactMapSearchTreeViewProps, ContactMapStreamAnnouncer, type ContactMapStreamAnnouncerProps, ContactMapStreamClient, type ContactMapStreamClientDeps, ContactMapStreamFailureNotice, type ContactMapStreamFailureNoticeProps, type ContactMapStreamHandle, ContactMapStreamPhase, type ContactMapStreamProgress, type ContactMapStreamState, type ContactMapTab, type ContactMapWorkerUrlKey, type ContactMapWorkerUrls, type ContactMapWorkerUrlsSurface, HighlightedText, type HighlightedTextProps, type HorizontalDragScrollHandlers, IndexWorkerSettings, type IndexWorkerSettingsProps, LIST_COLLAPSE_THRESHOLD, LIST_DETAIL_PANEL_MIN_WIDTH, LIST_EXPAND_THRESHOLD, LIST_PANEL_MIN_WIDTH, LIST_RESIZE_HANDLE_THICKNESS, LevenshteinWorkerSettings, type LevenshteinWorkerSettingsProps, Progress, type ProgressProps, SearchOptionsPanel, type SearchOptionsPanelProps, type SearchOptionsPanelTab, StatItem, type StatItemProps, StatisticsPanel, type StatisticsPanelProps, type StatisticsPanelTab, SwipeOverlay, type SwipeOverlayProps, TREE_COLLAPSE_THRESHOLD, TREE_DETAIL_PANEL_MIN_WIDTH, TREE_EXPAND_THRESHOLD, TREE_PANEL_MIN_WIDTH, TREE_RESIZE_HANDLE_THICKNESS, Tabs, TabsContent, TabsList, TabsTrigger, TreeWorkerSession, type TreeWorkerSessionOptions, type TreeWorkerSnapshot, type TreeWorkerSource, type TreeWorkerState, type UseDynamicViewportHeightOptions, type UseDynamicViewportHeightResult, type UseHorizontalDragScrollOptions, type UseLongPressPopupOptions, type UseLongPressPopupReturn, type UseResponsiveTwoColumnLayoutOptions, type UseResponsiveTwoColumnLayoutResult, type WorkerStatsKind, WorkerStatsSection, type WorkerStatsSectionProps, assertContactMapStreamEndpoint, assertContactMapTreeWorkerUrl, assertContactMapWorkerUrls, composeTreeVirtualScrollOptions, contactMapShouldRevalidate, countContactMapCompanies, deserializeStreamRecord, getContactMapStreamClient, getTreeWorkerSession, layerContactMapWorkerUrls, resetContactMapStreamClientForTesting, resetTreeWorkerSessionForTesting, resolveContactMapLabels, useAnimatedNumber, useContactMapConfig, useContactMapLabels, useContactMapStream, useContactPanelSizing, useDynamicViewportHeight, useHorizontalDragScroll, useLongPressPopup, useReportPopupVisibility, useResponsiveTwoColumnLayout, useRowPopupRegistry, useStreamedContactMapContext, useTreeWorker };