react-semaphor 0.1.311 → 0.1.314

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 (51) hide show
  1. package/dist/brand-studio/index.cjs +1 -1
  2. package/dist/brand-studio/index.js +4 -4
  3. package/dist/chunks/{braces-CSECDaJQ.js → braces-CWi8x9ww.js} +1 -1
  4. package/dist/chunks/{braces-DwaAt32i.js → braces-NfG5hX2c.js} +1 -1
  5. package/dist/chunks/calendar-preferences-dialog-BzpQ5u4h.js +1 -0
  6. package/dist/chunks/calendar-preferences-dialog-D70CuT-1.js +456 -0
  7. package/dist/chunks/{chevrons-up-down-DJhB8JNW.js → chevrons-up-down-B2viXO2I.js} +1 -1
  8. package/dist/chunks/{chevrons-up-down-3vBEM7eI.js → chevrons-up-down-DiWloubI.js} +1 -1
  9. package/dist/chunks/dashboard-controls-BS_aZcxs.js +57 -0
  10. package/dist/chunks/dashboard-controls-DbKtbw1V.js +2021 -0
  11. package/dist/chunks/dashboard-filter-controls-launcher-C8Wm2Smj.js +1540 -0
  12. package/dist/chunks/dashboard-filter-controls-launcher-CMXpudFJ.js +11 -0
  13. package/dist/chunks/{dashboard-json-GL_IXTCk.js → dashboard-json-CJCAen1R.js} +2 -2
  14. package/dist/chunks/{dashboard-json-B_rQbUUz.js → dashboard-json-v2C6Tmqf.js} +1 -1
  15. package/dist/chunks/{edit-dashboard-visual-nGSsSTYx.js → edit-dashboard-visual-DljWvnMy.js} +4758 -4694
  16. package/dist/chunks/edit-dashboard-visual-lRn3FeaP.js +183 -0
  17. package/dist/chunks/{index-9v7DehZd.js → index-P5hPTTzm.js} +33681 -33108
  18. package/dist/chunks/{index-CGCrm-dj.js → index-XYIIY48z.js} +228 -228
  19. package/dist/chunks/{palette-CI2J34i6.js → palette-CIuwlEiG.js} +1 -1
  20. package/dist/chunks/{palette-C5o9bLo6.js → palette-CJTdBzJB.js} +1 -1
  21. package/dist/chunks/{resource-management-panel-CNmVHnCz.js → resource-management-panel-CAxXzMdi.js} +1 -1
  22. package/dist/chunks/{resource-management-panel-DTg9_DI9.js → resource-management-panel-Dk0DzgVm.js} +18 -18
  23. package/dist/chunks/{save-CMv91_Hz.js → save-B8x5Vi0W.js} +1 -1
  24. package/dist/chunks/{save-Cpz6BWx9.js → save-_ALpoMy6.js} +1 -1
  25. package/dist/chunks/{switch-Dhoqe3OE.js → switch-B6fh8nb-.js} +139 -138
  26. package/dist/chunks/{switch-otrSiyjH.js → switch-DPaKnsb8.js} +14 -14
  27. package/dist/chunks/{use-create-flow-overlay-state-C8WGfC8T.js → use-create-flow-overlay-state-Cqf7GaFm.js} +511 -483
  28. package/dist/chunks/use-create-flow-overlay-state-DMZTflFt.js +16 -0
  29. package/dist/chunks/{use-visual-utils-RkPa2gqQ.js → use-visual-utils-CPMQLBYR.js} +12 -12
  30. package/dist/chunks/{use-visual-utils-BeJ73yvV.js → use-visual-utils-CQQ3jvDn.js} +1 -1
  31. package/dist/dashboard/index.cjs +1 -1
  32. package/dist/dashboard/index.js +1 -1
  33. package/dist/index.cjs +1 -1
  34. package/dist/index.js +118 -117
  35. package/dist/style.css +1 -1
  36. package/dist/surfboard/index.cjs +1 -1
  37. package/dist/surfboard/index.js +7 -8
  38. package/dist/types/dashboard.d.ts +1 -1
  39. package/dist/types/main.d.ts +76 -34
  40. package/dist/types/shared.d.ts +1 -1
  41. package/dist/types/surfboard.d.ts +1 -11
  42. package/dist/types/types.d.ts +1 -1
  43. package/package.json +1 -1
  44. package/dist/chunks/dashboard-controls-CeKjYa7s.js +0 -2274
  45. package/dist/chunks/dashboard-controls-Ds8Hmo3Q.js +0 -57
  46. package/dist/chunks/dashboard-filter-controls-button-CWL2jJcu.js +0 -11
  47. package/dist/chunks/dashboard-filter-controls-button-Tk5lhwVV.js +0 -1116
  48. package/dist/chunks/dashboard-summary-settings-dialog-CcszMc1A.js +0 -545
  49. package/dist/chunks/dashboard-summary-settings-dialog-DgqFlYl9.js +0 -1
  50. package/dist/chunks/edit-dashboard-visual-Bu2rxJjm.js +0 -183
  51. package/dist/chunks/use-create-flow-overlay-state-DiH6M1Cd.js +0 -16
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../chunks/index-CGCrm-dj.js"),e=require("../chunks/common-types-C73-Ud1-.js"),r=require("../chunks/dashboard-summary-settings-dialog-DgqFlYl9.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 r=require("../chunks/index-XYIIY48z.js"),e=require("../chunks/common-types-C73-Ud1-.js"),a=require("../chunks/calendar-preferences-dialog-BzpQ5u4h.js");exports.Surfboard=r.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.CalendarPreferencesDialog=a.CalendarPreferencesDialog;
@@ -1,10 +1,9 @@
1
- import { a as o } from "../chunks/index-9v7DehZd.js";
2
- import { C as s, E as C } from "../chunks/common-types-4bjoIgvm.js";
3
- import { C as E, D as f } from "../chunks/dashboard-summary-settings-dialog-CcszMc1A.js";
1
+ import { a as e } from "../chunks/index-P5hPTTzm.js";
2
+ import { C, E } from "../chunks/common-types-4bjoIgvm.js";
3
+ import { C as s } from "../chunks/calendar-preferences-dialog-D70CuT-1.js";
4
4
  export {
5
- s as CONTROL_CARD_DEFAULT_VALUE,
6
- E as CalendarPreferencesDialog,
7
- f as DashboardSummarySettingsDialog,
8
- C as EMPTY_SELECTION,
9
- o as Surfboard
5
+ C as CONTROL_CARD_DEFAULT_VALUE,
6
+ s as CalendarPreferencesDialog,
7
+ E as EMPTY_SELECTION,
8
+ e as Surfboard
10
9
  };
