react-semaphor 0.1.294 → 0.1.296

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 (40) hide show
  1. package/dist/chunks/{braces-DfDQiR3J.js → braces-BNXseceK.js} +1 -1
  2. package/dist/chunks/{braces-DR-GdaLC.js → braces-DVrX_3Q_.js} +1 -1
  3. package/dist/chunks/dashboard-controls-CKKZcVA5.js +2219 -0
  4. package/dist/chunks/dashboard-controls-DS2xJxHU.js +47 -0
  5. package/dist/chunks/dashboard-filter-controls-button-nqfmscB7.js +11 -0
  6. package/dist/chunks/{dashboard-filter-controls-button-DxgGUl00.js → dashboard-filter-controls-button-xPaIlNHP.js} +501 -495
  7. package/dist/chunks/{dashboard-json-BvTeHePu.js → dashboard-json-cuj9vYY9.js} +1 -1
  8. package/dist/chunks/{dashboard-json-DQW8TN0I.js → dashboard-json-ovQyHWw6.js} +1 -1
  9. package/dist/chunks/{dashboard-summary-settings-dialog-BsmKiGud.js → dashboard-summary-settings-dialog-BUg3Qyhh.js} +1 -1
  10. package/dist/chunks/{dashboard-summary-settings-dialog-q7fx3YAK.js → dashboard-summary-settings-dialog-DF076HeJ.js} +1 -1
  11. package/dist/chunks/{edit-dashboard-visual-RVl9nbDZ.js → edit-dashboard-visual-32TAM00c.js} +5373 -5302
  12. package/dist/chunks/edit-dashboard-visual-BtiMcO-L.js +183 -0
  13. package/dist/chunks/{index-DerPpfv0.js → index-BDeJH9hO.js} +103982 -88259
  14. package/dist/chunks/index-Dbrs96G8.js +1533 -0
  15. package/dist/chunks/{resource-management-panel-epydPwyM.js → resource-management-panel-2qcXsKwg.js} +2 -2
  16. package/dist/chunks/{resource-management-panel-DnZ1rw1A.js → resource-management-panel-C4qoxy_g.js} +31 -30
  17. package/dist/chunks/use-create-flow-overlay-state-BMD3YRzU.js +21 -0
  18. package/dist/chunks/{use-create-flow-overlay-state-C5vdfXhM.js → use-create-flow-overlay-state-CHeppRNE.js} +572 -568
  19. package/dist/chunks/{use-visual-utils-D9Kknvjl.js → use-visual-utils-BIHLaVwh.js} +70 -68
  20. package/dist/chunks/use-visual-utils-dOYWf6nM.js +1 -0
  21. package/dist/dashboard/index.cjs +1 -1
  22. package/dist/dashboard/index.js +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +113 -112
  25. package/dist/style.css +1 -1
  26. package/dist/surfboard/index.cjs +1 -1
  27. package/dist/surfboard/index.js +2 -2
  28. package/dist/types/dashboard.d.ts +271 -0
  29. package/dist/types/main.d.ts +324 -0
  30. package/dist/types/shared.d.ts +240 -0
  31. package/dist/types/surfboard.d.ts +271 -0
  32. package/dist/types/types.d.ts +271 -0
  33. package/package.json +7 -1
  34. package/dist/chunks/dashboard-controls-C3Z9bpYE.js +0 -2014
  35. package/dist/chunks/dashboard-controls-DGEVXgP5.js +0 -47
  36. package/dist/chunks/dashboard-filter-controls-button-BIYT1ucX.js +0 -11
  37. package/dist/chunks/edit-dashboard-visual-ChKj-Lzr.js +0 -183
  38. package/dist/chunks/index-BlspGR07.js +0 -1435
  39. package/dist/chunks/use-create-flow-overlay-state-Bcg4EgoD.js +0 -21
  40. package/dist/chunks/use-visual-utils-Dw_yw9zU.js +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../chunks/index-BlspGR07.js"),e=require("../types/index.cjs"),r=require("../chunks/dashboard-summary-settings-dialog-BsmKiGud.js");exports.Surfboard=a.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.CalendarPreferencesDialog=r.CalendarPreferencesDialog;exports.DashboardSummarySettingsDialog=r.DashboardSummarySettingsDialog;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../chunks/index-Dbrs96G8.js"),e=require("../types/index.cjs"),r=require("../chunks/dashboard-summary-settings-dialog-BUg3Qyhh.js");exports.Surfboard=a.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.CalendarPreferencesDialog=r.CalendarPreferencesDialog;exports.DashboardSummarySettingsDialog=r.DashboardSummarySettingsDialog;
@@ -1,6 +1,6 @@
1
- import { a as o } from "../chunks/index-DerPpfv0.js";
1
+ import { a as o } from "../chunks/index-BDeJH9hO.js";
2
2
  import { CONTROL_CARD_DEFAULT_VALUE as s, EMPTY_SELECTION as D } from "../types/index.js";
