@keepkit/ui 0.28.9 → 0.28.11

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
@@ -2,7 +2,7 @@
2
2
 
3
3
  [日本語](#日本語) | [English](#english)
4
4
 
5
- Release: v0.28.9
5
+ Release: v0.28.11
6
6
 
7
7
  ## 日本語
8
8
 
@@ -70,10 +70,18 @@ export function Library() {
70
70
  `urlSync`は検索・タグ・ソート・ページをURLと戻る/進むに同期します。
71
71
  Next.js Pages Routerでは`createNextPagesRouterAdapter(router)`を`urlAdapter`に渡します。
72
72
 
73
+ `reorderable`を有効にすると、明示ソートがない一覧は「手動順序」になります。日時ソートと切り替えられ、並べ替えは手動順序かつ`pinnedFirst`なしの場合に有効です。表示中の項目が占める位置だけを入れ替え、別ページ・非表示項目の位置を保ちます。矢印操作は即時保存、Escapeはつかみ状態の解除、保存済み順序の取り消しは5秒間のUndoで行います。
74
+
75
+ 独自の`KeepSortSelect`では`onManualSort`を渡すと`value="manual"`を選択できます。既存の`onValueChange(value, sort)`は日時ソートのみを通知します。手動順序のURL/Saved Viewでは`sort`を省略します。URL同期が有効ならURLが優先し、`sort`省略は以前の日時ソートを解除します。通常の一覧は更新日時降順へ戻ります。同じURLへの遷移は省略し、履歴は既定でpush、`urlSync={{ history: "replace" }}`でreplaceを選べます。
76
+
77
+ 未分類のSaved Viewは`organization.collection="unassigned"`で保存します。利用側の関数`query.filter`は引き続き保存できません。`revealRequest`はローカルの検索・タグ・整理・日時条件を解除しますが、利用側の固定`targetType`・`filter`で除外される対象には`excluded`を返します。`creatable`と`slots.toolbarEnd`は併用できます。
78
+
73
79
  ### 記事・リンクを再訪する一覧
74
80
 
75
81
  記事向け表示は選択式です。既存の既定表示は変わりません。
76
82
 
83
+ `linkTarget="card"`の既定表示は通常の画像・静的内容をリンクにし、タグ・操作ボタン・編集フォームをリンク外に置きます。カスタム画像や`children`/`render`全体は自動で包みません。compoundの`Title`はタイトルリンクを提供します。カスタム構成では`KeepItemCard.Link`で非対話コンテンツを明示的に包みます。URL、router用`linkComponent`、外部リンク属性、利用不能状態、`trackOpen`/`onOpen`はrootと共有します。内側の`Title`は静的表示、`Content`は自動タグなしです。独自のボタンやフォームもリンク外に置いてください。
84
+
77
85
  ```tsx
78
86
  <keep.Collection
79
87
  layout="list"
@@ -84,12 +92,49 @@ Next.js Pages Routerでは`createNextPagesRouterAdapter(router)`を`urlAdapter`
84
92
  />
85
93
  ```
86
94
 
95
+ ```tsx
96
+ <KeepItemCard item={item} href={item.meta.url} trackOpen>
97
+ <KeepItemCard.Link>
98
+ <KeepItemCard.Media />
99
+ <KeepItemCard.Content />
100
+ </KeepItemCard.Link>
101
+ <KeepItemCard.Tags />
102
+ <KeepItemCard.Actions />
103
+ </KeepItemCard>
104
+ ```
105
+
87
106
  `presentation="reading"`はタイトル、URLの保存元、コレクション名、メモ、タグ、保存・訪問情報を表示します。画像は`getImageProps`で指定した場合だけ表示します。保存トグルは既定で非表示、編集・メモ・訪問情報は表示され、既存の表示フラグで上書きできます。`href`と`trackOpen`は明示指定です。編集は300msの自動保存と「完了」を使い、失敗時は下書きを残します。
88
107
 
89
108
  `bulkActionsVariant="inline"`は記事行で選択します。全選択は現在ページだけで、検索・フィルター・ページ・表示先を変えると選択を解除します。失敗した一括操作は選択を保持します。既定の`separate`は従来の選択用一覧を維持します。
90
109
 
91
110
  独自の行には`KeepListSelection`(`selectedIds: readonly string[]`、`onSelectedIdsChange`、任意の`disabled`)を`KeepList.selection`に渡せます。`KeepList`と`KeepCollection`の`renderItem(item, state, selection?)`の第三引数は`KeepItemSelection`(`checked`、`onCheckedChange`、任意の`disabled`)で、`KeepItemCheckbox`にそのまま渡せます。従来の二引数コールバックも使用できます。
92
111
 
112
+ `KeepBulkActions`と`KeepCollection`の`confirmRemoval`は既定falseです。`confirmRemoval`を渡すと削除前に件数と確定・取消を表示します。確認開始時の全選択ID(ページ外も含む)を固定し、選択・scope・検索条件の変更で取り消します。失敗時は再試行でき、成功後は既存のUndoで復元できます。render-propsには`removalConfirmation`、`requestRemoval()`、`confirmRemoval()`、`cancelRemoval()`を公開します。
113
+
114
+ ```tsx
115
+ <keep.Collection confirmRemoval features={{ bulkActions: true }} />
116
+ ```
117
+
118
+ ### fallback分岐を確認・復元する
119
+
120
+ `KeepFallbackRecovery`はProviderと独立した画面です。対象adapterの`recovery`を明示的に渡します。表示や比較では書き込まず、競合の保存元を選び、所属などの変更プレビューを確認して適用します。未解決の競合や不整合がある場合は適用できません。データが変わった場合は再比較が必要です。「反映待ち」は修復内容が保存済みなので、再提出せず再試行します。
121
+
122
+ ```tsx
123
+ import { createBrowserStorageAdapter, KeepFallbackRecovery, KeepUiProvider } from "@keepkit/ui";
124
+
125
+ const storage = createBrowserStorageAdapter({ key: "my-app:items", scope: { userId: "alice" } });
126
+
127
+ function RecoveryScreen() {
128
+ return storage.recovery ? (
129
+ <KeepUiProvider locale="ja">
130
+ <KeepFallbackRecovery recovery={storage.recovery} />
131
+ </KeepUiProvider>
132
+ ) : null;
133
+ }
134
+ ```
135
+
136
+ `SyncStorageAdapter`経由では状態のみ表示します。修復は同期開始前のstandalone local adapterで行ってください。修復前バックアップは自動削除しません。導入時は旧実装のタブをすべて更新し、[Coreガイド](../keepkit/README.md)の保存制約を確認してください。
137
+
93
138
  `KeepQuickEditor.closeLabel`で終了ボタンの文言を指定できます。`debounceMs={0}`による手動保存は維持され、完了・Escapeでの終了は保存成功後に行います。単独のエディターはTabを閉じ込めません。
94
139
 
95
140
  ### 用途別のコンポーネント
@@ -104,7 +149,7 @@ Next.js Pages Routerでは`createNextPagesRouterAdapter(router)`を`urlAdapter`
104
149
  | 復元・保存対象の状態・同期状態 | `KeepUndo`、`keep.Backup`、`KeepItemStatusBadge`、`KeepSyncStatusBanner`、`KeepSyncRecoveryDialog` |
105
150
 
106
151
  各コンポーネントは同じProvider内に配置します。`renderItem`、slots、render propsで独自レイアウトへ組み込めます。
107
- `KeepItemCard`の`Media` / `Content` / `Title` / `Tags` / `Actions`でカードの一部だけを組み替えることもできます。
152
+ `KeepItemCard`の`Link` / `Media` / `Content` / `Title` / `Tags` / `Actions`でカードの一部だけを組み替えることもできます。
108
153
 
109
154
  ### テーマとアクセシビリティ
110
155
 
@@ -195,10 +240,18 @@ Choose `list`, `grid`, `compact`, or container-responsive `auto` for `layout`.
195
240
  `urlSync` synchronizes search, tags, sorting, and pagination with the URL and browser history.
196
241
  For Next.js Pages Router, pass `createNextPagesRouterAdapter(router)` as `urlAdapter`.
197
242
 
243
+ With `reorderable`, collections without an explicit sort default to manual order. The selector also supports date sorting; reorder handles appear only in manual order without `pinnedFirst`. Reordering replaces only the positions occupied by visible items, preserving other pages and hidden items. Arrow keys save immediately, Escape releases the grabbed item, and the existing five-second Undo restores committed order.
244
+
245
+ Pass `onManualSort` to a standalone `KeepSortSelect` to enable `value="manual"`. Its existing `onValueChange(value, sort)` callback still handles date sorts only. Manual-order URLs and Saved Views omit `sort`. Enabled URL synchronization takes priority; omitted `sort` clears the previous date sort. Ordinary collections fall back to newest update first. Unchanged URLs do not navigate; history defaults to push, with replace available through `urlSync={{ history: "replace" }}`.
246
+
247
+ Unassigned Saved Views use `organization.collection="unassigned"`. Host-supplied function filters remain unserializable. `revealRequest` clears local search, tag, organization, and date constraints, but returns `excluded` for items rejected by the host's fixed `targetType` or `filter`. `creatable` and `slots.toolbarEnd` can be combined.
248
+
198
249
  ### Revisit articles and links
199
250
 
200
251
  The reading presentation is opt-in; existing defaults are preserved.
201
252
 
253
+ Default `linkTarget="card"` links ordinary media and static content, placing tags, actions, and edit forms outside the link. Custom images and entire `children` / `render` bodies are no longer automatically wrapped. Compound `Title` supplies a title link. Use `KeepItemCard.Link` to explicitly wrap non-interactive content in custom layouts. It shares the root URL, router `linkComponent`, external-link attributes, availability, and `trackOpen` / `onOpen`. Nested `Title` is static, and `Content` omits automatic tags. Keep custom buttons and forms outside the link as well.
254
+
202
255
  ```tsx
203
256
  <keep.Collection
204
257
  layout="list"
@@ -209,12 +262,49 @@ The reading presentation is opt-in; existing defaults are preserved.
209
262
  />
210
263
  ```
211
264
 
265
+ ```tsx
266
+ <KeepItemCard item={item} href={item.meta.url} trackOpen>
267
+ <KeepItemCard.Link>
268
+ <KeepItemCard.Media />
269
+ <KeepItemCard.Content />
270
+ </KeepItemCard.Link>
271
+ <KeepItemCard.Tags />
272
+ <KeepItemCard.Actions />
273
+ </KeepItemCard>
274
+ ```
275
+
212
276
  `presentation="reading"` shows the title, URL source, collection name, note, tags, and save/open information. Images appear only when supplied through `getImageProps`. It hides the save toggle and shows editing, notes, and activity by default; existing visibility flags override these defaults. Supply `href` and `trackOpen` explicitly. Editing uses 300ms autosave and Done, retaining the draft on failure.
213
277
 
214
278
  `bulkActionsVariant="inline"` selects items on their article rows. Select-all targets only the current page; changes to search, filters, page, or view clear selection. Failed bulk operations retain selection. The default `separate` preserves the existing selection list.
215
279
 
216
280
  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.
217
281
 
282
+ `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()`.
283
+
284
+ ```tsx
285
+ <keep.Collection confirmRemoval features={{ bulkActions: true }} />
286
+ ```
287
+
288
+ ### Compare and restore fallback branches
289
+
290
+ `KeepFallbackRecovery` works independently of KeepProvider and accepts the target adapter's `recovery` explicitly. Display and inspection do not write. Select the source for conflicting records, review dependent membership changes, then apply. Unresolved conflicts or inconsistent relationships prevent applying. Changed data requires another inspection. A pending projection means the repair is already saved: retry it instead of submitting it again.
291
+
292
+ ```tsx
293
+ import { createBrowserStorageAdapter, KeepFallbackRecovery, KeepUiProvider } from "@keepkit/ui";
294
+
295
+ const storage = createBrowserStorageAdapter({ key: "my-app:items", scope: { userId: "alice" } });
296
+
297
+ function RecoveryScreen() {
298
+ return storage.recovery ? (
299
+ <KeepUiProvider locale="en">
300
+ <KeepFallbackRecovery recovery={storage.recovery} />
301
+ </KeepUiProvider>
302
+ ) : null;
303
+ }
304
+ ```
305
+
306
+ A `SyncStorageAdapter` exposes status only. Repair through a standalone local adapter before starting sync. Pre-repair backups are not automatically deleted. Refresh all older tabs when adopting this journal, and check the storage limits in the [Core guide](../keepkit/README.md).
307
+
218
308
  Use `KeepQuickEditor.closeLabel` to customize the completion button. Manual saving with `debounceMs={0}` is preserved; completion and Escape close only after successful saving. Standalone editors do not trap Tab.
219
309
 
220
310
  ### Components by task
@@ -229,7 +319,7 @@ Use `KeepQuickEditor.closeLabel` to customize the completion button. Manual savi
229
319
  | Undo, backup, availability, and sync | `KeepUndo`, `keep.Backup`, `KeepItemStatusBadge`, `KeepSyncStatusBanner`, `KeepSyncRecoveryDialog` |
230
320
 
231
321
  Place components under the same provider. Use `renderItem`, slots, or render props for custom layouts.
232
- Rearrange card regions through `KeepItemCard.Media` / `Content` / `Title` / `Tags` / `Actions`.
322
+ Rearrange card regions through `KeepItemCard.Link` / `Media` / `Content` / `Title` / `Tags` / `Actions`.
233
323
 
234
324
  ### Theme and accessibility
235
325
 
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { KeepListQuery, KeepUrlSyncOptions, KeepItemInput, ImportItemsResult, Ke
4
4
  export { AuthenticatedSyncAuthContext, AuthenticatedSyncKit, AuthenticatedSyncKitOptions, AuthenticatedSyncRequestContext, AuthenticatedSyncTransport, KeepItem, KeepItemInput, KeepListQuery, KeepRediscoveryStrategy, KeepScope, KeepSyncConflict, KeepSyncResolution, KeepSyncState, KeepSyncStatus, KeepUndoState, KeepUrlSyncOptions, createAuthenticatedSyncKit } from '@keepkit/core/core';
5
5
  import { useKeepItem, KeepCollectionSummary, KeepButtonProps as KeepButtonProps$1, UseKeepListResult, KeepErrorBoundaryProps, UseKeepNavigatorResult, CreateKeepKitOptions as CreateKeepKitOptions$1, KeepProviderProps, useKeepContext, useKeepList, UseKeepRediscoveryOptions, UseKeepRediscoveryResult, UseKeepCollectionsResult, UseKeepNavigatorOptions, KeepShortcutOptions } from '@keepkit/core/react';
6
6
  export { KeepButtonState, KeepContextValue, KeepErrorBoundary, KeepErrorBoundaryProps, KeepProvider, KeepProviderProps, KeepShortcutOptions, useKeepCollections, useKeepContext, useKeepItem, useKeepList, useKeepNavigator, useKeepRediscovery, useKeepShortcut } from '@keepkit/core/react';
7
+ import { KeepStorageRecovery } from '@keepkit/core/storage';
7
8
  export { FallbackStorageAdapter, IndexedDBAdapter, IndexedDBSyncQueueAdapter, LocalStorageAdapter, LocalStorageSyncQueueAdapter, SyncStorageAdapter, createBrowserStorageAdapter, createStorageAdapter } from '@keepkit/core/storage';
8
9
 
9
10
  type KeepUrlAdapter = {
@@ -119,6 +120,13 @@ type KeepBulkActionsState<TMeta = Record<string, unknown>> = {
119
120
  toggleSelectAll: () => void;
120
121
  toggleAll: () => void;
121
122
  remove: () => Promise<void>;
123
+ requestRemoval: () => Promise<void>;
124
+ confirmRemoval: () => Promise<void>;
125
+ cancelRemoval: () => void;
126
+ removalConfirmation: {
127
+ ids: readonly string[];
128
+ count: number;
129
+ } | null;
122
130
  updateTags: () => Promise<void>;
123
131
  collectionId: string;
124
132
  setCollectionId: (value: string) => void;
@@ -143,11 +151,13 @@ type KeepBulkActionsProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes
143
151
  onCompleted?: (action: "remove" | "tags", ids: string[]) => void;
144
152
  selectionScope?: KeepSelectionScope;
145
153
  onSelectionScopeChange?: (scope: KeepSelectionScope) => void;
154
+ /** Requires confirmation before removing the full selection, including items on other pages. */
155
+ confirmRemoval?: boolean;
146
156
  render?: RenderProp<KeepBulkActionsState<TMeta>>;
147
157
  children?: ReactNode | RenderProp<KeepBulkActionsState<TMeta>>;
148
158
  };
149
159
  /** Selects visible items and performs one storage operation for the whole selection. */
150
- declare function KeepBulkActions<TMeta = Record<string, unknown>>({ query, selectedIds: controlledSelectedIds, defaultSelectedIds, onSelectedIdsChange, renderItem, onCompleted, selectionScope: controlledScope, onSelectionScopeChange, render, children, ...props }: KeepBulkActionsProps<TMeta>): react.JSX.Element;
160
+ declare function KeepBulkActions<TMeta = Record<string, unknown>>({ query, selectedIds: controlledSelectedIds, defaultSelectedIds, onSelectedIdsChange, renderItem, onCompleted, selectionScope: controlledScope, onSelectionScopeChange, confirmRemoval, render, children, ...props }: KeepBulkActionsProps<TMeta>): react.JSX.Element;
151
161
 
152
162
  type KeepButtonProps<TMeta = Record<string, unknown>> = KeepButtonProps$1<TMeta> & {
153
163
  ref?: Ref<HTMLElement> | {
@@ -318,6 +328,8 @@ type KeepItemCardMediaProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> &
318
328
  children?: ReactNode;
319
329
  fallback?: ReactNode;
320
330
  };
331
+ /** An explicit linked region. Keep tags, buttons, and editors outside this region. */
332
+ type KeepItemCardLinkRegionProps = HTMLAttributes<HTMLElement>;
321
333
  type KeepItemCardContentProps = HTMLAttributes<HTMLDivElement>;
322
334
  type KeepItemCardTitleProps = Omit<HTMLAttributes<HTMLHeadingElement>, "title"> & {
323
335
  as?: "h2" | "h3" | "h4" | "h5" | "h6";
@@ -330,6 +342,7 @@ type KeepItemCardSkeletonProps = Omit<HTMLAttributes<HTMLElement>, "children"> &
330
342
  /** A low-dependency item presentation primitive with composable card parts. */
331
343
  declare function KeepItemCardRoot<TMeta = Record<string, unknown>>({ item, title, getTitle, getImageProps, imageComponent: ImageComponent, renderImage, renderTags, presentation, showTags, showNote, showSavedAt, showActivity, activityKind, collectionLabels, imageAlt, render, children, removeLabel, onRemoveError, onRemoved, onRetry, showSaveButton, showPinButton, showArchiveButton, showEditButton, onEdit, editSlot, editFeatures, saveButtonLabels, asChild, href: hrefOption, onOpen, trackOpen, linkTarget, linkComponent: LinkComponent, linkTargetAttribute, linkRel, highlightQuery, cardVariant, className, ...rootProps }: KeepItemCardProps<TMeta>): react.JSX.Element;
332
344
  declare function KeepItemCardMedia({ children, fallback, ...props }: KeepItemCardMediaProps): react.JSX.Element;
345
+ declare function KeepItemCardLink({ children, ...props }: KeepItemCardLinkRegionProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react.JSX.Element | null | undefined;
333
346
  declare function KeepItemCardContent({ children, ...props }: KeepItemCardContentProps): react.JSX.Element;
334
347
  declare function KeepItemCardTitle({ as, children, ...props }: KeepItemCardTitleProps): react.DetailedReactHTMLElement<{
335
348
  "data-keep-card-part": string;
@@ -638,6 +651,7 @@ declare function KeepItemCardArchive({ children, ...props }: Omit<KeepArchiveBut
638
651
  }): react.JSX.Element;
639
652
  declare function KeepItemCardCollectionBadge({ children, ...props }: KeepItemCardBadgeProps): react.JSX.Element | null;
640
653
  declare const KeepItemCard: typeof KeepItemCardRoot & {
654
+ Link: typeof KeepItemCardLink;
641
655
  Media: typeof KeepItemCardMedia;
642
656
  Content: typeof KeepItemCardContent;
643
657
  Title: typeof KeepItemCardTitle;
@@ -737,6 +751,8 @@ type KeepCollectionProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<
737
751
  onReorder?: (items: KeepItem<TMeta>[]) => void | Promise<void>;
738
752
  features?: Partial<Record<KeepCollectionFeature, boolean>>;
739
753
  bulkActionsVariant?: "separate" | "inline";
754
+ /** Requires confirmation before a bulk removal. */
755
+ confirmRemoval?: boolean;
740
756
  collectionLabels?: Record<string, string>;
741
757
  /** Shows a collection creation form in the toolbar. */
742
758
  creatable?: boolean;
@@ -884,7 +900,7 @@ type KeepTagEditorProps<TMeta = Record<string, unknown>> = Omit<FormHTMLAttribut
884
900
  /** Edits one item's normalized tag set; Enter adds and Backspace removes the last tag. */
885
901
  declare function KeepTagEditor<TMeta = Record<string, unknown>>({ item, availableTags, onSaved, onSaveError, render, ...props }: KeepTagEditorProps<TMeta>): react.JSX.Element;
886
902
 
887
- type KeepUiLabelKey = "done" | "moreActions" | "moveSelected" | "save" | "saved" | "remove" | "loading" | "saving" | "syncing" | "error" | "archive" | "unarchive" | "archived" | "pin" | "unpin" | "pinned" | "collection" | "allCollections" | "filterCollections" | "uncategorized" | "saveWithNote" | "editSavedItem" | "unsavedChanges" | "allTags" | "tags" | "filterTags" | "activeFilters" | "clearFilters" | "clearAllFilters" | "resetFilters" | "removeFilter" | "noFilteredItems" | "noFilteredItemsDescription" | "emptyStorageDescription" | "note" | "saveNote" | "noItems" | "loadingItems" | "errorItems" | "search" | "sort" | "newest" | "oldest" | "savedNewest" | "savedOldest" | "updatedNewest" | "updatedOldest" | "previousPage" | "nextPage" | "pagination" | "page" | "selectItems" | "selectedCount" | "deleteSelected" | "tagsToApply" | "applyTags" | "savedMessage" | "removedMessage" | "restoredMessage" | "syncFailedMessage" | "stalePrunedMessage" | "undo" | "undoAvailable" | "selectionScope" | "currentPage" | "searchResults" | "allItems" | "localVersion" | "remoteVersion" | "updatedAt" | "statusAvailable" | "noteSavedMessage" | "exportData" | "importData" | "importMode" | "merge" | "replace" | "importedCount" | "failedCount" | "storageQuotaError" | "statusExpired" | "statusRemoved" | "statusDeleted" | "statusPrivate" | "statusUnknown" | "retry" | "removeFromList" | "pruneStale" | "retrySync" | "resolveSync" | "keepLocal" | "useServer" | "manualMerge" | "close" | "backupRecovery" | "backupRecoveryDescription" | "syncPending" | "syncSynced" | "syncConflict" | "archiveScope" | "archiveScopeActive" | "archiveScopeArchived" | "archiveScopeAll" | "activityNeverOpened" | "activityOpened" | "activityInactiveFor" | "activityInactiveSuffix" | "activityBefore" | "activityAfter" | "undoReorder" | "toolbarStart" | "toolbarQuery" | "toolbarFilters" | "toolbarEnd" | "createCollection" | "createCollectionSubmit" | "collectionName" | "manageCollections" | "renameCollection" | "renameCollectionSubmit" | "deleteCollection" | "deleteCollectionConfirm" | "deleteCollectionSubmit" | "cancel" | "collectionItem" | "collectionItems";
903
+ type KeepUiLabelKey = "confirmRemoval" | "confirmRemovalDescription" | "fallbackRecovery" | "inspectRecovery" | "recoveryPrimary" | "recoveryFallback" | "recoverySnapshot" | "recoveryLegacy" | "recoveryUnavailable" | "recoveryStale" | "recoveryPending" | "recoveryReady" | "recoveryChooseSource" | "recoveryPreview" | "recoveryApply" | "recoveryApplied" | "recoveryCommitted" | "recoveryItems" | "recoveryMemberships" | "recoveryBackups" | "recoveryIssues" | "recoveryNoChanges" | "moveSelectedCollection" | "archiveSelected" | "unarchiveSelected" | "pinSelected" | "unpinSelected" | "done" | "moreActions" | "moveSelected" | "save" | "saved" | "remove" | "loading" | "saving" | "syncing" | "error" | "archive" | "unarchive" | "archived" | "pin" | "unpin" | "pinned" | "collection" | "allCollections" | "filterCollections" | "uncategorized" | "saveWithNote" | "editSavedItem" | "unsavedChanges" | "allTags" | "tags" | "filterTags" | "activeFilters" | "clearFilters" | "clearAllFilters" | "resetFilters" | "removeFilter" | "noFilteredItems" | "noFilteredItemsDescription" | "emptyStorageDescription" | "note" | "saveNote" | "noItems" | "loadingItems" | "errorItems" | "search" | "sort" | "newest" | "oldest" | "savedNewest" | "savedOldest" | "updatedNewest" | "updatedOldest" | "previousPage" | "nextPage" | "pagination" | "page" | "selectItems" | "selectedCount" | "deleteSelected" | "tagsToApply" | "applyTags" | "savedMessage" | "removedMessage" | "restoredMessage" | "syncFailedMessage" | "stalePrunedMessage" | "undo" | "undoAvailable" | "selectionScope" | "currentPage" | "searchResults" | "allItems" | "localVersion" | "remoteVersion" | "updatedAt" | "statusAvailable" | "noteSavedMessage" | "exportData" | "importData" | "importMode" | "merge" | "replace" | "importedCount" | "failedCount" | "storageQuotaError" | "statusExpired" | "statusRemoved" | "statusDeleted" | "statusPrivate" | "statusUnknown" | "retry" | "removeFromList" | "pruneStale" | "retrySync" | "resolveSync" | "keepLocal" | "useServer" | "manualMerge" | "close" | "backupRecovery" | "backupRecoveryDescription" | "syncPending" | "syncSynced" | "syncConflict" | "archiveScope" | "archiveScopeActive" | "archiveScopeArchived" | "archiveScopeAll" | "activityNeverOpened" | "activityOpened" | "activityInactiveFor" | "activityInactiveSuffix" | "activityBefore" | "activityAfter" | "undoReorder" | "toolbarStart" | "toolbarQuery" | "toolbarFilters" | "toolbarEnd" | "createCollection" | "createCollectionSubmit" | "collectionName" | "manageCollections" | "renameCollection" | "renameCollectionSubmit" | "deleteCollection" | "deleteCollectionConfirm" | "deleteCollectionSubmit" | "cancel" | "collectionItem" | "collectionItems" | "manualSort" | "moveItem" | "reorderMoved" | "reorderFailed" | "savedViews" | "savedViewName" | "saveView" | "renameSavedView" | "savedViewNewName" | "deleteSavedView" | "savedViewsLoadError" | "savedViewSaveError" | "savedViewNameRequired" | "savedViewNotSerializable" | "savedViewInvalidDates";
888
904
  type KeepUiLabelOptions = {
889
905
  /** Replaces the localized label text. Omit to keep the locale default. */
890
906
  text?: string;
@@ -1173,12 +1189,14 @@ type KeepSearchInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "value"
1173
1189
  declare function KeepSearchInput({ value: controlledValue, defaultValue, debounceMs, onValueChange, "aria-label": ariaLabel, placeholder, ...props }: KeepSearchInputProps): react.JSX.Element;
1174
1190
  type KeepSortValue = "savedAt:desc" | "savedAt:asc" | "updatedAt:desc" | "updatedAt:asc" | "lastOpenedAt:desc" | "lastOpenedAt:asc";
1175
1191
  type KeepSortSelectProps = Omit<SelectHTMLAttributes<HTMLSelectElement>, "value" | "defaultValue" | "onChange"> & {
1176
- value?: KeepSortValue;
1177
- defaultValue?: KeepSortValue;
1192
+ value?: KeepSortValue | "manual";
1193
+ defaultValue?: KeepSortValue | "manual";
1178
1194
  onValueChange?: (value: KeepSortValue, sort: NonNullable<KeepListQuery["sort"]>) => void;
1195
+ /** Adds a manual-order option without changing the dated-sort callback. */
1196
+ onManualSort?: () => void;
1179
1197
  };
1180
1198
  /** Emits a normalized sort descriptor that can be passed directly to useKeepList. */
1181
- declare function KeepSortSelect({ value: controlledValue, defaultValue, onValueChange, "aria-label": ariaLabel, children, ...props }: KeepSortSelectProps): react.JSX.Element;
1199
+ declare function KeepSortSelect({ value: controlledValue, defaultValue, onValueChange, onManualSort, "aria-label": ariaLabel, children, ...props }: KeepSortSelectProps): react.JSX.Element;
1182
1200
  type KeepPaginationState = {
1183
1201
  page: number;
1184
1202
  pageCount: number;
@@ -1195,6 +1213,13 @@ type KeepPaginationProps = Omit<React.HTMLAttributes<HTMLElement>, "children"> &
1195
1213
  /** Accessible pagination with previous/next controls and numbered page buttons. */
1196
1214
  declare function KeepPagination({ totalCount, pageSize, page, maxPageButtons, onPageChange, render, ...props }: KeepPaginationProps): react.JSX.Element;
1197
1215
 
1216
+ type KeepFallbackRecoveryProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HTMLElement>, "children"> & {
1217
+ /** Pass a standalone local adapter's capability before initializing remote synchronization. */
1218
+ recovery: KeepStorageRecovery<TMeta>;
1219
+ };
1220
+ /** Compares persisted versions without writing; only an explicit reviewed apply commits a repair. */
1221
+ declare function KeepFallbackRecovery<TMeta = Record<string, unknown>>({ recovery, ...props }: KeepFallbackRecoveryProps<TMeta>): react.JSX.Element;
1222
+
1198
1223
  type KeepRediscoveryProps<TMeta = Record<string, unknown>> = Omit<KeepListProps<TMeta>, "query"> & {
1199
1224
  strategy: KeepRediscoveryStrategy;
1200
1225
  inactiveForMs?: number;
@@ -1410,6 +1435,7 @@ type KeepKit<TMeta = Record<string, unknown>> = {
1410
1435
  Inbox: ComponentType<KeepInboxProps<TMeta>>;
1411
1436
  SavedViews: ComponentType<KeepSavedViewsProps<TMeta>>;
1412
1437
  CollectionManager: ComponentType<KeepCollectionManagerProps>;
1438
+ FallbackRecovery: ComponentType<KeepFallbackRecoveryProps<TMeta>>;
1413
1439
  Workspace: ComponentType<KeepWorkspaceProps<TMeta>>;
1414
1440
  useContext: () => ReturnType<typeof useKeepContext<TMeta>>;
1415
1441
  useItem: (item?: KeepItemInput<TMeta>) => ReturnType<typeof useKeepItem<TMeta>>;
@@ -1431,4 +1457,4 @@ type KeepKit<TMeta = Record<string, unknown>> = {
1431
1457
  /** Create one typed application API for the core and standard UI layer. */
1432
1458
  declare function createKeepKit<TMeta = Record<string, unknown>>(options?: CreateKeepKitOptions<TMeta>): KeepKit<TMeta>;
1433
1459
 
1434
- export { type CreateKeepKitOptions, KeepActiveFiltersSummary, type KeepActiveFiltersSummaryProps, type KeepActiveFiltersSummaryState, type KeepActivityKind, KeepAnnouncements, type KeepAnnouncementsProps, KeepAnnouncer, KeepArchiveButton, type KeepArchiveButtonProps, type KeepArchiveButtonState, type KeepArchiveScope, KeepArchiveScopeSelect, type KeepArchiveScopeSelectProps, KeepBackup, type KeepBackupProps, KeepBulkActions, type KeepBulkActionsProps, type KeepBulkActionsState, KeepButton, type KeepButtonIcon, type KeepButtonIconProps, type KeepButtonIcons, type KeepButtonLabels, type KeepButtonProps, KeepCollection, type KeepCollectionControlProps, KeepCollectionCreate, type KeepCollectionCreateProps, type KeepCollectionFeature, KeepCollectionFilter, KeepCollectionManager, type KeepCollectionManagerProps, type KeepCollectionOption, type KeepCollectionProps, type KeepCollectionRevealRequest, type KeepCollectionRevealResult, KeepCollectionSelect, type KeepCollectionSlots, type KeepCollectionToolbarContent, type KeepCollectionToolbarGroup, type KeepCollectionToolbarLayout, type KeepCollectionToolbarVariant, type KeepDisplayStatus, KeepEmptyState, type KeepEmptyStateProps, type KeepEmptyStateVariant, KeepFloatingTour, type KeepFloatingTourProps, KeepHighlight, type KeepHighlightProps, type KeepImageProps, KeepInbox, type KeepInboxProps, KeepItemCard, type KeepItemCardActionSlotProps, type KeepItemCardActionsProps, type KeepItemCardBadgeProps, type KeepItemCardContentProps, type KeepItemCardLinkProps, type KeepItemCardMediaProps, type KeepItemCardPresentation, type KeepItemCardProps, type KeepItemCardRemoveProps, type KeepItemCardSaveProps, KeepItemCardSkeleton, type KeepItemCardSkeletonProps, type KeepItemCardState, type KeepItemCardTagsProps, type KeepItemCardTitleProps, type KeepItemCardVariant, KeepItemCheckbox, type KeepItemCheckboxProps, type KeepItemSelection, KeepItemStatusBadge, type KeepItemStatusBadgeProps, type KeepKit, KeepKitProvider, type KeepKitProviderProps, KeepLastActivity, type KeepLastActivityProps, KeepLayout, type KeepLayoutPreset, type KeepLayoutProps, KeepList, type KeepListProps, type KeepListSelection, type KeepListState, KeepNavigator, KeepNoteEditor, type KeepNoteEditorProps, type KeepNoteEditorState, type KeepPagesRouterLike, KeepPagination, type KeepPaginationProps, type KeepPaginationState, KeepPinButton, type KeepPinButtonProps, type KeepPinButtonState, KeepPruneStaleButton, type KeepPruneStaleButtonProps, KeepQuickEditor, type KeepQuickEditorFeature, type KeepQuickEditorProps, type KeepQuickEditorState, KeepRediscovery, KeepRediscoveryPanel, type KeepRediscoveryPanelProps, type KeepRediscoveryProps, type KeepReorderableItemState, KeepReorderableList, type KeepReorderableListProps, KeepSavePopover, type KeepSavePopoverProps, KeepSaveViewButton, KeepSavedViews, type KeepSavedViewsProps, KeepSearchInput, type KeepSearchInputProps, type KeepSelectionScope, KeepShortcutHint, type KeepShortcutHintProps, KeepSortSelect, type KeepSortSelectProps, type KeepSortValue, KeepStaleNotice, type KeepStaleNoticeProps, KeepStatus, type KeepStatusLabels, type KeepStatusProps, type KeepStatusState, type KeepStatusValue, KeepSyncRecoveryDialog, type KeepSyncRecoveryDialogProps, KeepSyncStatusBanner, type KeepSyncStatusBannerProps, KeepTagEditor, type KeepTagEditorProps, type KeepTagEditorState, KeepTagFilter, type KeepTagFilterProps, type KeepTagFilterState, type KeepThemeDensity, type KeepThemeMode, type KeepThemeName, KeepThemeProvider, type KeepThemeProviderProps, type KeepThemeRadius, type KeepThemeVariables, type KeepToastFeedbackOptions, type KeepToastHandler, KeepTourBar, type KeepTourBarProps, type KeepTourContextValue, type KeepTourPersistenceStatus, type KeepTourPosition, KeepTourProvider, type KeepTourProviderProps, type KeepTourShortcutsOptions, type KeepTourStartOptions, type KeepUiFeedbackEvent, type KeepUiLabelContext, type KeepUiLabelKey, type KeepUiLabelOptions, type KeepUiLabelOptionsMap, type KeepUiLabels, type KeepUiLocale, type KeepUiLocaleLabels, KeepUiProvider, type KeepUiProviderProps, KeepUndo, type KeepUndoProps, type KeepUrlAdapter, KeepWorkspace, type KeepWorkspaceModule, type KeepWorkspacePreset, type KeepWorkspaceProps, type KeepWorkspaceRegion, type KeepWorkspaceSectionGap, type KeepWorkspaceSlots, type KeepWorkspaceState, type KeepWorkspaceSurface, type RenderProp, type UseKeepSavedViewsResult, chainedFunction, composeRefs, createKeepKit, createNextPagesRouterAdapter, createSlot, getKeepLocaleLabels, highlightText, isAllSelected, keepThemeNames, mergeProps, toggleSelectAll, useKeepQuickEditor, useKeepSavedViews, useKeepToastFeedback, useKeepTour, useKeepTourShortcuts, useKeepUiLabels, useKeepUrlSync, useUiLabelVisibility };
1460
+ export { type CreateKeepKitOptions, KeepActiveFiltersSummary, type KeepActiveFiltersSummaryProps, type KeepActiveFiltersSummaryState, type KeepActivityKind, KeepAnnouncements, type KeepAnnouncementsProps, KeepAnnouncer, KeepArchiveButton, type KeepArchiveButtonProps, type KeepArchiveButtonState, type KeepArchiveScope, KeepArchiveScopeSelect, type KeepArchiveScopeSelectProps, KeepBackup, type KeepBackupProps, KeepBulkActions, type KeepBulkActionsProps, type KeepBulkActionsState, KeepButton, type KeepButtonIcon, type KeepButtonIconProps, type KeepButtonIcons, type KeepButtonLabels, type KeepButtonProps, KeepCollection, type KeepCollectionControlProps, KeepCollectionCreate, type KeepCollectionCreateProps, type KeepCollectionFeature, KeepCollectionFilter, KeepCollectionManager, type KeepCollectionManagerProps, type KeepCollectionOption, type KeepCollectionProps, type KeepCollectionRevealRequest, type KeepCollectionRevealResult, KeepCollectionSelect, type KeepCollectionSlots, type KeepCollectionToolbarContent, type KeepCollectionToolbarGroup, type KeepCollectionToolbarLayout, type KeepCollectionToolbarVariant, type KeepDisplayStatus, KeepEmptyState, type KeepEmptyStateProps, type KeepEmptyStateVariant, KeepFallbackRecovery, type KeepFallbackRecoveryProps, KeepFloatingTour, type KeepFloatingTourProps, KeepHighlight, type KeepHighlightProps, type KeepImageProps, KeepInbox, type KeepInboxProps, KeepItemCard, type KeepItemCardActionSlotProps, type KeepItemCardActionsProps, type KeepItemCardBadgeProps, type KeepItemCardContentProps, type KeepItemCardLinkProps, type KeepItemCardLinkRegionProps, type KeepItemCardMediaProps, type KeepItemCardPresentation, type KeepItemCardProps, type KeepItemCardRemoveProps, type KeepItemCardSaveProps, KeepItemCardSkeleton, type KeepItemCardSkeletonProps, type KeepItemCardState, type KeepItemCardTagsProps, type KeepItemCardTitleProps, type KeepItemCardVariant, KeepItemCheckbox, type KeepItemCheckboxProps, type KeepItemSelection, KeepItemStatusBadge, type KeepItemStatusBadgeProps, type KeepKit, KeepKitProvider, type KeepKitProviderProps, KeepLastActivity, type KeepLastActivityProps, KeepLayout, type KeepLayoutPreset, type KeepLayoutProps, KeepList, type KeepListProps, type KeepListSelection, type KeepListState, KeepNavigator, KeepNoteEditor, type KeepNoteEditorProps, type KeepNoteEditorState, type KeepPagesRouterLike, KeepPagination, type KeepPaginationProps, type KeepPaginationState, KeepPinButton, type KeepPinButtonProps, type KeepPinButtonState, KeepPruneStaleButton, type KeepPruneStaleButtonProps, KeepQuickEditor, type KeepQuickEditorFeature, type KeepQuickEditorProps, type KeepQuickEditorState, KeepRediscovery, KeepRediscoveryPanel, type KeepRediscoveryPanelProps, type KeepRediscoveryProps, type KeepReorderableItemState, KeepReorderableList, type KeepReorderableListProps, KeepSavePopover, type KeepSavePopoverProps, KeepSaveViewButton, KeepSavedViews, type KeepSavedViewsProps, KeepSearchInput, type KeepSearchInputProps, type KeepSelectionScope, KeepShortcutHint, type KeepShortcutHintProps, KeepSortSelect, type KeepSortSelectProps, type KeepSortValue, KeepStaleNotice, type KeepStaleNoticeProps, KeepStatus, type KeepStatusLabels, type KeepStatusProps, type KeepStatusState, type KeepStatusValue, KeepSyncRecoveryDialog, type KeepSyncRecoveryDialogProps, KeepSyncStatusBanner, type KeepSyncStatusBannerProps, KeepTagEditor, type KeepTagEditorProps, type KeepTagEditorState, KeepTagFilter, type KeepTagFilterProps, type KeepTagFilterState, type KeepThemeDensity, type KeepThemeMode, type KeepThemeName, KeepThemeProvider, type KeepThemeProviderProps, type KeepThemeRadius, type KeepThemeVariables, type KeepToastFeedbackOptions, type KeepToastHandler, KeepTourBar, type KeepTourBarProps, type KeepTourContextValue, type KeepTourPersistenceStatus, type KeepTourPosition, KeepTourProvider, type KeepTourProviderProps, type KeepTourShortcutsOptions, type KeepTourStartOptions, type KeepUiFeedbackEvent, type KeepUiLabelContext, type KeepUiLabelKey, type KeepUiLabelOptions, type KeepUiLabelOptionsMap, type KeepUiLabels, type KeepUiLocale, type KeepUiLocaleLabels, KeepUiProvider, type KeepUiProviderProps, KeepUndo, type KeepUndoProps, type KeepUrlAdapter, KeepWorkspace, type KeepWorkspaceModule, type KeepWorkspacePreset, type KeepWorkspaceProps, type KeepWorkspaceRegion, type KeepWorkspaceSectionGap, type KeepWorkspaceSlots, type KeepWorkspaceState, type KeepWorkspaceSurface, type RenderProp, type UseKeepSavedViewsResult, chainedFunction, composeRefs, createKeepKit, createNextPagesRouterAdapter, createSlot, getKeepLocaleLabels, highlightText, isAllSelected, keepThemeNames, mergeProps, toggleSelectAll, useKeepQuickEditor, useKeepSavedViews, useKeepToastFeedback, useKeepTour, useKeepTourShortcuts, useKeepUiLabels, useKeepUrlSync, useUiLabelVisibility };