react-semaphor 0.1.295 → 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-BdoTYzuj.js → braces-BNXseceK.js} +1 -1
  2. package/dist/chunks/{braces-DWldEFn5.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-XwenlcXw.js → dashboard-filter-controls-button-xPaIlNHP.js} +501 -495
  7. package/dist/chunks/{dashboard-json-CU55qPXj.js → dashboard-json-cuj9vYY9.js} +1 -1
  8. package/dist/chunks/{dashboard-json-V6m6lJ_c.js → dashboard-json-ovQyHWw6.js} +1 -1
  9. package/dist/chunks/{dashboard-summary-settings-dialog-DRLPzp1P.js → dashboard-summary-settings-dialog-BUg3Qyhh.js} +1 -1
  10. package/dist/chunks/{dashboard-summary-settings-dialog-0CIiWsKc.js → dashboard-summary-settings-dialog-DF076HeJ.js} +1 -1
  11. package/dist/chunks/{edit-dashboard-visual-8ha6EM_g.js → edit-dashboard-visual-32TAM00c.js} +5331 -5303
  12. package/dist/chunks/edit-dashboard-visual-BtiMcO-L.js +183 -0
  13. package/dist/chunks/{index-14M0TnH6.js → index-BDeJH9hO.js} +103265 -88338
  14. package/dist/chunks/index-Dbrs96G8.js +1533 -0
  15. package/dist/chunks/{resource-management-panel-CcDAn86l.js → resource-management-panel-2qcXsKwg.js} +2 -2
  16. package/dist/chunks/{resource-management-panel-BL5-5ouC.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-D3PxfjYv.js → use-create-flow-overlay-state-CHeppRNE.js} +572 -568
  19. package/dist/chunks/{use-visual-utils-CdIOq4nt.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 +235 -1
  29. package/dist/types/main.d.ts +288 -1
  30. package/dist/types/shared.d.ts +204 -1
  31. package/dist/types/surfboard.d.ts +235 -1
  32. package/dist/types/types.d.ts +235 -1
  33. package/package.json +7 -1
  34. package/dist/chunks/dashboard-controls-B3lrnI_r.js +0 -47
  35. package/dist/chunks/dashboard-controls-D7U6E1sB.js +0 -2014
  36. package/dist/chunks/dashboard-filter-controls-button-D0AsV28-.js +0 -11
  37. package/dist/chunks/edit-dashboard-visual-sSLAkmgf.js +0 -183
  38. package/dist/chunks/index-Ze8VskG1.js +0 -1435
  39. package/dist/chunks/use-create-flow-overlay-state-BbQVNDCj.js +0 -21
  40. package/dist/chunks/use-visual-utils-kh8p2QFm.js +0 -1
@@ -483,6 +483,206 @@ declare type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowfla
483
483
 
484
484
  declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
485
485
 
486
+ declare type DocumentChartSection = {
487
+ id: string;
488
+ type: 'chart';
489
+ title?: string;
490
+ card: TCard;
491
+ heightPx: number;
492
+ };
493
+
494
+ declare type DocumentControlInputDefinition = DocumentInputBase & {
495
+ kind: 'control';
496
+ control: ControlDefinition;
497
+ exports?: DocumentInputExportKey[];
498
+ };
499
+
500
+ declare type DocumentDefinition = {
501
+ version: 1;
502
+ page: DocumentPageSetup;
503
+ runtime?: DocumentRuntimeSettings;
504
+ inputs?: DocumentInputDefinition[];
505
+ defaultInputValues?: Record<string, unknown>;
506
+ header?: DocumentHeaderRegion;
507
+ footer?: DocumentFooterRegion;
508
+ sections: DocumentSection[];
509
+ theme?: DocumentTheme;
510
+ };
511
+
512
+ declare type DocumentFilterInputDefinition = DocumentInputBase & {
513
+ kind: 'filter';
514
+ filter: TFilter;
515
+ exports?: DocumentInputExportKey[];
516
+ };
517
+
518
+ declare type DocumentFooterRegion = DocumentRegionBase & {
519
+ region: 'footer';
520
+ layout: {
521
+ type: 'preset';
522
+ preset: 'mvp_footer';
523
+ };
524
+ };
525
+
526
+ declare type DocumentHeaderRegion = DocumentRegionBase & {
527
+ region: 'header';
528
+ layout: {
529
+ type: 'preset';
530
+ preset: 'mvp_header';
531
+ };
532
+ };
533
+
534
+ declare type DocumentImageRegionBlock = DocumentRegionBlockBase & {
535
+ type: 'image';
536
+ role?: 'logo';
537
+ src: string;
538
+ alt?: string;
539
+ widthPx?: number;
540
+ };
541
+
542
+ declare type DocumentInputBase = {
543
+ id: string;
544
+ label: string;
545
+ variableName: string;
546
+ requiredAtExecution: boolean;
547
+ documentPlacement?: 'input_bar';
548
+ description?: string;
549
+ };
550
+
551
+ declare type DocumentInputDefinition = DocumentFilterInputDefinition | DocumentControlInputDefinition;
552
+
553
+ declare type DocumentInputExportKey = 'label' | 'value' | 'start' | 'end' | 'range';
554
+
555
+ declare type DocumentPageBreakSection = {
556
+ id: string;
557
+ type: 'page_break';
558
+ };
559
+
560
+ declare type DocumentPageSetup = {
561
+ size: 'letter' | 'a4';
562
+ orientation: 'portrait' | 'landscape';
563
+ margins: {
564
+ top: number;
565
+ right: number;
566
+ bottom: number;
567
+ left: number;
568
+ unit: 'in' | 'mm';
569
+ };
570
+ };
571
+
572
+ declare type DocumentRegionBase = {
573
+ enabled: boolean;
574
+ heightPx?: number;
575
+ layout: DocumentRegionLayout;
576
+ blocks: DocumentRegionBlock[];
577
+ };
578
+
579
+ declare type DocumentRegionBlock = DocumentTextRegionBlock | DocumentImageRegionBlock;
580
+
581
+ declare type DocumentRegionBlockBase = {
582
+ id: string;
583
+ area?: 'left' | 'center' | 'right' | 'title' | 'metadata' | 'note' | 'pageInfo';
584
+ };
585
+
586
+ declare type DocumentRegionLayout = {
587
+ type: 'preset';
588
+ preset: 'mvp_header' | 'mvp_footer';
589
+ };
590
+
591
+ declare type DocumentRuntimeSettings = {
592
+ generatedAtFormat?: string;
593
+ };
594
+
595
+ declare type DocumentSection = DocumentTextSection | DocumentTableSection | DocumentChartSection | DocumentSpacerSection | DocumentPageBreakSection;
596
+
597
+ declare type DocumentSpacerSection = {
598
+ id: string;
599
+ type: 'spacer';
600
+ heightPx: number;
601
+ };
602
+
603
+ declare type DocumentTableDensity = 'comfortable' | 'standard' | 'compact' | 'dense';
604
+
605
+ declare type DocumentTableGridLines = 'none' | 'outer' | 'inner' | 'horizontal' | 'vertical' | 'top' | 'right' | 'bottom' | 'left' | 'full';
606
+
607
+ declare type DocumentTableHeaderStyle = 'plain' | 'filled' | 'accent';
608
+
609
+ declare type DocumentTableSection = {
610
+ id: string;
611
+ type: 'table';
612
+ title?: string;
613
+ card: TCard;
614
+ table: {
615
+ totalsRow?: boolean;
616
+ columnFormatting?: Record<string, unknown>;
617
+ repeatHeaderOnPageBreak?: boolean;
618
+ rowHeightPx?: number;
619
+ style?: DocumentTableStyle;
620
+ };
621
+ };
622
+
623
+ declare type DocumentTableStyle = {
624
+ density?: DocumentTableDensity;
625
+ headerStyle?: DocumentTableHeaderStyle;
626
+ headerBackgroundColor?: string;
627
+ headerTextColor?: string;
628
+ stripedRows?: boolean;
629
+ gridLines?: DocumentTableGridLines;
630
+ wrapText?: boolean;
631
+ };
632
+
633
+ declare type DocumentTextContent = DocumentTextNode[];
634
+
635
+ declare type DocumentTextInlineFormat = {
636
+ bold?: boolean;
637
+ italic?: boolean;
638
+ underline?: boolean;
639
+ };
640
+
641
+ declare type DocumentTextNode = {
642
+ type: 'text';
643
+ value: string;
644
+ format?: DocumentTextInlineFormat;
645
+ } | {
646
+ type: 'variable';
647
+ ref: DocumentVariableRef;
648
+ format?: DocumentTextInlineFormat;
649
+ };
650
+
651
+ declare type DocumentTextRegionBlock = DocumentRegionBlockBase & {
652
+ type: 'text';
653
+ role?: 'title' | 'metadata' | 'note' | 'pageInfo';
654
+ content: DocumentTextContent;
655
+ style?: DocumentTextStyle;
656
+ };
657
+
658
+ declare type DocumentTextSection = {
659
+ id: string;
660
+ type: 'text';
661
+ content: DocumentTextContent;
662
+ style?: DocumentTextStyle;
663
+ };
664
+
665
+ declare type DocumentTextStyle = {
666
+ fontSize?: number;
667
+ fontWeight?: 'normal' | 'medium' | 'semibold' | 'bold';
668
+ color?: string;
669
+ align?: 'left' | 'center' | 'right';
670
+ };
671
+
672
+ declare type DocumentTheme = {
673
+ fontFamily?: string;
674
+ primaryColor?: string;
675
+ };
676
+
677
+ declare type DocumentVariableRef = {
678
+ source: 'input';
679
+ inputId: string;
680
+ export: DocumentInputExportKey;
681
+ } | {
682
+ source: 'documentMeta';
683
+ key: 'generatedAt' | 'pageNumber' | 'pageCount';
684
+ };
685
+
486
686
  declare interface DrillDownInteraction {
487
687
  mode: 'drillDown';
488
688
  /**
@@ -1224,7 +1424,7 @@ declare type StyleProps = {
1224
1424
  * the Linear-style spec). Drives row padding, cell font size, and header
1225
1425
  * font size via a shared density spec in DataTable.
1226
1426
  */
1227
- declare type TableDensity = 'compact' | 'comfortable' | 'spacious';
1427
+ declare type TableDensity = 'dense' | 'compact' | 'standard' | 'comfortable' | 'spacious';
1228
1428
 
1229
1429
  declare type TablePreferences = {
1230
1430
  columnSettingsMap?: ColumnSettingsMap;
@@ -1235,6 +1435,7 @@ declare type TablePreferences = {
1235
1435
  enableDevModePagination?: boolean;
1236
1436
  forceClientPagination?: boolean;
1237
1437
  density?: TableDensity;
1438
+ documentWrapText?: boolean;
1238
1439
  };
1239
1440
 
1240
1441
  /**
@@ -1933,6 +2134,7 @@ declare type TPointStyle = 'circle' | 'cross' | 'crossRot' | 'dash' | 'line' | '
1933
2134
 
1934
2135
  declare type TSheet = {
1935
2136
  id: string;
2137
+ kind?: 'dashboard' | 'document';
1936
2138
  title?: string;
1937
2139
  description?: string;
1938
2140
  layout?: ReactGridLayout.Layout[];
@@ -1940,6 +2142,7 @@ declare type TSheet = {
1940
2142
  cards?: TCard[];
1941
2143
  frames?: TFrame[];
1942
2144
  calculatedFields?: Field[];
2145
+ document?: DocumentDefinition;
1943
2146
  };
1944
2147
 
1945
2148
  /**
@@ -470,6 +470,18 @@ export declare type DashboardProps = {
470
470
  cardControlDefinitions?: ControlDefinition[];
471
471
  controlBindings?: ControlBinding[];
472
472
  };
473
+ /**
474
+ * Document-local runtime values for print/render entry points. Values are
475
+ * keyed by document input id and are intentionally separate from dashboard
476
+ * filters/controls.
477
+ */
478
+ documentInputValues?: DocumentInputRuntimeValues;
479
+ /**
480
+ * Render target for print entry points. Generic dashboard PDF exports also
481
+ * use cardDisplay.mode="print"; document-specific print handling must only
482
+ * run when this is explicitly "document".
483
+ */
484
+ renderMode?: 'dashboard' | 'document';
473
485
  customStyle?: TStyle;
474
486
  currentTheme?: Theme;
475
487
  version?: string;
@@ -608,6 +620,215 @@ declare type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowfla
608
620
 
609
621
  export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
610
622
 
623
+ export declare type DocumentChartSection = {
624
+ id: string;
625
+ type: 'chart';
626
+ title?: string;
627
+ card: TCard;
628
+ heightPx: number;
629
+ };
630
+
631
+ export declare type DocumentControlInputDefinition = DocumentInputBase & {
632
+ kind: 'control';
633
+ control: ControlDefinition;
634
+ exports?: DocumentInputExportKey[];
635
+ };
636
+
637
+ export declare type DocumentDefinition = {
638
+ version: 1;
639
+ page: DocumentPageSetup;
640
+ runtime?: DocumentRuntimeSettings;
641
+ inputs?: DocumentInputDefinition[];
642
+ defaultInputValues?: Record<string, unknown>;
643
+ header?: DocumentHeaderRegion;
644
+ footer?: DocumentFooterRegion;
645
+ sections: DocumentSection[];
646
+ theme?: DocumentTheme;
647
+ };
648
+
649
+ export declare type DocumentFilterInputDefinition = DocumentInputBase & {
650
+ kind: 'filter';
651
+ filter: TFilter;
652
+ exports?: DocumentInputExportKey[];
653
+ };
654
+
655
+ export declare type DocumentFooterRegion = DocumentRegionBase & {
656
+ region: 'footer';
657
+ layout: {
658
+ type: 'preset';
659
+ preset: 'mvp_footer';
660
+ };
661
+ };
662
+
663
+ export declare type DocumentHeaderRegion = DocumentRegionBase & {
664
+ region: 'header';
665
+ layout: {
666
+ type: 'preset';
667
+ preset: 'mvp_header';
668
+ };
669
+ };
670
+
671
+ export declare type DocumentImageRegionBlock = DocumentRegionBlockBase & {
672
+ type: 'image';
673
+ role?: 'logo';
674
+ src: string;
675
+ alt?: string;
676
+ widthPx?: number;
677
+ };
678
+
679
+ export declare type DocumentInputBase = {
680
+ id: string;
681
+ label: string;
682
+ variableName: string;
683
+ requiredAtExecution: boolean;
684
+ documentPlacement?: 'input_bar';
685
+ description?: string;
686
+ };
687
+
688
+ export declare type DocumentInputDefinition = DocumentFilterInputDefinition | DocumentControlInputDefinition;
689
+
690
+ export declare type DocumentInputExportKey = 'label' | 'value' | 'start' | 'end' | 'range';
691
+
692
+ export declare type DocumentInputRuntimeValues = {
693
+ sheetId?: string;
694
+ filterValuesByInputId?: Record<string, TFilterValue | undefined>;
695
+ controlValuesByInputId?: Record<string, unknown>;
696
+ generatedAt?: string;
697
+ };
698
+
699
+ export declare type DocumentPageBreakSection = {
700
+ id: string;
701
+ type: 'page_break';
702
+ };
703
+
704
+ export declare type DocumentPageSetup = {
705
+ size: 'letter' | 'a4';
706
+ orientation: 'portrait' | 'landscape';
707
+ margins: {
708
+ top: number;
709
+ right: number;
710
+ bottom: number;
711
+ left: number;
712
+ unit: 'in' | 'mm';
713
+ };
714
+ };
715
+
716
+ export declare type DocumentRegion = DocumentHeaderRegion | DocumentFooterRegion;
717
+
718
+ export declare type DocumentRegionBase = {
719
+ enabled: boolean;
720
+ heightPx?: number;
721
+ layout: DocumentRegionLayout;
722
+ blocks: DocumentRegionBlock[];
723
+ };
724
+
725
+ export declare type DocumentRegionBlock = DocumentTextRegionBlock | DocumentImageRegionBlock;
726
+
727
+ export declare type DocumentRegionBlockBase = {
728
+ id: string;
729
+ area?: 'left' | 'center' | 'right' | 'title' | 'metadata' | 'note' | 'pageInfo';
730
+ };
731
+
732
+ export declare type DocumentRegionLayout = {
733
+ type: 'preset';
734
+ preset: 'mvp_header' | 'mvp_footer';
735
+ };
736
+
737
+ export declare type DocumentRuntimeSettings = {
738
+ generatedAtFormat?: string;
739
+ };
740
+
741
+ export declare type DocumentSection = DocumentTextSection | DocumentTableSection | DocumentChartSection | DocumentSpacerSection | DocumentPageBreakSection;
742
+
743
+ export declare type DocumentSpacerSection = {
744
+ id: string;
745
+ type: 'spacer';
746
+ heightPx: number;
747
+ };
748
+
749
+ export declare type DocumentTableDensity = 'comfortable' | 'standard' | 'compact' | 'dense';
750
+
751
+ export declare type DocumentTableGridLines = 'none' | 'outer' | 'inner' | 'horizontal' | 'vertical' | 'top' | 'right' | 'bottom' | 'left' | 'full';
752
+
753
+ export declare type DocumentTableHeaderStyle = 'plain' | 'filled' | 'accent';
754
+
755
+ export declare type DocumentTableSection = {
756
+ id: string;
757
+ type: 'table';
758
+ title?: string;
759
+ card: TCard;
760
+ table: {
761
+ totalsRow?: boolean;
762
+ columnFormatting?: Record<string, unknown>;
763
+ repeatHeaderOnPageBreak?: boolean;
764
+ rowHeightPx?: number;
765
+ style?: DocumentTableStyle;
766
+ };
767
+ };
768
+
769
+ export declare type DocumentTableStyle = {
770
+ density?: DocumentTableDensity;
771
+ headerStyle?: DocumentTableHeaderStyle;
772
+ headerBackgroundColor?: string;
773
+ headerTextColor?: string;
774
+ stripedRows?: boolean;
775
+ gridLines?: DocumentTableGridLines;
776
+ wrapText?: boolean;
777
+ };
778
+
779
+ export declare type DocumentTextContent = DocumentTextNode[];
780
+
781
+ export declare type DocumentTextInlineFormat = {
782
+ bold?: boolean;
783
+ italic?: boolean;
784
+ underline?: boolean;
785
+ };
786
+
787
+ export declare type DocumentTextNode = {
788
+ type: 'text';
789
+ value: string;
790
+ format?: DocumentTextInlineFormat;
791
+ } | {
792
+ type: 'variable';
793
+ ref: DocumentVariableRef;
794
+ format?: DocumentTextInlineFormat;
795
+ };
796
+
797
+ export declare type DocumentTextRegionBlock = DocumentRegionBlockBase & {
798
+ type: 'text';
799
+ role?: 'title' | 'metadata' | 'note' | 'pageInfo';
800
+ content: DocumentTextContent;
801
+ style?: DocumentTextStyle;
802
+ };
803
+
804
+ export declare type DocumentTextSection = {
805
+ id: string;
806
+ type: 'text';
807
+ content: DocumentTextContent;
808
+ style?: DocumentTextStyle;
809
+ };
810
+
811
+ export declare type DocumentTextStyle = {
812
+ fontSize?: number;
813
+ fontWeight?: 'normal' | 'medium' | 'semibold' | 'bold';
814
+ color?: string;
815
+ align?: 'left' | 'center' | 'right';
816
+ };
817
+
818
+ export declare type DocumentTheme = {
819
+ fontFamily?: string;
820
+ primaryColor?: string;
821
+ };
822
+
823
+ export declare type DocumentVariableRef = {
824
+ source: 'input';
825
+ inputId: string;
826
+ export: DocumentInputExportKey;
827
+ } | {
828
+ source: 'documentMeta';
829
+ key: 'generatedAt' | 'pageNumber' | 'pageCount';
830
+ };
831
+
611
832
  declare interface DrillDownInteraction {
612
833
  mode: 'drillDown';
613
834
  /**
@@ -1323,6 +1544,16 @@ declare type RelativeDateFilter = {
1323
1544
  to: number;
1324
1545
  };
1325
1546
 
1547
+ export declare type ResolvedDocumentInput = {
1548
+ inputId: string;
1549
+ variableName: string;
1550
+ rawValue: unknown;
1551
+ displayValue: string;
1552
+ filterValues?: TFilterValue[];
1553
+ controlValue?: unknown;
1554
+ exports: Record<string, string | number | boolean | null>;
1555
+ };
1556
+
1326
1557
  declare type ResolvedPrimaryDateField = {
1327
1558
  sourceDataset: string;
1328
1559
  sourceField: string;
@@ -1429,7 +1660,7 @@ export declare function Surfboard({ showControls, showFooter, ...rest }: Dashboa
1429
1660
  * the Linear-style spec). Drives row padding, cell font size, and header
1430
1661
  * font size via a shared density spec in DataTable.
1431
1662
  */
1432
- declare type TableDensity = 'compact' | 'comfortable' | 'spacious';
1663
+ declare type TableDensity = 'dense' | 'compact' | 'standard' | 'comfortable' | 'spacious';
1433
1664
 
1434
1665
  declare type TablePreferences = {
1435
1666
  columnSettingsMap?: ColumnSettingsMap;
@@ -1440,6 +1671,7 @@ declare type TablePreferences = {
1440
1671
  enableDevModePagination?: boolean;
1441
1672
  forceClientPagination?: boolean;
1442
1673
  density?: TableDensity;
1674
+ documentWrapText?: boolean;
1443
1675
  };
1444
1676
 
1445
1677
  /**
@@ -2183,6 +2415,7 @@ export declare type TPointStyle = 'circle' | 'cross' | 'crossRot' | 'dash' | 'li
2183
2415
 
2184
2416
  export declare type TSheet = {
2185
2417
  id: string;
2418
+ kind?: 'dashboard' | 'document';
2186
2419
  title?: string;
2187
2420
  description?: string;
2188
2421
  layout?: ReactGridLayout.Layout[];
@@ -2190,6 +2423,7 @@ export declare type TSheet = {
2190
2423
  cards?: TCard[];
2191
2424
  frames?: TFrame[];
2192
2425
  calculatedFields?: Field[];
2426
+ document?: DocumentDefinition;
2193
2427
  };
2194
2428
 
2195
2429
  /**