@keepkit/ui 0.28.0 → 0.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/index.d.ts +50 -10
- package/dist/index.js +567 -282
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -57,6 +57,8 @@ function SavedArticles() {
|
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
`keep.Collection`は検索、ソート、ページング、loading / empty / error、ARIA live通知を標準で提供します。検索は既定で300msデバウンスされます。`features={{ tagFilter: true, bulkActions: true }}`でタグフィルターと一括操作も有効にできます。個別の`KeepList`、`KeepSearchInput`、`KeepSortSelect`、`KeepPagination`、`KeepItemCheckbox`、`KeepTagEditor`などは高度なレイアウト用に利用できます。`KeepBulkActions`はrender propsで操作UIを差し替えられ、`isAllSelected` / `toggleSelectAll`で表示中アイテムを一括操作できます。`KeepNoteEditor`は既定300msのデバウンス保存に対応し、`debounceMs={0}`でフォーム送信のみへ戻せます。通知領域だけを明示的に置く場合は`KeepAnnouncer`(`KeepAnnouncements`のalias)を使えます。
|
|
60
|
+
再発見には`useKeepItem(item).recordOpen()`で`lastOpenedAt`を記録し、`activity`クエリまたは`createRediscoveryQuery()` / `useKeepRediscovery()`を利用できます。`<KeepRediscovery strategy="forgotten" limit={5} />`は既存の`KeepList`を組み合わせた標準プリセットです。カード単位では`trackOpen`を指定したときだけ開封記録を有効にします。
|
|
61
|
+
保存確認から対象へ戻すには`revealRequest={{ requestId, itemId }}`を渡し、`onRevealResult`で結果を受け取れます。検索・タグ・保存先フィルターとページを調整して対象を表示します。
|
|
60
62
|
`KeepWorkspace`はこれらのプリミティブを一つにまとめ、`basic`、`standard`、`management`、`sync`のプリセットを提供します。`createKeepKit()`を利用する場合は同じ実装を`keep.Workspace`から型付きで利用できます。`modules`、`slots`、子コンポーネントごとのpropsで部分的に差し替えられます。
|
|
61
63
|
`KeepCollectionManager`は作成・名前変更・削除・件数表示をまとめたheadless UIです。`allowCreate`、`allowRename`、`allowDelete`、`showCounts`で機能を個別に切り替えられ、`collectionLabels`、`title`、`description`、`empty`で表示を差し替えられます。
|
|
62
64
|
画面領域を明示する場合は`surface="panel"`または領域別の`surface`と、`sectionGap="compact" | "comfortable"`を指定できます。空のslotは枠を生成せず、未指定時と`surface="plain"`では従来のDOM順序を維持します。
|
|
@@ -107,7 +109,7 @@ const onFeedback = useKeepToastFeedback(toast);
|
|
|
107
109
|
<KeepKitProvider storage={storage} onFeedback={onFeedback}>{children}</KeepKitProvider>;
|
|
108
110
|
```
|
|
109
111
|
|
|
110
|
-
v0.28.
|
|
112
|
+
v0.28.2では、利用履歴とRediscovery query、カード開封追跡に加えて、検索・タグ・コレクション・Activity・アーカイブ条件を表示して個別解除できるフィルターサマリーを追加しました。レイアウト領域を消費しないPortalベースのフローティング巡回UI、Tailwind CSS v4との統合、ホストテーマ変数との衝突回避も引き続き利用できます。
|
|
111
113
|
Phase 4の状態UIとして`KeepItemStatusBadge`、`KeepStaleNotice`、`KeepPruneStaleButton`、`KeepSyncStatusBanner`、`KeepSyncRecoveryDialog`を利用できます。`import "@keepkit/ui/theme.css"`でテーマCSSを有効にできます。
|
|
112
114
|
|
|
113
115
|
### Tailwind/shadcnテーマ
|
|
@@ -198,6 +200,7 @@ function SavedArticles() {
|
|
|
198
200
|
```
|
|
199
201
|
|
|
200
202
|
`keep.Collection` includes search, sorting, pagination, loading/empty/error states, and polite live announcements. Search is debounced by 300ms by default. Enable `features={{ tagFilter: true, bulkActions: true }}` for tag filtering and bulk operations. Use the individual `KeepList`, `KeepSearchInput`, `KeepSortSelect`, `KeepPagination`, `KeepItemCheckbox`, and `KeepTagEditor` primitives when you need a custom layout. `KeepBulkActions` supports render props and exposes `isAllSelected` / `toggleSelectAll` for visible-item selection. `KeepNoteEditor` auto-saves dirty notes after 300ms by default; set `debounceMs={0}` to use form submission only. Mount `KeepAnnouncer` (`KeepAnnouncements` alias) when you need the live region explicitly.
|
|
203
|
+
Pass `revealRequest={{ requestId, itemId }}` to return to an item from a save confirmation; `onRevealResult` reports the outcome after search, tag, collection, and pagination state is adjusted.
|
|
201
204
|
`KeepWorkspace` composes these primitives into `basic`, `standard`, `management`, and `sync` presets. `createKeepKit()` exposes the same implementation as a typed `keep.Workspace`. Override individual areas through `modules`, `slots`, and child-component props.
|
|
202
205
|
`KeepCollectionManager` is a headless collection-management UI for creating, renaming, deleting, and counting collections. Toggle each capability with `allowCreate`, `allowRename`, `allowDelete`, and `showCounts`; customize `collectionLabels`, `title`, `description`, and `empty`.
|
|
203
206
|
Use `surface="panel"` or a per-region `surface` map together with `sectionGap="compact" | "comfortable"` to make workspace boundaries explicit. Empty slots do not create frames, and omitted `surface` or `surface="plain"` preserves the existing DOM order.
|
|
@@ -247,7 +250,7 @@ const onFeedback = useKeepToastFeedback(toast);
|
|
|
247
250
|
<KeepKitProvider storage={storage} onFeedback={onFeedback}>{children}</KeepKitProvider>;
|
|
248
251
|
```
|
|
249
252
|
|
|
250
|
-
v0.28.
|
|
253
|
+
v0.28.2 adds activity tracking, Rediscovery queries, opt-in card open tracking, and a complete active-filter summary with removal and result-count feedback. The portal-rendered floating tour UI, Tailwind CSS v4 integration, host-theme isolation, and cascade-layer support remain available.
|
|
251
254
|
Phase 4 adds `KeepItemStatusBadge`, `KeepStaleNotice`, `KeepPruneStaleButton`, `KeepSyncStatusBanner`, and `KeepSyncRecoveryDialog` for unavailable items, sync failures, conflict resolution, and backup recovery. Import `@keepkit/ui/theme.css` or `@keepkit/ui/tailwind.css` for the opt-in theme layer.
|
|
252
255
|
|
|
253
256
|
### Tailwind and shadcn theme
|
|
@@ -291,6 +294,7 @@ import { KeepItemCard, KeepThemeProvider } from "@keepkit/ui";
|
|
|
291
294
|
Use `[data-state="saved"]`, `[data-state="unsaved"]`, `[data-loading="true"]`, `[data-state="error"]`, `[data-state="empty"]`, `[data-state="stale"]`, `[data-status="expired"]`, `[data-status="removed"]`, and `[data-state="selected"]` from host CSS or Tailwind data variants. For migration, keep importing `@keepkit/ui/theme.css` while replacing direct `--keepkit-*` references with `--keep-*`. In the Pages Router, inject `createNextPagesRouterAdapter(router)` into `urlAdapter`.
|
|
292
295
|
|
|
293
296
|
Collection queries use one canonical shape: `targetType`, `tags`, `search`, `sort`, `pagination`, `filter`, and `savedBetween`. Saved item inputs contain only `id`, `meta`, `targetType`, `note`, and `tags`; KeepKit owns persistence timestamps.
|
|
297
|
+
For rediscovery, use `useKeepItem(item).recordOpen()` to persist `lastOpenedAt`, then query `activity` with `opened`, `lastOpenedBefore`, `lastOpenedAfter`, or `inactiveForMs`. `createRediscoveryQuery()` / `useKeepRediscovery()` provide standard `never-opened`, `forgotten`, and `recently-opened` views, while `<KeepRediscovery strategy="forgotten" limit={5} />` composes the UI list. `KeepItemCard trackOpen` opts into tracking without changing existing cards.
|
|
294
298
|
|
|
295
299
|
Framework-neutral APIs remain available from `@keepkit/core/core`, low-level React bindings from `@keepkit/core/react`, and storage adapters from `@keepkit/core/storage`.
|
|
296
300
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ButtonHTMLAttributes, ReactNode, HTMLAttributes, ComponentType, Ref, RefCallback, ReactElement, InputHTMLAttributes, FormHTMLAttributes, ImgHTMLAttributes, MouseEvent, HTMLAttributeAnchorTarget, SelectHTMLAttributes, KeyboardEvent, CSSProperties } from 'react';
|
|
3
|
-
import { KeepListQuery, KeepUrlSyncOptions, KeepItemInput, ImportItemsResult, KeepItem, KeepItemStatus, KeepSyncConflict } from '@keepkit/core/core';
|
|
4
|
-
export { AuthenticatedSyncAuthContext, AuthenticatedSyncKit, AuthenticatedSyncKitOptions, AuthenticatedSyncRequestContext, AuthenticatedSyncTransport, KeepItem, KeepItemInput, KeepListQuery, KeepScope, KeepSyncConflict, KeepSyncResolution, KeepSyncState, KeepSyncStatus, KeepUndoState, KeepUrlSyncOptions, createAuthenticatedSyncKit } from '@keepkit/core/core';
|
|
5
|
-
import { useKeepItem, KeepButtonProps as KeepButtonProps$1, UseKeepListResult, KeepErrorBoundaryProps, UseKeepNavigatorResult, CreateKeepKitOptions as CreateKeepKitOptions$1, KeepProviderProps, useKeepContext, useKeepList, UseKeepCollectionsResult, UseKeepNavigatorOptions, KeepShortcutOptions } from '@keepkit/core/react';
|
|
6
|
-
export { KeepButtonState, KeepContextValue, KeepErrorBoundary, KeepErrorBoundaryProps, KeepProvider, KeepProviderProps, KeepShortcutOptions, useKeepCollections, useKeepContext, useKeepItem, useKeepList, useKeepNavigator, useKeepShortcut } from '@keepkit/core/react';
|
|
3
|
+
import { KeepListQuery, KeepUrlSyncOptions, KeepItemInput, ImportItemsResult, KeepItem, KeepItemStatus, KeepRediscoveryStrategy, KeepSyncConflict } from '@keepkit/core/core';
|
|
4
|
+
export { AuthenticatedSyncAuthContext, AuthenticatedSyncKit, AuthenticatedSyncKitOptions, AuthenticatedSyncRequestContext, AuthenticatedSyncTransport, KeepItem, KeepItemInput, KeepListQuery, KeepRediscoveryStrategy, KeepScope, KeepSyncConflict, KeepSyncResolution, KeepSyncState, KeepSyncStatus, KeepUndoState, KeepUrlSyncOptions, createAuthenticatedSyncKit } from '@keepkit/core/core';
|
|
5
|
+
import { useKeepItem, KeepButtonProps as KeepButtonProps$1, UseKeepListResult, KeepErrorBoundaryProps, UseKeepNavigatorResult, CreateKeepKitOptions as CreateKeepKitOptions$1, KeepProviderProps, useKeepContext, useKeepList, UseKeepRediscoveryOptions, UseKeepRediscoveryResult, UseKeepCollectionsResult, UseKeepNavigatorOptions, KeepShortcutOptions } from '@keepkit/core/react';
|
|
6
|
+
export { KeepButtonState, KeepContextValue, KeepErrorBoundary, KeepErrorBoundaryProps, KeepProvider, KeepProviderProps, KeepShortcutOptions, useKeepCollections, useKeepContext, useKeepItem, useKeepList, useKeepNavigator, useKeepRediscovery, useKeepShortcut } from '@keepkit/core/react';
|
|
7
7
|
export { FallbackStorageAdapter, IndexedDBAdapter, IndexedDBSyncQueueAdapter, LocalStorageAdapter, LocalStorageSyncQueueAdapter, SyncStorageAdapter, createBrowserStorageAdapter, createStorageAdapter } from '@keepkit/core/storage';
|
|
8
8
|
|
|
9
9
|
type KeepUrlAdapter = {
|
|
@@ -289,6 +289,8 @@ type KeepItemCardProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HT
|
|
|
289
289
|
asChild?: boolean;
|
|
290
290
|
href?: string | ((item: KeepItem<TMeta>) => string | undefined);
|
|
291
291
|
onOpen?: (item: KeepItem<TMeta>, event: MouseEvent<HTMLElement>) => void;
|
|
292
|
+
/** Records an open through KeepKit before invoking `onOpen`. */
|
|
293
|
+
trackOpen?: boolean;
|
|
292
294
|
linkTarget?: "title" | "card";
|
|
293
295
|
linkComponent?: ComponentType<KeepItemCardLinkProps>;
|
|
294
296
|
linkTargetAttribute?: HTMLAttributeAnchorTarget;
|
|
@@ -311,7 +313,7 @@ type KeepItemCardSkeletonProps = Omit<HTMLAttributes<HTMLElement>, "children"> &
|
|
|
311
313
|
layout?: KeepLayoutPreset;
|
|
312
314
|
};
|
|
313
315
|
/** A low-dependency item presentation primitive with composable card parts. */
|
|
314
|
-
declare function KeepItemCardRoot<TMeta = Record<string, unknown>>({ item, title, getTitle, getImageProps, imageComponent: ImageComponent, renderImage, renderTags, showTags, showNote, showSavedAt, collectionLabels, imageAlt, render, children, removeLabel, onRemoveError, onRemoved, onRetry, showSaveButton, showPinButton, showArchiveButton, showEditButton, onEdit, editSlot, editFeatures, saveButtonLabels, asChild, href: hrefOption, onOpen, linkTarget, linkComponent: LinkComponent, linkTargetAttribute, linkRel, highlightQuery, cardVariant, className, ...rootProps }: KeepItemCardProps<TMeta>): react.JSX.Element;
|
|
316
|
+
declare function KeepItemCardRoot<TMeta = Record<string, unknown>>({ item, title, getTitle, getImageProps, imageComponent: ImageComponent, renderImage, renderTags, showTags, showNote, showSavedAt, 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;
|
|
315
317
|
declare function KeepItemCardMedia({ children, fallback, ...props }: KeepItemCardMediaProps): react.JSX.Element;
|
|
316
318
|
declare function KeepItemCardContent({ children, ...props }: KeepItemCardContentProps): react.JSX.Element;
|
|
317
319
|
declare function KeepItemCardTitle({ as, children, ...props }: KeepItemCardTitleProps): react.DetailedReactHTMLElement<{
|
|
@@ -676,6 +678,15 @@ type KeepCollectionSlots<TMeta = Record<string, unknown>> = {
|
|
|
676
678
|
toolbarStart?: KeepCollectionToolbarContent<TMeta>;
|
|
677
679
|
toolbarEnd?: KeepCollectionToolbarContent<TMeta>;
|
|
678
680
|
};
|
|
681
|
+
type KeepCollectionRevealRequest = {
|
|
682
|
+
requestId: number;
|
|
683
|
+
itemId: string;
|
|
684
|
+
};
|
|
685
|
+
type KeepCollectionRevealResult = {
|
|
686
|
+
requestId: number;
|
|
687
|
+
itemId: string;
|
|
688
|
+
status: "visible" | "not-found" | "excluded";
|
|
689
|
+
};
|
|
679
690
|
type KeepCollectionProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
680
691
|
query?: KeepListQuery<TMeta>;
|
|
681
692
|
pageSize?: number;
|
|
@@ -709,6 +720,9 @@ type KeepCollectionProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<
|
|
|
709
720
|
fallback?: KeepErrorBoundaryProps["fallback"];
|
|
710
721
|
onBoundaryError?: KeepErrorBoundaryProps["onError"];
|
|
711
722
|
boundaryResetKey?: unknown;
|
|
723
|
+
/** Requests the collection to clear local filters and reveal an item. */
|
|
724
|
+
revealRequest?: KeepCollectionRevealRequest;
|
|
725
|
+
onRevealResult?: (result: KeepCollectionRevealResult) => void;
|
|
712
726
|
};
|
|
713
727
|
/** A batteries-included collection with query controls and accessible status feedback. */
|
|
714
728
|
declare function KeepCollection<TMeta = Record<string, unknown>>(props: KeepCollectionProps<TMeta>): react.JSX.Element;
|
|
@@ -832,7 +846,7 @@ type KeepTagEditorProps<TMeta = Record<string, unknown>> = Omit<FormHTMLAttribut
|
|
|
832
846
|
/** Edits one item's normalized tag set; Enter adds and Backspace removes the last tag. */
|
|
833
847
|
declare function KeepTagEditor<TMeta = Record<string, unknown>>({ item, availableTags, onSaved, onSaveError, render, ...props }: KeepTagEditorProps<TMeta>): react.JSX.Element;
|
|
834
848
|
|
|
835
|
-
type KeepUiLabelKey = "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" | "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" | "undoReorder" | "toolbarStart" | "toolbarQuery" | "toolbarFilters" | "toolbarEnd" | "createCollection" | "createCollectionSubmit" | "collectionName" | "manageCollections" | "renameCollection" | "renameCollectionSubmit" | "deleteCollection" | "deleteCollectionConfirm" | "deleteCollectionSubmit" | "cancel" | "collectionItem" | "collectionItems";
|
|
849
|
+
type KeepUiLabelKey = "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" | "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" | "activityBefore" | "activityAfter" | "undoReorder" | "toolbarStart" | "toolbarQuery" | "toolbarFilters" | "toolbarEnd" | "createCollection" | "createCollectionSubmit" | "collectionName" | "manageCollections" | "renameCollection" | "renameCollectionSubmit" | "deleteCollection" | "deleteCollectionConfirm" | "deleteCollectionSubmit" | "cancel" | "collectionItem" | "collectionItems";
|
|
836
850
|
type KeepUiLabelOptions = {
|
|
837
851
|
/** Replaces the localized label text. Omit to keep the locale default. */
|
|
838
852
|
text?: string;
|
|
@@ -1023,8 +1037,18 @@ type KeepActiveFiltersSummaryProps<TMeta = Record<string, unknown>> = Omit<HTMLA
|
|
|
1023
1037
|
query?: KeepListQuery<TMeta>;
|
|
1024
1038
|
search?: string;
|
|
1025
1039
|
tags?: readonly string[];
|
|
1040
|
+
collection?: string;
|
|
1041
|
+
collectionLabel?: string;
|
|
1042
|
+
activity?: KeepListQuery<TMeta>["activity"];
|
|
1043
|
+
activityLabel?: string;
|
|
1044
|
+
archiveScope?: KeepListQuery<TMeta>["archiveScope"];
|
|
1045
|
+
archiveScopeLabel?: string;
|
|
1046
|
+
totalCount?: number;
|
|
1026
1047
|
onSearchChange?: (value: string) => void;
|
|
1027
1048
|
onTagChange?: (tag: string) => void;
|
|
1049
|
+
onCollectionChange?: (collectionId?: string) => void;
|
|
1050
|
+
onActivityChange?: (activity?: KeepListQuery<TMeta>["activity"]) => void;
|
|
1051
|
+
onArchiveScopeChange?: (scope: NonNullable<KeepListQuery<TMeta>["archiveScope"]>) => void;
|
|
1028
1052
|
onClear?: () => void;
|
|
1029
1053
|
children?: ReactNode | RenderProp<KeepActiveFiltersSummaryState>;
|
|
1030
1054
|
asChild?: boolean;
|
|
@@ -1032,13 +1056,20 @@ type KeepActiveFiltersSummaryProps<TMeta = Record<string, unknown>> = Omit<HTMLA
|
|
|
1032
1056
|
type KeepActiveFiltersSummaryState = {
|
|
1033
1057
|
search: string;
|
|
1034
1058
|
tags: string[];
|
|
1059
|
+
collection?: string;
|
|
1060
|
+
activity?: KeepListQuery["activity"];
|
|
1061
|
+
archiveScope?: KeepListQuery["archiveScope"];
|
|
1062
|
+
totalCount?: number;
|
|
1035
1063
|
hasFilters: boolean;
|
|
1036
1064
|
clear: () => void;
|
|
1037
1065
|
removeSearch: () => void;
|
|
1038
1066
|
removeTag: (tag: string) => void;
|
|
1067
|
+
removeCollection: () => void;
|
|
1068
|
+
removeActivity: () => void;
|
|
1069
|
+
removeArchiveScope: () => void;
|
|
1039
1070
|
};
|
|
1040
|
-
/** Lists active
|
|
1041
|
-
declare function KeepActiveFiltersSummary<TMeta = Record<string, unknown>>({ query, search: providedSearch, tags: providedTags, onSearchChange, onTagChange, onClear, children, asChild, className, ...rootProps }: KeepActiveFiltersSummaryProps<TMeta>): ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
|
|
1071
|
+
/** Lists active query filters with one-tap recovery actions. */
|
|
1072
|
+
declare function KeepActiveFiltersSummary<TMeta = Record<string, unknown>>({ query, search: providedSearch, tags: providedTags, collection: providedCollection, collectionLabel: providedCollectionLabel, activity: providedActivity, activityLabel: providedActivityLabel, archiveScope: providedArchiveScope, archiveScopeLabel: providedArchiveScopeLabel, totalCount, onSearchChange, onTagChange, onCollectionChange, onActivityChange, onArchiveScopeChange, onClear, children, asChild, className, ...rootProps }: KeepActiveFiltersSummaryProps<TMeta>): ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
|
|
1042
1073
|
|
|
1043
1074
|
type KeepCollectionOption = {
|
|
1044
1075
|
id?: string;
|
|
@@ -1091,7 +1122,7 @@ type KeepSearchInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "value"
|
|
|
1091
1122
|
};
|
|
1092
1123
|
/** A controlled/uncontrolled search field with a small built-in debounce. */
|
|
1093
1124
|
declare function KeepSearchInput({ value: controlledValue, defaultValue, debounceMs, onValueChange, "aria-label": ariaLabel, placeholder, ...props }: KeepSearchInputProps): react.JSX.Element;
|
|
1094
|
-
type KeepSortValue = "savedAt:desc" | "savedAt:asc" | "updatedAt:desc" | "updatedAt:asc";
|
|
1125
|
+
type KeepSortValue = "savedAt:desc" | "savedAt:asc" | "updatedAt:desc" | "updatedAt:asc" | "lastOpenedAt:desc" | "lastOpenedAt:asc";
|
|
1095
1126
|
type KeepSortSelectProps = Omit<SelectHTMLAttributes<HTMLSelectElement>, "value" | "defaultValue" | "onChange"> & {
|
|
1096
1127
|
value?: KeepSortValue;
|
|
1097
1128
|
defaultValue?: KeepSortValue;
|
|
@@ -1115,6 +1146,14 @@ type KeepPaginationProps = Omit<React.HTMLAttributes<HTMLElement>, "children"> &
|
|
|
1115
1146
|
/** Accessible pagination with previous/next controls and numbered page buttons. */
|
|
1116
1147
|
declare function KeepPagination({ totalCount, pageSize, page, maxPageButtons, onPageChange, render, ...props }: KeepPaginationProps): react.JSX.Element;
|
|
1117
1148
|
|
|
1149
|
+
type KeepRediscoveryProps<TMeta = Record<string, unknown>> = Omit<KeepListProps<TMeta>, "query"> & {
|
|
1150
|
+
strategy: KeepRediscoveryStrategy;
|
|
1151
|
+
inactiveForMs?: number;
|
|
1152
|
+
limit?: number;
|
|
1153
|
+
};
|
|
1154
|
+
/** A small composition for the standard rediscovery queries. */
|
|
1155
|
+
declare function KeepRediscovery<TMeta = Record<string, unknown>>({ strategy, inactiveForMs, limit, itemCardProps, ...props }: KeepRediscoveryProps<TMeta>): react.JSX.Element;
|
|
1156
|
+
|
|
1118
1157
|
type KeepStaleNoticeProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
1119
1158
|
item: KeepItem<TMeta>;
|
|
1120
1159
|
onRetry?: (item: KeepItem<TMeta>) => void | Promise<void>;
|
|
@@ -1297,6 +1336,7 @@ type KeepKit<TMeta = Record<string, unknown>> = {
|
|
|
1297
1336
|
useContext: () => ReturnType<typeof useKeepContext<TMeta>>;
|
|
1298
1337
|
useItem: (item?: KeepItemInput<TMeta>) => ReturnType<typeof useKeepItem<TMeta>>;
|
|
1299
1338
|
useList: (query?: KeepListQuery<TMeta>) => ReturnType<typeof useKeepList<TMeta>>;
|
|
1339
|
+
useRediscovery: (options: UseKeepRediscoveryOptions) => UseKeepRediscoveryResult<TMeta>;
|
|
1300
1340
|
useCollections: (options?: {
|
|
1301
1341
|
targetType?: string;
|
|
1302
1342
|
orderBy?: "name" | "count";
|
|
@@ -1312,4 +1352,4 @@ type KeepKit<TMeta = Record<string, unknown>> = {
|
|
|
1312
1352
|
/** Create one typed application API for the core and standard UI layer. */
|
|
1313
1353
|
declare function createKeepKit<TMeta = Record<string, unknown>>(options?: CreateKeepKitOptions<TMeta>): KeepKit<TMeta>;
|
|
1314
1354
|
|
|
1315
|
-
export { type CreateKeepKitOptions, KeepActiveFiltersSummary, type KeepActiveFiltersSummaryProps, type KeepActiveFiltersSummaryState, 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, 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, KeepItemCard, type KeepItemCardActionSlotProps, type KeepItemCardActionsProps, type KeepItemCardBadgeProps, type KeepItemCardContentProps, type KeepItemCardLinkProps, type KeepItemCardMediaProps, type KeepItemCardProps, type KeepItemCardRemoveProps, type KeepItemCardSaveProps, KeepItemCardSkeleton, type KeepItemCardSkeletonProps, type KeepItemCardState, type KeepItemCardTagsProps, type KeepItemCardTitleProps, type KeepItemCardVariant, KeepItemCheckbox, type KeepItemCheckboxProps, KeepItemStatusBadge, type KeepItemStatusBadgeProps, type KeepKit, KeepKitProvider, type KeepKitProviderProps, KeepLayout, type KeepLayoutPreset, type KeepLayoutProps, KeepList, type KeepListProps, 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, type KeepReorderableItemState, KeepReorderableList, type KeepReorderableListProps, KeepSavePopover, type KeepSavePopoverProps, 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, chainedFunction, composeRefs, createKeepKit, createNextPagesRouterAdapter, createSlot, getKeepLocaleLabels, highlightText, isAllSelected, keepThemeNames, mergeProps, toggleSelectAll, useKeepQuickEditor, useKeepToastFeedback, useKeepTour, useKeepTourShortcuts, useKeepUiLabels, useKeepUrlSync, useUiLabelVisibility };
|
|
1355
|
+
export { type CreateKeepKitOptions, KeepActiveFiltersSummary, type KeepActiveFiltersSummaryProps, type KeepActiveFiltersSummaryState, 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, KeepItemCard, type KeepItemCardActionSlotProps, type KeepItemCardActionsProps, type KeepItemCardBadgeProps, type KeepItemCardContentProps, type KeepItemCardLinkProps, type KeepItemCardMediaProps, type KeepItemCardProps, type KeepItemCardRemoveProps, type KeepItemCardSaveProps, KeepItemCardSkeleton, type KeepItemCardSkeletonProps, type KeepItemCardState, type KeepItemCardTagsProps, type KeepItemCardTitleProps, type KeepItemCardVariant, KeepItemCheckbox, type KeepItemCheckboxProps, KeepItemStatusBadge, type KeepItemStatusBadgeProps, type KeepKit, KeepKitProvider, type KeepKitProviderProps, KeepLayout, type KeepLayoutPreset, type KeepLayoutProps, KeepList, type KeepListProps, 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, type KeepRediscoveryProps, type KeepReorderableItemState, KeepReorderableList, type KeepReorderableListProps, KeepSavePopover, type KeepSavePopoverProps, 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, chainedFunction, composeRefs, createKeepKit, createNextPagesRouterAdapter, createSlot, getKeepLocaleLabels, highlightText, isAllSelected, keepThemeNames, mergeProps, toggleSelectAll, useKeepQuickEditor, useKeepToastFeedback, useKeepTour, useKeepTourShortcuts, useKeepUiLabels, useKeepUrlSync, useUiLabelVisibility };
|