react-semaphor 0.1.567 → 0.1.568

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 (30) hide show
  1. package/dist/assistant-context/index.js +1 -1
  2. package/dist/briefings/index.js +1 -1
  3. package/dist/chunks/{assistant-chat-D-IuHHwh.js → assistant-chat-BN5I8KuN.js} +5 -5
  4. package/dist/chunks/{bookmark-impact-B0estCHn.js → bookmark-impact-CJ-65omV.js} +1 -1
  5. package/dist/chunks/{card-filter-builder-DbSmzvem.js → card-filter-builder-BBuB99GZ.js} +51 -51
  6. package/dist/chunks/{dashboard-f8J9DHh5.js → dashboard-YnWZC4dK.js} +1 -1
  7. package/dist/chunks/{dashboard-briefing-launcher-DunvZYsU.js → dashboard-briefing-launcher-BF89TU2h.js} +184 -184
  8. package/dist/chunks/{dashboard-controls-B09cN2Dz.js → dashboard-controls-atHc1EjP.js} +7 -7
  9. package/dist/chunks/{dashboard-json-BNNCaKEc.js → dashboard-json-Cxp3inxd.js} +1 -1
  10. package/dist/chunks/{dates-BsJcyoC_.js → dates-CKO05ino.js} +4 -4
  11. package/dist/chunks/{edit-dashboard-visual-Cwzbpty8.js → edit-dashboard-visual-DdmTfn-J.js} +7 -7
  12. package/dist/chunks/{filter-reach-copy-P-kDwUpY.js → filter-reach-copy-jZGzK_IH.js} +840 -826
  13. package/dist/chunks/{index-BcXw0CpM.js → index-CPNZW0mu.js} +1 -1
  14. package/dist/chunks/{report-preferences-dialog-CbgmdWeZ.js → report-preferences-dialog-Mbd-I0wV.js} +7 -7
  15. package/dist/chunks/{resolve-dashboard-input-context-DPKSF3qj.js → resolve-dashboard-input-context-Du0fjN3h.js} +4604 -4548
  16. package/dist/chunks/{saved-dashboard-context-CNudmm9U.js → saved-dashboard-context-y8N6RvjS.js} +2 -2
  17. package/dist/chunks/{semaphor-ready-indicator-CQd-PCCZ.js → semaphor-ready-indicator-BSEdUq40.js} +21211 -21061
  18. package/dist/chunks/{shelf-drop-preview-context-CWS3e20y.js → shelf-drop-preview-context-D7QqPl36.js} +2 -2
  19. package/dist/chunks/{stored-dashboard-CrQFT27O.js → stored-dashboard-d3xQYxBD.js} +46 -46
  20. package/dist/chunks/{variable-draft-BDxlD0dM.js → variable-draft-DOX03R4A.js} +2 -2
  21. package/dist/dashboard/index.js +1 -1
  22. package/dist/dashboard-authoring/index.js +1545 -1518
  23. package/dist/index.js +11 -11
  24. package/dist/style.css +1 -1
  25. package/dist/surfboard/index.js +1 -1
  26. package/dist/types/lib/document/document-edits.d.ts +8 -3
  27. package/dist/types/lib/document/document-text-style.d.ts +54 -0
  28. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +21 -3
  29. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +5 -2
  30. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { a, R as s, D as o } from "../chunks/report-preferences-dialog-CbgmdWeZ.js";
1
+ import { a, R as s, D as o } from "../chunks/report-preferences-dialog-Mbd-I0wV.js";
2
2
  import { C as f, E as D } from "../chunks/bookmark-state-Du3s13_V.js";
