@proveanything/smartlinks-utils-ui 0.9.2 → 0.9.4
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/{chunk-CBIKDA3S.js → chunk-2IQEDRSZ.js} +4 -31
- package/dist/chunk-2IQEDRSZ.js.map +1 -0
- package/dist/{chunk-KFKVGUUP.js → chunk-KA4MKRHL.js} +2 -4
- package/dist/chunk-KA4MKRHL.js.map +1 -0
- package/dist/chunk-OLYC54YT.js +59 -0
- package/dist/chunk-OLYC54YT.js.map +1 -0
- package/dist/components/AssetPicker/index.css +2189 -3
- package/dist/components/AssetPicker/index.css.map +1 -1
- package/dist/components/AssetPicker/index.js +2 -1
- package/dist/components/ConditionsEditor/index.css +2189 -3
- package/dist/components/ConditionsEditor/index.css.map +1 -1
- package/dist/components/FontPicker/index.css +2189 -3
- package/dist/components/FontPicker/index.css.map +1 -1
- package/dist/components/IconPicker/index.css +2189 -3
- package/dist/components/IconPicker/index.css.map +1 -1
- package/dist/components/RecordsAdmin/index.css +75 -30
- package/dist/components/RecordsAdmin/index.css.map +1 -1
- package/dist/components/RecordsAdmin/index.d.ts +33 -4
- package/dist/components/RecordsAdmin/index.js +475 -176
- package/dist/components/RecordsAdmin/index.js.map +1 -1
- package/dist/index.css +2189 -3
- package/dist/index.css.map +1 -1
- package/dist/index.js +2 -2
- package/dist/records-4NN757SG.js +3 -0
- package/dist/{records-AYYQSP7E.js.map → records-4NN757SG.js.map} +1 -1
- package/package.json +1 -1
- package/dist/chunk-CBIKDA3S.js.map +0 -1
- package/dist/chunk-KFKVGUUP.js.map +0 -1
- package/dist/records-AYYQSP7E.js +0 -3
|
@@ -493,7 +493,17 @@ interface DeepLinkAdapter {
|
|
|
493
493
|
subscribe(listener: () => void): () => void;
|
|
494
494
|
}
|
|
495
495
|
interface DeepLinkOptions {
|
|
496
|
-
/**
|
|
496
|
+
/**
|
|
497
|
+
* Master switch. **Default `true` as of v0.10.** Most hosts want URL
|
|
498
|
+
* round-tripping (refresh / share-link restores the open record), so the
|
|
499
|
+
* shell installs a default adapter automatically — `window.location` +
|
|
500
|
+
* `window.history` for standalone hosts, or a postMessage relay when
|
|
501
|
+
* mounted inside a SmartLinks iframe.
|
|
502
|
+
*
|
|
503
|
+
* Set to `false` to run an isolated shell whose state never touches the
|
|
504
|
+
* URL. Useful for embedded previews, modal pickers, or hosts that own
|
|
505
|
+
* a more opinionated URL scheme they don't want the shell to touch.
|
|
506
|
+
*/
|
|
497
507
|
enabled?: boolean;
|
|
498
508
|
/** Push/replace strategy. Default `'smart'`. */
|
|
499
509
|
history?: DeepLinkHistoryMode;
|
|
@@ -1376,13 +1386,19 @@ interface PreviewScopePickerProps {
|
|
|
1376
1386
|
/** Are variants/batches available for drill-down. */
|
|
1377
1387
|
showVariants: boolean;
|
|
1378
1388
|
showBatches: boolean;
|
|
1389
|
+
/** Active rail tab. The picker hides itself on product/variant/batch
|
|
1390
|
+
* tabs because the editing scope already pins a product there. */
|
|
1391
|
+
activeScope?: ScopeKind;
|
|
1379
1392
|
/** i18n strings (uses defaults if omitted). */
|
|
1380
1393
|
i18n?: {
|
|
1381
1394
|
previewAs?: string;
|
|
1382
1395
|
previewAsDefault?: string;
|
|
1396
|
+
change?: string;
|
|
1397
|
+
searchProducts?: string;
|
|
1398
|
+
close?: string;
|
|
1383
1399
|
};
|
|
1384
1400
|
}
|
|
1385
|
-
declare const PreviewScopePicker: ({ SL, collectionId, editingScope, value, onChange, showVariants, showBatches, i18n, }: PreviewScopePickerProps) => react_jsx_runtime.JSX.Element | null;
|
|
1401
|
+
declare const PreviewScopePicker: ({ SL, collectionId, editingScope, value, onChange, showVariants, showBatches, activeScope, i18n, }: PreviewScopePickerProps) => react_jsx_runtime.JSX.Element | null;
|
|
1386
1402
|
|
|
1387
1403
|
declare const ScopeBreadcrumb: ({ scope }: {
|
|
1388
1404
|
scope: ParsedRef;
|
|
@@ -2401,11 +2417,24 @@ declare const normaliseRule: (rule: FacetRule | null | undefined) => NormalisedR
|
|
|
2401
2417
|
* `null` so the caller can route them to a separate "no rule" bucket.
|
|
2402
2418
|
*/
|
|
2403
2419
|
declare const ruleHash: (rule: FacetRule | null | undefined) => string | null;
|
|
2420
|
+
/**
|
|
2421
|
+
* Optional label lookup — turn raw facet/value KEYS (e.g. `cooking_guide`,
|
|
2422
|
+
* `over-cook`) into the human-readable LABELS the host already shows
|
|
2423
|
+
* elsewhere (e.g. "Cooking Guide", "Over-cook"). Pass via `summariseRule`
|
|
2424
|
+
* so rail headers, right-pane summaries and chips never expose raw keys
|
|
2425
|
+
* when a friendly name is available.
|
|
2426
|
+
*/
|
|
2427
|
+
interface RuleLabelLookup {
|
|
2428
|
+
facetLabel?: (facetKey: string) => string | undefined;
|
|
2429
|
+
valueLabel?: (facetKey: string, valueKey: string) => string | undefined;
|
|
2430
|
+
}
|
|
2404
2431
|
/**
|
|
2405
2432
|
* Human-readable single-line summary of a rule, used for group headers.
|
|
2406
|
-
* Compact ("
|
|
2433
|
+
* Compact ("Country: Germany, France · Tier: Premium") so it fits a
|
|
2434
|
+
* rail-width header. Falls back to raw keys when no lookup is supplied
|
|
2435
|
+
* or the lookup returns undefined for a given key.
|
|
2407
2436
|
*/
|
|
2408
|
-
declare const summariseRule: (rule: FacetRule | null | undefined) => string;
|
|
2437
|
+
declare const summariseRule: (rule: FacetRule | null | undefined, lookup?: RuleLabelLookup) => string;
|
|
2409
2438
|
/** Comparator: are two rules semantically identical? */
|
|
2410
2439
|
declare const rulesEqual: (a: FacetRule | null | undefined, b: FacetRule | null | undefined) => boolean;
|
|
2411
2440
|
|