@@ -241,7 +241,6 @@ declare interface CardConfig {
241
241
  showOnCard?: boolean;
242
242
  includeInDashboardSummary?: boolean;
243
243
  breakdownDimensions?: GroupByField[];
244
- anomalyEnabled?: boolean;
245
244
  };
246
245
  rowAggregates?: Array<{
247
246
  label?: string;
@@ -2062,6 +2061,7 @@ declare type TableStylePreferences = {
2062
2061
  headerStyle?: TableHeaderStyle;
2063
2062
  headerBackgroundColor?: string;
2064
2063
  headerTextColor?: string;
2064
+ headerWrapText?: boolean;
2065
2065
  stripedRows?: boolean;
2066
2066
  gridLines?: TableGridLines;
2067
2067
  wrapText?: boolean;
@@ -982,7 +982,6 @@ export declare interface CardConfig {
982
982
  showOnCard?: boolean;
983
983
  includeInDashboardSummary?: boolean;
984
984
  breakdownDimensions?: GroupByField[];
985
- anomalyEnabled?: boolean;
986
985
  };
987
986
  rowAggregates?: Array<{
988
987
  label?: string;
@@ -1570,19 +1569,65 @@ declare interface DashboardExportDialogProps {
1570
1569
  onOpenChange: (open: boolean) => void;
1571
1570
  }
1572
1571
 
1573
- export declare function DashboardFilterControlsButton({ showFilters, onToggleFilters, onAddFilter, onAddControl, onManageControls, size, className, primaryButtonClassName, secondaryButtonClassName, dropdownContentClassName, }: DashboardFilterControlsButtonProps): JSX.Element;
1572
+ export declare function DashboardFilterControlsButton({ showFilters, onShowFiltersChange, pickerContent, settingsContent, size, className, primaryButtonClassName, secondaryButtonClassName, pickerContentClassName, settingsContentClassName, }: DashboardFilterControlsButtonProps): JSX.Element;
1574
1573
 
1574
+ /**
1575
+ * DashboardFilterControlsButton — split-button shell for the toolbar.
1576
+ *
1577
+ * Two halves, each a Popover trigger:
1578
+ *
1579
+ * - Primary half: opens the *picker* popover (whose content is passed
1580
+ * in via `pickerContent`). Open state is controlled — the launcher
1581
+ * wires it to the `showFilters` store field so existing close
1582
+ * handlers (e.g. semaphor-app's dashboard-controls cleanup paths)
1583
+ * continue to work without change.
1584
+ *
1585
+ * - Chevron half: opens the *actions / settings* popover (passed in
1586
+ * via `settingsContent`). Open state is local; the chevron has no
1587
+ * external consumers that need to drive it.
1588
+ *
1589
+ * Floating popovers replace the legacy 320px FilterAside that mounted as
1590
+ * a flex sibling and shifted the dashboard. Width / height live on the
1591
+ * popover content components — this shell only owns the button chrome.
1592
+ */
1575
1593
  declare type DashboardFilterControlsButtonProps = {
1576
1594
  showFilters: boolean;
1577
- onToggleFilters: () => void;
1578
- onAddFilter: () => void;
1579
- onAddControl: () => void;
1580
- onManageControls: () => void;
1595
+ onShowFiltersChange: (show: boolean) => void;
1596
+ pickerContent: ReactNode;
1597
+ settingsContent: (closeSettings: () => void) => ReactNode;
1581
1598
  size?: 'default' | 'toolbar';
1582
1599
  className?: string;
1583
1600
  primaryButtonClassName?: string;
1584
1601
  secondaryButtonClassName?: string;
1585
- dropdownContentClassName?: string;
1602
+ pickerContentClassName?: string;
1603
+ settingsContentClassName?: string;
1604
+ };
1605
+
1606
+ /**
1607
+ * DashboardFilterControlsLauncher — composition root for the toolbar
1608
+ * Filter control. Decides which surfaces to show based on whether the
1609
+ * selected sheet is a document sheet (different inspector path) or a
1610
+ * standard dashboard sheet (popover picker + chevron settings).
1611
+ *
1612
+ * Behavior preserved from the legacy aside-based version:
1613
+ * - Document sheets route to the document inspector instead of the
1614
+ * filter picker.
1615
+ * - Opening the filter picker collapses the AI assistant rail.
1616
+ * - `showFilters` in the dashboard store is the source of truth for
1617
+ * whether the picker popover is open. External code that calls
1618
+ * `setShowFilters(false)` (e.g. semaphor-app's close / save / discard
1619
+ * handlers) will close the popover the same way it used to close the
1620
+ * aside.
1621
+ */
1622
+ export declare function DashboardFilterControlsLauncher({ size, className, primaryButtonClassName, secondaryButtonClassName, pickerContentClassName, settingsContentClassName, }: DashboardFilterControlsLauncherProps): JSX.Element;
1623
+
1624
+ declare type DashboardFilterControlsLauncherProps = {
1625
+ size?: 'default' | 'toolbar';
1626
+ className?: string;
1627
+ primaryButtonClassName?: string;
1628
+ secondaryButtonClassName?: string;
1629
+ pickerContentClassName?: string;
1630
+ settingsContentClassName?: string;
1586
1631
  };
1587
1632
 
1588
1633
  export declare type DashboardInput = FilterDashboardInput | ControlDashboardInput;
@@ -1885,16 +1930,6 @@ export declare type DashboardStore = {
1885
1930
  actions: Actions_2;
1886
1931
  };
1887
1932
 
1888
- export declare function DashboardSummarySettingsDialog({ open, onOpenChange, dashboard, onApply, disabled, }: DashboardSummarySettingsDialogProps): JSX.Element;
1889
-
1890
- declare type DashboardSummarySettingsDialogProps = {
1891
- open: boolean;
1892
- onOpenChange: (open: boolean) => void;
1893
- dashboard: TDashboard;
1894
- onApply: (summary: NonNullable<TDashboard['summary']>) => void;
1895
- disabled?: boolean;
1896
- };
1897
-
1898
1933
  export declare const DashboardWC: CustomElementConstructor;
1899
1934
 
1900
1935
  export declare interface DatabaseEntityReference {
@@ -2065,6 +2100,14 @@ export declare type DocumentControlInputDefinition = DocumentInputBase & {
2065
2100
  exports?: DocumentInputExportKey[];
2066
2101
  };
2067
2102
 
2103
+ export declare function DocumentControlsSettings({ open, onOpenChange, initialMode, }: DocumentControlsSettingsProps): JSX.Element | null;
2104
+
2105
+ declare type DocumentControlsSettingsProps = {
2106
+ open: boolean;
2107
+ onOpenChange: (open: boolean) => void;
2108
+ initialMode?: 'manage' | 'create';
2109
+ };
2110
+
2068
2111
  export declare type DocumentDefinition = {
2069
2112
  version: 1;
2070
2113
  page: DocumentPageSetup;
@@ -4151,15 +4194,6 @@ declare type SummaryAction = {
4151
4194
 
4152
4195
  declare type SummaryActionType = 'apply_filter' | 'change_comparison' | 'open_schedule' | 'refresh';
4153
4196
 
4154
- declare type SummaryAnomaly = {
4155
- metricId: string;
4156
- severity: 'low' | 'medium' | 'high';
4157
- reason: 'z_score_spike' | 'trend_break' | 'threshold_breach' | 'insufficient_baseline';
4158
- score: number;
4159
- confidence: number;
4160
- message: string;
4161
- };
4162
-
4163
4197
  export declare function SummaryCard(): JSX.Element | null;
4164
4198
 
4165
4199
  declare type SummaryCardSummary = {
@@ -4168,17 +4202,26 @@ declare type SummaryCardSummary = {
4168
4202
  summary: Omit<SummaryResponse, 'cardSummaries'>;
4169
4203
  };
4170
4204
 
4205
+ declare type SummaryDirection = 'up' | 'down' | 'flat';
4206
+
4171
4207
  declare type SummaryDriver = {
4208
+ kind: SummaryDriverKind;
4172
4209
  metricId: string;
4173
4210
  dimension: string;
4174
4211
  key: string;
4175
- direction: 'up' | 'down';
4176
- delta: number;
4212
+ direction: SummaryDirection;
4213
+ current: number;
4214
+ comparison: number | null;
4215
+ delta: number | null;
4177
4216
  contributionPct: number;
4178
- basis: 'gross_decline' | 'gross_growth' | 'net_change';
4217
+ basis: SummaryDriverBasis;
4179
4218
  action: SummaryAction;
4180
4219
  };
4181
4220
 
4221
+ declare type SummaryDriverBasis = 'gross_decline' | 'gross_growth' | 'net_change' | 'current_value';
4222
+
4223
+ declare type SummaryDriverKind = 'period_delta_driver' | 'value_contributor';
4224
+
4182
4225
  export declare type SummaryResponse = {
4183
4226
  narrative: string;
4184
4227
  generatedAt: string;
@@ -4189,14 +4232,13 @@ export declare type SummaryResponse = {
4189
4232
  comparison: number | null;
4190
4233
  delta: number | null;
4191
4234
  deltaPct: number | null;
4192
- direction: 'up' | 'down' | 'flat';
4235
+ direction: SummaryDirection;
4193
4236
  }>;
4194
4237
  drivers: SummaryDriver[];
4195
- anomalies: SummaryAnomaly[];
4196
4238
  suggestedActions: SummaryAction[];
4197
4239
  cardSummaries?: SummaryCardSummary[];
4198
4240
  metadata: {
4199
- contractVersion: '1.0';
4241
+ contractVersion: '1.1';
4200
4242
  cacheHit: boolean;
4201
4243
  generationMs: number;
4202
4244
  partial: boolean;
@@ -4204,7 +4246,7 @@ export declare type SummaryResponse = {
4204
4246
  };
4205
4247
  };
4206
4248
 
4207
- declare type SummaryWarningCode = 'PARTIAL_TIMEOUT' | 'LLM_TIMEOUT_FALLBACK' | 'ANOMALY_MODULE_UNAVAILABLE' | 'DRIVER_DATA_INSUFFICIENT' | 'UNSUPPORTED_CARD_EXCLUDED' | 'CARD_QUERY_FAILED';
4249
+ declare type SummaryWarningCode = 'PARTIAL_TIMEOUT' | 'LLM_TIMEOUT_FALLBACK' | 'DRIVER_DATA_INSUFFICIENT' | 'UNSUPPORTED_CARD_EXCLUDED' | 'CARD_QUERY_FAILED';
4208
4250
 
4209
4251
  export declare function Surfboard({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX.Element;
4210
4252
 
@@ -4336,6 +4378,7 @@ declare type TableStylePreferences = {
4336
4378
  headerStyle?: TableHeaderStyle;
4337
4379
  headerBackgroundColor?: string;
4338
4380
  headerTextColor?: string;
4381
+ headerWrapText?: boolean;
4339
4382
  stripedRows?: boolean;
4340
4383
  gridLines?: TableGridLines;
4341
4384
  wrapText?: boolean;
@@ -6024,7 +6067,6 @@ export declare function useDashboardSummary(): {
6024
6067
  isRefreshing: boolean;
6025
6068
  applyAction: (action: SummaryAction) => Promise<void>;
6026
6069
  enabled: boolean;
6027
- maxItems: number;
6028
6070
  };
6029
6071
 
6030
6072
  export declare function useDataColumns(token?: AuthToken): {
@@ -156,7 +156,6 @@ declare interface CardConfig {
156
156
  showOnCard?: boolean;
157
157
  includeInDashboardSummary?: boolean;
158
158
  breakdownDimensions?: GroupByField[];
159
- anomalyEnabled?: boolean;
160
159
  };
161
160
  rowAggregates?: Array<{
162
161
  label?: string;
@@ -1666,6 +1665,7 @@ declare type TableStylePreferences = {
1666
1665
  headerStyle?: TableHeaderStyle;
1667
1666
  headerBackgroundColor?: string;
1668
1667
  headerTextColor?: string;
1668
+ headerWrapText?: boolean;
1669
1669
  stripedRows?: boolean;
1670
1670
  gridLines?: TableGridLines;
1671
1671
  wrapText?: boolean;
@@ -248,7 +248,6 @@ declare interface CardConfig {
248
248
  showOnCard?: boolean;
249
249
  includeInDashboardSummary?: boolean;
250
250
  breakdownDimensions?: GroupByField[];
251
- anomalyEnabled?: boolean;
252
251
  };
253
252
  rowAggregates?: Array<{
254
253
  label?: string;
@@ -799,16 +798,6 @@ export declare type DashboardProps = {
799
798
  preferences?: DashboardPreferences;
800
799
  };
801
800
 
802
- export declare function DashboardSummarySettingsDialog({ open, onOpenChange, dashboard, onApply, disabled, }: DashboardSummarySettingsDialogProps): JSX.Element;
803
-
804
- declare type DashboardSummarySettingsDialogProps = {
805
- open: boolean;
806
- onOpenChange: (open: boolean) => void;
807
- dashboard: TDashboard;
808
- onApply: (summary: NonNullable<TDashboard['summary']>) => void;
809
- disabled?: boolean;
810
- };
811
-
812
801
  declare interface DatabaseEntityReference {
813
802
  connectionId: string;
814
803
  connectionType: ConnectionType;
@@ -2084,6 +2073,7 @@ declare type TableStylePreferences = {
2084
2073
  headerStyle?: TableHeaderStyle;
2085
2074
  headerBackgroundColor?: string;
2086
2075
  headerTextColor?: string;
2076
+ headerWrapText?: boolean;
2087
2077
  stripedRows?: boolean;
2088
2078
  gridLines?: TableGridLines;
2089
2079
  wrapText?: boolean;
@@ -497,7 +497,6 @@ export declare interface CardConfig {
497
497
  showOnCard?: boolean;
498
498
  includeInDashboardSummary?: boolean;
499
499
  breakdownDimensions?: GroupByField[];
500
- anomalyEnabled?: boolean;
501
500
  };
502
501
  rowAggregates?: Array<{
503
502
  label?: string;
@@ -2643,6 +2642,7 @@ declare type TableStylePreferences = {
2643
2642
  headerStyle?: TableHeaderStyle;
2644
2643
  headerBackgroundColor?: string;
2645
2644
  headerTextColor?: string;
2645
+ headerWrapText?: boolean;
2646
2646
  stripedRows?: boolean;
2647
2647
  gridLines?: TableGridLines;
2648
2648
  wrapText?: boolean;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.311",
8
+ "version": "0.1.314",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",