@proveanything/smartlinks-utils-ui 0.9.5 → 0.9.6
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/dist/components/AssetPicker/index.css +26 -7
- package/dist/components/AssetPicker/index.css.map +1 -1
- package/dist/components/ConditionsEditor/index.css +26 -7
- package/dist/components/ConditionsEditor/index.css.map +1 -1
- package/dist/components/FontPicker/index.css +26 -7
- package/dist/components/FontPicker/index.css.map +1 -1
- package/dist/components/IconPicker/index.css +26 -7
- package/dist/components/IconPicker/index.css.map +1 -1
- package/dist/components/RecordsAdmin/index.css +26 -7
- package/dist/components/RecordsAdmin/index.css.map +1 -1
- package/dist/components/RecordsAdmin/index.d.ts +14 -5
- package/dist/components/RecordsAdmin/index.js +307 -252
- package/dist/components/RecordsAdmin/index.js.map +1 -1
- package/dist/index.css +26 -7
- package/dist/index.css.map +1 -1
- package/package.json +1 -1
|
@@ -10,9 +10,8 @@ import { InfiniteData } from '@tanstack/react-query';
|
|
|
10
10
|
* Where a record is anchored in the inheritance chain.
|
|
11
11
|
*
|
|
12
12
|
* - `collection` — terminal rung (collection-wide default). Inherited by every
|
|
13
|
-
* product/
|
|
13
|
+
* product/variant/batch when nothing more specific exists. Most useful
|
|
14
14
|
* for collection-cardinality records (a global pool of FAQs / recipes / SOPs).
|
|
15
|
-
* - `facet` — anchored to a facet value (e.g. `bagel-type=white`).
|
|
16
15
|
* - `product` — anchored to a product.
|
|
17
16
|
* - `variant` — anchored to a product variant.
|
|
18
17
|
* - `batch` — anchored to a product batch.
|
|
@@ -26,6 +25,11 @@ import { InfiniteData } from '@tanstack/react-query';
|
|
|
26
25
|
* open / upcoming / closed for time-bound records like
|
|
27
26
|
* votes or competitions). Off by default — add `'all'` to
|
|
28
27
|
* the host's `scopes` array to enable.
|
|
28
|
+
*
|
|
29
|
+
* NOTE: `'facet'` exists in the union purely so legacy refs in storage
|
|
30
|
+
* (`facet:bagel-type=white`) still parse. It is NOT a valid value to
|
|
31
|
+
* pass in the host's `scopes` array and is not surfaced as a tab.
|
|
32
|
+
* Use `facetRule` (rule records) for facet targeting instead.
|
|
29
33
|
*/
|
|
30
34
|
type ScopeKind = 'collection' | 'product' | 'facet' | 'variant' | 'batch' | 'rule' | 'all';
|
|
31
35
|
/** Parsed `ref` string — see `data/refs.ts`. Format: `kind:id` or chain. */
|
|
@@ -1765,6 +1769,10 @@ declare function useDeepLinkState(options: DeepLinkOptions | undefined): UseDeep
|
|
|
1765
1769
|
|
|
1766
1770
|
declare const createDefaultDeepLinkAdapter: (paramNames: ResolvedDeepLinkParamNames) => DeepLinkAdapter;
|
|
1767
1771
|
|
|
1772
|
+
type RouterParamsGetter = () => URLSearchParams;
|
|
1773
|
+
type RouterParamsSetter = (next: URLSearchParams) => void;
|
|
1774
|
+
declare const createRouterDeepLinkAdapter: (paramNames: ResolvedDeepLinkParamNames, getParams: RouterParamsGetter, setParams: RouterParamsSetter) => DeepLinkAdapter;
|
|
1775
|
+
|
|
1768
1776
|
/**
|
|
1769
1777
|
* Detect whether the current window is an iframe with a usable parent.
|
|
1770
1778
|
* Returns false during SSR or when sandboxed in a way that hides `parent`.
|
|
@@ -2283,7 +2291,8 @@ interface Props<T> {
|
|
|
2283
2291
|
selectedItemId?: string;
|
|
2284
2292
|
isLoading: boolean;
|
|
2285
2293
|
error: Error | null;
|
|
2286
|
-
|
|
2294
|
+
/** Retained for API stability — back nav now lives in EditorItemNav. */
|
|
2295
|
+
onBack?: () => void;
|
|
2287
2296
|
onSelect: (itemId: string) => void;
|
|
2288
2297
|
/**
|
|
2289
2298
|
* Set of keys (recordIds + scope refs) currently dirty in the shell-level
|
|
@@ -2296,7 +2305,7 @@ interface Props<T> {
|
|
|
2296
2305
|
errorKeys?: ReadonlySet<string>;
|
|
2297
2306
|
i18n: Pick<RecordsAdminI18n, 'backToScopes' | 'siblingsHeading' | 'noItemsTitle' | 'noItemsBody'>;
|
|
2298
2307
|
}
|
|
2299
|
-
declare function SiblingRail<T>({ items, selectedItemId, isLoading, error,
|
|
2308
|
+
declare function SiblingRail<T>({ items, selectedItemId, isLoading, error, onSelect, dirtyKeys, errorKeys, i18n, }: Props<T>): react_jsx_runtime.JSX.Element;
|
|
2300
2309
|
|
|
2301
2310
|
interface ClipboardEntry<T = unknown> {
|
|
2302
2311
|
value: T;
|
|
@@ -2453,4 +2462,4 @@ declare const exportCsv: <T>(records: RecordSummary<T>[], schema: CsvSchema<T>)
|
|
|
2453
2462
|
declare const importCsv: <T>(file: File, schema: CsvSchema<T>, ctx: RecordsCtx) => Promise<ImportReport>;
|
|
2454
2463
|
declare const downloadBlob: (blob: Blob, filename: string) => void;
|
|
2455
2464
|
|
|
2456
|
-
export { ALL_ITEM_VIEWS, ALL_PRESENTATIONS, BatchList, BulkActionsMenu, type ClipboardEntry, type CollectedRecord, type CollectedSort, type CollectionRailMode, type CsvSchema, type CsvSchemaColumn, DEFAULT_DEEP_LINK_PARAM_NAMES, DEFAULT_I18N, DEFAULT_ICONS, type DeepLinkAdapter, type DeepLinkChangeKind, type DeepLinkHistoryMode, type DeepLinkOptions, type DeepLinkParamNames, type DeepLinkState, DefaultItemCards, DefaultItemTable, DefaultRecordCard, DefaultRecordRow, DeleteButton, type DirtyDraft, DirtyDraftProvider, type DirtyDraftStatus, type DirtyDraftStore, type DirtyStrategy, DrawerPreview, type EditorContext, EditorItemNav, EmptyState, ErrorState, FacetList, InheritanceMarker, InheritanceProvider, InlinePreview, IntroCard, type ItemColumn, ItemListView, type ItemSlotContext, type ItemView, type ItemViewContext, ItemViewSwitcher, LoadingState, type MergeStrategy, type MergedRecord, type NavConfirmI18n, type NormalisedRule, type ParsedRef, type PasteCompatibility, type PasteCompatibilityResult, PresentationSwitcher, type PreviewMode, PreviewScopePicker, PreviewToggleButton, type ProductBrowseItem, type ProductChildItem, ProductDrillDown, ProductList, type RecordBadge, RecordBrowser, type RecordCardinality, RecordEditor, RecordList, type RecordPresentation, type RecordSlotContext, type RecordSource, type RecordStatus, type RecordSummary, type RecordsAdminI18n, type RecordsAdminIcons, RecordsAdminShell, type RecordsAdminShellProps, type ResolvedDeepLinkParamNames, ResolvedPreview, type ResolvedRecord, ScopeBreadcrumb, type ScopeCounts, type ScopeKind, ScopeTabs, SiblingRail, SidePreview, type SmartLinksSDK, StatusDot, StatusFilterPills, StatusIcon, type StatusTone, TabbedPreview, type TelemetryEvent, type UseCollectionItemsArgs, type UseRecordClipboardArgs, type UseRecordClipboardReturn, type UseResolveAllRecordsArgs, type UseResolveAllResult, type UseRulePreviewArgs, type UseRulePreviewResult, type UseScopeCountsArgs, type UseScopeCountsResult, UtilityRow, VariantList, buildDraftKey, buildRef, bulkDelete, bulkUpsert, checkPasteCompatibility, cloneValue, createDefaultDeepLinkAdapter, createPostMessageDeepLinkAdapter, createRecord, downloadBlob, exportCsv, getRecordById, importCsv, isInSmartLinksIframe, listRecords, matchRecords, mergeIcons, normaliseRule, parseRef, parsedRefToScope, parsedRefToTarget, pickHeaderIcon, removeRecord, resolutionChain, resolveRecord, restoreRecord, ruleHash, rulesEqual, scopeCountsQueryKey, scopesEqual, statusToneLabel, summariseRule, upsertRecord, useCollectedRecords, useCollectionItems, useDeepLinkState, useDirtyDraft, useDirtyDraftActions, useDirtyDraftStore, useDirtyDrafts, useDirtyNavigation, useFacetBrowse, useIntroDismissed, useItemViewPref, useMergedRecord, usePresentationPref, useProductBrowse, useProductChildren, useRecordClipboard, useRecordEditor, useRecordList, useResolveAllRecords, useResolvedRecord, useRulePreview, useScopeCounts, useScopeProbe, useUnsavedGuard };
|
|
2465
|
+
export { ALL_ITEM_VIEWS, ALL_PRESENTATIONS, BatchList, BulkActionsMenu, type ClipboardEntry, type CollectedRecord, type CollectedSort, type CollectionRailMode, type CsvSchema, type CsvSchemaColumn, DEFAULT_DEEP_LINK_PARAM_NAMES, DEFAULT_I18N, DEFAULT_ICONS, type DeepLinkAdapter, type DeepLinkChangeKind, type DeepLinkHistoryMode, type DeepLinkOptions, type DeepLinkParamNames, type DeepLinkState, DefaultItemCards, DefaultItemTable, DefaultRecordCard, DefaultRecordRow, DeleteButton, type DirtyDraft, DirtyDraftProvider, type DirtyDraftStatus, type DirtyDraftStore, type DirtyStrategy, DrawerPreview, type EditorContext, EditorItemNav, EmptyState, ErrorState, FacetList, InheritanceMarker, InheritanceProvider, InlinePreview, IntroCard, type ItemColumn, ItemListView, type ItemSlotContext, type ItemView, type ItemViewContext, ItemViewSwitcher, LoadingState, type MergeStrategy, type MergedRecord, type NavConfirmI18n, type NormalisedRule, type ParsedRef, type PasteCompatibility, type PasteCompatibilityResult, PresentationSwitcher, type PreviewMode, PreviewScopePicker, PreviewToggleButton, type ProductBrowseItem, type ProductChildItem, ProductDrillDown, ProductList, type RecordBadge, RecordBrowser, type RecordCardinality, RecordEditor, RecordList, type RecordPresentation, type RecordSlotContext, type RecordSource, type RecordStatus, type RecordSummary, type RecordsAdminI18n, type RecordsAdminIcons, RecordsAdminShell, type RecordsAdminShellProps, type ResolvedDeepLinkParamNames, ResolvedPreview, type ResolvedRecord, type RouterParamsGetter, type RouterParamsSetter, ScopeBreadcrumb, type ScopeCounts, type ScopeKind, ScopeTabs, SiblingRail, SidePreview, type SmartLinksSDK, StatusDot, StatusFilterPills, StatusIcon, type StatusTone, TabbedPreview, type TelemetryEvent, type UseCollectionItemsArgs, type UseRecordClipboardArgs, type UseRecordClipboardReturn, type UseResolveAllRecordsArgs, type UseResolveAllResult, type UseRulePreviewArgs, type UseRulePreviewResult, type UseScopeCountsArgs, type UseScopeCountsResult, UtilityRow, VariantList, buildDraftKey, buildRef, bulkDelete, bulkUpsert, checkPasteCompatibility, cloneValue, createDefaultDeepLinkAdapter, createPostMessageDeepLinkAdapter, createRecord, createRouterDeepLinkAdapter, downloadBlob, exportCsv, getRecordById, importCsv, isInSmartLinksIframe, listRecords, matchRecords, mergeIcons, normaliseRule, parseRef, parsedRefToScope, parsedRefToTarget, pickHeaderIcon, removeRecord, resolutionChain, resolveRecord, restoreRecord, ruleHash, rulesEqual, scopeCountsQueryKey, scopesEqual, statusToneLabel, summariseRule, upsertRecord, useCollectedRecords, useCollectionItems, useDeepLinkState, useDirtyDraft, useDirtyDraftActions, useDirtyDraftStore, useDirtyDrafts, useDirtyNavigation, useFacetBrowse, useIntroDismissed, useItemViewPref, useMergedRecord, usePresentationPref, useProductBrowse, useProductChildren, useRecordClipboard, useRecordEditor, useRecordList, useResolveAllRecords, useResolvedRecord, useRulePreview, useScopeCounts, useScopeProbe, useUnsavedGuard };
|