@nivaro/react 0.1.146 → 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 {
@@ -2395,6 +2402,8 @@ export declare function onFieldInterfacesChange(cb: () => void): () => void;
2395
2402
  */
2396
2403
  export declare function onIdleChange(fn: (idle: boolean) => void): () => void;
2397
2404
 
2405
+ export declare function openCatalogItem(collection: string, id: string, context?: Record<string, unknown>): void;
2406
+
2398
2407
  export declare function openChatRoom(room: string, label?: string): void;
2399
2408
 
2400
2409
  export declare function openDmWith(userId: string, displayName?: string): void;
@@ -2581,10 +2590,13 @@ declare type PipelineState = {
2581
2590
  stage_visibility: 'always' | 'hide' | 'hide_unless_active';
2582
2591
  };
2583
2592
 
2584
- export declare function PipelineTransitionButtons({ collection, item, onBeforeTransition }: {
2593
+ export declare function PipelineTransitionButtons({ collection, item, onBeforeTransition, wrap }: {
2585
2594
  collection: string;
2586
2595
  item: string;
2587
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;
2588
2600
  }): JSX.Element | null;
2589
2601
 
2590
2602
  /** Play the configured notification sound. No-op for 'off'/unknown/unavailable audio. */
@@ -3203,6 +3215,10 @@ export declare function RecordSubscribeButton({ collection, itemId, recordLabel
3203
3215
  recordLabel?: string;
3204
3216
  }): JSX.Element;
3205
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
+
3206
3222
  /** Register the host's DM opener. Returns an unregister function. */
3207
3223
  export declare function registerDmOpener(fn: DmOpener): () => void;
3208
3224