@tetrascience-npm/tetrascience-react-ui 0.5.0-beta.71.1 → 0.5.0-beta.73.1

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.
Files changed (27) hide show
  1. package/dist/components/composed/PlateMapEditor/PlateMapEditor.cjs +1 -1
  2. package/dist/components/composed/PlateMapEditor/PlateMapEditor.cjs.map +1 -1
  3. package/dist/components/composed/PlateMapEditor/PlateMapEditor.js +288 -369
  4. package/dist/components/composed/PlateMapEditor/PlateMapEditor.js.map +1 -1
  5. package/dist/components/composed/PlateMapEditor/PlateMapForm.cjs +2 -0
  6. package/dist/components/composed/PlateMapEditor/PlateMapForm.cjs.map +1 -0
  7. package/dist/components/composed/PlateMapEditor/PlateMapForm.js +43 -0
  8. package/dist/components/composed/PlateMapEditor/PlateMapForm.js.map +1 -0
  9. package/dist/components/composed/PlateMapEditor/PlateMapGrid.cjs +2 -0
  10. package/dist/components/composed/PlateMapEditor/PlateMapGrid.cjs.map +1 -0
  11. package/dist/components/composed/PlateMapEditor/PlateMapGrid.js +154 -0
  12. package/dist/components/composed/PlateMapEditor/PlateMapGrid.js.map +1 -0
  13. package/dist/components/composed/PlateMapEditor/PlateMapManifest.cjs +2 -0
  14. package/dist/components/composed/PlateMapEditor/PlateMapManifest.cjs.map +1 -0
  15. package/dist/components/composed/PlateMapEditor/PlateMapManifest.js +44 -0
  16. package/dist/components/composed/PlateMapEditor/PlateMapManifest.js.map +1 -0
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.css +1 -1
  19. package/dist/index.d.ts +151 -2
  20. package/dist/index.js +644 -636
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.tailwind.css +1 -1
  23. package/dist/utils/colors.cjs +1 -1
  24. package/dist/utils/colors.cjs.map +1 -1
  25. package/dist/utils/colors.js +43 -21
  26. package/dist/utils/colors.js.map +1 -1
  27. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -543,11 +543,38 @@ export declare type ChainOfThoughtTriggerProps = ComponentProps<typeof Collapsib
543
543
  };
544
544
 
545
545
  /**
546
- * Chart color palette for consistent graph styling
547
- * Uses the primary graph colors from the design system
546
+ * Chart color palette for consistent graph styling.
547
+ *
548
+ * CVD-friendly (deuteranopia / protanopia / tritanopia) categorical palette.
549
+ * Single source of truth is the `--chart-1` … `--chart-12` CSS variables in
550
+ * `index.tailwind.css`; the hex fallbacks below are used during SSR / before
551
+ * the stylesheet resolves. Slots 1–8 are recommended; 9–12 are for sparing use
552
+ * when more than 8 series are needed.
548
553
  */
549
554
  export declare const CHART_COLORS: readonly [string, string, string, string, string, string, string, string, string, string, string, string];
550
555
 
556
+ /**
557
+ * CVD-friendly diverging ramps (midpoint at step 06/07). Red/green pairings
558
+ * are intentionally avoided (worst for deutan/protan).
559
+ * Source of truth: `--chart-div-*` CSS variables in `index.tailwind.css`.
560
+ */
561
+ export declare const CHART_DIVERGING: {
562
+ readonly blueOrange: string[];
563
+ readonly tealMagenta: string[];
564
+ readonly purpleYellowGreen: string[];
565
+ };
566
+
567
+ /**
568
+ * CVD-friendly sequential ramps (light → dark, anchored on brand).
569
+ * 12 steps each — pass to a chart's colorscale / sequential interpolator.
570
+ * Source of truth: `--chart-seq-*` CSS variables in `index.tailwind.css`.
571
+ */
572
+ export declare const CHART_SEQUENTIAL: {
573
+ readonly blue: string[];
574
+ readonly teal: string[];
575
+ readonly purple: string[];
576
+ };
577
+
551
578
  export declare const Chat: ({ initialMessages, models, defaultModel, suggestions, onSend, className, }: ChatProps) => JSX.Element;
