@keepkit/ui 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -2
- package/dist/index.d.ts +121 -7
- package/dist/index.js +971 -321
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -88,7 +88,7 @@ const onFeedback = useKeepToastFeedback(toast);
|
|
|
88
88
|
<KeepKitProvider storage={storage} onFeedback={onFeedback}>{children}</KeepKitProvider>;
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
v0.
|
|
91
|
+
v0.21.0では`KeepTourBar` / `KeepNavigator`、`KeepReorderableList`、`useKeepTourShortcuts`を利用できます。`KeepCollection urlSync layout="list" | "grid" | "compact"`、`KeepBulkActions selectionScope="page" | "query" | "all"`、`KeepUndo`も利用できます。`createNextPagesRouterAdapter`はNext.js Pages Router用の注入adapterです。`locale`は16言語に対応し、`labels`で上書きできます。認証付き同期は`createAuthenticatedSyncKit`から利用できます。
|
|
92
92
|
Phase 4の状態UIとして`KeepItemStatusBadge`、`KeepStaleNotice`、`KeepPruneStaleButton`、`KeepSyncStatusBanner`、`KeepSyncRecoveryDialog`を利用できます。`import "@keepkit/ui/theme.css"`でテーマCSSを有効にできます。
|
|
93
93
|
|
|
94
94
|
### Tailwind/shadcnテーマ
|
|
@@ -207,7 +207,7 @@ const onFeedback = useKeepToastFeedback(toast);
|
|
|
207
207
|
<KeepKitProvider storage={storage} onFeedback={onFeedback}>{children}</KeepKitProvider>;
|
|
208
208
|
```
|
|
209
209
|
|
|
210
|
-
In v0.
|
|
210
|
+
In v0.21.0, use `KeepTourBar` / `KeepNavigator`, `KeepReorderableList`, and `useKeepTourShortcuts` for continuous saved-item tours. `KeepCollection urlSync` with `layout="list" | "grid" | "compact"`, `KeepBulkActions selectionScope="page" | "query" | "all"`, and `KeepUndo` remain available. `createNextPagesRouterAdapter` is the injected adapter for Next.js Pages Router. `locale` includes 16 built-in dictionaries, and `labels` overrides individual entries. Authenticated sync is available through `createAuthenticatedSyncKit`.
|
|
211
211
|
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.
|
|
212
212
|
|
|
213
213
|
### Tailwind and shadcn theme
|
|
@@ -248,3 +248,11 @@ Use `[data-state="saved"]`, `[data-state="unsaved"]`, `[data-loading="true"]`, `
|
|
|
248
248
|
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.
|
|
249
249
|
|
|
250
250
|
Framework-neutral APIs remain available from `@keepkit/core/core`, low-level React bindings from `@keepkit/core/react`, and storage adapters from `@keepkit/core/storage`.
|
|
251
|
+
|
|
252
|
+
## Archive, pin, collections, and quick save editing
|
|
253
|
+
|
|
254
|
+
The UI package exports `KeepArchiveButton`, `KeepPinButton`, `KeepCollectionSelect`, `KeepCollectionFilter`, `KeepSavePopover`, `KeepQuickEditor`, and `useKeepQuickEditor`. Buttons expose `aria-pressed`, `data-archived`/`data-pinned`, and `data-keep-action`. Collection labels default to IDs and can be overridden with `collectionLabels`. Enable `features={{ collectionFilter: true }}` on `KeepCollection` to include the collection filter. `KeepSavePopover` wraps `KeepButton` and opens after a new save; its quick editor debounces note, tags, and collection updates by 300ms by default.
|
|
255
|
+
|
|
256
|
+
## アーカイブ・ピン留め・コレクション・保存直後編集
|
|
257
|
+
|
|
258
|
+
UI パッケージは `KeepArchiveButton`、`KeepPinButton`、`KeepCollectionSelect`、`KeepCollectionFilter`、`KeepSavePopover`、`KeepQuickEditor`、`useKeepQuickEditor` を公開します。ボタンは `aria-pressed`、`data-archived` / `data-pinned`、`data-keep-action` を出力します。コレクション名は既定で ID を表示し、`collectionLabels` で置換できます。`KeepCollection` に `features={{ collectionFilter: true }}` を指定するとフィルターを統合できます。`KeepSavePopover` は `KeepButton` を内部 trigger とし、新規保存後に開きます。クイックエディターはメモ・タグ・コレクションを一時状態として扱い、既定 300ms で保存します。
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { KeepListQuery, KeepUrlSyncOptions, ImportItemsResult, KeepItem, KeepItemStatus, KeepSyncConflict
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, HTMLAttributes, ComponentType, Ref, RefCallback, ReactElement, InputHTMLAttributes, FormHTMLAttributes, ImgHTMLAttributes, MouseEvent, HTMLAttributeAnchorTarget, KeyboardEvent, SelectHTMLAttributes, CSSProperties } from 'react';
|
|
3
|
+
import { KeepListQuery, KeepUrlSyncOptions, KeepItemInput, ImportItemsResult, KeepItem, KeepItemStatus, KeepSyncConflict } from '@keepkit/core/core';
|
|
4
4
|
export { AuthenticatedSyncAuthContext, AuthenticatedSyncKit, AuthenticatedSyncKitOptions, AuthenticatedSyncRequestContext, AuthenticatedSyncTransport, KeepItem, KeepItemInput, KeepListQuery, KeepScope, KeepSyncConflict, KeepSyncResolution, KeepSyncState, KeepSyncStatus, KeepUndoState, KeepUrlSyncOptions, createAuthenticatedSyncKit } from '@keepkit/core/core';
|
|
5
|
-
import { KeepButtonProps as KeepButtonProps$1, UseKeepListResult, KeepErrorBoundaryProps, UseKeepNavigatorResult, CreateKeepKitOptions as CreateKeepKitOptions$1, KeepProviderProps, useKeepContext,
|
|
5
|
+
import { useKeepItem, KeepButtonProps as KeepButtonProps$1, UseKeepListResult, KeepErrorBoundaryProps, UseKeepNavigatorResult, CreateKeepKitOptions as CreateKeepKitOptions$1, KeepProviderProps, useKeepContext, useKeepList, UseKeepNavigatorOptions, KeepShortcutOptions } from '@keepkit/core/react';
|
|
6
6
|
export { KeepButtonState, KeepContextValue, KeepErrorBoundary, KeepErrorBoundaryProps, KeepProvider, KeepProviderProps, KeepShortcutOptions, useKeepContext, useKeepItem, useKeepList, useKeepNavigator, useKeepShortcut } from '@keepkit/core/react';
|
|
7
7
|
export { FallbackStorageAdapter, IndexedDBAdapter, IndexedDBSyncQueueAdapter, LocalStorageAdapter, LocalStorageSyncQueueAdapter, SyncStorageAdapter, createBrowserStorageAdapter, createStorageAdapter } from '@keepkit/core/storage';
|
|
8
8
|
|
|
@@ -36,6 +36,27 @@ declare function createNextPagesRouterAdapter(router: KeepPagesRouterLike): Keep
|
|
|
36
36
|
/** Synchronizes collection filters with browser history and supports back/forward restoration. */
|
|
37
37
|
declare function useKeepUrlSync<TMeta = Record<string, unknown>>({ enabled, query, onQueryChange, options, adapter: providedAdapter, }: KeepUrlSyncProps<TMeta>): void;
|
|
38
38
|
|
|
39
|
+
type KeepArchiveButtonState<TMeta = Record<string, unknown>> = ReturnType<typeof useKeepItem<TMeta>>;
|
|
40
|
+
type KeepArchiveButtonProps<TMeta = Record<string, unknown>> = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "onClick" | "aria-pressed"> & {
|
|
41
|
+
item: KeepItemInput<TMeta>;
|
|
42
|
+
children?: ReactNode | ((state: KeepArchiveButtonState<TMeta>) => ReactNode);
|
|
43
|
+
archiveLabel?: ReactNode;
|
|
44
|
+
unarchiveLabel?: ReactNode;
|
|
45
|
+
onToggleError?: (error: unknown) => void;
|
|
46
|
+
};
|
|
47
|
+
/** A style-free accessible archive toggle. */
|
|
48
|
+
declare function KeepArchiveButton<TMeta = Record<string, unknown>>({ item, children, archiveLabel, unarchiveLabel, onToggleError, disabled, ...props }: KeepArchiveButtonProps<TMeta>): react.JSX.Element;
|
|
49
|
+
type KeepPinButtonState<TMeta = Record<string, unknown>> = ReturnType<typeof useKeepItem<TMeta>>;
|
|
50
|
+
type KeepPinButtonProps<TMeta = Record<string, unknown>> = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "onClick" | "aria-pressed"> & {
|
|
51
|
+
item: KeepItemInput<TMeta>;
|
|
52
|
+
children?: ReactNode | ((state: KeepPinButtonState<TMeta>) => ReactNode);
|
|
53
|
+
pinLabel?: ReactNode;
|
|
54
|
+
unpinLabel?: ReactNode;
|
|
55
|
+
onToggleError?: (error: unknown) => void;
|
|
56
|
+
};
|
|
57
|
+
/** A style-free accessible pin toggle. */
|
|
58
|
+
declare function KeepPinButton<TMeta = Record<string, unknown>>({ item, children, pinLabel, unpinLabel, onToggleError, disabled, ...props }: KeepPinButtonProps<TMeta>): react.JSX.Element;
|
|
59
|
+
|
|
39
60
|
type KeepBackupProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
40
61
|
filename?: string;
|
|
41
62
|
onExport?: (data: string) => void;
|
|
@@ -141,6 +162,65 @@ type KeepItemCheckboxProps<TMeta = Record<string, unknown>> = Omit<InputHTMLAttr
|
|
|
141
162
|
/** A reusable accessible selection checkbox for a saved item. */
|
|
142
163
|
declare function KeepItemCheckbox<TMeta = Record<string, unknown>>({ item, checked, label, onCheckedChange, "aria-label": ariaLabel, ...props }: KeepItemCheckboxProps<TMeta>): react.JSX.Element;
|
|
143
164
|
|
|
165
|
+
type KeepQuickEditorState<TMeta = Record<string, unknown>> = {
|
|
166
|
+
item: KeepItem<TMeta>;
|
|
167
|
+
note: string;
|
|
168
|
+
tags: string[];
|
|
169
|
+
collectionId?: string;
|
|
170
|
+
setNote: (value: string) => void;
|
|
171
|
+
setTags: (value: string[]) => void;
|
|
172
|
+
setCollectionId: (value?: string) => void;
|
|
173
|
+
isDirty: boolean;
|
|
174
|
+
isSaving: boolean;
|
|
175
|
+
error: unknown | null;
|
|
176
|
+
flush: () => Promise<void>;
|
|
177
|
+
};
|
|
178
|
+
declare function useKeepQuickEditor<TMeta = Record<string, unknown>>(item: KeepItem<TMeta>, options?: {
|
|
179
|
+
debounceMs?: number;
|
|
180
|
+
onSaved?: (item: KeepItem<TMeta>) => void;
|
|
181
|
+
onSaveError?: (error: unknown) => void;
|
|
182
|
+
}): {
|
|
183
|
+
state: {
|
|
184
|
+
item: KeepItem<TMeta>;
|
|
185
|
+
note: string;
|
|
186
|
+
tags: string[];
|
|
187
|
+
collectionId: string | undefined;
|
|
188
|
+
setNote: react.Dispatch<react.SetStateAction<string>>;
|
|
189
|
+
setTags: react.Dispatch<react.SetStateAction<string[]>>;
|
|
190
|
+
setCollectionId: react.Dispatch<react.SetStateAction<string | undefined>>;
|
|
191
|
+
isDirty: boolean;
|
|
192
|
+
isSaving: boolean;
|
|
193
|
+
error: unknown;
|
|
194
|
+
flush: () => Promise<void>;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
type KeepQuickEditorProps<TMeta = Record<string, unknown>> = Omit<FormHTMLAttributes<HTMLFormElement>, "children" | "onSubmit"> & {
|
|
198
|
+
item: KeepItem<TMeta>;
|
|
199
|
+
debounceMs?: number;
|
|
200
|
+
collectionIds?: string[];
|
|
201
|
+
collectionLabels?: Record<string, string>;
|
|
202
|
+
children?: ReactNode | ((state: KeepQuickEditorState<TMeta>) => ReactNode);
|
|
203
|
+
onClose?: () => void;
|
|
204
|
+
onSaved?: (item: KeepItem<TMeta>) => void;
|
|
205
|
+
onSaveError?: (error: unknown) => void;
|
|
206
|
+
};
|
|
207
|
+
/** A compact, temporary-state editor for note, tags, and collection metadata. */
|
|
208
|
+
declare function KeepQuickEditor<TMeta = Record<string, unknown>>({ item, debounceMs, collectionIds, collectionLabels, children, onClose, onSaved, onSaveError, ...props }: KeepQuickEditorProps<TMeta>): react.JSX.Element;
|
|
209
|
+
|
|
210
|
+
type KeepSavePopoverProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
211
|
+
item: KeepItemInput<TMeta>;
|
|
212
|
+
open?: boolean;
|
|
213
|
+
defaultOpen?: boolean;
|
|
214
|
+
onOpenChange?: (open: boolean) => void;
|
|
215
|
+
buttonProps?: Omit<KeepButtonProps<TMeta>, "item" | "asChild"> & {
|
|
216
|
+
asChild?: false;
|
|
217
|
+
};
|
|
218
|
+
editorProps?: Omit<KeepQuickEditorProps<TMeta>, "item" | "onClose">;
|
|
219
|
+
children?: ReactNode;
|
|
220
|
+
};
|
|
221
|
+
/** Opens a quick editor only after this trigger changes from unsaved to saved. */
|
|
222
|
+
declare function KeepSavePopover<TMeta = Record<string, unknown>>({ item, open: controlledOpen, defaultOpen, onOpenChange, buttonProps, editorProps, children, ...props }: KeepSavePopoverProps<TMeta>): react.JSX.Element;
|
|
223
|
+
|
|
144
224
|
type KeepUndoProps = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
145
225
|
children?: ReactNode;
|
|
146
226
|
label?: ReactNode;
|
|
@@ -180,6 +260,7 @@ type KeepItemCardProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HT
|
|
|
180
260
|
renderTags?: (tags: string[], item: KeepItem<TMeta>) => ReactNode;
|
|
181
261
|
showTags?: boolean;
|
|
182
262
|
showSavedAt?: boolean;
|
|
263
|
+
collectionLabels?: Record<string, string>;
|
|
183
264
|
imageAlt?: string;
|
|
184
265
|
render?: RenderProp<KeepItemCardState<TMeta>>;
|
|
185
266
|
children?: ReactNode | RenderProp<KeepItemCardState<TMeta>>;
|
|
@@ -212,7 +293,7 @@ type KeepItemCardSkeletonProps = Omit<HTMLAttributes<HTMLElement>, "children"> &
|
|
|
212
293
|
layout?: KeepLayoutPreset;
|
|
213
294
|
};
|
|
214
295
|
/** A low-dependency item presentation primitive with composable card parts. */
|
|
215
|
-
declare function KeepItemCardRoot<TMeta = Record<string, unknown>>({ item, title, getTitle, getImageProps, imageComponent: ImageComponent, renderImage, renderTags, showTags, showSavedAt, imageAlt, render, children, removeLabel, onRemoveError, onRemoved, onRetry, showSaveButton, saveButtonLabels, asChild, href: hrefOption, onOpen, linkTarget, linkComponent: LinkComponent, linkTargetAttribute, linkRel, highlightQuery, className, ...rootProps }: KeepItemCardProps<TMeta>): react.JSX.Element;
|
|
296
|
+
declare function KeepItemCardRoot<TMeta = Record<string, unknown>>({ item, title, getTitle, getImageProps, imageComponent: ImageComponent, renderImage, renderTags, showTags, showSavedAt, collectionLabels, imageAlt, render, children, removeLabel, onRemoveError, onRemoved, onRetry, showSaveButton, saveButtonLabels, asChild, href: hrefOption, onOpen, linkTarget, linkComponent: LinkComponent, linkTargetAttribute, linkRel, highlightQuery, className, ...rootProps }: KeepItemCardProps<TMeta>): react.JSX.Element;
|
|
216
297
|
declare function KeepItemCardMedia({ children, fallback, ...props }: KeepItemCardMediaProps): react.JSX.Element;
|
|
217
298
|
declare function KeepItemCardContent({ children, ...props }: KeepItemCardContentProps): react.JSX.Element;
|
|
218
299
|
declare function KeepItemCardTitle({ as, children, ...props }: KeepItemCardTitleProps): react.DetailedReactHTMLElement<{
|
|
@@ -499,12 +580,24 @@ declare function KeepItemCardTitle({ as, children, ...props }: KeepItemCardTitle
|
|
|
499
580
|
}, HTMLElement>;
|
|
500
581
|
declare function KeepItemCardTags({ children, ...props }: KeepItemCardTagsProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react.JSX.Element | null;
|
|
501
582
|
declare function KeepItemCardActions({ children, ...props }: KeepItemCardActionsProps): react.JSX.Element;
|
|
583
|
+
type KeepItemCardActionSlotProps = Omit<KeepPinButtonProps<unknown>, "item" | "children"> & {
|
|
584
|
+
children?: ReactNode;
|
|
585
|
+
};
|
|
586
|
+
type KeepItemCardBadgeProps = HTMLAttributes<HTMLSpanElement>;
|
|
587
|
+
declare function KeepItemCardPin({ children, ...props }: KeepItemCardActionSlotProps): react.JSX.Element;
|
|
588
|
+
declare function KeepItemCardArchive({ children, ...props }: Omit<KeepArchiveButtonProps<unknown>, "item" | "children"> & {
|
|
589
|
+
children?: ReactNode;
|
|
590
|
+
}): react.JSX.Element;
|
|
591
|
+
declare function KeepItemCardCollectionBadge({ children, ...props }: KeepItemCardBadgeProps): react.JSX.Element | null;
|
|
502
592
|
declare const KeepItemCard: typeof KeepItemCardRoot & {
|
|
503
593
|
Media: typeof KeepItemCardMedia;
|
|
504
594
|
Content: typeof KeepItemCardContent;
|
|
505
595
|
Title: typeof KeepItemCardTitle;
|
|
506
596
|
Tags: typeof KeepItemCardTags;
|
|
507
597
|
Actions: typeof KeepItemCardActions;
|
|
598
|
+
Pin: typeof KeepItemCardPin;
|
|
599
|
+
Archive: typeof KeepItemCardArchive;
|
|
600
|
+
CollectionBadge: typeof KeepItemCardCollectionBadge;
|
|
508
601
|
};
|
|
509
602
|
/** A non-interactive placeholder that preserves the selected card layout while data loads. */
|
|
510
603
|
declare function KeepItemCardSkeleton({ layout, ...props }: KeepItemCardSkeletonProps): react.JSX.Element;
|
|
@@ -534,7 +627,7 @@ type KeepListProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HTMLEl
|
|
|
534
627
|
/** A list primitive with built-in loading, empty, error, and removal states. */
|
|
535
628
|
declare function KeepList<TMeta = Record<string, unknown>>(props: KeepListProps<TMeta>): react.JSX.Element;
|
|
536
629
|
|
|
537
|
-
type KeepCollectionFeature = "search" | "sort" | "pagination" | "tagFilter" | "bulkActions";
|
|
630
|
+
type KeepCollectionFeature = "search" | "sort" | "pagination" | "tagFilter" | "collectionFilter" | "bulkActions";
|
|
538
631
|
type KeepLayoutPreset = "list" | "grid" | "compact" | "auto";
|
|
539
632
|
type KeepCollectionProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
540
633
|
query?: KeepListQuery<TMeta>;
|
|
@@ -543,6 +636,7 @@ type KeepCollectionProps<TMeta = Record<string, unknown>> = Omit<HTMLAttributes<
|
|
|
543
636
|
urlSync?: boolean | KeepUrlSyncOptions;
|
|
544
637
|
urlAdapter?: KeepUrlAdapter;
|
|
545
638
|
features?: Partial<Record<KeepCollectionFeature, boolean>>;
|
|
639
|
+
collectionLabels?: Record<string, string>;
|
|
546
640
|
renderItem?: (item: KeepItem<TMeta>, state: KeepListState<TMeta>) => ReactNode;
|
|
547
641
|
itemCardProps?: Omit<KeepItemCardProps<TMeta>, "item" | "children" | "render">;
|
|
548
642
|
loading?: ReactNode | RenderProp<KeepListState<TMeta>>;
|
|
@@ -638,7 +732,7 @@ type KeepTagEditorProps<TMeta = Record<string, unknown>> = Omit<FormHTMLAttribut
|
|
|
638
732
|
/** Edits one item's normalized tag set; Enter adds and Backspace removes the last tag. */
|
|
639
733
|
declare function KeepTagEditor<TMeta = Record<string, unknown>>({ item, availableTags, onSaved, onSaveError, render, ...props }: KeepTagEditorProps<TMeta>): react.JSX.Element;
|
|
640
734
|
|
|
641
|
-
type KeepUiLabelKey = "save" | "saved" | "remove" | "loading" | "saving" | "syncing" | "error" | "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";
|
|
735
|
+
type KeepUiLabelKey = "save" | "saved" | "remove" | "loading" | "saving" | "syncing" | "error" | "archive" | "unarchive" | "archived" | "pin" | "unpin" | "pinned" | "collection" | "allCollections" | "filterCollections" | "uncategorized" | "saveWithNote" | "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";
|
|
642
736
|
type KeepUiLabels = Partial<Record<KeepUiLabelKey, string>>;
|
|
643
737
|
type KeepUiLocaleLabels = Record<KeepUiLabelKey, string>;
|
|
644
738
|
|
|
@@ -778,6 +872,26 @@ type KeepActiveFiltersSummaryState = {
|
|
|
778
872
|
/** Lists active search and tag filters with one-tap recovery actions. */
|
|
779
873
|
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;
|
|
780
874
|
|
|
875
|
+
type KeepCollectionOption = {
|
|
876
|
+
id?: string;
|
|
877
|
+
label: string;
|
|
878
|
+
};
|
|
879
|
+
type KeepCollectionControlProps = Omit<SelectHTMLAttributes<HTMLSelectElement>, "value" | "defaultValue" | "onChange"> & {
|
|
880
|
+
value?: string;
|
|
881
|
+
defaultValue?: string;
|
|
882
|
+
onValueChange?: (collectionId?: string) => void;
|
|
883
|
+
onChange?: (collectionId?: string) => void;
|
|
884
|
+
collectionLabels?: Record<string, string>;
|
|
885
|
+
allLabel?: string;
|
|
886
|
+
uncategorizedLabel?: string;
|
|
887
|
+
};
|
|
888
|
+
/** A select that moves one item between derived collections. */
|
|
889
|
+
declare function KeepCollectionSelect<TMeta = Record<string, unknown>>({ item, value, defaultValue, onValueChange, onChange, collectionLabels, uncategorizedLabel, ...props }: KeepCollectionControlProps & {
|
|
890
|
+
item: KeepItem<TMeta>;
|
|
891
|
+
}): react.JSX.Element;
|
|
892
|
+
/** A select filter for the collections derived from current items. */
|
|
893
|
+
declare function KeepCollectionFilter<TMeta = Record<string, unknown>>({ value, defaultValue, onValueChange, onChange, collectionLabels, allLabel, uncategorizedLabel, ...props }: KeepCollectionControlProps): react.JSX.Element;
|
|
894
|
+
|
|
781
895
|
type KeepTagFilterState = {
|
|
782
896
|
tags: string[];
|
|
783
897
|
tagCounts: Record<string, number>;
|
|
@@ -977,4 +1091,4 @@ type KeepKit<TMeta = Record<string, unknown>> = {
|
|
|
977
1091
|
/** Create one typed application API for the core and standard UI layer. */
|
|
978
1092
|
declare function createKeepKit<TMeta = Record<string, unknown>>(options?: CreateKeepKitOptions<TMeta>): KeepKit<TMeta>;
|
|
979
1093
|
|
|
980
|
-
export { type CreateKeepKitOptions, KeepActiveFiltersSummary, type KeepActiveFiltersSummaryProps, type KeepActiveFiltersSummaryState, KeepAnnouncements, type KeepAnnouncementsProps, KeepAnnouncer, KeepBackup, type KeepBackupProps, KeepBulkActions, type KeepBulkActionsProps, type KeepBulkActionsState, KeepButton, type KeepButtonIcon, type KeepButtonIconProps, type KeepButtonIcons, type KeepButtonLabels, type KeepButtonProps, KeepCollection, type KeepCollectionFeature, type KeepCollectionProps, type KeepDisplayStatus, KeepEmptyState, type KeepEmptyStateProps, type KeepEmptyStateVariant, KeepHighlight, type KeepHighlightProps, type KeepImageProps, KeepItemCard, type KeepItemCardActionsProps, type KeepItemCardContentProps, type KeepItemCardLinkProps, type KeepItemCardMediaProps, type KeepItemCardProps, KeepItemCardSkeleton, type KeepItemCardSkeletonProps, type KeepItemCardState, type KeepItemCardTagsProps, type KeepItemCardTitleProps, 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, KeepPruneStaleButton, type KeepPruneStaleButtonProps, type KeepReorderableItemState, KeepReorderableList, type KeepReorderableListProps, 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 KeepTourShortcutsOptions, type KeepUiFeedbackEvent, type KeepUiLabelContext, type KeepUiLabelKey, type KeepUiLabels, type KeepUiLocale, type KeepUiLocaleLabels, KeepUiProvider, type KeepUiProviderProps, KeepUndo, type KeepUndoProps, type KeepUrlAdapter, type RenderProp, chainedFunction, composeRefs, createKeepKit, createNextPagesRouterAdapter, createSlot, getKeepLocaleLabels, highlightText, isAllSelected, keepThemeNames, mergeProps, toggleSelectAll, useKeepToastFeedback, useKeepTourShortcuts, useKeepUiLabels, useKeepUrlSync };
|
|
1094
|
+
export { type CreateKeepKitOptions, KeepActiveFiltersSummary, type KeepActiveFiltersSummaryProps, type KeepActiveFiltersSummaryState, KeepAnnouncements, type KeepAnnouncementsProps, KeepAnnouncer, KeepArchiveButton, type KeepArchiveButtonProps, type KeepArchiveButtonState, KeepBackup, type KeepBackupProps, KeepBulkActions, type KeepBulkActionsProps, type KeepBulkActionsState, KeepButton, type KeepButtonIcon, type KeepButtonIconProps, type KeepButtonIcons, type KeepButtonLabels, type KeepButtonProps, KeepCollection, type KeepCollectionControlProps, type KeepCollectionFeature, KeepCollectionFilter, type KeepCollectionOption, type KeepCollectionProps, KeepCollectionSelect, type KeepDisplayStatus, KeepEmptyState, type KeepEmptyStateProps, type KeepEmptyStateVariant, KeepHighlight, type KeepHighlightProps, type KeepImageProps, KeepItemCard, type KeepItemCardActionSlotProps, type KeepItemCardActionsProps, type KeepItemCardBadgeProps, type KeepItemCardContentProps, type KeepItemCardLinkProps, type KeepItemCardMediaProps, type KeepItemCardProps, KeepItemCardSkeleton, type KeepItemCardSkeletonProps, type KeepItemCardState, type KeepItemCardTagsProps, type KeepItemCardTitleProps, 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 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 KeepTourShortcutsOptions, type KeepUiFeedbackEvent, type KeepUiLabelContext, type KeepUiLabelKey, type KeepUiLabels, type KeepUiLocale, type KeepUiLocaleLabels, KeepUiProvider, type KeepUiProviderProps, KeepUndo, type KeepUndoProps, type KeepUrlAdapter, type RenderProp, chainedFunction, composeRefs, createKeepKit, createNextPagesRouterAdapter, createSlot, getKeepLocaleLabels, highlightText, isAllSelected, keepThemeNames, mergeProps, toggleSelectAll, useKeepQuickEditor, useKeepToastFeedback, useKeepTourShortcuts, useKeepUiLabels, useKeepUrlSync };
|