@nivaro/react 0.1.145 → 0.1.147

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/index.d.ts CHANGED
@@ -304,6 +304,8 @@ export declare function BroadcastView({ className }: {
304
304
 
305
305
  export declare function buildGroups<T extends QueueGroupingRow>(rows: T[], attribute: string): QueueGroup<T>[];
306
306
 
307
+ export declare function canOpenCatalogItem(collection: string | null | undefined): boolean;
308
+
307
309
  export declare function canOpenChatRoom(): boolean;
308
310
 
309
311
  export declare function canOpenDm(): boolean;
@@ -325,6 +327,11 @@ declare type CascadeRule = {
325
327
  child_field: string;
326
328
  };
327
329
 
330
+ /** context = the hosting form's current values (parent draft) — lets the
331
+ * host seed its drawer's filters (warehouse, project type, …) from the
332
+ * record the click came from. Shape is host-interpreted. */
333
+ declare type CatalogItemOpener = (id: string, context?: Record<string, unknown>) => void;
334
+
328
335
  export declare function CellCopyLayer(): ReactPortal | null;
329
336
 
330
337
  declare interface CellFilterLite {
@@ -2062,6 +2069,12 @@ export declare interface M2MStagingCtx {
2062
2069
  stageUnlink: (key: string, junctionId: unknown) => void;
2063
2070
  unstageLink: (key: string, relatedId: unknown) => void;
2064
2071
  unstageUnlink: (key: string, junctionId: unknown) => void;
2072
+ /** Which field an auto-filled parent value was DERIVED from (upstream
2073
+ * cascades / cross-record defaults). A cascade rule whose parent was
2074
+ * derived from the rule's own field must not narrow that field's options —
2075
+ * otherwise picking a region locks the region picker into the zone the
2076
+ * pick itself filled. */
2077
+ getDerivedOrigin?: (parentField: string) => string | null;
2065
2078
  }
2066
2079
 
2067
2080
  declare type MatchedDrawerConfig = {
@@ -2389,6 +2402,8 @@ export declare function onFieldInterfacesChange(cb: () => void): () => void;
2389
2402
  */
2390
2403
  export declare function onIdleChange(fn: (idle: boolean) => void): () => void;
2391
2404
 
2405
+ export declare function openCatalogItem(collection: string, id: string, context?: Record<string, unknown>): void;
2406
+
2392
2407
  export declare function openChatRoom(room: string, label?: string): void;
2393
2408
 
2394
2409
  export declare function openDmWith(userId: string, displayName?: string): void;
@@ -2575,10 +2590,13 @@ declare type PipelineState = {
2575
2590
  stage_visibility: 'always' | 'hide' | 'hide_unless_active';
2576
2591
  };
2577
2592
 
2578
- export declare function PipelineTransitionButtons({ collection, item, onBeforeTransition }: {
2593
+ export declare function PipelineTransitionButtons({ collection, item, onBeforeTransition, wrap }: {
2579
2594
  collection: string;
2580
2595
  item: string;
2581
2596
  onBeforeTransition?: () => boolean | Promise<boolean>;
2597
+ /** false = single-line buttons (header hosting): wrapping would absorb the
2598
+ * width pressure the header's overflow-collapse logic needs to see. */
2599
+ wrap?: boolean;
2582
2600
  }): JSX.Element | null;
2583
2601
 
2584
2602
  /** Play the configured notification sound. No-op for 'off'/unknown/unavailable audio. */
@@ -3197,6 +3215,10 @@ export declare function RecordSubscribeButton({ collection, itemId, recordLabel
3197
3215
  recordLabel?: string;
3198
3216
  }): JSX.Element;
3199
3217
 
3218
+ /** Register a detail opener for a catalog collection. Returns an unregister
3219
+ * cleanup — call it on unmount so a dead host can't leave a stale opener. */
3220
+ export declare function registerCatalogItemOpener(collection: string, fn: CatalogItemOpener): () => void;
3221
+
3200
3222
  /** Register the host's DM opener. Returns an unregister function. */
3201
3223
  export declare function registerDmOpener(fn: DmOpener): () => void;
3202
3224