3
- import { C as m, D as t } from "../chunks/dashboard-summary-settings-dialog-q7fx3YAK.js";
3
+ import { C as m, D as t } from "../chunks/dashboard-summary-settings-dialog-DF076HeJ.js";
4
4
  export {
5
5
  s as CONTROL_CARD_DEFAULT_VALUE,
6
6
  m as CalendarPreferencesDialog,
@@ -272,6 +272,12 @@ declare interface ColumnSettings {
272
272
  maxWidth?: number;
273
273
  textOverflow?: 'ellipsis' | 'wrap' | 'clip';
274
274
  textWrap: 'wrap' | 'nowrap';
275
+ /**
276
+ * Totals-row behavior for this column. Undefined = 'none'. The footer
277
+ * renders only when at least one visible column has a non-'none' behavior.
278
+ */
279
+ totalsBehavior?: TotalsBehavior;
280
+ totalsLabel?: string;
275
281
  numberFormat: {
276
282
  style: 'decimal' | 'currency' | 'percent' | 'scientific';
277
283
  currency: string;
@@ -284,6 +290,14 @@ declare interface ColumnSettings {
284
290
  dataBarColor: string;
285
291
  dataBarMinValue?: number;
286
292
  dataBarMaxValue?: number;
293
+ /**
294
+ * When true, render the cell bg with a heatmap intensity tint scaled
295
+ * across the column's value range. Composes with the existing text
296
+ * color/color-range logic (tint is bg only). `showDataBar` takes
297
+ * precedence when both are set — per the canonical design, a cell is
298
+ * either a data-bar or a heatmap, never both.
299
+ */
300
+ showHeatmap?: boolean;
287
301
  };
288
302
  dateFormat: {
289
303
  format: string;
@@ -446,6 +460,18 @@ export declare type DashboardProps = {
446
460
  cardControlDefinitions?: ControlDefinition[];
447
461
  controlBindings?: ControlBinding[];
448
462
  };
463
+ /**
464
+ * Document-local runtime values for print/render entry points. Values are
465
+ * keyed by document input id and are intentionally separate from dashboard
466
+ * filters/controls.
467
+ */
468
+ documentInputValues?: DocumentInputRuntimeValues;
469
+ /**
470
+ * Render target for print entry points. Generic dashboard PDF exports also
471
+ * use cardDisplay.mode="print"; document-specific print handling must only
472
+ * run when this is explicitly "document".
473
+ */
474
+ renderMode?: 'dashboard' | 'document';
449
475
  customStyle?: TStyle;
450
476
  currentTheme?: Theme;
451
477
  version?: string;
@@ -574,6 +600,215 @@ declare type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowfla
574
600
 
575
601
  export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
576
602
 
603
+ export declare type DocumentChartSection = {
604
+ id: string;
605
+ type: 'chart';
606
+ title?: string;
607
+ card: TCard;
608
+ heightPx: number;
609
+ };
610
+
611
+ export declare type DocumentControlInputDefinition = DocumentInputBase & {
612
+ kind: 'control';
613
+ control: ControlDefinition;
614
+ exports?: DocumentInputExportKey[];
615
+ };
616
+
617
+ export declare type DocumentDefinition = {
618
+ version: 1;
619
+ page: DocumentPageSetup;
620
+ runtime?: DocumentRuntimeSettings;
621
+ inputs?: DocumentInputDefinition[];
622
+ defaultInputValues?: Record<string, unknown>;
623
+ header?: DocumentHeaderRegion;
624
+ footer?: DocumentFooterRegion;
625
+ sections: DocumentSection[];
626
+ theme?: DocumentTheme;
627
+ };
628
+
629
+ export declare type DocumentFilterInputDefinition = DocumentInputBase & {
630
+ kind: 'filter';
631
+ filter: TFilter;
632
+ exports?: DocumentInputExportKey[];
633
+ };
634
+
635
+ export declare type DocumentFooterRegion = DocumentRegionBase & {
636
+ region: 'footer';
637
+ layout: {
638
+ type: 'preset';
639
+ preset: 'mvp_footer';
640
+ };
641
+ };
642
+
643
+ export declare type DocumentHeaderRegion = DocumentRegionBase & {
644
+ region: 'header';
645
+ layout: {
646
+ type: 'preset';
647
+ preset: 'mvp_header';
648
+ };
649
+ };
650
+
651
+ export declare type DocumentImageRegionBlock = DocumentRegionBlockBase & {
652
+ type: 'image';
653
+ role?: 'logo';
654
+ src: string;
655
+ alt?: string;
656
+ widthPx?: number;
657
+ };
658
+
659
+ export declare type DocumentInputBase = {
660
+ id: string;
661
+ label: string;
662
+ variableName: string;
663
+ requiredAtExecution: boolean;
664
+ documentPlacement?: 'input_bar';
665
+ description?: string;
666
+ };
667
+
668
+ export declare type DocumentInputDefinition = DocumentFilterInputDefinition | DocumentControlInputDefinition;
669
+
670
+ export declare type DocumentInputExportKey = 'label' | 'value' | 'start' | 'end' | 'range';
671
+
672
+ export declare type DocumentInputRuntimeValues = {
673
+ sheetId?: string;
674
+ filterValuesByInputId?: Record<string, TFilterValue | undefined>;
675
+ controlValuesByInputId?: Record<string, unknown>;
676
+ generatedAt?: string;
677
+ };
678
+
679
+ export declare type DocumentPageBreakSection = {
680
+ id: string;
681
+ type: 'page_break';
682
+ };
683
+
684
+ export declare type DocumentPageSetup = {
685
+ size: 'letter' | 'a4';
686
+ orientation: 'portrait' | 'landscape';
687
+ margins: {
688
+ top: number;
689
+ right: number;
690
+ bottom: number;
691
+ left: number;
692
+ unit: 'in' | 'mm';
693
+ };
694
+ };
695
+
696
+ export declare type DocumentRegion = DocumentHeaderRegion | DocumentFooterRegion;
697
+
698
+ export declare type DocumentRegionBase = {
699
+ enabled: boolean;
700
+ heightPx?: number;
701
+ layout: DocumentRegionLayout;
702
+ blocks: DocumentRegionBlock[];
703
+ };
704
+
705
+ export declare type DocumentRegionBlock = DocumentTextRegionBlock | DocumentImageRegionBlock;
706
+
707
+ export declare type DocumentRegionBlockBase = {
708
+ id: string;
709
+ area?: 'left' | 'center' | 'right' | 'title' | 'metadata' | 'note' | 'pageInfo';
710
+ };
711
+
712
+ export declare type DocumentRegionLayout = {
713
+ type: 'preset';
714
+ preset: 'mvp_header' | 'mvp_footer';
715
+ };
716
+
717
+ export declare type DocumentRuntimeSettings = {
718
+ generatedAtFormat?: string;
719
+ };
720
+
721
+ export declare type DocumentSection = DocumentTextSection | DocumentTableSection | DocumentChartSection | DocumentSpacerSection | DocumentPageBreakSection;
722
+
723
+ export declare type DocumentSpacerSection = {
724
+ id: string;
725
+ type: 'spacer';
726
+ heightPx: number;
727
+ };
728
+
729
+ export declare type DocumentTableDensity = 'comfortable' | 'standard' | 'compact' | 'dense';
730
+
731
+ export declare type DocumentTableGridLines = 'none' | 'outer' | 'inner' | 'horizontal' | 'vertical' | 'top' | 'right' | 'bottom' | 'left' | 'full';
732
+
733
+ export declare type DocumentTableHeaderStyle = 'plain' | 'filled' | 'accent';
734
+
735
+ export declare type DocumentTableSection = {
736
+ id: string;
737
+ type: 'table';
738
+ title?: string;
739
+ card: TCard;
740
+ table: {
741
+ totalsRow?: boolean;
742
+ columnFormatting?: Record<string, unknown>;
743
+ repeatHeaderOnPageBreak?: boolean;
744
+ rowHeightPx?: number;
745
+ style?: DocumentTableStyle;
746
+ };
747
+ };
748
+
749
+ export declare type DocumentTableStyle = {
750
+ density?: DocumentTableDensity;
751
+ headerStyle?: DocumentTableHeaderStyle;
752
+ headerBackgroundColor?: string;
753
+ headerTextColor?: string;
754
+ stripedRows?: boolean;
755
+ gridLines?: DocumentTableGridLines;
756
+ wrapText?: boolean;
757
+ };
758
+
759
+ export declare type DocumentTextContent = DocumentTextNode[];
760
+
761
+ export declare type DocumentTextInlineFormat = {
762
+ bold?: boolean;
763
+ italic?: boolean;
764
+ underline?: boolean;
765
+ };
766
+
767
+ export declare type DocumentTextNode = {
768
+ type: 'text';
769
+ value: string;
770
+ format?: DocumentTextInlineFormat;
771
+ } | {
772
+ type: 'variable';
773
+ ref: DocumentVariableRef;
774
+ format?: DocumentTextInlineFormat;
775
+ };
776
+
777
+ export declare type DocumentTextRegionBlock = DocumentRegionBlockBase & {
778
+ type: 'text';
779
+ role?: 'title' | 'metadata' | 'note' | 'pageInfo';
780
+ content: DocumentTextContent;
781
+ style?: DocumentTextStyle;
782
+ };
783
+
784
+ export declare type DocumentTextSection = {
785
+ id: string;
786
+ type: 'text';
787
+ content: DocumentTextContent;
788
+ style?: DocumentTextStyle;
789
+ };
790
+
791
+ export declare type DocumentTextStyle = {
792
+ fontSize?: number;
793
+ fontWeight?: 'normal' | 'medium' | 'semibold' | 'bold';
794
+ color?: string;
795
+ align?: 'left' | 'center' | 'right';
796
+ };
797
+
798
+ export declare type DocumentTheme = {
799
+ fontFamily?: string;
800
+ primaryColor?: string;
801
+ };
802
+
803
+ export declare type DocumentVariableRef = {
804
+ source: 'input';
805
+ inputId: string;
806
+ export: DocumentInputExportKey;
807
+ } | {
808
+ source: 'documentMeta';
809
+ key: 'generatedAt' | 'pageNumber' | 'pageCount';
810
+ };
811
+
577
812
  declare interface DrillDownInteraction {
578
813
  mode: 'drillDown';
579
814
  /**
@@ -1289,6 +1524,16 @@ declare type RelativeDateFilter = {
1289
1524
  to: number;
1290
1525
  };
1291
1526
 
1527
+ export declare type ResolvedDocumentInput = {
1528
+ inputId: string;
1529
+ variableName: string;
1530
+ rawValue: unknown;
1531
+ displayValue: string;
1532
+ filterValues?: TFilterValue[];
1533
+ controlValue?: unknown;
1534
+ exports: Record<string, string | number | boolean | null>;
1535
+ };
1536
+
1292
1537
  declare type ResolvedPrimaryDateField = {
1293
1538
  sourceDataset: string;
1294
1539
  sourceField: string;
@@ -1387,6 +1632,14 @@ export declare type StyleProps = {
1387
1632
  };
1388
1633
  };
1389
1634
 
1635
+ /**
1636
+ * Row rhythm for the whole table. Authors pick one per card; undefined
1637
+ * falls back to 'compact' (the canonical default — dense scanning, matches
1638
+ * the Linear-style spec). Drives row padding, cell font size, and header
1639
+ * font size via a shared density spec in DataTable.
1640
+ */
1641
+ declare type TableDensity = 'dense' | 'compact' | 'standard' | 'comfortable' | 'spacious';
1642
+
1390
1643
  declare type TablePreferences = {
1391
1644
  columnSettingsMap?: ColumnSettingsMap;
1392
1645
  selectColumnVisible?: boolean;
@@ -1395,6 +1648,8 @@ declare type TablePreferences = {
1395
1648
  pageSize?: number;
1396
1649
  enableDevModePagination?: boolean;
1397
1650
  forceClientPagination?: boolean;
1651
+ density?: TableDensity;
1652
+ documentWrapText?: boolean;
1398
1653
  };
1399
1654
 
1400
1655
  /**
@@ -2119,11 +2374,26 @@ export declare type TLens = {
2119
2374
  /** Line dash style options */
2120
2375
  export declare type TLineStyle = 'solid' | 'dashed' | 'dotted' | 'dash-dot';
2121
2376
 
2377
+ /**
2378
+ * Per-column contribution to the table-level totals row (`<tfoot>`).
2379
+ * Additive and optional — omitting it keeps the cell empty in the footer,
2380
+ * matching existing behavior when a totals row is not needed.
2381
+ *
2382
+ * - 'sum' → aggregate the column across the full dataset
2383
+ * - 'avg' → arithmetic mean across the full dataset
2384
+ * - 'count' → non-null count across the full dataset
2385
+ * - 'label' → render `totalsLabel` (or 'Total') as static text — typically
2386
+ * on the first column so the footer reads as a labeled row
2387
+ * - 'none' → blank cell in the footer
2388
+ */
2389
+ declare type TotalsBehavior = 'sum' | 'avg' | 'count' | 'label' | 'none';
2390
+
2122
2391
  /** Point style options supported by Chart.js */
2123
2392
  export declare type TPointStyle = 'circle' | 'cross' | 'crossRot' | 'dash' | 'line' | 'rect' | 'rectRounded' | 'rectRot' | 'star' | 'triangle';
2124
2393
 
2125
2394
  export declare type TSheet = {
2126
2395
  id: string;
2396
+ kind?: 'dashboard' | 'document';
2127
2397
  title?: string;
2128
2398
  description?: string;
2129
2399
  layout?: ReactGridLayout.Layout[];
@@ -2131,6 +2401,7 @@ export declare type TSheet = {
2131
2401
  cards?: TCard[];
2132
2402
  frames?: TFrame[];
2133
2403
  calculatedFields?: Field[];
2404
+ document?: DocumentDefinition;
2134
2405
  };
2135
2406
 
2136
2407
  /**