@proveanything/smartlinks-utils-ui 0.4.0 → 0.6.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.
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode, ComponentType } from 'react';
3
- import { FacetRule, MatchedAt, RecordScope, AppRecord, RecordTarget, MatchResult, MatchEntry } from '@proveanything/smartlinks/dist/types/appObjects';
3
+ import { FacetRule, MatchedAt, RecordTarget, AppRecord, MatchResult, ResolveAllEntry } from '@proveanything/smartlinks/dist/types/appObjects';
4
4
  import { LucideIcon } from 'lucide-react';
5
5
  import * as _tanstack_query_core from '@tanstack/query-core';
6
6
  import * as _proveanything_smartlinks from '@proveanything/smartlinks';
@@ -25,7 +25,11 @@ type ScopeKind = 'collection' | 'product' | 'facet' | 'variant' | 'batch' | 'rul
25
25
  interface ParsedRef {
26
26
  /** Most-specific scope this ref points at. */
27
27
  kind: ScopeKind | 'collection';
28
- /** Raw ref string, e.g. `product:abc123` or `facet:gluten-free/variant:500ml`. */
28
+ /**
29
+ * Raw ref string, derived from anchors via `buildRef` for display /
30
+ * breadcrumb / URL purposes. Never used as a record-identity key
31
+ * internally — every record is addressed by its UUID `id`.
32
+ */
29
33
  raw: string;
30
34
  collectionId?: string;
31
35
  productId?: string;
@@ -34,19 +38,6 @@ interface ParsedRef {
34
38
  variantId?: string;
35
39
  batchId?: string;
36
40
  proofId?: string;
37
- /**
38
- * Opaque id of a rule-targeted record (ref starts with `rule:`). Set when
39
- * `kind === 'rule'`. The actual rule lives on the record's `facetRule`
40
- * field — this is just the addressing handle used by the URL/refs layer.
41
- */
42
- ruleId?: string;
43
- /**
44
- * For `collection` cardinality records: the per-item identifier within the
45
- * scope. Singleton records leave this undefined. The full ref is
46
- * `{scopeRef}/item:{itemId}`, or just `item:{itemId}` for collection-rooted
47
- * items.
48
- */
49
- itemId?: string;
50
41
  }
51
42
 
52
43
  type RecordSource = 'self' | 'inherited' | 'empty';
@@ -76,16 +67,17 @@ interface RecordSummary<TData = unknown> {
76
67
  /** Optional small badges (e.g. "Draft", "12 items"). */
77
68
  badges?: RecordBadge[];
78
69
  /**
79
- * For `collection` cardinality record types: the per-item identifier within
80
- * a scope. The full ref is `{scopeRef}/item:{itemId}`. Singleton records
81
- * leave this undefined.
70
+ * For `collection` cardinality record types: the per-item identifier.
71
+ * This is the record's UUID `id` (same value as `RecordSummary.id`),
72
+ * surfaced on a separate field so item renderers can stay type-clean.
73
+ * Singleton records leave this undefined.
82
74
  */
83
75
  itemId?: string;
84
76
  /**
85
- * For rule-targeted records (ref begins `rule:`). The AND-of-OR clauses
86
- * the server uses to match this record against a product's facets.
87
- * `null` for non-rule records. The browser uses this to render a friendly
88
- * rule summary as the row subtitle.
77
+ * For rule-targeted records (`facetRule != null` on the underlying
78
+ * `AppRecord`). The AND-of-OR clauses the server uses to match this
79
+ * record against a product's facets. `null` for non-rule records. The
80
+ * browser uses this to render a friendly rule summary as the row subtitle.
89
81
  */
90
82
  facetRule?: FacetRule | null;
91
83
  }
@@ -94,6 +86,12 @@ interface ResolvedRecord<TData = unknown> {
94
86
  source: RecordSource;
95
87
  /** Where the resolved value came from (own scope or parent ref). */
96
88
  sourceRef?: string;
89
+ /**
90
+ * UUID of the resolved record (when `source === 'self'` or `'inherited'`).
91
+ * This is the SDK's stable identity; prefer it over `sourceRef` for any
92
+ * subsequent `update`/`remove` call. Absent when `source === 'empty'`.
93
+ */
94
+ recordId?: string;
97
95
  /** The parent value that would be inherited if this scope cleared its override. */
98
96
  parentValue?: TData | null;
99
97
  /**
@@ -108,7 +106,8 @@ interface ResolvedRecord<TData = unknown> {
108
106
  * The `facetRule` attached to the winning record itself, if any. Distinct
109
107
  * from `matchedRule` (which is set when the resolver classified the match
110
108
  * as rule-based). For rule-targeted records (`source: 'self'` on a
111
- * `rule:{id}` ref) this is the rule the editor authors against.
109
+ * record with `facetRule != null`) this is the rule the editor authors
110
+ * against.
112
111
  */
113
112
  facetRule?: FacetRule | null;
114
113
  }
@@ -375,6 +374,12 @@ interface RecordsAdminI18n {
375
374
  /** Cross-scope warning copy (e.g. variant → product). */
376
375
  pasteWarnTitle: string;
377
376
  pasteWarnContinue: string;
377
+ /**
378
+ * Label for the synthetic "All items" rail row shown on the Global tab in
379
+ * collection-cardinality mode (no `groupBy`). Selecting it pins the right
380
+ * pane to the multi-item list.
381
+ */
382
+ itemsAllLabel: string;
378
383
  }
379
384
  declare const DEFAULT_I18N: RecordsAdminI18n;
380
385
 
@@ -393,8 +398,8 @@ type DeepLinkHistoryMode = 'push' | 'replace' | 'smart';
393
398
  * a host already uses one of these keys for something else.
394
399
  */
395
400
  interface DeepLinkParamNames {
396
- /** Default `'item'`. */
397
- item?: string;
401
+ /** Default `'recordId'`. */
402
+ recordId?: string;
398
403
  /** Default `'scope'`. */
399
404
  scope?: string;
400
405
  /** Default `'view'`. */
@@ -405,9 +410,9 @@ interface DeepLinkParamNames {
405
410
  * `undefined` means "absent from the URL".
406
411
  */
407
412
  interface DeepLinkState {
408
- /** Item id when an item is open in the editor. */
409
- item?: string | null;
410
- /** Scope ref when no item is open and the user is browsing a list. */
413
+ /** UUID of the record open in the editor (SDK-assigned). */
414
+ recordId?: string | null;
415
+ /** Anchor scope ref when no record is open and the user is browsing a list. */
411
416
  scope?: string | null;
412
417
  /** Right-pane view choice (`table` / `cards` / `gallery`). */
413
418
  view?: string | null;
@@ -454,7 +459,7 @@ interface DeepLinkOptions {
454
459
  * to avoid the optional-key ceremony.
455
460
  */
456
461
  interface ResolvedDeepLinkParamNames {
457
- item: string;
462
+ recordId: string;
458
463
  scope: string;
459
464
  view: string;
460
465
  }
@@ -905,7 +910,8 @@ interface RecordBrowserProps {
905
910
  scopes: ScopeKind[];
906
911
  activeScope: ScopeKind;
907
912
  onActiveScopeChange: (s: ScopeKind) => void;
908
- selectedRef?: string;
913
+ /** UUID of the highlighted row (matches `RecordSummary.id`). */
914
+ selectedId?: string;
909
915
  onSelectRef: (item: RecordSummary) => void;
910
916
  items: RecordSummary[];
911
917
  counts: {
@@ -926,7 +932,7 @@ interface RecordBrowserProps {
926
932
  scopesLoading?: boolean;
927
933
  i18n: RecordsAdminI18n;
928
934
  }
929
- declare const RecordBrowser: ({ scopes, activeScope, onActiveScopeChange, selectedRef, onSelectRef, items, counts, isLoading, error, filter, onFilterChange, search, onSearchChange, hasNextPage, isFetchingNextPage, onLoadMore, scopesLoading, i18n, }: RecordBrowserProps) => react_jsx_runtime.JSX.Element;
935
+ declare const RecordBrowser: ({ scopes, activeScope, onActiveScopeChange, selectedId, onSelectRef, items, counts, isLoading, error, filter, onFilterChange, search, onSearchChange, hasNextPage, isFetchingNextPage, onLoadMore, scopesLoading, i18n, }: RecordBrowserProps) => react_jsx_runtime.JSX.Element;
930
936
 
931
937
  interface Props$g {
932
938
  scopes: ScopeKind[];
@@ -982,10 +988,24 @@ declare const StatusFilterPills: ({ value, onChange, counts, i18n, hideZero }: P
982
988
 
983
989
  interface Props$c {
984
990
  items: RecordSummary[];
985
- selectedRef?: string;
991
+ /**
992
+ * UUID of the currently-selected row. Matches `RecordSummary.id`. Records
993
+ * without an `id` (synthesised product/facet rows that don't yet have a
994
+ * server-side record) can never be the selection target — those tabs key
995
+ * highlighting off product/facet anchors via `selectedAnchorKey` instead.
996
+ */
997
+ selectedId?: string;
998
+ /**
999
+ * Anchor-based highlight fallback for tabs whose rail rows are not backed
1000
+ * by AppRecords (Products, Facets). Compared against `RecordSummary.ref`
1001
+ * which for those tabs is a synthesised display-only anchor string.
1002
+ */
1003
+ selectedAnchorKey?: string;
986
1004
  onSelect: (item: RecordSummary) => void;
987
- /** When set, the matching row gets a small "unsaved" indicator. */
988
- dirtyRef?: string;
1005
+ /** UUID of the row currently being edited with unsaved changes. */
1006
+ dirtyId?: string;
1007
+ /** Anchor-key equivalent of `dirtyId` for non-record-backed tabs. */
1008
+ dirtyAnchorKey?: string;
989
1009
  /** Rail row density. Defaults to `list`. */
990
1010
  presentation?: RecordPresentation;
991
1011
  /** Optional custom row renderer (still dense — applied to both densities). */
@@ -1009,11 +1029,11 @@ interface Props$c {
1009
1029
  clipboardSourceLabel?: string;
1010
1030
  } | null;
1011
1031
  }
1012
- declare const RecordList: ({ items, selectedRef, onSelect, dirtyRef, presentation, renderListRow, groupBy, rowClipboard, }: Props$c) => react_jsx_runtime.JSX.Element;
1013
- declare const ProductList: ({ items, selectedRef, onSelect, dirtyRef, presentation, renderListRow, groupBy, rowClipboard, }: Props$c) => react_jsx_runtime.JSX.Element;
1014
- declare const FacetList: ({ items, selectedRef, onSelect, dirtyRef, presentation, renderListRow, groupBy, rowClipboard, }: Props$c) => react_jsx_runtime.JSX.Element;
1015
- declare const VariantList: ({ items, selectedRef, onSelect, dirtyRef, presentation, renderListRow, groupBy, rowClipboard, }: Props$c) => react_jsx_runtime.JSX.Element;
1016
- declare const BatchList: ({ items, selectedRef, onSelect, dirtyRef, presentation, renderListRow, groupBy, rowClipboard, }: Props$c) => react_jsx_runtime.JSX.Element;
1032
+ declare const RecordList: ({ items, selectedId, selectedAnchorKey, onSelect, dirtyId, dirtyAnchorKey, presentation, renderListRow, groupBy, rowClipboard, }: Props$c) => react_jsx_runtime.JSX.Element;
1033
+ declare const ProductList: ({ items, selectedId, selectedAnchorKey, onSelect, dirtyId, dirtyAnchorKey, presentation, renderListRow, groupBy, rowClipboard, }: Props$c) => react_jsx_runtime.JSX.Element;
1034
+ declare const FacetList: ({ items, selectedId, selectedAnchorKey, onSelect, dirtyId, dirtyAnchorKey, presentation, renderListRow, groupBy, rowClipboard, }: Props$c) => react_jsx_runtime.JSX.Element;
1035
+ declare const VariantList: ({ items, selectedId, selectedAnchorKey, onSelect, dirtyId, dirtyAnchorKey, presentation, renderListRow, groupBy, rowClipboard, }: Props$c) => react_jsx_runtime.JSX.Element;
1036
+ declare const BatchList: ({ items, selectedId, selectedAnchorKey, onSelect, dirtyId, dirtyAnchorKey, presentation, renderListRow, groupBy, rowClipboard, }: Props$c) => react_jsx_runtime.JSX.Element;
1017
1037
 
1018
1038
  interface DefaultRecordRowProps {
1019
1039
  record: RecordSummary;
@@ -1279,6 +1299,27 @@ interface Props$6 {
1279
1299
  }
1280
1300
  declare const UtilityRow: ({ label, customLabel, introHidden, onShowIntro }: Props$6) => react_jsx_runtime.JSX.Element | null;
1281
1301
 
1302
+ /** Flat anchor shape — matches `UpsertRecordInput` / `BulkUpsertItem`. */
1303
+ interface RecordAnchors {
1304
+ productId?: string | null;
1305
+ variantId?: string | null;
1306
+ batchId?: string | null;
1307
+ proofId?: string | null;
1308
+ }
1309
+ /**
1310
+ * Project a `ParsedRef` to the flat anchor IDs the SDK writes. Facet
1311
+ * components on the ref are intentionally ignored — facet targeting now
1312
+ * lives on `facetRule` (rule records), not as a record anchor.
1313
+ */
1314
+ declare const parsedRefToScope: (ref: ParsedRef) => RecordAnchors;
1315
+ declare const parsedRefToTarget: (ref: ParsedRef) => RecordTarget;
1316
+ /**
1317
+ * True when two anchor sets refer to the same node. Used to decide
1318
+ * "self" vs "inherited" when consuming `match()` results: compare the
1319
+ * winning record's flat anchor IDs against the editing scope.
1320
+ */
1321
+ declare const scopesEqual: (a: RecordAnchors, b: RecordAnchors) => boolean;
1322
+
1282
1323
  interface RecordsCtx {
1283
1324
  SL: SmartLinksSDK;
1284
1325
  collectionId: string;
@@ -1288,15 +1329,23 @@ interface RecordsCtx {
1288
1329
  * and needs to query/scope by type. */
1289
1330
  recordType?: string;
1290
1331
  }
1291
- /** Shape of a single record write — uses the SDK's structured `scope`. */
1332
+ /**
1333
+ * Shape of a single record write. SDK 1.10.2 takes flat anchor IDs
1334
+ * directly on the upsert payload (`productId`, `variantId`, `batchId`,
1335
+ * `proofId`); the legacy nested `scope` object is gone. Set `facetRule`
1336
+ * for rule records — mutually exclusive with anchor IDs.
1337
+ */
1292
1338
  interface RecordWrite<T = unknown> {
1293
- /** Logical key. The server canonicalises this from `scope` if omitted. */
1339
+ /**
1340
+ * Optional caller-supplied external ref (e.g. a SKU or user-typed key).
1341
+ * When omitted the server addresses the record by anchors / facetRule
1342
+ * alone — we no longer synthesise one from anchor IDs client-side.
1343
+ */
1294
1344
  ref?: string;
1295
- /** Structured scope; required for specificity / `match()` to work. */
1296
- scope: RecordScope;
1345
+ /** Flat anchor IDs. Drives specificity and `match()` server-side. */
1346
+ scope: RecordAnchors;
1297
1347
  data: T;
1298
1348
  visibility?: 'public' | 'owner' | 'admin';
1299
- productId?: string;
1300
1349
  status?: string;
1301
1350
  startsAt?: string | null;
1302
1351
  expiresAt?: string | null;
@@ -1304,7 +1353,7 @@ interface RecordWrite<T = unknown> {
1304
1353
  sourceSystem?: string;
1305
1354
  /**
1306
1355
  * Optional facet rule. When set, the record is targeted via this rule and
1307
- * `scope` should be empty (the SDK enforces mutual exclusion). Used by
1356
+ * anchor IDs must be empty (SDK enforces mutual exclusion). Used by
1308
1357
  * the rule editor / Targeting section.
1309
1358
  */
1310
1359
  facetRule?: FacetRule | null;
@@ -1321,17 +1370,26 @@ declare const listRecords: (ctx: RecordsCtx, params?: {
1321
1370
  total: number;
1322
1371
  hasMore: boolean;
1323
1372
  }>;
1324
- /** Look up a single record by its canonical ref. */
1325
- declare const getRecordByRef: (ctx: RecordsCtx, ref: string) => Promise<AppRecord | null>;
1326
1373
  /**
1327
- * Atomic upsert via the SDK. Always sends `scope` so the server can compute
1328
- * `specificity` and derive `ref` deterministically.
1374
+ * Look up a single record by its UUID id. The id-primary read path used by
1375
+ * deep-link restore (`?recordId=`).
1376
+ */
1377
+ declare const getRecordById: (ctx: RecordsCtx, recordId: string) => Promise<AppRecord | null>;
1378
+ /**
1379
+ * Create-or-update by (anchors + recordType) — used when we don't yet know
1380
+ * the record's UUID id. The server addresses the row by anchors (or the
1381
+ * supplied `ref`/`facetRule`) and returns the row with its stable `id`.
1382
+ *
1383
+ * Prefer `updateRecord(ctx, id, …)` whenever an id is already in hand:
1384
+ * it's an unambiguous PATCH against a known row and never accidentally
1385
+ * resurrects a sibling at the same anchor.
1329
1386
  */
1330
1387
  declare const upsertRecord: <T>(ctx: RecordsCtx, write: RecordWrite<T>) => Promise<{
1331
1388
  record: AppRecord;
1332
1389
  isCreate: boolean;
1333
1390
  }>;
1334
- declare const deleteRecord: (ctx: RecordsCtx, ref: string) => Promise<boolean>;
1391
+ /** Delete a record by its UUID id. The id-primary delete path. */
1392
+ declare const removeRecord: (ctx: RecordsCtx, recordId: string) => Promise<void>;
1335
1393
  /** Restore a soft-deleted record by ID (admin only). */
1336
1394
  declare const restoreRecord: (ctx: RecordsCtx, recordId: string) => Promise<AppRecord>;
1337
1395
  /**
@@ -1352,7 +1410,7 @@ declare const matchRecords: (ctx: RecordsCtx, target: RecordTarget, opts?: {
1352
1410
  */
1353
1411
  declare const bulkUpsert: <T>(ctx: RecordsCtx, entries: Array<{
1354
1412
  ref?: string;
1355
- scope: RecordScope;
1413
+ scope: RecordAnchors;
1356
1414
  data: T;
1357
1415
  status?: string;
1358
1416
  }>) => Promise<{
@@ -1366,7 +1424,7 @@ declare const bulkUpsert: <T>(ctx: RecordsCtx, entries: Array<{
1366
1424
  declare const bulkDelete: (ctx: RecordsCtx, input: {
1367
1425
  refs: string[];
1368
1426
  } | {
1369
- scope: Omit<RecordScope, "facets">;
1427
+ scope: RecordAnchors;
1370
1428
  }) => Promise<{
1371
1429
  removed: number;
1372
1430
  }>;
@@ -1453,12 +1511,12 @@ interface UseResolvedRecordArgs {
1453
1511
  facetValue?: string;
1454
1512
  proofId?: string;
1455
1513
  /**
1456
- * Optional raw ref. Required for rule-targeted records (`rule:{id}`) so the
1457
- * resolver can look them up by ref instead of running an inheritance chain.
1458
- * For pinned scopes this can be left empty — the structured scope ids are
1459
- * sufficient.
1514
+ * Direct UUID lookup. When set, the resolver bypasses the inheritance
1515
+ * chain and loads this record by id (used by `?recordId=` deep-links and
1516
+ * by rule-record edits both cases where the row's identity is already
1517
+ * known and the resolver shouldn't run a `match()`).
1460
1518
  */
1461
- ref?: string;
1519
+ recordId?: string;
1462
1520
  supportedScopes?: ScopeKind[];
1463
1521
  enabled?: boolean;
1464
1522
  withParent?: boolean;
@@ -1469,6 +1527,7 @@ declare function useResolvedRecord<T = unknown>(args: UseResolvedRecordArgs): {
1469
1527
  data: T | null;
1470
1528
  source: RecordSource;
1471
1529
  sourceRef?: string;
1530
+ recordId?: string;
1472
1531
  parentValue?: T | null | undefined;
1473
1532
  matchedAt?: _proveanything_smartlinks.MatchedAt;
1474
1533
  matchedRule?: _proveanything_smartlinks.FacetRule;
@@ -1479,8 +1538,8 @@ interface UseCollectionItemsArgs {
1479
1538
  ctx: RecordsCtx;
1480
1539
  /**
1481
1540
  * Scope the items live under. Items at the collection root pass an empty
1482
- * `scope.raw` (the hook then uses `refPrefix: 'item:'`). Pass `null` to
1483
- * keep the query disabled.
1541
+ * `scope.raw` (we then keep records with no anchors). Pass `null` to keep
1542
+ * the query disabled.
1484
1543
  */
1485
1544
  scope: ParsedRef | null;
1486
1545
  /** Per-page size requested from the SDK (default 100). */
@@ -1519,7 +1578,7 @@ declare function useCollectionItems<T = unknown>(args: UseCollectionItemsArgs):
1519
1578
  * incremental" (replace) under `'smart'` history mode. The shell tags each
1520
1579
  * emit with one of these.
1521
1580
  */
1522
- type DeepLinkChangeKind = 'item.open' | 'item.close' | 'item.step' | 'scope' | 'view';
1581
+ type DeepLinkChangeKind = 'record.open' | 'record.close' | 'record.step' | 'scope' | 'view';
1523
1582
  interface UseDeepLinkStateResult {
1524
1583
  /** Latest snapshot read from the adapter. */
1525
1584
  urlState: DeepLinkState;
@@ -1573,8 +1632,12 @@ interface UseResolveAllRecordsArgs {
1573
1632
  staleTime?: number;
1574
1633
  }
1575
1634
  interface UseResolveAllResult {
1576
- /** All matching records, sorted most-specific first. Each appears once. */
1577
- records: MatchEntry[];
1635
+ /**
1636
+ * All matching records, sorted most-specific first. Each appears once.
1637
+ * SDK 1.10.2: `ResolveAllEntry` wraps `{ record: AppRecord, matchedAt,
1638
+ * specificity, matchedRule? }`.
1639
+ */
1640
+ records: ResolveAllEntry[];
1578
1641
  /** True when the result hit the `limit` safety cap. */
1579
1642
  truncated: boolean;
1580
1643
  isLoading: boolean;
@@ -1935,8 +1998,19 @@ declare function SiblingRail<T>({ items, selectedItemId, isLoading, error, onBac
1935
1998
 
1936
1999
  interface ClipboardEntry<T = unknown> {
1937
2000
  value: T;
1938
- sourceScope: ScopeKind | 'collection';
1939
- sourceRef: string;
2001
+ /**
2002
+ * The full parsed scope the value was copied from. Carries scope kind +
2003
+ * anchors so paste-compat can compare structurally without re-parsing a
2004
+ * string. The `raw` field is purely for friendly display (toasts).
2005
+ */
2006
+ sourceScope: ParsedRef;
2007
+ /**
2008
+ * UUID of the source record, when the copy originated from a saved
2009
+ * AppRecord (records-driven rails, in-editor copy of a saved record).
2010
+ * Absent when copying from a synthesised anchor row (Products tab) or
2011
+ * a never-saved draft. Used for self-paste detection.
2012
+ */
2013
+ sourceRecordId?: string;
1940
2014
  /** Friendly label captured at copy time so paste targets can show
1941
2015
  * "Paste from {sourceLabel}" without re-fetching the source. */
1942
2016
  sourceLabel?: string;
@@ -2002,7 +2076,6 @@ interface BuildRefArgs {
2002
2076
  variantId?: string;
2003
2077
  batchId?: string;
2004
2078
  proofId?: string;
2005
- itemId?: string;
2006
2079
  }
2007
2080
  declare const buildRef: (a: BuildRefArgs) => string;
2008
2081
  /**
@@ -2010,17 +2083,6 @@ declare const buildRef: (a: BuildRefArgs) => string;
2010
2083
  * `supportedScopes` prunes scopes the app doesn't care about.
2011
2084
  */
2012
2085
  declare const resolutionChain: (target: ParsedRef, supportedScopes: ScopeKind[]) => string[];
2013
- /**
2014
- * Strip the trailing `/item:{id}` (or leading `item:{id}`) from a ref and
2015
- * return both halves. For singleton refs `itemId` is `undefined` and
2016
- * `scopeRef` equals the input.
2017
- */
2018
- declare const splitItemRef: (raw: string) => {
2019
- scopeRef: string;
2020
- itemId?: string;
2021
- };
2022
- /** Concatenate a scope ref (possibly empty for collection) and an itemId. */
2023
- declare const buildItemRef: (scopeRef: string, itemId: string) => string;
2024
2086
 
2025
2087
  interface ResolveArgs {
2026
2088
  ctx: RecordsCtx;
@@ -2036,15 +2098,6 @@ interface ResolveArgs {
2036
2098
  }
2037
2099
  declare const resolveRecord: <T>(args: ResolveArgs) => Promise<ResolvedRecord<T>>;
2038
2100
 
2039
- declare const parsedRefToScope: (ref: ParsedRef) => RecordScope;
2040
- declare const parsedRefToTarget: (ref: ParsedRef) => RecordTarget;
2041
- /**
2042
- * Compare a winning record's scope against the editing scope.
2043
- * Returns true when they refer to the same node — used to decide
2044
- * "self" vs "inherited" when consuming `match()` results.
2045
- */
2046
- declare const scopesEqual: (a: RecordScope, b: RecordScope) => boolean;
2047
-
2048
2101
  interface ImportReport {
2049
2102
  total: number;
2050
2103
  saved: number;
@@ -2060,4 +2113,4 @@ declare const exportCsv: <T>(records: RecordSummary<T>[], schema: CsvSchema<T>)
2060
2113
  declare const importCsv: <T>(file: File, schema: CsvSchema<T>, ctx: RecordsCtx) => Promise<ImportReport>;
2061
2114
  declare const downloadBlob: (blob: Blob, filename: string) => void;
2062
2115
 
2063
- 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 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 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 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, UtilityRow, VariantList, buildItemRef, buildRef, bulkDelete, bulkUpsert, checkPasteCompatibility, cloneValue, createDefaultDeepLinkAdapter, deleteRecord, downloadBlob, exportCsv, getRecordByRef, importCsv, listRecords, matchRecords, mergeIcons, parseRef, parsedRefToScope, parsedRefToTarget, pickHeaderIcon, resolutionChain, resolveRecord, restoreRecord, scopesEqual, splitItemRef, statusToneLabel, upsertRecord, useCollectedRecords, useCollectionItems, useDeepLinkState, useDirtyNavigation, useFacetBrowse, useIntroDismissed, useItemViewPref, useMergedRecord, usePresentationPref, useProductBrowse, useProductChildren, useRecordClipboard, useRecordEditor, useRecordList, useResolveAllRecords, useResolvedRecord, useRulePreview, useScopeProbe, useUnsavedGuard };
2116
+ 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 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 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 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, UtilityRow, VariantList, buildRef, bulkDelete, bulkUpsert, checkPasteCompatibility, cloneValue, createDefaultDeepLinkAdapter, downloadBlob, exportCsv, getRecordById, importCsv, listRecords, matchRecords, mergeIcons, parseRef, parsedRefToScope, parsedRefToTarget, pickHeaderIcon, removeRecord, resolutionChain, resolveRecord, restoreRecord, scopesEqual, statusToneLabel, upsertRecord, useCollectedRecords, useCollectionItems, useDeepLinkState, useDirtyNavigation, useFacetBrowse, useIntroDismissed, useItemViewPref, useMergedRecord, usePresentationPref, useProductBrowse, useProductChildren, useRecordClipboard, useRecordEditor, useRecordList, useResolveAllRecords, useResolvedRecord, useRulePreview, useScopeProbe, useUnsavedGuard };