@keepkit/ui 0.28.17 → 0.28.18
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 +196 -5
- package/dist/chunk-4O5N26YS.js +218 -0
- package/dist/chunk-4O5N26YS.js.map +1 -0
- package/dist/chunk-5ETQGHPV.js +307 -0
- package/dist/chunk-5ETQGHPV.js.map +1 -0
- package/dist/chunk-5SFHCUDA.js +200 -0
- package/dist/chunk-5SFHCUDA.js.map +1 -0
- package/dist/chunk-6753KF4D.js +357 -0
- package/dist/chunk-6753KF4D.js.map +1 -0
- package/dist/chunk-6JKG6SKJ.js +234 -0
- package/dist/chunk-6JKG6SKJ.js.map +1 -0
- package/dist/chunk-7DCSOVGM.js +23 -0
- package/dist/chunk-7DCSOVGM.js.map +1 -0
- package/dist/chunk-7DOB3Z6F.js +565 -0
- package/dist/chunk-7DOB3Z6F.js.map +1 -0
- package/dist/chunk-AQOSZ6AW.js +287 -0
- package/dist/chunk-AQOSZ6AW.js.map +1 -0
- package/dist/chunk-BJCZ7MFN.js +322 -0
- package/dist/chunk-BJCZ7MFN.js.map +1 -0
- package/dist/chunk-BW4SUJIX.js +135 -0
- package/dist/chunk-BW4SUJIX.js.map +1 -0
- package/dist/chunk-BYYWJGSN.js +220 -0
- package/dist/chunk-BYYWJGSN.js.map +1 -0
- package/dist/chunk-CIVXLU4D.js +111 -0
- package/dist/chunk-CIVXLU4D.js.map +1 -0
- package/dist/chunk-DMDBZJPO.js +37 -0
- package/dist/chunk-DMDBZJPO.js.map +1 -0
- package/dist/chunk-DQ5RMIU5.js +112 -0
- package/dist/chunk-DQ5RMIU5.js.map +1 -0
- package/dist/chunk-G2JWJKST.js +95 -0
- package/dist/chunk-G2JWJKST.js.map +1 -0
- package/dist/chunk-G76JVCNJ.js +55 -0
- package/dist/chunk-G76JVCNJ.js.map +1 -0
- package/dist/chunk-GZEFBTVD.js +37 -0
- package/dist/chunk-GZEFBTVD.js.map +1 -0
- package/dist/chunk-HFXB4S72.js +160 -0
- package/dist/chunk-HFXB4S72.js.map +1 -0
- package/dist/chunk-JJ4L5AKR.js +389 -0
- package/dist/chunk-JJ4L5AKR.js.map +1 -0
- package/dist/chunk-K2L44I7D.js +152 -0
- package/dist/chunk-K2L44I7D.js.map +1 -0
- package/dist/chunk-LKNVVPTN.js +210 -0
- package/dist/chunk-LKNVVPTN.js.map +1 -0
- package/dist/chunk-M3UORQXZ.js +2983 -0
- package/dist/chunk-M3UORQXZ.js.map +1 -0
- package/dist/chunk-M46GROWD.js +116 -0
- package/dist/chunk-M46GROWD.js.map +1 -0
- package/dist/chunk-MMGM7JIE.js +141 -0
- package/dist/chunk-MMGM7JIE.js.map +1 -0
- package/dist/chunk-NOPTRHRR.js +26 -0
- package/dist/chunk-NOPTRHRR.js.map +1 -0
- package/dist/chunk-NSYL6RSY.js +20 -0
- package/dist/chunk-NSYL6RSY.js.map +1 -0
- package/dist/chunk-NVFKN4NU.js +94 -0
- package/dist/chunk-NVFKN4NU.js.map +1 -0
- package/dist/chunk-P2WLTFPG.js +46 -0
- package/dist/chunk-P2WLTFPG.js.map +1 -0
- package/dist/chunk-PE57SLZO.js +798 -0
- package/dist/chunk-PE57SLZO.js.map +1 -0
- package/dist/chunk-PHFY6LQT.js +167 -0
- package/dist/chunk-PHFY6LQT.js.map +1 -0
- package/dist/chunk-PZHARNLY.js +208 -0
- package/dist/chunk-PZHARNLY.js.map +1 -0
- package/dist/chunk-Q6AFJL4Y.js +318 -0
- package/dist/chunk-Q6AFJL4Y.js.map +1 -0
- package/dist/chunk-Q7IEJ2YF.js +49 -0
- package/dist/chunk-Q7IEJ2YF.js.map +1 -0
- package/dist/chunk-QOCX37A5.js +69 -0
- package/dist/chunk-QOCX37A5.js.map +1 -0
- package/dist/chunk-RIWL3IPZ.js +46 -0
- package/dist/chunk-RIWL3IPZ.js.map +1 -0
- package/dist/chunk-RKYQGWKB.js +229 -0
- package/dist/chunk-RKYQGWKB.js.map +1 -0
- package/dist/chunk-SYLOO5TX.js +504 -0
- package/dist/chunk-SYLOO5TX.js.map +1 -0
- package/dist/chunk-URE4EGL2.js +206 -0
- package/dist/chunk-URE4EGL2.js.map +1 -0
- package/dist/chunk-VM4ROXYF.js +114 -0
- package/dist/chunk-VM4ROXYF.js.map +1 -0
- package/dist/chunk-VTPSR3LD.js +16 -0
- package/dist/chunk-VTPSR3LD.js.map +1 -0
- package/dist/chunk-WB6NBGC2.js +112 -0
- package/dist/chunk-WB6NBGC2.js.map +1 -0
- package/dist/chunk-XJFMMRQR.js +110 -0
- package/dist/chunk-XJFMMRQR.js.map +1 -0
- package/dist/chunk-XKWDO5VL.js +156 -0
- package/dist/chunk-XKWDO5VL.js.map +1 -0
- package/dist/chunk-XVOLYEUK.js +65 -0
- package/dist/chunk-XVOLYEUK.js.map +1 -0
- package/dist/chunk-YCUQ2YTP.js +169 -0
- package/dist/chunk-YCUQ2YTP.js.map +1 -0
- package/dist/chunk-ZCDLWGQV.js +140 -0
- package/dist/chunk-ZCDLWGQV.js.map +1 -0
- package/dist/collection-select-X6WKM--x.d.ts +25 -0
- package/dist/entries/active-filters-summary.d.ts +58 -0
- package/dist/entries/active-filters-summary.js +10 -0
- package/dist/entries/active-filters-summary.js.map +1 -0
- package/dist/entries/announcements.d.ts +4 -0
- package/dist/entries/announcements.js +11 -0
- package/dist/entries/announcements.js.map +1 -0
- package/dist/entries/announcer.d.ts +4 -0
- package/dist/entries/announcer.js +11 -0
- package/dist/entries/announcer.js.map +1 -0
- package/dist/entries/archive-button.d.ts +4 -0
- package/dist/entries/archive-button.js +9 -0
- package/dist/entries/archive-button.js.map +1 -0
- package/dist/entries/archive-scope-select.d.ts +13 -0
- package/dist/entries/archive-scope-select.js +9 -0
- package/dist/entries/archive-scope-select.js.map +1 -0
- package/dist/entries/archive-undo.d.ts +6 -0
- package/dist/entries/archive-undo.js +10 -0
- package/dist/entries/archive-undo.js.map +1 -0
- package/dist/entries/backup.d.ts +19 -0
- package/dist/entries/backup.js +10 -0
- package/dist/entries/backup.js.map +1 -0
- package/dist/entries/bulk-actions.d.ts +60 -0
- package/dist/entries/bulk-actions.js +12 -0
- package/dist/entries/bulk-actions.js.map +1 -0
- package/dist/entries/button.d.ts +21 -0
- package/dist/entries/button.js +10 -0
- package/dist/entries/button.js.map +1 -0
- package/dist/entries/collection-create.d.ts +19 -0
- package/dist/entries/collection-create.js +10 -0
- package/dist/entries/collection-create.js.map +1 -0
- package/dist/entries/collection-filter.d.ts +3 -0
- package/dist/entries/collection-filter.js +10 -0
- package/dist/entries/collection-filter.js.map +1 -0
- package/dist/entries/collection-manager.d.ts +29 -0
- package/dist/entries/collection-manager.js +12 -0
- package/dist/entries/collection-manager.js.map +1 -0
- package/dist/entries/collection-select.d.ts +3 -0
- package/dist/entries/collection-select.js +10 -0
- package/dist/entries/collection-select.js.map +1 -0
- package/dist/entries/collection.d.ts +11 -0
- package/dist/entries/collection.js +32 -0
- package/dist/entries/collection.js.map +1 -0
- package/dist/entries/empty-state.d.ts +17 -0
- package/dist/entries/empty-state.js +10 -0
- package/dist/entries/empty-state.js.map +1 -0
- package/dist/entries/error-boundary.d.ts +1 -0
- package/dist/entries/error-boundary.js +8 -0
- package/dist/entries/error-boundary.js.map +1 -0
- package/dist/entries/fallback-recovery.d.ts +12 -0
- package/dist/entries/fallback-recovery.js +9 -0
- package/dist/entries/fallback-recovery.js.map +1 -0
- package/dist/entries/floating-tour.d.ts +23 -0
- package/dist/entries/floating-tour.js +14 -0
- package/dist/entries/floating-tour.js.map +1 -0
- package/dist/entries/highlight.d.ts +2 -0
- package/dist/entries/highlight.js +8 -0
- package/dist/entries/highlight.js.map +1 -0
- package/dist/entries/inbox.d.ts +19 -0
- package/dist/entries/inbox.js +33 -0
- package/dist/entries/inbox.js.map +1 -0
- package/dist/entries/item-card-skeleton.d.ts +20 -0
- package/dist/entries/item-card-skeleton.js +8 -0
- package/dist/entries/item-card-skeleton.js.map +1 -0
- package/dist/entries/item-card.d.ts +412 -0
- package/dist/entries/item-card.js +17 -0
- package/dist/entries/item-card.js.map +1 -0
- package/dist/entries/item-checkbox.d.ts +14 -0
- package/dist/entries/item-checkbox.js +8 -0
- package/dist/entries/item-checkbox.js.map +1 -0
- package/dist/entries/item-status-badge.d.ts +13 -0
- package/dist/entries/item-status-badge.js +10 -0
- package/dist/entries/item-status-badge.js.map +1 -0
- package/dist/entries/kit-provider.d.ts +18 -0
- package/dist/entries/kit-provider.js +14 -0
- package/dist/entries/kit-provider.js.map +1 -0
- package/dist/entries/last-activity.d.ts +12 -0
- package/dist/entries/last-activity.js +9 -0
- package/dist/entries/last-activity.js.map +1 -0
- package/dist/entries/layout.d.ts +21 -0
- package/dist/entries/layout.js +9 -0
- package/dist/entries/layout.js.map +1 -0
- package/dist/entries/list.d.ts +11 -0
- package/dist/entries/list.js +23 -0
- package/dist/entries/list.js.map +1 -0
- package/dist/entries/navigator.d.ts +4 -0
- package/dist/entries/navigator.js +11 -0
- package/dist/entries/navigator.js.map +1 -0
- package/dist/entries/note-editor.d.ts +32 -0
- package/dist/entries/note-editor.js +11 -0
- package/dist/entries/note-editor.js.map +1 -0
- package/dist/entries/pagination.d.ts +3 -0
- package/dist/entries/pagination.js +9 -0
- package/dist/entries/pagination.js.map +1 -0
- package/dist/entries/pin-button.d.ts +4 -0
- package/dist/entries/pin-button.js +9 -0
- package/dist/entries/pin-button.js.map +1 -0
- package/dist/entries/provider.d.ts +1 -0
- package/dist/entries/provider.js +8 -0
- package/dist/entries/provider.js.map +1 -0
- package/dist/entries/prune-stale-button.d.ts +3 -0
- package/dist/entries/prune-stale-button.js +12 -0
- package/dist/entries/prune-stale-button.js.map +1 -0
- package/dist/entries/quick-editor.d.ts +3 -0
- package/dist/entries/quick-editor.js +11 -0
- package/dist/entries/quick-editor.js.map +1 -0
- package/dist/entries/rediscovery-panel.d.ts +12 -0
- package/dist/entries/rediscovery-panel.js +24 -0
- package/dist/entries/rediscovery-panel.js.map +1 -0
- package/dist/entries/rediscovery.d.ts +12 -0
- package/dist/entries/rediscovery.js +24 -0
- package/dist/entries/rediscovery.js.map +1 -0
- package/dist/entries/reorderable-list.d.ts +35 -0
- package/dist/entries/reorderable-list.js +10 -0
- package/dist/entries/reorderable-list.js.map +1 -0
- package/dist/entries/save-popover.d.ts +39 -0
- package/dist/entries/save-popover.js +15 -0
- package/dist/entries/save-popover.js.map +1 -0
- package/dist/entries/save-view-button.d.ts +3 -0
- package/dist/entries/save-view-button.js +9 -0
- package/dist/entries/save-view-button.js.map +1 -0
- package/dist/entries/saved-views.d.ts +3 -0
- package/dist/entries/saved-views.js +9 -0
- package/dist/entries/saved-views.js.map +1 -0
- package/dist/entries/search-input.d.ts +3 -0
- package/dist/entries/search-input.js +9 -0
- package/dist/entries/search-input.js.map +1 -0
- package/dist/entries/shortcut-hint.d.ts +11 -0
- package/dist/entries/shortcut-hint.js +8 -0
- package/dist/entries/shortcut-hint.js.map +1 -0
- package/dist/entries/sort-select.d.ts +3 -0
- package/dist/entries/sort-select.js +9 -0
- package/dist/entries/sort-select.js.map +1 -0
- package/dist/entries/stale-notice.d.ts +3 -0
- package/dist/entries/stale-notice.js +12 -0
- package/dist/entries/stale-notice.js.map +1 -0
- package/dist/entries/status.d.ts +4 -0
- package/dist/entries/status.js +11 -0
- package/dist/entries/status.js.map +1 -0
- package/dist/entries/sync-recovery-dialog.d.ts +18 -0
- package/dist/entries/sync-recovery-dialog.js +11 -0
- package/dist/entries/sync-recovery-dialog.js.map +1 -0
- package/dist/entries/sync-status-banner.d.ts +12 -0
- package/dist/entries/sync-status-banner.js +10 -0
- package/dist/entries/sync-status-banner.js.map +1 -0
- package/dist/entries/tag-editor.d.ts +22 -0
- package/dist/entries/tag-editor.js +10 -0
- package/dist/entries/tag-editor.js.map +1 -0
- package/dist/entries/tag-filter.d.ts +33 -0
- package/dist/entries/tag-filter.js +10 -0
- package/dist/entries/tag-filter.js.map +1 -0
- package/dist/entries/theme-provider.d.ts +2 -0
- package/dist/entries/theme-provider.js +9 -0
- package/dist/entries/theme-provider.js.map +1 -0
- package/dist/entries/tour-bar.d.ts +4 -0
- package/dist/entries/tour-bar.js +11 -0
- package/dist/entries/tour-bar.js.map +1 -0
- package/dist/entries/tour-provider.d.ts +3 -0
- package/dist/entries/tour-provider.js +8 -0
- package/dist/entries/tour-provider.js.map +1 -0
- package/dist/entries/ui-provider.d.ts +5 -0
- package/dist/entries/ui-provider.js +8 -0
- package/dist/entries/ui-provider.js.map +1 -0
- package/dist/entries/undo.d.ts +11 -0
- package/dist/entries/undo.js +10 -0
- package/dist/entries/undo.js.map +1 -0
- package/dist/entries/workspace.d.ts +59 -0
- package/dist/entries/workspace.js +37 -0
- package/dist/entries/workspace.js.map +1 -0
- package/dist/highlight-BFeqa6kU.d.ts +40 -0
- package/dist/index.d.ts +63 -1409
- package/dist/index.js +198 -10271
- package/dist/index.js.map +1 -1
- package/dist/list-C350Dche.d.ts +141 -0
- package/dist/pin-button-DK3j0atw.d.ts +27 -0
- package/dist/quick-editor-BpsvwjQS.d.ts +61 -0
- package/dist/rediscovery-F5gTtPUz.d.ts +20 -0
- package/dist/saved-views-BXIyAVBn.d.ts +14 -0
- package/dist/sort-select-DBlR6ubA.d.ts +40 -0
- package/dist/stale-notice-DczSweyn.d.ts +24 -0
- package/dist/status-xiIQ206y.d.ts +31 -0
- package/dist/styles/base.css +87 -55
- package/dist/styles/collection.css +1 -0
- package/dist/tailwind.css +0 -30
- package/dist/theme-provider-DFMkjkmm.d.ts +37 -0
- package/dist/tour-bar-iiXvVYE8.d.ts +51 -0
- package/dist/tour-provider-BqhPK2vS.d.ts +40 -0
- package/dist/ui-context-BE201rLI.d.ts +70 -0
- package/dist/ui-provider-Bqziw03k.d.ts +7 -0
- package/package.json +226 -2
package/README.md
CHANGED
|
@@ -2,13 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
[日本語](#日本語) | [English](#english)
|
|
4
4
|
|
|
5
|
-
Release: v0.28.
|
|
5
|
+
Release: v0.28.18
|
|
6
6
|
|
|
7
7
|
## 日本語
|
|
8
8
|
|
|
9
9
|
KeepKitのReact向けUIパッケージです。`@keepkit/core`を含み、保存ボタンと一覧を共通のProviderで利用できます。
|
|
10
10
|
CSSは任意で、標準テーマでも独自のスタイルでも使えます。React 18以降に対応します。
|
|
11
11
|
|
|
12
|
+
一覧を使わずに保存ボタンだけを追加する場合は、部品の入口を直接importできます。CSSも必要なものだけを読み込みます。コンポーネントは通常どおり同じProviderの中に置いてください。
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { KeepButton } from "@keepkit/ui/button";
|
|
16
|
+
import "@keepkit/ui/styles/base.css";
|
|
17
|
+
import "@keepkit/ui/styles/button.css";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
[全公開UI部品の入口とgzipサイズ](#component-bundle-sizes)は、部品を1つ使う場合に転送するUIのJS量を比較するための表です。npmで展開したパッケージ全体の容量とは異なります。
|
|
21
|
+
|
|
12
22
|
### はじめる
|
|
13
23
|
|
|
14
24
|
```bash
|
|
@@ -124,6 +134,14 @@ import { KeepArchiveUndo, KeepCollection, KeepProvider } from "@keepkit/ui";
|
|
|
124
134
|
|
|
125
135
|
独自の行には`KeepListSelection`(`selectedIds: readonly string[]`、`onSelectedIdsChange`、任意の`disabled`)を`KeepList.selection`に渡せます。`KeepList`と`KeepCollection`の`renderItem(item, state, selection?)`の第三引数は`KeepItemSelection`(`checked`、`onCheckedChange`、任意の`disabled`)で、`KeepItemCheckbox`にそのまま渡せます。従来の二引数コールバックも使用できます。
|
|
126
136
|
|
|
137
|
+
**行を差し替えたときの契約**([実装例 / examples](#custom-row-examples)):
|
|
138
|
+
|
|
139
|
+
- 通常の一覧では、`renderItem` が `ul` の直接の子を返すため、`<li key={item.id}>` を用意します。組み込みの並べ替えが有効な場合に限り、外側の `li` とドラッグハンドルはKeepKitが描画するので、中身だけを返します。
|
|
140
|
+
- 矢印キー・Home・Endで移動させるには、各行に1つ `data-keepkit="card"` を付け、ホスト部品から実DOMへ渡します。`tabIndex` は一覧が管理します。キー操作はカード自身にフォーカスがあるときだけ有効で、内部の入力欄からは移動しません。カード上の `aria-hidden="true"` または `data-roving-disabled="true"` は対象外です。
|
|
141
|
+
- 標準カードへのフラグメントリンクも維持する場合は `id={'saved-item-' + encodeURIComponent(item.id)}` を指定します。このIDは矢印キー移動には不要です。
|
|
142
|
+
- 状態表示や操作は自動では追加されません。`KeepItemStatusBadge` と `KeepItemCheckbox` は単体利用可、`KeepItemCard.Remove` と `KeepItemCard.Link` はカード内専用です。単体の `KeepButton` は保存と解除を切り替えるトグルです。状態バッジはリンクを無効化しないため、独自行では利用不能な項目をリンクにしないでください。
|
|
143
|
+
- 標準の `KeepItemCard` でも開封記録は任意です(`href` と `trackOpen`)。独自リンクでは開いたときだけ `useKeepItem(item).recordOpen()` を呼びます。マウント・フォーカス・選択・解除では呼ばず、`trackOpen` と併用しません。
|
|
144
|
+
|
|
127
145
|
`KeepBulkActions`と`KeepCollection`の`confirmRemoval`は既定falseです。`confirmRemoval`を渡すと削除前に件数と確定・取消を表示します。確認開始時の全選択ID(ページ外も含む)を固定し、選択・scope・検索条件の変更で取り消します。失敗時は再試行でき、成功後は既存のUndoで復元できます。render-propsには`removalConfirmation`、`requestRemoval()`、`confirmRemoval()`、`cancelRemoval()`を公開します。
|
|
128
146
|
|
|
129
147
|
```tsx
|
|
@@ -168,6 +186,10 @@ function RecoveryScreen() {
|
|
|
168
186
|
`KeepSavePopover`の編集パネルは、最も近い開いている`dialog`内、または`document.body`に表示されます。独自モーダルでは`portalContainer`にモーダルのコンテンツ要素を指定してください。
|
|
169
187
|
`KeepItemCard`の`Link` / `Media` / `Content` / `Title` / `Tags` / `Actions`でカードの一部だけを組み替えることもできます。
|
|
170
188
|
|
|
189
|
+
`KeepUiProvider`、`KeepKitProvider`、`createKeepKit` の `icons` で、保存(`save`)、保存済み(`saved`)、解除(`remove`)、処理中(`loading`)、失敗(`error`)、コレクション(`collection`)、状態別バッジ(`status`)をまとめて指定できます。ボタンに指定したアイコンが優先され、指定のない状態は従来の表示に戻ります。保存済みトグルには解除操作のアイコンを優先します。アイコンは装飾用で、ラベルと読み上げ名は別に維持されます。
|
|
190
|
+
|
|
191
|
+
標準パネルは `32rem` 以下で画面下端に表示されます。自分のDrawerやDialogを使う場合は [ホストパネルの例](#host-panel-example) のように `renderPanel` で `content` を一度だけ配置します。コレクション選択に加えて作成も必要なら `allowCreateCollection` を指定します。Escape・背景クリック・閉じる操作はすべて `requestClose()` に渡し、ホスト側で先にアンマウントしないでください。保存失敗時は開いたまま下書きを残します。ホストはフォーカスの制御と `triggerRef` への復帰を担当します。
|
|
192
|
+
|
|
171
193
|
### サイトのナビゲーションから一覧を開く
|
|
172
194
|
|
|
173
195
|
共通レイアウトにProviderを一つ置き、ヘッダーやモバイルナビゲーションから保存一覧のURLへリンクします。保存通知からも同じURLに移動できます。ルーティングには利用側のRouterを使用してください。
|
|
@@ -198,8 +220,10 @@ function Site() {
|
|
|
198
220
|
@import "@keepkit/ui/tailwind.css";
|
|
199
221
|
```
|
|
200
222
|
|
|
201
|
-
|
|
202
|
-
`--
|
|
223
|
+
標準CSSでもTailwind連携でも、既定では `--color-primary` など**完成した色**だけを取り込みます。
|
|
224
|
+
shadcn v3のように `--primary: 348 84% 44%` と定義する場合は `<KeepKitProvider hostColorFormat="hsl-channels">` を指定します。この形式のときだけ `hsl(var(--primary))` として読み、未定義の色はKeepKitの配色に戻ります。アプリの `--primary` を書き換える必要はありません。
|
|
225
|
+
|
|
226
|
+
モードの既定は `inherit`:テーマ要素か祖先に `.dark` があればダーク、なければ端末設定にかかわらずライトです。ダーク未対応のアプリで明示的に固定するなら `mode="light"`、端末設定に追従するなら `mode="system"` を指定します。これはKeepKitの既定色を切り替えるもので、ホストが渡す色自体を反転する指定ではありません。`theme="ocean"` などのプリセット、`density`、`radius`、`variables` も使えます。主色を変える場合はテーマ要素の `--keep-primary` を指定すると、アクセントとそれを使う混色・影にも反映されます。
|
|
203
227
|
|
|
204
228
|
操作はキーボード・ARIAラベル・状態通知に対応します。`data-state`、`data-loading`、`data-disabled`は独自CSSでも利用できます。
|
|
205
229
|
カード一覧は矢印キー・Home・Endで移動でき、`trackOpen`を指定したカードでのみ開封を記録します。
|
|
@@ -228,6 +252,8 @@ CSS is optional: use the supplied theme or your own styles. Requires React 18 or
|
|
|
228
252
|
|
|
229
253
|
### Getting started
|
|
230
254
|
|
|
255
|
+
If you only use a button, import `KeepButton` from `@keepkit/ui/button` and optionally `@keepkit/ui/styles/base.css` plus `@keepkit/ui/styles/button.css`. Use the same provider as for root imports. The [full component import and size table](#component-bundle-sizes) measures the gzip-compressed UI JavaScript for single-component consumers, **not** the npm unpacked size.
|
|
256
|
+
|
|
231
257
|
```bash
|
|
232
258
|
pnpm add @keepkit/ui
|
|
233
259
|
```
|
|
@@ -341,6 +367,45 @@ import { KeepArchiveUndo, KeepCollection, KeepProvider } from "@keepkit/ui";
|
|
|
341
367
|
|
|
342
368
|
For custom rows, pass `KeepListSelection` (`selectedIds: readonly string[]`, `onSelectedIdsChange`, optional `disabled`) to `KeepList.selection`. The third argument of `KeepList` and `KeepCollection`'s `renderItem(item, state, selection?)` is `KeepItemSelection` (`checked`, `onCheckedChange`, optional `disabled`), ready to spread onto `KeepItemCheckbox`. Existing two-argument callbacks still work.
|
|
343
369
|
|
|
370
|
+
#### Custom row examples
|
|
371
|
+
|
|
372
|
+
Return a keyed `li` for the normal list. When built-in reordering is active, KeepKit supplies the `li` and drag handle; return just the row contents. The simplest way to retain card behavior is to compose its parts:
|
|
373
|
+
|
|
374
|
+
```tsx
|
|
375
|
+
<KeepList<ArticleMeta> renderItem={(item, _state, selection) => (
|
|
376
|
+
<li key={item.id}>
|
|
377
|
+
<KeepItemCard item={item} href={item.meta.url} trackOpen>
|
|
378
|
+
<KeepItemCard.Link>{item.meta.title}</KeepItemCard.Link>
|
|
379
|
+
<KeepItemStatusBadge status={item.status} />
|
|
380
|
+
{selection && <KeepItemCheckbox item={item} {...selection} />}
|
|
381
|
+
<KeepItemCard.Remove />
|
|
382
|
+
</KeepItemCard>
|
|
383
|
+
</li>
|
|
384
|
+
)} />
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
For a host-owned row, forward `data-keepkit="card"` to **one DOM element per row**. The list manages its `tabIndex`; arrows, Home and End move focus only when the card itself is focused, not from a nested input. `aria-hidden="true"` or `data-roving-disabled="true"` on the card excludes it. Neither badges nor open tracking are injected:
|
|
388
|
+
|
|
389
|
+
```tsx
|
|
390
|
+
function ArticleRow({ item }: { item: KeepItem<ArticleMeta> }) {
|
|
391
|
+
const { recordOpen } = useKeepItem(item);
|
|
392
|
+
const available = item.status === undefined || item.status === "available";
|
|
393
|
+
return (
|
|
394
|
+
<li data-keepkit="card" id={`saved-item-${encodeURIComponent(item.id)}`}>
|
|
395
|
+
{available ? (
|
|
396
|
+
<a href={item.meta.url} onClick={() => void recordOpen().catch(reportError)}>{item.meta.title}</a>
|
|
397
|
+
) : <span>{item.meta.title}</span>}
|
|
398
|
+
<KeepItemStatusBadge status={item.status} />
|
|
399
|
+
<KeepButton item={item} />
|
|
400
|
+
</li>
|
|
401
|
+
);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
<KeepCollection<ArticleMeta> renderItem={(item) => <ArticleRow key={item.id} item={item} />} />
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
The example's `id` preserves standard card fragment links; roving focus does not require it. `KeepItemStatusBadge` and `KeepItemCheckbox` work outside a card; `KeepItemCard.Link` and `.Remove` require a card ancestor. `KeepButton` is a standalone save/remove toggle, not a remove-only action. A badge does not disable a host link. Only record an actual open: `trackOpen` defaults to `false`, and combining it with a manual `recordOpen()` would record twice. Mounting, moving focus, selecting or removing should not count as opening.
|
|
408
|
+
|
|
344
409
|
`KeepBulkActions` and `KeepCollection` default `confirmRemoval` to false. Enable it to show the count and confirm/cancel controls before removal. Confirmation freezes all selected IDs, including selections outside the page, and cancels when selection, scope, or query changes. Failures can be retried; successful removal retains existing Undo. Render props expose `removalConfirmation`, `requestRemoval()`, `confirmRemoval()`, and `cancelRemoval()`.
|
|
345
410
|
|
|
346
411
|
```tsx
|
|
@@ -406,6 +471,42 @@ To use an existing drawer, place `keep.Collection` inside it under the same prov
|
|
|
406
471
|
|
|
407
472
|
`KeepSavePopover` renders its editor in the nearest open native `dialog`, or in `document.body` otherwise. For a custom modal with a focus trap, pass its content element as `portalContainer` so the editor remains inside the modal.
|
|
408
473
|
|
|
474
|
+
Set `icons` on `KeepUiProvider`, `KeepKitProvider` or `createKeepKit` to share decorative icons. Set only the slots you need:
|
|
475
|
+
|
|
476
|
+
```tsx
|
|
477
|
+
<KeepUiProvider icons={{ save: Bookmark, saved: BookmarkFilled, collection: Folder, status: { expired: Clock } }}>
|
|
478
|
+
{children}
|
|
479
|
+
</KeepUiProvider>
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
`remove`, `loading` and `error` are also supported. A saved toggle prefers local `remove`, local `saved`, provider `remove`, then provider `saved`. Missing slots retain built-in visuals. `status` accepts an individual item status or a normalized fallback such as `restricted`. Accessible action and status names remain separate from the icons.
|
|
483
|
+
|
|
484
|
+
#### Host panel example
|
|
485
|
+
|
|
486
|
+
The standard panel docks to the bottom at `32rem` and narrower. To use your own sheet or dialog instead, render the editor `content` once in a **controlled** host shell. `Drawer` / `DrawerContent` below are host components; adapt their focus and dismissal APIs to your library:
|
|
487
|
+
|
|
488
|
+
```tsx
|
|
489
|
+
<KeepSavePopover
|
|
490
|
+
item={article}
|
|
491
|
+
allowCreateCollection
|
|
492
|
+
editorProps={{ features: { title: false, note: false, tags: false, collection: true } }}
|
|
493
|
+
renderPanel={({ panelId, dialogLabel, content, requestClose, triggerRef }) => (
|
|
494
|
+
<Drawer open onOpenChange={(open) => { if (!open) void requestClose(); }}>
|
|
495
|
+
<DrawerContent
|
|
496
|
+
id={panelId}
|
|
497
|
+
aria-label={dialogLabel}
|
|
498
|
+
onCloseAutoFocus={(event) => { event.preventDefault(); triggerRef.current?.focus(); }}
|
|
499
|
+
>
|
|
500
|
+
{content}
|
|
501
|
+
<button type="button" onClick={() => void requestClose()}>Done</button>
|
|
502
|
+
</DrawerContent>
|
|
503
|
+
</Drawer>
|
|
504
|
+
)}
|
|
505
|
+
/>
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
Only a successful save from this trigger opens the shell automatically. `allowCreateCollection` adds a creation form beside the editor and selects the new collection. The host owns positioning, initial focus, trapping and restoration. Route Escape, outside dismissal and Done through `requestClose()` rather than unmounting immediately: it waits for pending edits and returns `false` on failure, leaving the draft and error visible.
|
|
509
|
+
|
|
409
510
|
### Theme and accessibility
|
|
410
511
|
|
|
411
512
|
Import `@keepkit/ui/theme.css` for the standard theme. For Tailwind CSS v4 or shadcn, add these global CSS imports:
|
|
@@ -415,8 +516,9 @@ Import `@keepkit/ui/theme.css` for the standard theme. For Tailwind CSS v4 or sh
|
|
|
415
516
|
@import "@keepkit/ui/tailwind.css";
|
|
416
517
|
```
|
|
417
518
|
|
|
418
|
-
|
|
419
|
-
|
|
519
|
+
With either stylesheet, the default bridge reads **complete colors** such as `--color-primary`. For shadcn v3 channel lists such as `--primary: 348 84% 44%`, use `<KeepKitProvider hostColorFormat="hsl-channels">`. Only this format wraps the values in `hsl(...)`; missing tokens use KeepKit's palette. The host's `--primary` need not change.
|
|
520
|
+
|
|
521
|
+
The default mode is `inherit`: the theme element or an ancestor with `.dark` selects dark; otherwise KeepKit stays light regardless of OS settings. Set `mode="light"` explicitly in a light-only app, or `mode="system"` for OS-driven colors. Modes select KeepKit's fallback palette; they don't invert colors supplied by the host. Use presets such as `theme="ocean"`, `density`, `radius`, or `variables` as before. Override `--keep-primary` on the theme element to update the accent and the mixes and shadows that depend on it.
|
|
420
522
|
|
|
421
523
|
Controls support keyboard interaction, ARIA labels, and live announcements. Use `data-state`, `data-loading`, and `data-disabled` in custom CSS.
|
|
422
524
|
Card lists support arrow keys, Home, and End. Cards record opens only when `trackOpen` is enabled.
|
|
@@ -428,3 +530,92 @@ Backups include saved items, collection definitions, and memberships; history, v
|
|
|
428
530
|
**Replace imports overwrite existing data and do not roll back.**
|
|
429
531
|
|
|
430
532
|
See the [Core README](../keepkit/README.md) for persistence contracts and the [repository README](../../README.md) for demos and Next.js examples.
|
|
533
|
+
|
|
534
|
+
## Component bundle sizes
|
|
535
|
+
|
|
536
|
+
各行は、該当部品1つだけをimportしたときのUIのJS転送量です。ビルド済みパッケージの公開入口をesbuildでバンドル・ツリーシェイク・minifyし(ブラウザ用ES2020 ESM)、Nodeのgzipレベル9で測定しています。必要な共有コード・言語辞書を含み、React・React DOM・`@keepkit/core`・型宣言・ソースマップは除外します。Coreの部品を再公開する入口は再エクスポート分のみです。各行の合計はアプリのサイズではありません。CSSは任意で、ローカルの `@import` を含めた値を別表にしています。Tailwindはホスト側で処理する前の値です。
|
|
537
|
+
|
|
538
|
+
Each row represents one isolated consumer import from the **built package**, tree-shaken and minified with esbuild (browser ES2020 ESM), then compressed with Node gzip level 9. Shared UI code and built-in locale dictionaries are included. React (including JSX runtime), React DOM, `@keepkit/core`, source maps and declarations are excluded. Core component entries measure only the re-export. Do not add the rows: multiple components share code. Optional CSS is measured separately, including local `@import` rules and before host Tailwind processing.
|
|
539
|
+
|
|
540
|
+
Regenerate from the repository root / リポジトリのルートで再生成:
|
|
541
|
+
|
|
542
|
+
```sh
|
|
543
|
+
pnpm --filter @keepkit/ui... build
|
|
544
|
+
pnpm ui:sizes --write
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
<!-- sizes:start -->
|
|
548
|
+
|
|
549
|
+
| Component / コンポーネント | Import / インポート | gzip (bytes) |
|
|
550
|
+
| --- | --- | ---: |
|
|
551
|
+
| `KeepActiveFiltersSummary` | `@keepkit/ui/active-filters-summary` | 33944 |
|
|
552
|
+
| `KeepAnnouncements` | `@keepkit/ui/announcements` | 30923 |
|
|
553
|
+
| `KeepAnnouncer` | `@keepkit/ui/announcer` | 30930 |
|
|
554
|
+
| `KeepArchiveButton` | `@keepkit/ui/archive-button` | 30979 |
|
|
555
|
+
| `KeepArchiveScopeSelect` | `@keepkit/ui/archive-scope-select` | 30870 |
|
|
556
|
+
| `KeepArchiveUndo` | `@keepkit/ui/archive-undo` | 31248 |
|
|
557
|
+
| `KeepBackup` | `@keepkit/ui/backup` | 32582 |
|
|
558
|
+
| `KeepBulkActions` | `@keepkit/ui/bulk-actions` | 34181 |
|
|
559
|
+
| `KeepButton` | `@keepkit/ui/button` | 31921 |
|
|
560
|
+
| `KeepCollection` | `@keepkit/ui/collection` | 56819 |
|
|
561
|
+
| `KeepCollectionCreate` | `@keepkit/ui/collection-create` | 31532 |
|
|
562
|
+
| `KeepCollectionFilter` | `@keepkit/ui/collection-filter` | 31285 |
|
|
563
|
+
| `KeepCollectionManager` | `@keepkit/ui/collection-manager` | 33212 |
|
|
564
|
+
| `KeepCollectionSelect` | `@keepkit/ui/collection-select` | 30956 |
|
|
565
|
+
| `KeepEmptyState` | `@keepkit/ui/empty-state` | 31584 |
|
|
566
|
+
| `KeepErrorBoundary` | `@keepkit/ui/error-boundary` | 88 |
|
|
567
|
+
| `KeepFallbackRecovery` | `@keepkit/ui/fallback-recovery` | 32697 |
|
|
568
|
+
| `KeepFloatingTour` | `@keepkit/ui/floating-tour` | 35031 |
|
|
569
|
+
| `KeepHighlight` | `@keepkit/ui/highlight` | 493 |
|
|
570
|
+
| `KeepInbox` | `@keepkit/ui/inbox` | 56911 |
|
|
571
|
+
| `KeepItemCard` | `@keepkit/ui/item-card` | 40441 |
|
|
572
|
+
| `KeepItemCardSkeleton` | `@keepkit/ui/item-card-skeleton` | 239 |
|
|
573
|
+
| `KeepItemCheckbox` | `@keepkit/ui/item-checkbox` | 366 |
|
|
574
|
+
| `KeepItemStatusBadge` | `@keepkit/ui/item-status-badge` | 31466 |
|
|
575
|
+
| `KeepKitProvider` | `@keepkit/ui/kit-provider` | 34021 |
|
|
576
|
+
| `KeepLastActivity` | `@keepkit/ui/last-activity` | 31073 |
|
|
577
|
+
| `KeepLayout` | `@keepkit/ui/layout` | 833 |
|
|
578
|
+
| `KeepList` | `@keepkit/ui/list` | 43934 |
|
|
579
|
+
| `KeepNavigator` | `@keepkit/ui/navigator` | 33084 |
|
|
580
|
+
| `KeepNoteEditor` | `@keepkit/ui/note-editor` | 32683 |
|
|
581
|
+
| `KeepPagination` | `@keepkit/ui/pagination` | 31244 |
|
|
582
|
+
| `KeepPinButton` | `@keepkit/ui/pin-button` | 30983 |
|
|
583
|
+
| `KeepProvider` | `@keepkit/ui/provider` | 83 |
|
|
584
|
+
| `KeepPruneStaleButton` | `@keepkit/ui/prune-stale-button` | 31723 |
|
|
585
|
+
| `KeepQuickEditor` | `@keepkit/ui/quick-editor` | 33447 |
|
|
586
|
+
| `KeepRediscovery` | `@keepkit/ui/rediscovery` | 44100 |
|
|
587
|
+
| `KeepRediscoveryPanel` | `@keepkit/ui/rediscovery-panel` | 44230 |
|
|
588
|
+
| `KeepReorderableList` | `@keepkit/ui/reorderable-list` | 31756 |
|
|
589
|
+
| `KeepSavePopover` | `@keepkit/ui/save-popover` | 38184 |
|
|
590
|
+
| `KeepSaveViewButton` | `@keepkit/ui/save-view-button` | 31691 |
|
|
591
|
+
| `KeepSavedViews` | `@keepkit/ui/saved-views` | 31875 |
|
|
592
|
+
| `KeepSearchInput` | `@keepkit/ui/search-input` | 30978 |
|
|
593
|
+
| `KeepShortcutHint` | `@keepkit/ui/shortcut-hint` | 339 |
|
|
594
|
+
| `KeepSortSelect` | `@keepkit/ui/sort-select` | 31065 |
|
|
595
|
+
| `KeepStaleNotice` | `@keepkit/ui/stale-notice` | 32393 |
|
|
596
|
+
| `KeepStatus` | `@keepkit/ui/status` | 31801 |
|
|
597
|
+
| `KeepSyncRecoveryDialog` | `@keepkit/ui/sync-recovery-dialog` | 33770 |
|
|
598
|
+
| `KeepSyncStatusBanner` | `@keepkit/ui/sync-status-banner` | 31288 |
|
|
599
|
+
| `KeepTagEditor` | `@keepkit/ui/tag-editor` | 31776 |
|
|
600
|
+
| `KeepTagFilter` | `@keepkit/ui/tag-filter` | 32306 |
|
|
601
|
+
| `KeepThemeProvider` | `@keepkit/ui/theme-provider` | 1126 |
|
|
602
|
+
| `KeepTourBar` | `@keepkit/ui/tour-bar` | 33074 |
|
|
603
|
+
| `KeepTourProvider` | `@keepkit/ui/tour-provider` | 1123 |
|
|
604
|
+
| `KeepUiProvider` | `@keepkit/ui/ui-provider` | 30926 |
|
|
605
|
+
| `KeepUndo` | `@keepkit/ui/undo` | 31663 |
|
|
606
|
+
| `KeepWorkspace` | `@keepkit/ui/workspace` | 61505 |
|
|
607
|
+
|
|
608
|
+
### CSS
|
|
609
|
+
|
|
610
|
+
| Stylesheet / スタイルシート | gzip (bytes) |
|
|
611
|
+
| --- | ---: |
|
|
612
|
+
| `@keepkit/ui/styles/base.css` | 4076 |
|
|
613
|
+
| `@keepkit/ui/styles/button.css` | 675 |
|
|
614
|
+
| `@keepkit/ui/styles/collection.css` | 4541 |
|
|
615
|
+
| `@keepkit/ui/styles/status.css` | 566 |
|
|
616
|
+
| `@keepkit/ui/styles/sync.css` | 1319 |
|
|
617
|
+
| `@keepkit/ui/styles/workspace.css` | 355 |
|
|
618
|
+
| `@keepkit/ui/tailwind.css` | 9691 |
|
|
619
|
+
| `@keepkit/ui/theme.css` | 9462 |
|
|
620
|
+
|
|
621
|
+
<!-- sizes:end -->
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import {
|
|
2
|
+
KeepUndo
|
|
3
|
+
} from "./chunk-VM4ROXYF.js";
|
|
4
|
+
import {
|
|
5
|
+
KeepSyncRecoveryDialog
|
|
6
|
+
} from "./chunk-5SFHCUDA.js";
|
|
7
|
+
import {
|
|
8
|
+
KeepSyncStatusBanner
|
|
9
|
+
} from "./chunk-G2JWJKST.js";
|
|
10
|
+
import {
|
|
11
|
+
KeepBackup
|
|
12
|
+
} from "./chunk-BJCZ7MFN.js";
|
|
13
|
+
import {
|
|
14
|
+
KeepCollection
|
|
15
|
+
} from "./chunk-PE57SLZO.js";
|
|
16
|
+
import {
|
|
17
|
+
KeepPruneStaleButton
|
|
18
|
+
} from "./chunk-BYYWJGSN.js";
|
|
19
|
+
import {
|
|
20
|
+
hasRenderableContent,
|
|
21
|
+
resolveContent
|
|
22
|
+
} from "./chunk-LKNVVPTN.js";
|
|
23
|
+
|
|
24
|
+
// src/features/workspace/KeepWorkspace.tsx
|
|
25
|
+
import { createInboxQuery } from "@keepkit/core/core";
|
|
26
|
+
|
|
27
|
+
// src/features/workspace/hooks/useKeepWorkspace.ts
|
|
28
|
+
import { useCallback, useState } from "react";
|
|
29
|
+
var PRESET_MODULES = {
|
|
30
|
+
basic: {
|
|
31
|
+
syncStatus: false,
|
|
32
|
+
undo: false,
|
|
33
|
+
recovery: false,
|
|
34
|
+
backup: false,
|
|
35
|
+
stalePrune: false,
|
|
36
|
+
inbox: false,
|
|
37
|
+
savedViews: false
|
|
38
|
+
},
|
|
39
|
+
standard: {
|
|
40
|
+
syncStatus: false,
|
|
41
|
+
undo: true,
|
|
42
|
+
recovery: false,
|
|
43
|
+
backup: false,
|
|
44
|
+
stalePrune: false,
|
|
45
|
+
inbox: false,
|
|
46
|
+
savedViews: false
|
|
47
|
+
},
|
|
48
|
+
management: {
|
|
49
|
+
syncStatus: false,
|
|
50
|
+
undo: true,
|
|
51
|
+
recovery: false,
|
|
52
|
+
backup: true,
|
|
53
|
+
stalePrune: true,
|
|
54
|
+
inbox: false,
|
|
55
|
+
savedViews: false
|
|
56
|
+
},
|
|
57
|
+
sync: {
|
|
58
|
+
syncStatus: true,
|
|
59
|
+
undo: true,
|
|
60
|
+
recovery: true,
|
|
61
|
+
backup: false,
|
|
62
|
+
stalePrune: false,
|
|
63
|
+
inbox: false,
|
|
64
|
+
savedViews: false
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var PRESET_COLLECTION_FEATURES = {
|
|
68
|
+
basic: { search: false, sort: false, pagination: false },
|
|
69
|
+
standard: {},
|
|
70
|
+
management: { tagFilter: true, collectionFilter: true, bulkActions: true, pin: true, archive: true },
|
|
71
|
+
sync: {}
|
|
72
|
+
};
|
|
73
|
+
function useKeepWorkspace({
|
|
74
|
+
preset,
|
|
75
|
+
modules,
|
|
76
|
+
recoveryOpen,
|
|
77
|
+
onRecoveryOpenChange,
|
|
78
|
+
onResolveConflicts
|
|
79
|
+
}) {
|
|
80
|
+
const [internalRecoveryOpen, setInternalRecoveryOpen] = useState(false);
|
|
81
|
+
const resolvedModules = { ...PRESET_MODULES[preset], ...modules };
|
|
82
|
+
const setRecoveryOpen = useCallback(
|
|
83
|
+
(open) => {
|
|
84
|
+
if (recoveryOpen === void 0) setInternalRecoveryOpen(open);
|
|
85
|
+
onRecoveryOpenChange?.(open);
|
|
86
|
+
},
|
|
87
|
+
[onRecoveryOpenChange, recoveryOpen]
|
|
88
|
+
);
|
|
89
|
+
const openRecovery = useCallback(() => {
|
|
90
|
+
onResolveConflicts?.();
|
|
91
|
+
setRecoveryOpen(true);
|
|
92
|
+
}, [onResolveConflicts, setRecoveryOpen]);
|
|
93
|
+
return {
|
|
94
|
+
preset,
|
|
95
|
+
modules: resolvedModules,
|
|
96
|
+
collectionFeatures: PRESET_COLLECTION_FEATURES[preset],
|
|
97
|
+
recoveryOpen: recoveryOpen ?? internalRecoveryOpen,
|
|
98
|
+
setRecoveryOpen,
|
|
99
|
+
openRecovery
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// src/features/workspace/KeepWorkspace.tsx
|
|
104
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
105
|
+
function KeepWorkspace({
|
|
106
|
+
preset = "standard",
|
|
107
|
+
modules,
|
|
108
|
+
surface,
|
|
109
|
+
sectionGap,
|
|
110
|
+
collectionProps,
|
|
111
|
+
syncStatusProps,
|
|
112
|
+
recoveryProps,
|
|
113
|
+
backupProps,
|
|
114
|
+
undoProps,
|
|
115
|
+
stalePruneProps,
|
|
116
|
+
slots,
|
|
117
|
+
children,
|
|
118
|
+
className,
|
|
119
|
+
...props
|
|
120
|
+
}) {
|
|
121
|
+
const view = useKeepWorkspace({
|
|
122
|
+
preset,
|
|
123
|
+
modules,
|
|
124
|
+
recoveryOpen: recoveryProps?.open,
|
|
125
|
+
onRecoveryOpenChange: recoveryProps?.onOpenChange,
|
|
126
|
+
onResolveConflicts: syncStatusProps?.onResolveConflicts
|
|
127
|
+
});
|
|
128
|
+
const state = {
|
|
129
|
+
preset: view.preset,
|
|
130
|
+
modules: view.modules,
|
|
131
|
+
recoveryOpen: view.recoveryOpen,
|
|
132
|
+
setRecoveryOpen: view.setRecoveryOpen
|
|
133
|
+
};
|
|
134
|
+
const resolvedCollectionProps = {
|
|
135
|
+
...collectionProps,
|
|
136
|
+
query: view.modules.inbox ? {
|
|
137
|
+
...collectionProps?.query,
|
|
138
|
+
...createInboxQuery({ organization: collectionProps?.query?.organization })
|
|
139
|
+
} : collectionProps?.query,
|
|
140
|
+
features: {
|
|
141
|
+
...view.collectionFeatures,
|
|
142
|
+
...view.modules.inbox ? { bulkActions: true, note: true, archive: true, tags: true } : {},
|
|
143
|
+
...view.modules.savedViews ? { savedViews: true } : {},
|
|
144
|
+
...collectionProps?.features
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
const structuredRegions = surface !== void 0 && surface !== "plain";
|
|
148
|
+
const region = (name, content) => {
|
|
149
|
+
if (!structuredRegions) return content;
|
|
150
|
+
if (!hasRenderableContent(content)) return null;
|
|
151
|
+
const resolvedSurface = typeof surface === "string" ? surface : surface[name] ?? "plain";
|
|
152
|
+
return /* @__PURE__ */ jsx("div", { "data-keepkit": "workspace-region", "data-region": name, "data-surface": resolvedSurface, children: content });
|
|
153
|
+
};
|
|
154
|
+
const before = resolveOptionalSlot(slots?.before, state);
|
|
155
|
+
const syncStatus = view.modules.syncStatus ? resolveSlot(
|
|
156
|
+
slots?.syncStatus,
|
|
157
|
+
/* @__PURE__ */ jsx(KeepSyncStatusBanner, { ...syncStatusProps, onResolveConflicts: view.openRecovery }),
|
|
158
|
+
state
|
|
159
|
+
) : null;
|
|
160
|
+
const collection = resolveSlot(slots?.collection, /* @__PURE__ */ jsx(KeepCollection, { ...resolvedCollectionProps }), state);
|
|
161
|
+
const actions = view.modules.backup || view.modules.stalePrune ? resolveSlot(
|
|
162
|
+
slots?.actions,
|
|
163
|
+
/* @__PURE__ */ jsxs("div", { "data-keepkit": "workspace-actions", children: [
|
|
164
|
+
view.modules.stalePrune ? /* @__PURE__ */ jsx(KeepPruneStaleButton, { ...stalePruneProps }) : null,
|
|
165
|
+
view.modules.backup ? /* @__PURE__ */ jsx(KeepBackup, { ...backupProps }) : null
|
|
166
|
+
] }),
|
|
167
|
+
state
|
|
168
|
+
) : null;
|
|
169
|
+
const undo = view.modules.undo ? resolveSlot(slots?.undo, /* @__PURE__ */ jsx(KeepUndo, { ...undoProps }), state) : null;
|
|
170
|
+
const recovery = view.modules.recovery ? resolveSlot(
|
|
171
|
+
slots?.recovery,
|
|
172
|
+
/* @__PURE__ */ jsx(
|
|
173
|
+
KeepSyncRecoveryDialog,
|
|
174
|
+
{
|
|
175
|
+
...recoveryProps,
|
|
176
|
+
open: view.recoveryOpen,
|
|
177
|
+
onOpenChange: view.setRecoveryOpen
|
|
178
|
+
}
|
|
179
|
+
),
|
|
180
|
+
state
|
|
181
|
+
) : null;
|
|
182
|
+
const additionalContent = resolveOptionalSlot(children, state);
|
|
183
|
+
const after = resolveOptionalSlot(slots?.after, state);
|
|
184
|
+
return /* @__PURE__ */ jsxs(
|
|
185
|
+
"section",
|
|
186
|
+
{
|
|
187
|
+
...props,
|
|
188
|
+
className,
|
|
189
|
+
"data-keepkit": "workspace",
|
|
190
|
+
"data-preset": preset,
|
|
191
|
+
"data-surface": surface !== void 0 ? typeof surface === "string" ? surface : "custom" : void 0,
|
|
192
|
+
"data-section-gap": sectionGap,
|
|
193
|
+
children: [
|
|
194
|
+
region("before", before),
|
|
195
|
+
region("syncStatus", syncStatus),
|
|
196
|
+
region("collection", collection),
|
|
197
|
+
region("actions", actions),
|
|
198
|
+
region("undo", undo),
|
|
199
|
+
region("recovery", recovery),
|
|
200
|
+
region("children", additionalContent),
|
|
201
|
+
region("after", after)
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
function resolveSlot(slot, fallback, state) {
|
|
207
|
+
if (slot === void 0) return fallback;
|
|
208
|
+
return resolveContent(slot, state);
|
|
209
|
+
}
|
|
210
|
+
function resolveOptionalSlot(slot, state) {
|
|
211
|
+
if (slot === void 0) return null;
|
|
212
|
+
return resolveContent(slot, state);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export {
|
|
216
|
+
KeepWorkspace
|
|
217
|
+
};
|
|
218
|
+
//# sourceMappingURL=chunk-4O5N26YS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/features/workspace/KeepWorkspace.tsx","../src/features/workspace/hooks/useKeepWorkspace.ts"],"sourcesContent":["\"use client\";\n\nimport { createInboxQuery } from \"@keepkit/core/core\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { hasRenderableContent, type RenderProp, resolveContent } from \"../../foundation/shared\";\nimport { KeepBackup, type KeepBackupProps } from \"../actions/KeepBackup\";\nimport { KeepUndo, type KeepUndoProps } from \"../actions/KeepUndo\";\nimport { KeepCollection, type KeepCollectionProps } from \"../collection/KeepCollection\";\nimport { KeepPruneStaleButton, type KeepPruneStaleButtonProps } from \"../status/KeepStaleNotice\";\nimport { KeepSyncRecoveryDialog, type KeepSyncRecoveryDialogProps } from \"../sync/KeepSyncRecoveryDialog\";\nimport { KeepSyncStatusBanner, type KeepSyncStatusBannerProps } from \"../sync/KeepSyncStatusBanner\";\nimport { useKeepWorkspace } from \"./hooks/useKeepWorkspace\";\n\nexport type KeepWorkspacePreset = \"basic\" | \"standard\" | \"management\" | \"sync\";\nexport type KeepWorkspaceModule = \"syncStatus\" | \"undo\" | \"recovery\" | \"backup\" | \"stalePrune\" | \"inbox\" | \"savedViews\";\nexport type KeepWorkspaceRegion =\n | \"before\"\n | \"syncStatus\"\n | \"collection\"\n | \"actions\"\n | \"undo\"\n | \"recovery\"\n | \"children\"\n | \"after\";\nexport type KeepWorkspaceSurface = \"plain\" | \"compact\" | \"panel\";\nexport type KeepWorkspaceSectionGap = \"none\" | \"compact\" | \"comfortable\";\n\nexport type KeepWorkspaceState = {\n preset: KeepWorkspacePreset;\n modules: Readonly<Record<KeepWorkspaceModule, boolean>>;\n recoveryOpen: boolean;\n setRecoveryOpen: (open: boolean) => void;\n};\n\ntype KeepWorkspaceContent = ReactNode | RenderProp<KeepWorkspaceState>;\n\nexport type KeepWorkspaceSlots = {\n before?: KeepWorkspaceContent;\n syncStatus?: KeepWorkspaceContent;\n collection?: KeepWorkspaceContent;\n actions?: KeepWorkspaceContent;\n undo?: KeepWorkspaceContent;\n recovery?: KeepWorkspaceContent;\n after?: KeepWorkspaceContent;\n};\n\nexport type KeepWorkspaceProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HTMLElement>, \"children\"> & {\n preset?: KeepWorkspacePreset;\n modules?: Partial<Record<KeepWorkspaceModule, boolean>>;\n /** Opts into region wrappers and their theme-backed surface treatment. */\n surface?: KeepWorkspaceSurface | Partial<Record<KeepWorkspaceRegion, KeepWorkspaceSurface>>;\n /** Controls the finite spacing scale between rendered workspace regions. */\n sectionGap?: KeepWorkspaceSectionGap;\n collectionProps?: KeepCollectionProps<TMeta>;\n syncStatusProps?: KeepSyncStatusBannerProps;\n recoveryProps?: KeepSyncRecoveryDialogProps<TMeta>;\n backupProps?: KeepBackupProps<TMeta>;\n undoProps?: KeepUndoProps;\n stalePruneProps?: KeepPruneStaleButtonProps;\n slots?: KeepWorkspaceSlots;\n children?: KeepWorkspaceContent;\n};\n\n/** Composes the standard collection, management, and sync primitives into one customizable workspace. */\nexport function KeepWorkspace<TMeta = Record<string, unknown>>({\n preset = \"standard\",\n modules,\n surface,\n sectionGap,\n collectionProps,\n syncStatusProps,\n recoveryProps,\n backupProps,\n undoProps,\n stalePruneProps,\n slots,\n children,\n className,\n ...props\n}: KeepWorkspaceProps<TMeta>) {\n const view = useKeepWorkspace({\n preset,\n modules,\n recoveryOpen: recoveryProps?.open,\n onRecoveryOpenChange: recoveryProps?.onOpenChange,\n onResolveConflicts: syncStatusProps?.onResolveConflicts,\n });\n const state: KeepWorkspaceState = {\n preset: view.preset,\n modules: view.modules,\n recoveryOpen: view.recoveryOpen,\n setRecoveryOpen: view.setRecoveryOpen,\n };\n const resolvedCollectionProps = {\n ...collectionProps,\n query: view.modules.inbox\n ? {\n ...collectionProps?.query,\n ...createInboxQuery<TMeta>({ organization: collectionProps?.query?.organization }),\n }\n : collectionProps?.query,\n features: {\n ...view.collectionFeatures,\n ...(view.modules.inbox ? { bulkActions: true, note: true, archive: true, tags: true } : {}),\n ...(view.modules.savedViews ? { savedViews: true } : {}),\n ...collectionProps?.features,\n },\n };\n const structuredRegions = surface !== undefined && surface !== \"plain\";\n const region = (name: KeepWorkspaceRegion, content: ReactNode): ReactNode => {\n if (!structuredRegions) return content;\n if (!hasRenderableContent(content)) return null;\n const resolvedSurface = typeof surface === \"string\" ? surface : (surface[name] ?? \"plain\");\n return (\n <div data-keepkit=\"workspace-region\" data-region={name} data-surface={resolvedSurface}>\n {content}\n </div>\n );\n };\n const before = resolveOptionalSlot(slots?.before, state);\n const syncStatus = view.modules.syncStatus\n ? resolveSlot(\n slots?.syncStatus,\n <KeepSyncStatusBanner {...syncStatusProps} onResolveConflicts={view.openRecovery} />,\n state,\n )\n : null;\n const collection = resolveSlot(slots?.collection, <KeepCollection<TMeta> {...resolvedCollectionProps} />, state);\n const actions =\n view.modules.backup || view.modules.stalePrune\n ? resolveSlot(\n slots?.actions,\n <div data-keepkit=\"workspace-actions\">\n {view.modules.stalePrune ? <KeepPruneStaleButton {...stalePruneProps} /> : null}\n {view.modules.backup ? <KeepBackup<TMeta> {...backupProps} /> : null}\n </div>,\n state,\n )\n : null;\n const undo = view.modules.undo ? resolveSlot(slots?.undo, <KeepUndo {...undoProps} />, state) : null;\n const recovery = view.modules.recovery\n ? resolveSlot(\n slots?.recovery,\n <KeepSyncRecoveryDialog<TMeta>\n {...recoveryProps}\n open={view.recoveryOpen}\n onOpenChange={view.setRecoveryOpen}\n />,\n state,\n )\n : null;\n const additionalContent = resolveOptionalSlot(children, state);\n const after = resolveOptionalSlot(slots?.after, state);\n\n return (\n <section\n {...props}\n className={className}\n data-keepkit=\"workspace\"\n data-preset={preset}\n data-surface={surface !== undefined ? (typeof surface === \"string\" ? surface : \"custom\") : undefined}\n data-section-gap={sectionGap}\n >\n {region(\"before\", before)}\n {region(\"syncStatus\", syncStatus)}\n {region(\"collection\", collection)}\n {region(\"actions\", actions)}\n {region(\"undo\", undo)}\n {region(\"recovery\", recovery)}\n {region(\"children\", additionalContent)}\n {region(\"after\", after)}\n </section>\n );\n}\n\nfunction resolveSlot(\n slot: KeepWorkspaceContent | undefined,\n fallback: ReactNode,\n state: KeepWorkspaceState,\n): ReactNode {\n if (slot === undefined) return fallback;\n return resolveContent(slot, state);\n}\n\nfunction resolveOptionalSlot(slot: KeepWorkspaceContent | undefined, state: KeepWorkspaceState): ReactNode {\n if (slot === undefined) return null;\n return resolveContent(slot, state);\n}\n","import { useCallback, useState } from \"react\";\nimport type { KeepCollectionFeature } from \"../../collection/KeepCollection\";\nimport type { KeepWorkspaceModule, KeepWorkspacePreset } from \"../KeepWorkspace\";\n\ntype KeepWorkspaceOptions = {\n preset: KeepWorkspacePreset;\n modules: Partial<Record<KeepWorkspaceModule, boolean>> | undefined;\n recoveryOpen: boolean | undefined;\n onRecoveryOpenChange: ((open: boolean) => void) | undefined;\n onResolveConflicts: (() => void) | undefined;\n};\n\nconst PRESET_MODULES: Record<KeepWorkspacePreset, Record<KeepWorkspaceModule, boolean>> = {\n basic: {\n syncStatus: false,\n undo: false,\n recovery: false,\n backup: false,\n stalePrune: false,\n inbox: false,\n savedViews: false,\n },\n standard: {\n syncStatus: false,\n undo: true,\n recovery: false,\n backup: false,\n stalePrune: false,\n inbox: false,\n savedViews: false,\n },\n management: {\n syncStatus: false,\n undo: true,\n recovery: false,\n backup: true,\n stalePrune: true,\n inbox: false,\n savedViews: false,\n },\n sync: {\n syncStatus: true,\n undo: true,\n recovery: true,\n backup: false,\n stalePrune: false,\n inbox: false,\n savedViews: false,\n },\n};\n\nconst PRESET_COLLECTION_FEATURES: Record<KeepWorkspacePreset, Partial<Record<KeepCollectionFeature, boolean>>> = {\n basic: { search: false, sort: false, pagination: false },\n standard: {},\n management: { tagFilter: true, collectionFilter: true, bulkActions: true, pin: true, archive: true },\n sync: {},\n};\n\nexport function useKeepWorkspace({\n preset,\n modules,\n recoveryOpen,\n onRecoveryOpenChange,\n onResolveConflicts,\n}: KeepWorkspaceOptions) {\n const [internalRecoveryOpen, setInternalRecoveryOpen] = useState(false);\n const resolvedModules = { ...PRESET_MODULES[preset], ...modules };\n const setRecoveryOpen = useCallback(\n (open: boolean) => {\n if (recoveryOpen === undefined) setInternalRecoveryOpen(open);\n onRecoveryOpenChange?.(open);\n },\n [onRecoveryOpenChange, recoveryOpen],\n );\n const openRecovery = useCallback(() => {\n onResolveConflicts?.();\n setRecoveryOpen(true);\n }, [onResolveConflicts, setRecoveryOpen]);\n\n return {\n preset,\n modules: resolvedModules,\n collectionFeatures: PRESET_COLLECTION_FEATURES[preset],\n recoveryOpen: recoveryOpen ?? internalRecoveryOpen,\n setRecoveryOpen,\n openRecovery,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,wBAAwB;;;ACFjC,SAAS,aAAa,gBAAgB;AAYtC,IAAM,iBAAoF;AAAA,EACxF,OAAO;AAAA,IACL,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,YAAY;AAAA,EACd;AAAA,EACA,UAAU;AAAA,IACR,YAAY;A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