552
579
 
553
580
  export declare interface ChatMessage {
@@ -2310,6 +2337,99 @@ export declare interface PlateMapEditorProps<T extends WellRecord = WellRecord>
2310
2337
  className?: string;
2311
2338
  }
2312
2339
 
2340
+ /**
2341
+ * Card-agnostic metadata form panel. Renders the staged-value form (or a
2342
+ * caller-supplied `formSlot`) plus an optional legend. Bring your own
2343
+ * container — drop it bare into a sidebar, wrap it in a `Card`, or stack it
2344
+ * above the grid.
2345
+ */
2346
+ export declare function PlateMapForm<T extends WellRecord = WellRecord>({ fields, value, onChange, selectionSize, onApply, onClear, applyLabel, clearLabel, extras, legend, formSlot, className, }: PlateMapFormProps<T>): JSX.Element;
2347
+
2348
+ export declare interface PlateMapFormProps<T extends WellRecord = WellRecord> {
2349
+ fields: WellField<T>[];
2350
+ /** Staged values applied across the current selection on Apply. */
2351
+ value: Partial<T>;
2352
+ onChange: (next: Partial<T>) => void;
2353
+ selectionSize: number;
2354
+ onApply: () => void;
2355
+ onClear: () => void;
2356
+ applyLabel?: string;
2357
+ clearLabel?: string;
2358
+ /** Helper slot rendered between the fields and the action row. */
2359
+ extras?: React_2.ReactNode;
2360
+ /** Legend block rendered beneath the form, separated by a divider. */
2361
+ legend?: React_2.ReactNode;
2362
+ /**
2363
+ * Fully replaces the built-in `WellMetadataForm` — e.g. a drag-and-drop
2364
+ * source palette. The legend slot still renders beneath the replacement.
2365
+ */
2366
+ formSlot?: React_2.ReactNode;
2367
+ className?: string;
2368
+ }
2369
+
2370
+ /**
2371
+ * Card-agnostic plate grid panel. Renders the selection toolbar, hover
2372
+ * summary, the interactive `PlatePaintGrid`, and optional group shortcuts —
2373
+ * and owns the ephemeral hover state internally. The plate title, plate
2374
+ * selector, and actions menu are intentionally NOT part of this panel; compose
2375
+ * `PlateMapPlateSelector` and `PlateMapActionsMenu` around it for full layout
2376
+ * freedom.
2377
+ */
2378
+ export declare function PlateMapGrid<T extends WellRecord = WellRecord>({ format, rows, columns, values, selection, onSelectionChange, colorForWell, fields, renderHoverSummary, onHoveredWellChange, hoveredWellId, toolbar, hideSelectionControls, selectAllLabel, deselectAllLabel, emptyWellFillColor, wellShape, framed, wrapWell, highlightedWellIds, onWellDoubleClick, selectionFillMode, flashWellId, flashWellKey, cellSize, autoScale, minCellSize, maxCellSize, groups, activeGroupId, onGroupClick, className, }: PlateMapGridProps<T>): JSX.Element;
2379
+
2380
+ export declare interface PlateMapGridProps<T extends WellRecord = WellRecord> {
2381
+ format: PlateFormat;
2382
+ rows?: number;
2383
+ columns?: number;
2384
+ values: Map<WellId, T>;
2385
+ selection: Set<WellId>;
2386
+ onSelectionChange: (next: Set<WellId>) => void;
2387
+ /** Resolves the SVG fill color for a well. */
2388
+ colorForWell: (well: T | undefined, wellId: WellId) => string;
2389
+ /** Field schema used to build the default hover summary string. */
2390
+ fields?: WellField<T>[];
2391
+ /** Custom hover summary for the strip above the grid. */
2392
+ renderHoverSummary?: (well: T | undefined, wellId: WellId) => React_2.ReactNode;
2393
+ /** Fires whenever the currently hovered well changes (null on leave). */
2394
+ onHoveredWellChange?: (wellId: WellId | null) => void;
2395
+ /**
2396
+ * Controlled hovered well id. When provided, the panel reflects this value
2397
+ * instead of tracking hover internally — useful for syncing the hover
2398
+ * summary with external state (e.g. resetting it on a plate switch).
2399
+ */
2400
+ hoveredWellId?: WellId | null;
2401
+ /** Controls rendered to the left of the built-in select/deselect links. */
2402
+ toolbar?: React_2.ReactNode;
2403
+ /** Hide the built-in "Select all" / "Deselect all" links. */
2404
+ hideSelectionControls?: boolean;
2405
+ selectAllLabel?: string;
2406
+ deselectAllLabel?: string;
2407
+ /** Fill color for empty wells. Pass `null` to delegate empty wells to `colorForWell`. */
2408
+ emptyWellFillColor?: string | null;
2409
+ /** Well shape forwarded to `PlatePaintGrid`. Defaults to `"rect"`. */
2410
+ wellShape?: WellShape;
2411
+ /** When true, wraps the grid in a card-like plate frame (rounded + border + soft shadow). */
2412
+ framed?: boolean;
2413
+ /** Render-prop that places a node inside each absolute-positioned well cell. */
2414
+ wrapWell?: (wellId: WellId, cellSize: number) => React_2.ReactNode;
2415
+ /** Wells to highlight (e.g. when hovering a legend item externally). */
2416
+ highlightedWellIds?: ReadonlySet<WellId>;
2417
+ onWellDoubleClick?: (wellId: WellId) => void;
2418
+ selectionFillMode?: "selection" | "well";
2419
+ flashWellId?: WellId;
2420
+ flashWellKey?: number;
2421
+ /** Fixed well size. When unset, the grid grows with the available width. */
2422
+ cellSize?: number;
2423
+ autoScale?: boolean;
2424
+ minCellSize?: number;
2425
+ maxCellSize?: number;
2426
+ /** Optional grouped well shortcuts rendered under the grid. */
2427
+ groups?: PlateMapGroupOption[];
2428
+ activeGroupId?: string;
2429
+ onGroupClick?: (group: PlateMapGroupOption) => void;
2430
+ className?: string;
2431
+ }
2432
+
2313
2433
  export declare interface PlateMapGroupOption {
2314
2434
  id: string;
2315
2435
  label: string;
@@ -2322,6 +2442,35 @@ export declare interface PlateMapGroupOption {
2322
2442
  disabled?: boolean;
2323
2443
  }
2324
2444
 
2445
+ /**
2446
+ * Card-agnostic sample-manifest panel. A thin wrapper over `WellManifestTable`
2447
+ * with an optional heading and no width constraint of its own, so it can span
2448
+ * the full screen width or sit inside any container the caller chooses.
2449
+ */
2450
+ export declare function PlateMapManifest<T extends WellRecord = WellRecord>({ values, onChange, columns, fields, selection, onSelectionChange, emptyEntry, isPopulated, filterable, groupable, pageSize, pageSizeOptions, title, className, }: PlateMapManifestProps<T>): JSX.Element;
2451
+
2452
+ export declare interface PlateMapManifestProps<T extends WellRecord = WellRecord> {
2453
+ values: Map<WellId, T>;
2454
+ onChange: (next: Map<WellId, T>) => void;
2455
+ columns: WellColumn<T>[];
2456
+ fields?: WellField<T>[];
2457
+ selection?: Set<WellId>;
2458
+ onSelectionChange?: (next: Set<WellId>) => void;
2459
+ /** Builds an empty record when a manifest row is freshly created. */
2460
+ emptyEntry: (id: WellId) => T;
2461
+ /** Filter for the manifest's "hide empty" mode. */
2462
+ isPopulated?: (row: T) => boolean;
2463
+ /** Enables the filter popover on the manifest table. */
2464
+ filterable?: boolean;
2465
+ /** Enables the group-by selector on the manifest table. */
2466
+ groupable?: boolean;
2467
+ pageSize?: number;
2468
+ pageSizeOptions?: number[];
2469
+ /** Optional heading rendered above the table. Omit for a bare table. */
2470
+ title?: React_2.ReactNode;
2471
+ className?: string;
2472
+ }
2473
+
2325
2474
  export declare interface PlateMapPlateOption {
2326
2475
  /** Stable plate id. For imported CSVs this should be the user-provided barcode. */
2327
2476
  id: string;