3
3
  export {
4
4
  f as CONTROL_CARD_DEFAULT_VALUE,
@@ -39,19 +39,20 @@ export type DocumentEdit = {
39
39
  } | {
40
40
  type: 'updateText';
41
41
  sectionId: string;
42
- content: DocumentTextContent;
42
+ content?: DocumentTextContent;
43
43
  style?: DocumentTextStyle;
44
44
  }
45
45
  /**
46
46
  * A header or footer line by its role (data variables spec S-4): the
47
47
  * region panels and the MCP's `document.text` operation write a line here.
48
- * A missing region is created enabled; a missing line is added.
48
+ * A missing region is created enabled; a missing line is added. Only header
49
+ * lines take a style (`documentLineTakesStyle`).
49
50
  */
50
51
  | {
51
52
  type: 'updateRegionText';
52
53
  region: 'header' | 'footer';
53
54
  role: DocumentRegionTextRole;
54
- content: DocumentTextContent;
55
+ content?: DocumentTextContent;
55
56
  style?: DocumentTextStyle;
56
57
  } | {
57
58
  type: 'updateTableOptions';
@@ -89,6 +90,10 @@ export type DocumentEdit = {
89
90
  toIndex: number;
90
91
  };
91
92
  export type DocumentRegionTextRole = NonNullable<DocumentTextRegionBlock['role']>;
93
+ /** What a region panel changes on one line: its words, its style, or both. */
94
+ export type DocumentRegionTextChange = Pick<Extract<DocumentEdit, {
95
+ type: 'updateRegionText';
96
+ }>, 'content' | 'style'>;
92
97
  /** The lines each region has, by role: what `updateRegionText` accepts. */
93
98
  export declare const DOCUMENT_REGION_TEXT_ROLES: Record<'header' | 'footer', readonly DocumentRegionTextRole[]>;
94
99
  export type DocumentEditResult = {
@@ -0,0 +1,54 @@
1
+ import { DocumentTextRegionBlock, DocumentTextStyle } from '../types/common-types.js';
2
+ /**
3
+ * A Document's text sizes (whole pixels in this range) and alignments: what
4
+ * the editor's panels offer and the MCP's `document.text.update` accepts, so
5
+ * the two save the same style (Authoring Parity).
6
+ */
7
+ export declare const DOCUMENT_TEXT_SIZE_MIN = 8;
8
+ export declare const DOCUMENT_TEXT_SIZE_MAX = 48;
9
+ export declare const DOCUMENT_TEXT_ALIGNMENTS: readonly ["left", "center", "right"];
10
+ export type DocumentTextAlign = NonNullable<DocumentTextStyle['align']>;
11
+ /** A text section's size when its style sets none. */
12
+ export declare const DOCUMENT_TEXT_SECTION_DEFAULT_SIZE = 13;
13
+ /** A header line's size when its style sets none: the title reads larger than the metadata. */
14
+ export declare const DOCUMENT_HEADER_LINE_DEFAULT_SIZE: Record<'title' | 'metadata', number>;
15
+ /** Only header lines take a size and alignment; the footer's note and page info keep their fixed look. */
16
+ export declare function documentLineTakesStyle(role: NonNullable<DocumentTextRegionBlock['role']>): role is "title" | "metadata";
17
+ /**
18
+ * A style as the MCP states it: the outline reads it, `document.text.update`
19
+ * writes it. Weight and color stay with the editor.
20
+ */
21
+ export type DocumentTextStyleWords = {
22
+ size?: number;
23
+ align?: DocumentTextAlign;
24
+ };
25
+ export declare function readDocumentTextStyleWords(style: DocumentTextStyle | undefined): DocumentTextStyleWords | undefined;
26
+ export declare function documentTextStyleFromWords(words: DocumentTextStyleWords): DocumentTextStyle;
27
+ /** The space between a header's logo and its lines (`gap-3`). */
28
+ export declare const DOCUMENT_HEADER_LOGO_GAP_PX = 12;
29
+ /**
30
+ * How a header lays out its logo and lines. A line aligns across the page,
31
+ * not across the space beside the logo:
32
+ * - `beside`: the logo at one side, the lines in the rest; a centered line
33
+ * gives up the logo's width on the far side, so it centers on the page.
34
+ * - `columns`: three columns, the lines in the left one (left-aligned lines
35
+ * beside a centered or right logo, as headers have always drawn).
36
+ * - `split`: a centered logo between the lines, each line in the column its
37
+ * alignment names.
38
+ * - `stacked`: the logo on its own row at its side, the lines below it. A
39
+ * centered logo always stacks over a centered line; a side logo does when
40
+ * balancing it would leave a centered line under half the header's width.
41
+ * - `full`: no logo; the lines span the page.
42
+ */
43
+ export type DocumentHeaderLayout = 'beside' | 'columns' | 'split' | 'stacked' | 'full';
44
+ export declare function documentHeaderLayout({ hasLogo, logoArea, logoWidthPx, headerWidthPx, aligns, }: {
45
+ hasLogo: boolean;
46
+ logoArea: 'left' | 'center' | 'right';
47
+ logoWidthPx: number;
48
+ /** The page's width inside its margins, which the header spans. */
49
+ headerWidthPx: number;
50
+ /** The title's and metadata's alignments; unset reads as left. */
51
+ aligns: Array<DocumentTextAlign | undefined>;
52
+ }): DocumentHeaderLayout;
53
+ /** A style change laid over the stored style: a field the change leaves out stays as it is. */
54
+ export declare function mergeDocumentTextStyle(current: DocumentTextStyle | undefined, patch: DocumentTextStyle): DocumentTextStyle;
@@ -7476,7 +7476,17 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
7476
7476
  }, {
7477
7477
  sectionId: string;
7478
7478
  }>]>;
7479
- text: z.ZodArray<z.ZodType<TextRun, z.ZodTypeDef, TextRun>, "many">;
7479
+ text: z.ZodOptional<z.ZodArray<z.ZodType<TextRun, z.ZodTypeDef, TextRun>, "many">>;
7480
+ style: z.ZodOptional<z.ZodObject<{
7481
+ size: z.ZodOptional<z.ZodNumber>;
7482
+ align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
7483
+ }, "strict", z.ZodTypeAny, {
7484
+ size?: number | undefined;
7485
+ align?: "left" | "right" | "center" | undefined;
7486
+ }, {
7487
+ size?: number | undefined;
7488
+ align?: "left" | "right" | "center" | undefined;
7489
+ }>>;
7480
7490
  }, "strict", z.ZodTypeAny, {
7481
7491
  target: {
7482
7492
  role: "title" | "metadata" | "note" | "pageInfo";
@@ -7484,9 +7494,13 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
7484
7494
  } | {
7485
7495
  sectionId: string;
7486
7496
  };
7487
- text: TextRun[];
7488
7497
  op: "document.text.update";
7489
7498
  sheetId: string;
7499
+ text?: TextRun[] | undefined;
7500
+ style?: {
7501
+ size?: number | undefined;
7502
+ align?: "left" | "right" | "center" | undefined;
7503
+ } | undefined;
7490
7504
  }, {
7491
7505
  target: {
7492
7506
  role: "title" | "metadata" | "note" | "pageInfo";
@@ -7494,9 +7508,13 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
7494
7508
  } | {
7495
7509
  sectionId: string;
7496
7510
  };
7497
- text: TextRun[];
7498
7511
  op: "document.text.update";
7499
7512
  sheetId: string;
7513
+ text?: TextRun[] | undefined;
7514
+ style?: {
7515
+ size?: number | undefined;
7516
+ align?: "left" | "right" | "center" | undefined;
7517
+ } | undefined;
7500
7518
  }>]>;
