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
@@ -76,6 +76,20 @@ declare type Actions_2 = {
76
76
  addSheet: (sheet: TSheet) => void;
77
77
  deleteSheet: (sheetId: string) => void;
78
78
  setSheetTitle: (sheetId: string, title: string) => void;
79
+ updateSheetDocument: (sheetId: string, updater: (document: DocumentDefinition) => DocumentDefinition) => void;
80
+ updateDocumentSectionCard: (sheetId: string, sectionId: string, card: TCard, options?: {
81
+ calculatedFields?: Field[];
82
+ }) => void;
83
+ setSelectedDocumentSectionId: (sheetId: string, sectionId: string | null) => void;
84
+ setDocumentInspectorTab: (sheetId: string, tab: DocumentInspectorTab) => void;
85
+ setDocumentInputFilterValues: (sheetId: string, valuesByInputId: Record<string, TFilterValue | undefined>) => void;
86
+ setDocumentInputFilterValue: (sheetId: string, inputId: string, filterValue: TFilterValue) => void;
87
+ removeDocumentInputFilterValue: (sheetId: string, inputId: string) => void;
88
+ setDocumentInputFilterModes: (sheetId: string, modesByInputId: Record<string, DocumentFilterMode>) => void;
89
+ setDocumentInputFilterMode: (sheetId: string, inputId: string, filterMode: DocumentFilterMode) => void;
90
+ setDocumentInputControlValues: (sheetId: string, valuesByInputId: Record<string, unknown>) => void;
91
+ setDocumentInputControlValue: (sheetId: string, inputId: string, value: unknown) => void;
92
+ clearDocumentInputRuntime: (sheetId?: string) => void;
79
93
  setSelectedSheetId: (sheetId: string | null) => void;
80
94
  setSheetLayout: (sheetId: string, layout: default_2.Layout[]) => void;
81
95
  setSheetLayouts: (sheetId: string, layouts: default_2.Layouts) => void;
@@ -284,6 +298,8 @@ declare type Actions_3 = TableActions & ExplorerActions & DrillActions & {
284
298
  setOnTableChange: (onTableChange: (tableNmae: string) => void) => void;
285
299
  setOnSave: (onSave: (card: TFrame) => void) => void;
286
300
  setOnClose: (onClose: () => void) => void;
301
+ setEditorContext: (context: EditorContext) => void;
302
+ clearEditorContext: () => void;
287
303
  };
288
304
 
289
305
  /**
@@ -1073,6 +1089,12 @@ declare interface ColumnSettings {
1073
1089
  maxWidth?: number;
1074
1090
  textOverflow?: 'ellipsis' | 'wrap' | 'clip';
1075
1091
  textWrap: 'wrap' | 'nowrap';
1092
+ /**
1093
+ * Totals-row behavior for this column. Undefined = 'none'. The footer
1094
+ * renders only when at least one visible column has a non-'none' behavior.
1095
+ */
1096
+ totalsBehavior?: TotalsBehavior;
1097
+ totalsLabel?: string;
1076
1098
  numberFormat: {
1077
1099
  style: 'decimal' | 'currency' | 'percent' | 'scientific';
1078
1100
  currency: string;
@@ -1085,6 +1107,14 @@ declare interface ColumnSettings {
1085
1107
  dataBarColor: string;
1086
1108
  dataBarMinValue?: number;
1087
1109
  dataBarMaxValue?: number;
1110
+ /**
1111
+ * When true, render the cell bg with a heatmap intensity tint scaled
1112
+ * across the column's value range. Composes with the existing text
1113
+ * color/color-range logic (tint is bg only). `showDataBar` takes
1114
+ * precedence when both are set — per the canonical design, a cell is
1115
+ * either a data-bar or a heatmap, never both.
1116
+ */
1117
+ showHeatmap?: boolean;
1088
1118
  };
1089
1119
  dateFormat: {
1090
1120
  format: string;
@@ -1434,6 +1464,18 @@ export declare type DashboardProps = {
1434
1464
  cardControlDefinitions?: ControlDefinition[];
1435
1465
  controlBindings?: ControlBinding[];
1436
1466
  };
1467
+ /**
1468
+ * Document-local runtime values for print/render entry points. Values are
1469
+ * keyed by document input id and are intentionally separate from dashboard
1470
+ * filters/controls.
1471
+ */
1472
+ documentInputValues?: DocumentInputRuntimeValues;
1473
+ /**
1474
+ * Render target for print entry points. Generic dashboard PDF exports also
1475
+ * use cardDisplay.mode="print"; document-specific print handling must only
1476
+ * run when this is explicitly "document".
1477
+ */
1478
+ renderMode?: 'dashboard' | 'document';
1437
1479
  customStyle?: TStyle;
1438
1480
  currentTheme?: Theme;
1439
1481
  version?: string;
@@ -1479,6 +1521,9 @@ export declare type DashboardStore = {
1479
1521
  selectedFrameId?: string | null;
1480
1522
  selectedCardId?: string | null;
1481
1523
  selectedCard?: TCard | null;
1524
+ selectedDocumentSectionIdsBySheetId: Record<string, string | null>;
1525
+ documentInspectorTabsBySheetId: Record<string, DocumentInspectorTab>;
1526
+ documentInputRuntimeBySheetId: Record<string, DocumentInputRuntimeState>;
1482
1527
  /**
1483
1528
  * Pending sheet-wide frame rewrites produced while visual editing. These stay
1484
1529
  * draft-only until the editor Save path applies the current frame.
@@ -1691,6 +1736,225 @@ export declare type DimensionInputReference = {
1691
1736
 
1692
1737
  export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
1693
1738
 
1739
+ export declare type DocumentChartSection = {
1740
+ id: string;
1741
+ type: 'chart';
1742
+ title?: string;
1743
+ card: TCard;
1744
+ heightPx: number;
1745
+ };
1746
+
1747
+ export declare type DocumentControlInputDefinition = DocumentInputBase & {
1748
+ kind: 'control';
1749
+ control: ControlDefinition;
1750
+ exports?: DocumentInputExportKey[];
1751
+ };
1752
+
1753
+ export declare type DocumentDefinition = {
1754
+ version: 1;
1755
+ page: DocumentPageSetup;
1756
+ runtime?: DocumentRuntimeSettings;
1757
+ inputs?: DocumentInputDefinition[];
1758
+ defaultInputValues?: Record<string, unknown>;
1759
+ header?: DocumentHeaderRegion;
1760
+ footer?: DocumentFooterRegion;
1761
+ sections: DocumentSection[];
1762
+ theme?: DocumentTheme;
1763
+ };
1764
+
1765
+ export declare type DocumentFilterInputDefinition = DocumentInputBase & {
1766
+ kind: 'filter';
1767
+ filter: TFilter;
1768
+ exports?: DocumentInputExportKey[];
1769
+ };
1770
+
1771
+ declare type DocumentFilterMode = 'include' | 'exclude';
1772
+
1773
+ export declare type DocumentFooterRegion = DocumentRegionBase & {
1774
+ region: 'footer';
1775
+ layout: {
1776
+ type: 'preset';
1777
+ preset: 'mvp_footer';
1778
+ };
1779
+ };
1780
+
1781
+ export declare type DocumentHeaderRegion = DocumentRegionBase & {
1782
+ region: 'header';
1783
+ layout: {
1784
+ type: 'preset';
1785
+ preset: 'mvp_header';
1786
+ };
1787
+ };
1788
+
1789
+ export declare type DocumentImageRegionBlock = DocumentRegionBlockBase & {
1790
+ type: 'image';
1791
+ role?: 'logo';
1792
+ src: string;
1793
+ alt?: string;
1794
+ widthPx?: number;
1795
+ };
1796
+
1797
+ export declare type DocumentInputBase = {
1798
+ id: string;
1799
+ label: string;
1800
+ variableName: string;
1801
+ requiredAtExecution: boolean;
1802
+ documentPlacement?: 'input_bar';
1803
+ description?: string;
1804
+ };
1805
+
1806
+ export declare type DocumentInputDefinition = DocumentFilterInputDefinition | DocumentControlInputDefinition;
1807
+
1808
+ export declare type DocumentInputExportKey = 'label' | 'value' | 'start' | 'end' | 'range';
1809
+
1810
+ export declare type DocumentInputRuntimeState = {
1811
+ filterValuesByInputId: Record<string, TFilterValue | undefined>;
1812
+ filterModesByInputId: Record<string, DocumentFilterMode>;
1813
+ controlValuesByInputId: Record<string, unknown>;
1814
+ };
1815
+
1816
+ export declare type DocumentInputRuntimeValues = {
1817
+ sheetId?: string;
1818
+ filterValuesByInputId?: Record<string, TFilterValue | undefined>;
1819
+ controlValuesByInputId?: Record<string, unknown>;
1820
+ generatedAt?: string;
1821
+ };
1822
+
1823
+ export declare type DocumentInspectorTab = 'section' | 'page' | 'header' | 'footer' | 'inputs';
1824
+
1825
+ export declare type DocumentPageBreakSection = {
1826
+ id: string;
1827
+ type: 'page_break';
1828
+ };
1829
+
1830
+ export declare type DocumentPageSetup = {
1831
+ size: 'letter' | 'a4';
1832
+ orientation: 'portrait' | 'landscape';
1833
+ margins: {
1834
+ top: number;
1835
+ right: number;
1836
+ bottom: number;
1837
+ left: number;
1838
+ unit: 'in' | 'mm';
1839
+ };
1840
+ };
1841
+
1842
+ export declare type DocumentRegion = DocumentHeaderRegion | DocumentFooterRegion;
1843
+
1844
+ export declare type DocumentRegionBase = {
1845
+ enabled: boolean;
1846
+ heightPx?: number;
1847
+ layout: DocumentRegionLayout;
1848
+ blocks: DocumentRegionBlock[];
1849
+ };
1850
+
1851
+ export declare type DocumentRegionBlock = DocumentTextRegionBlock | DocumentImageRegionBlock;
1852
+
1853
+ export declare type DocumentRegionBlockBase = {
1854
+ id: string;
1855
+ area?: 'left' | 'center' | 'right' | 'title' | 'metadata' | 'note' | 'pageInfo';
1856
+ };
1857
+
1858
+ export declare type DocumentRegionLayout = {
1859
+ type: 'preset';
1860
+ preset: 'mvp_header' | 'mvp_footer';
1861
+ };
1862
+
1863
+ export declare type DocumentRuntimeSettings = {
1864
+ generatedAtFormat?: string;
1865
+ };
1866
+
1867
+ export declare type DocumentSection = DocumentTextSection | DocumentTableSection | DocumentChartSection | DocumentSpacerSection | DocumentPageBreakSection;
1868
+
1869
+ export declare type DocumentSpacerSection = {
1870
+ id: string;
1871
+ type: 'spacer';
1872
+ heightPx: number;
1873
+ };
1874
+
1875
+ export declare type DocumentTableDensity = 'comfortable' | 'standard' | 'compact' | 'dense';
1876
+
1877
+ export declare type DocumentTableGridLines = 'none' | 'outer' | 'inner' | 'horizontal' | 'vertical' | 'top' | 'right' | 'bottom' | 'left' | 'full';
1878
+
1879
+ export declare type DocumentTableHeaderStyle = 'plain' | 'filled' | 'accent';
1880
+
1881
+ export declare type DocumentTableSection = {
1882
+ id: string;
1883
+ type: 'table';
1884
+ title?: string;
1885
+ card: TCard;
1886
+ table: {
1887
+ totalsRow?: boolean;
1888
+ columnFormatting?: Record<string, unknown>;
1889
+ repeatHeaderOnPageBreak?: boolean;
1890
+ rowHeightPx?: number;
1891
+ style?: DocumentTableStyle;
1892
+ };
1893
+ };
1894
+
1895
+ export declare type DocumentTableStyle = {
1896
+ density?: DocumentTableDensity;
1897
+ headerStyle?: DocumentTableHeaderStyle;
1898
+ headerBackgroundColor?: string;
1899
+ headerTextColor?: string;
1900
+ stripedRows?: boolean;
1901
+ gridLines?: DocumentTableGridLines;
1902
+ wrapText?: boolean;
1903
+ };
1904
+
1905
+ export declare type DocumentTextContent = DocumentTextNode[];
1906
+
1907
+ export declare type DocumentTextInlineFormat = {
1908
+ bold?: boolean;
1909
+ italic?: boolean;
1910
+ underline?: boolean;
1911
+ };
1912
+
1913
+ export declare type DocumentTextNode = {
1914
+ type: 'text';
1915
+ value: string;
1916
+ format?: DocumentTextInlineFormat;
1917
+ } | {
1918
+ type: 'variable';
1919
+ ref: DocumentVariableRef;
1920
+ format?: DocumentTextInlineFormat;
1921
+ };
1922
+
1923
+ export declare type DocumentTextRegionBlock = DocumentRegionBlockBase & {
1924
+ type: 'text';
1925
+ role?: 'title' | 'metadata' | 'note' | 'pageInfo';
1926
+ content: DocumentTextContent;
1927
+ style?: DocumentTextStyle;
1928
+ };
1929
+
1930
+ export declare type DocumentTextSection = {
1931
+ id: string;
1932
+ type: 'text';
1933
+ content: DocumentTextContent;
1934
+ style?: DocumentTextStyle;
1935
+ };
1936
+
1937
+ export declare type DocumentTextStyle = {
1938
+ fontSize?: number;
1939
+ fontWeight?: 'normal' | 'medium' | 'semibold' | 'bold';
1940
+ color?: string;
1941
+ align?: 'left' | 'center' | 'right';
1942
+ };
1943
+
1944
+ export declare type DocumentTheme = {
1945
+ fontFamily?: string;
1946
+ primaryColor?: string;
1947
+ };
1948
+
1949
+ export declare type DocumentVariableRef = {
1950
+ source: 'input';
1951
+ inputId: string;
1952
+ export: DocumentInputExportKey;
1953
+ } | {
1954
+ source: 'documentMeta';
1955
+ key: 'generatedAt' | 'pageNumber' | 'pageCount';
1956
+ };
1957
+
1694
1958
  export declare interface DomainCalculatedDimension {
1695
1959
  name: string;
1696
1960
  label: string;
@@ -1714,6 +1978,16 @@ export declare interface DomainCalculatedMetric {
1714
1978
  aggregationStrategy?: AggregationStrategy;
1715
1979
  }
1716
1980
 
1981
+ export declare function downloadDocumentPdf(apiServiceUrl: string, authToken: AuthToken | undefined, options: {
1982
+ sheetId: string;
1983
+ title: string;
1984
+ pageSize: string;
1985
+ orientation: string;
1986
+ inputValues: DocumentInputRuntimeValues;
1987
+ timezone?: string;
1988
+ password?: string;
1989
+ }): Promise<void>;
1990
+
1717
1991
  export declare function downloadPdf(apiServiceUrl: string, authToken: AuthToken | undefined, password?: string, sheetSelection?: 'current' | 'all', expandedState?: Record<string, boolean>): Promise<void>;
1718
1992
 
1719
1993
  declare type DraftDeliveryConfig = {
@@ -2020,6 +2294,19 @@ export declare interface DynamicDrillInteraction {
2020
2294
  /* Excluded from this release type: drillField */
2021
2295
  }
2022
2296
 
2297
+ export declare type EditorContext = {
2298
+ type: 'dashboard';
2299
+ } | {
2300
+ type: 'documentSection';
2301
+ sheetId: string;
2302
+ sectionId: string;
2303
+ cardId: string;
2304
+ documentFilterValues?: TFilterValue[];
2305
+ documentControlDefinitions?: ControlDefinition[];
2306
+ documentControlValues?: Record<string, unknown>;
2307
+ missingRequiredInputLabels?: string[];
2308
+ };
2309
+
2023
2310
  export declare type EditorStore = {
2024
2311
  tempQueryData?: {
2025
2312
  queryKey: string[];
@@ -2057,6 +2344,7 @@ export declare type EditorStore = {
2057
2344
  onSchemaChange?: (schemaName: string) => void;
2058
2345
  onSave?: (card: TFrame) => void | Promise<void>;
2059
2346
  onClose?: () => void;
2347
+ editorContext?: EditorContext;
2060
2348
  /** Draft slots for mode switching - preserves work when toggling between dev/standard */
2061
2349
  modeDrafts: ModeDrafts;
2062
2350
  };
@@ -3202,6 +3490,16 @@ export declare function resolveDatamodelName(datamodelName: string): string;
3202
3490
 
3203
3491
  export declare const resolveDataType: (value: any) => string;
3204
3492
 
3493
+ export declare type ResolvedDocumentInput = {
3494
+ inputId: string;
3495
+ variableName: string;
3496
+ rawValue: unknown;
3497
+ displayValue: string;
3498
+ filterValues?: TFilterValue[];
3499
+ controlValue?: unknown;
3500
+ exports: Record<string, string | number | boolean | null>;
3501
+ };
3502
+
3205
3503
  declare type ResolvedPrimaryDateField = {
3206
3504
  sourceDataset: string;
3207
3505
  sourceField: string;
@@ -3545,6 +3843,14 @@ export declare type TableConfig = {
3545
3843
  datamodelId: string;
3546
3844
  };
3547
3845
 
3846
+ /**
3847
+ * Row rhythm for the whole table. Authors pick one per card; undefined
3848
+ * falls back to 'compact' (the canonical default — dense scanning, matches
3849
+ * the Linear-style spec). Drives row padding, cell font size, and header
3850
+ * font size via a shared density spec in DataTable.
3851
+ */
3852
+ declare type TableDensity = 'dense' | 'compact' | 'standard' | 'comfortable' | 'spacious';
3853
+
3548
3854
  export declare type TableItem = DropdownItem;
3549
3855
 
3550
3856
  declare type TablePreferences = {
@@ -3555,6 +3861,8 @@ declare type TablePreferences = {
3555
3861
  pageSize?: number;
3556
3862
  enableDevModePagination?: boolean;
3557
3863
  forceClientPagination?: boolean;
3864
+ density?: TableDensity;
3865
+ documentWrapText?: boolean;
3558
3866
  };
3559
3867
 
3560
3868
  /**
@@ -4518,6 +4826,20 @@ export declare type TokenSecurityPolicy = {
4518
4826
  };
4519
4827
  };
4520
4828
 
4829
+ /**
4830
+ * Per-column contribution to the table-level totals row (`<tfoot>`).
4831
+ * Additive and optional — omitting it keeps the cell empty in the footer,
4832
+ * matching existing behavior when a totals row is not needed.
4833
+ *
4834
+ * - 'sum' → aggregate the column across the full dataset
4835
+ * - 'avg' → arithmetic mean across the full dataset
4836
+ * - 'count' → non-null count across the full dataset
4837
+ * - 'label' → render `totalsLabel` (or 'Total') as static text — typically
4838
+ * on the first column so the footer reads as a labeled row
4839
+ * - 'none' → blank cell in the footer
4840
+ */
4841
+ declare type TotalsBehavior = 'sum' | 'avg' | 'count' | 'label' | 'none';
4842
+
4521
4843
  /** Point style options supported by Chart.js */
4522
4844
  export declare type TPointStyle = 'circle' | 'cross' | 'crossRot' | 'dash' | 'line' | 'rect' | 'rectRounded' | 'rectRot' | 'star' | 'triangle';
4523
4845
 
@@ -4530,6 +4852,7 @@ export declare type TSelectedRecord = ComboBoxOption;
4530
4852
 
4531
4853
  export declare type TSheet = {
4532
4854
  id: string;
4855
+ kind?: 'dashboard' | 'document';
4533
4856
  title?: string;
4534
4857
  description?: string;
4535
4858
  layout?: ReactGridLayout.Layout[];
@@ -4537,6 +4860,7 @@ export declare type TSheet = {
4537
4860
  cards?: TCard[];
4538
4861
  frames?: TFrame[];
4539
4862
  calculatedFields?: Field[];
4863
+ document?: DocumentDefinition;
4540
4864
  };
4541
4865
 
4542
4866
  /**