7501
7519
  /** The ops of changes to a dashboard: the one list callers route by (semaphor-app's MCP change tools). */
7502
7520
  export declare const DASHBOARD_CHANGE_OPS: readonly DashboardChange['op'][];
@@ -1,6 +1,7 @@
1
1
  import { DashboardRelationshipReachResolver } from '../../../lib/query-context/dashboard-filter-mapping-resolution.js';
2
2
  import { TDashboard } from '../../../lib/types/common-types.js';
3
3
  import { DocumentRegionTextRole } from '../../../lib/document/document-edits.js';
4
+ import { DocumentTextStyleWords } from '../../../lib/document/document-text-style.js';
4
5
  import { FrameWidth } from '../../layouts/index.js';
5
6
  import { RunPresentation, TextBlocks, TextRun } from '../text-card-words/index.js';
6
7
  import { CardTypeProperties } from '../changes/card-types.js';
@@ -76,15 +77,17 @@ export type OutlineTextCard = {
76
77
  editorOnly?: string[];
77
78
  linkedVisualId?: string;
78
79
  };
79
- /** A Document header or footer line, as `document.text.update` takes it (data variables DV-D13, DV-D31). */
80
+ /** A Document header or footer line, as `document.text.update` takes it (data variables DV-D13, DV-D31); `style` when it sets a size or alignment. */
80
81
  export type OutlineDocumentLine = {
81
82
  role: DocumentRegionTextRole;
82
83
  text: TextRun[];
84
+ style?: DocumentTextStyleWords;
83
85
  };
84
- /** A Document text section: one line of runs (its content holds no blocks). */
86
+ /** A Document text section: one line of runs (its content holds no blocks), and its size and alignment when set. */
85
87
  export type OutlineDocumentTextSection = {
86
88
  sectionId: string;
87
89
  text: TextRun[];
90
+ style?: DocumentTextStyleWords;
88
91
  };
89
92
  /**
90
93
  * A variable text may name (data variables DV-D13): an input's value, a report
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.567",
8
+ "version": "0.1.568",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",