@magmonium/one 0.4.58 → 0.4.60

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 (61) hide show
  1. package/fesm2022/{magmonium-one-attribute-value-BobQXKUK.mjs → magmonium-one-attribute-value-CPh-lJPV.mjs} +3 -3
  2. package/fesm2022/{magmonium-one-attribute-value-BobQXKUK.mjs.map → magmonium-one-attribute-value-CPh-lJPV.mjs.map} +1 -1
  3. package/fesm2022/{magmonium-one-base-checkbox-bwMjlhHR.mjs → magmonium-one-base-checkbox-LdM6dqF_.mjs} +2 -2
  4. package/fesm2022/{magmonium-one-base-checkbox-bwMjlhHR.mjs.map → magmonium-one-base-checkbox-LdM6dqF_.mjs.map} +1 -1
  5. package/fesm2022/{magmonium-one-base-dropdown-BgLka4oB.mjs → magmonium-one-base-dropdown-DgfWj1wC.mjs} +10 -10
  6. package/fesm2022/{magmonium-one-base-dropdown-BgLka4oB.mjs.map → magmonium-one-base-dropdown-DgfWj1wC.mjs.map} +1 -1
  7. package/fesm2022/{magmonium-one-base-input-KRWQalNW.mjs → magmonium-one-base-input-B92NOmxz.mjs} +2 -2
  8. package/fesm2022/{magmonium-one-base-input-KRWQalNW.mjs.map → magmonium-one-base-input-B92NOmxz.mjs.map} +1 -1
  9. package/fesm2022/{magmonium-one-base-text-HyEol70U.mjs → magmonium-one-base-text-ChjG3GNw.mjs} +2 -2
  10. package/fesm2022/{magmonium-one-base-text-HyEol70U.mjs.map → magmonium-one-base-text-ChjG3GNw.mjs.map} +1 -1
  11. package/fesm2022/{magmonium-one-button-B1KCA8KO.mjs → magmonium-one-button-BvX-kWgh.mjs} +7 -7
  12. package/fesm2022/{magmonium-one-button-B1KCA8KO.mjs.map → magmonium-one-button-BvX-kWgh.mjs.map} +1 -1
  13. package/fesm2022/{magmonium-one-checkbox-CyVd_a7p.mjs → magmonium-one-checkbox-CTRdyVrI.mjs} +5 -5
  14. package/fesm2022/{magmonium-one-checkbox-CyVd_a7p.mjs.map → magmonium-one-checkbox-CTRdyVrI.mjs.map} +1 -1
  15. package/fesm2022/{magmonium-one-color-utl-Bd80JrEQ.mjs → magmonium-one-color-utl-BA51l-Rw.mjs} +2 -2
  16. package/fesm2022/{magmonium-one-color-utl-Bd80JrEQ.mjs.map → magmonium-one-color-utl-BA51l-Rw.mjs.map} +1 -1
  17. package/fesm2022/{magmonium-one-directives-Dbe0pfCf.mjs → magmonium-one-directives-DM6J1Hvs.mjs} +4 -4
  18. package/fesm2022/{magmonium-one-directives-Dbe0pfCf.mjs.map → magmonium-one-directives-DM6J1Hvs.mjs.map} +1 -1
  19. package/fesm2022/{magmonium-one-group-BPhM2IIa.mjs → magmonium-one-group-cbqVX51M.mjs} +7 -7
  20. package/fesm2022/{magmonium-one-group-BPhM2IIa.mjs.map → magmonium-one-group-cbqVX51M.mjs.map} +1 -1
  21. package/fesm2022/{magmonium-one-header-CckG0DHr.mjs → magmonium-one-header-BylTUAGY.mjs} +4 -4
  22. package/fesm2022/{magmonium-one-header-CckG0DHr.mjs.map → magmonium-one-header-BylTUAGY.mjs.map} +1 -1
  23. package/fesm2022/{magmonium-one-icon-dAR6gd-q.mjs → magmonium-one-icon-CH-g8CUR.mjs} +4 -4
  24. package/fesm2022/{magmonium-one-icon-dAR6gd-q.mjs.map → magmonium-one-icon-CH-g8CUR.mjs.map} +1 -1
  25. package/fesm2022/{magmonium-one-image-editor-CKx7BRVF.mjs → magmonium-one-image-editor-FomMDHZl.mjs} +4 -4
  26. package/fesm2022/{magmonium-one-image-editor-CKx7BRVF.mjs.map → magmonium-one-image-editor-FomMDHZl.mjs.map} +1 -1
  27. package/fesm2022/{magmonium-one-label-B8WJHiU4.mjs → magmonium-one-label-BJcQs0Nd.mjs} +2 -2
  28. package/fesm2022/{magmonium-one-label-B8WJHiU4.mjs.map → magmonium-one-label-BJcQs0Nd.mjs.map} +1 -1
  29. package/fesm2022/{magmonium-one-m-ref-BdP7Kzhk.mjs → magmonium-one-m-ref-DLIAzywu.mjs} +2 -2
  30. package/fesm2022/{magmonium-one-m-ref-BdP7Kzhk.mjs.map → magmonium-one-m-ref-DLIAzywu.mjs.map} +1 -1
  31. package/fesm2022/{magmonium-one-menu-CxswmD0O.mjs → magmonium-one-menu-Ct4s8-W_.mjs} +6 -6
  32. package/fesm2022/{magmonium-one-menu-CxswmD0O.mjs.map → magmonium-one-menu-Ct4s8-W_.mjs.map} +1 -1
  33. package/fesm2022/{magmonium-one-multi-range-mv5rz3uW.mjs → magmonium-one-multi-range-CDJX9iFR.mjs} +3 -3
  34. package/fesm2022/{magmonium-one-multi-range-mv5rz3uW.mjs.map → magmonium-one-multi-range-CDJX9iFR.mjs.map} +1 -1
  35. package/fesm2022/{magmonium-one-options-asset-By4-vPVk.mjs → magmonium-one-options-asset-BNd1hbLw.mjs} +2 -2
  36. package/fesm2022/{magmonium-one-options-asset-By4-vPVk.mjs.map → magmonium-one-options-asset-BNd1hbLw.mjs.map} +1 -1
  37. package/fesm2022/{magmonium-one-otp-BlP0t9w1.mjs → magmonium-one-otp-AFrgpHdp.mjs} +5 -5
  38. package/fesm2022/{magmonium-one-otp-BlP0t9w1.mjs.map → magmonium-one-otp-AFrgpHdp.mjs.map} +1 -1
  39. package/fesm2022/{magmonium-one-password-CTnJ9M7d.mjs → magmonium-one-password-C7W01COQ.mjs} +6 -6
  40. package/fesm2022/{magmonium-one-password-CTnJ9M7d.mjs.map → magmonium-one-password-C7W01COQ.mjs.map} +1 -1
  41. package/fesm2022/{magmonium-one-radio-BanML2y5.mjs → magmonium-one-radio-yizQzCrD.mjs} +3 -3
  42. package/fesm2022/{magmonium-one-radio-BanML2y5.mjs.map → magmonium-one-radio-yizQzCrD.mjs.map} +1 -1
  43. package/fesm2022/{magmonium-one-range-B_3WiQR7.mjs → magmonium-one-range-B6JesBOM.mjs} +4 -4
  44. package/fesm2022/{magmonium-one-range-B_3WiQR7.mjs.map → magmonium-one-range-B6JesBOM.mjs.map} +1 -1
  45. package/fesm2022/{magmonium-one-selector-Do0PsJBx.mjs → magmonium-one-selector-CeqlecBa.mjs} +4 -4
  46. package/fesm2022/{magmonium-one-selector-Do0PsJBx.mjs.map → magmonium-one-selector-CeqlecBa.mjs.map} +1 -1
  47. package/fesm2022/{magmonium-one-size-converter-BOLtxL8d.mjs → magmonium-one-size-converter-BqkALIWA.mjs} +3 -2
  48. package/fesm2022/magmonium-one-size-converter-BqkALIWA.mjs.map +1 -0
  49. package/fesm2022/{magmonium-one-text-DDA0gCOd.mjs → magmonium-one-text-DT9ia02A.mjs} +6 -6
  50. package/fesm2022/{magmonium-one-text-DDA0gCOd.mjs.map → magmonium-one-text-DT9ia02A.mjs.map} +1 -1
  51. package/fesm2022/{magmonium-one-text-output-Dkx0i1iu.mjs → magmonium-one-text-output-nJBGhbwG.mjs} +4 -4
  52. package/fesm2022/{magmonium-one-text-output-Dkx0i1iu.mjs.map → magmonium-one-text-output-nJBGhbwG.mjs.map} +1 -1
  53. package/fesm2022/magmonium-one-theme-BtQyLRdQ.mjs +1 -0
  54. package/fesm2022/{magmonium-one-toggle-C5-GwMSQ.mjs → magmonium-one-toggle-BPInV6K-.mjs} +3 -3
  55. package/fesm2022/{magmonium-one-toggle-C5-GwMSQ.mjs.map → magmonium-one-toggle-BPInV6K-.mjs.map} +1 -1
  56. package/fesm2022/magmonium-one.mjs +1396 -43
  57. package/fesm2022/magmonium-one.mjs.map +1 -1
  58. package/package.json +1 -1
  59. package/types/magmonium-one.d.ts +629 -4
  60. package/fesm2022/magmonium-one-size-converter-BOLtxL8d.mjs.map +0 -1
  61. package/fesm2022/magmonium-one-theme-Ce9i3H3R.mjs +0 -1
@@ -39,6 +39,7 @@ export declare const LAYOUT_ASSET_FOLDER: {
39
39
  readonly text_output: "text_outputs";
40
40
  readonly list: "lists";
41
41
  readonly section_table: "section_tables";
42
+ readonly section_chart: "section_charts";
42
43
  };
43
44
  export declare const FORM_ASSET_FOLDER: {
44
45
  readonly form: "forms";
@@ -1538,7 +1539,7 @@ export declare class DraggableDirective {
1538
1539
  readonly max: import("@angular/core").InputSignal<Position | undefined>;
1539
1540
  readonly dragStart: import("@angular/core").OutputEmitterRef<void>;
1540
1541
  readonly dragEnd: import("@angular/core").OutputEmitterRef<void>;
1541
- protected readonly cursor: import("@angular/core").Signal<"ew-resize" | "ns-resize" | "move">;
1542
+ protected readonly cursor: import("@angular/core").Signal<"move" | "ew-resize" | "ns-resize">;
1542
1543
  protected state: DraggableState;
1543
1544
  set pos(position: Position);
1544
1545
  /**
@@ -6060,6 +6061,630 @@ declare const defaultSectionTableSort: (columns: readonly SectionTableColumn[])
6060
6061
  * to the end in either direction — an empty cell is not the smallest value.
6061
6062
  */
6062
6063
  export declare const sortSectionTableRows: <T>(rows: readonly T[] | null | undefined, sort: SectionTableSort | null | undefined) => T[];
6064
+ /**
6065
+ * What a SectionChart draws its lines against (GLOSSARY.md SectionChart).
6066
+ * `auto` reads `value` for one series and `percent` for more: two price levels
6067
+ * on one axis flatten each other, so a comparison is always % change. `value`
6068
+ * under two or more series is read as `percent` for the same reason.
6069
+ */
6070
+ type SectionChartScale = 'auto' | 'percent' | 'value';
6071
+ export declare const SECTION_CHART_SCALES: readonly SectionChartScale[];
6072
+ /**
6073
+ * How much of a SectionChart is drawn. `minimal` is the line alone — no axes,
6074
+ * grid, tooltip, presets or navigator — under a top row of each series' name,
6075
+ * its change, and the period.
6076
+ */
6077
+ type SectionChartVariant = 'default' | 'minimal';
6078
+ declare const SECTION_CHART_VARIANTS: readonly SectionChartVariant[];
6079
+ /**
6080
+ * The span a SectionChart draws, as the two ISO 8601 instants it runs between
6081
+ * (GLOSSARY.md SectionChartWindow). Text rather than epoch ms: what reads a
6082
+ * window is most often an api call, and an api takes its dates as text.
6083
+ */
6084
+ type SectionChartWindow = {
6085
+ from: string;
6086
+ to: string;
6087
+ };
6088
+ /**
6089
+ * The `range` a SectionChart holds once its window was set by hand rather
6090
+ * than by a preset — the window itself is then the whole answer.
6091
+ */
6092
+ export declare const SECTION_CHART_CUSTOM_RANGE = "custom";
6093
+ /**
6094
+ * The presets offered when no `section_charts/<name>.yml` names its own
6095
+ * `ranges`. An id is `max`, `ytd`, or a count and a unit — `10d`, `2w`,
6096
+ * `3m`, `5y` (GLOSSARY.md SectionChartPreset).
6097
+ */
6098
+ export declare const DEFAULT_SECTION_CHART_RANGES: readonly string[];
6099
+ /** One preset as the toggle draws it. */
6100
+ type SectionChartPreset = SectionToggleItem & {
6101
+ id: string;
6102
+ };
6103
+ /**
6104
+ * A SectionChart's asset (`section_charts/<name>.yml`). The preset list is
6105
+ * the reason it exists — a list is an asset (ADR 0010); the scalars beside it
6106
+ * stand in only where the tag leaves them unset.
6107
+ */
6108
+ type SectionChartConfig = Config & {
6109
+ ranges?: string[];
6110
+ range?: string;
6111
+ scale?: SectionChartScale;
6112
+ variant?: SectionChartVariant;
6113
+ displayPeriod?: string;
6114
+ height?: number;
6115
+ navigator?: boolean;
6116
+ measure?: boolean;
6117
+ };
6118
+ /** One series' points as the chart reads them: times ascending, one value each. */
6119
+ type SectionChartPoints = {
6120
+ t: number[];
6121
+ y: number[];
6122
+ };
6123
+ /**
6124
+ * One series as the chart draws it — its points, the label its legend row
6125
+ * reads (with the MessageVariable values it is resolved with) and the colour
6126
+ * that names it.
6127
+ */
6128
+ type SectionChartLine = SectionChartPoints & {
6129
+ label: string;
6130
+ noTranslate: boolean;
6131
+ params?: Record<string, string>;
6132
+ color: string;
6133
+ };
6134
+ /** Where a tick on the time axis falls, and which unit names it. */
6135
+ type SectionChartTimeTick = {
6136
+ t: number;
6137
+ unit: 'day' | 'month' | 'year';
6138
+ };
6139
+ /**
6140
+ * The categorical colours a series takes by its position when it names none,
6141
+ * one row per theme mode. The order is the colour-blind safety, not taste:
6142
+ * every neighbouring pair clears ΔE 8 under protan, deutan and tritan
6143
+ * simulation, and the dark row is stepped for a dark surface rather than
6144
+ * being the light row flipped. Never cycled — a ninth series draws neutral.
6145
+ */
6146
+ declare const SECTION_CHART_PALETTE: {
6147
+ readonly light: readonly ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#008300", "#6250d6", "#e34948"];
6148
+ readonly dark: readonly ["#3987e5", "#d95926", "#199e70", "#c98500", "#d55181", "#008300", "#9085e9", "#e66767"];
6149
+ };
6150
+ /**
6151
+ * What a SectionChartSeries registers about itself so the chart can draw it.
6152
+ * Signals, because the rows behind a series arrive whenever its binding loads.
6153
+ */
6154
+ interface SectionChartMember {
6155
+ readonly points: Signal<SectionChartPoints>;
6156
+ readonly label: Signal<string>;
6157
+ readonly noTranslate: Signal<boolean>;
6158
+ readonly params: Signal<Record<string, string> | undefined>;
6159
+ readonly color: Signal<string | undefined>;
6160
+ }
6161
+ /**
6162
+ * What a series' legend row reads back from the chart: the colour it was
6163
+ * given and its change across the window, both the chart's to decide because
6164
+ * both depend on every other series and on the window.
6165
+ */
6166
+ interface SectionChartLegendRow {
6167
+ readonly color: string;
6168
+ readonly change: string;
6169
+ readonly trend: 'up' | 'down' | 'flat';
6170
+ }
6171
+ /**
6172
+ * The chart's side of the contract. A series finds it by DI rather than the
6173
+ * chart querying its content: the editor's Canvas renders children through a
6174
+ * template outlet, which a content query never sees, and DI walks the element
6175
+ * injector the same way whichever of the two put the series there — the walk a
6176
+ * SectionTableCell takes to its table.
6177
+ */
6178
+ interface SectionChartContext {
6179
+ register(member: SectionChartMember): void;
6180
+ unregister(member: SectionChartMember): void;
6181
+ /** The legend row this member draws; undefined once it has left. */
6182
+ legendOf(member: SectionChartMember): Signal<SectionChartLegendRow | undefined>;
6183
+ }
6184
+ declare const SECTION_CHART_CONTEXT: InjectionToken<SectionChartContext>;
6185
+ type Line = SectionChartLine & {
6186
+ member?: SectionChartMember;
6187
+ };
6188
+ type Plotted = {
6189
+ line: Line;
6190
+ shown: number[];
6191
+ ds: SectionChartPoints;
6192
+ };
6193
+ /**
6194
+ * A time-series chart composed from series placed inside it (GLOSSARY.md
6195
+ * SectionChart): every `m-section-chart-series` that registers with it is one
6196
+ * line on one axis. One series reads in its own values; two or more read as % change from
6197
+ * each one's first point in the window, the only scale on which instruments
6198
+ * priced 240 and 11,800 can be compared at all.
6199
+ *
6200
+ * The x axis is time, not position: series sampled on different days still
6201
+ * line up, and a gap in the data is a gap on the axis. Lines are straight
6202
+ * between points — a smoothed curve draws highs and lows that never happened.
6203
+ *
6204
+ * What it draws is a window of the data: a preset (`1m`, `ytd`, `max`, …)
6205
+ * measured back from the last point, or a window set by hand. `range` and
6206
+ * `window` are models, so `rangeChange` and `windowChange` fire when the reader
6207
+ * picks a preset or lets go of the navigator, and never because an input moved
6208
+ * — the SectionPagination rule (m-one-ui ADR 0097): an emit caused by an input
6209
+ * is how a Screen fetches in a loop.
6210
+ *
6211
+ * On the Canvas, series holding no data draw a sample, so a chart dropped
6212
+ * before its binding exists is still something the author can see and select.
6213
+ */
6214
+ export declare class SectionChartComponent extends ConfigComponent<SectionChartConfig> {
6215
+ subFolder: "section_charts";
6216
+ readonly scale: import("@angular/core").InputSignal<SectionChartScale | undefined>;
6217
+ /**
6218
+ * `minimal` draws the line alone under each series' name, change and the
6219
+ * period — no axes, grid, tooltip, measure, presets or navigator.
6220
+ */
6221
+ readonly variant: import("@angular/core").InputSignal<SectionChartVariant | undefined>;
6222
+ /**
6223
+ * The period the top row names, as written — `1Y`, `Past year`. Unset reads
6224
+ * the window's own dates.
6225
+ */
6226
+ readonly displayPeriod: import("@angular/core").InputSignal<string | undefined>;
6227
+ /** The whole chart's height in px, the time axis included. */
6228
+ readonly height: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
6229
+ /**
6230
+ * Draws the navigator: an overview of all the data beneath the plot, with
6231
+ * the window on it to drag, resize, or jump by pressing outside it.
6232
+ */
6233
+ readonly navigator: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
6234
+ /**
6235
+ * Lets the reader drag across the plot to measure a stretch: the band is
6236
+ * shaded and every series' change between its two ends is read out. A
6237
+ * click clears it. Display only — it writes nothing and emits nothing.
6238
+ */
6239
+ readonly measure: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
6240
+ /**
6241
+ * The preset in force — one of the asset's `ranges`, or `custom` once the
6242
+ * window was set by hand. Unset reads the asset's `range`, then `max`.
6243
+ */
6244
+ readonly range: import("@angular/core").ModelSignal<string | undefined>;
6245
+ /**
6246
+ * The window drawn under a `custom` range. Written whenever the reader picks
6247
+ * a preset too, so whoever fetches hears one shape whichever way the window
6248
+ * moved.
6249
+ */
6250
+ readonly window: import("@angular/core").ModelSignal<SectionChartWindow | undefined>;
6251
+ /** Every series that registered, in arrival order, each with its slot. */
6252
+ private readonly members;
6253
+ private readonly locale;
6254
+ protected readonly tableId: string;
6255
+ protected readonly width: import("@angular/core").WritableSignal<number>;
6256
+ private readonly dateFormat;
6257
+ private readonly dayFormat;
6258
+ private readonly monthFormat;
6259
+ private readonly yearFormat;
6260
+ private readonly numberFormat;
6261
+ private readonly compactFormat;
6262
+ protected readonly resolvedHeight: import("@angular/core").Signal<number>;
6263
+ private readonly resolvedScale;
6264
+ private readonly resolvedRange;
6265
+ protected readonly minimal: import("@angular/core").Signal<boolean>;
6266
+ private readonly margin;
6267
+ protected readonly showNavigator: import("@angular/core").Signal<boolean>;
6268
+ protected readonly canMeasure: import("@angular/core").Signal<boolean>;
6269
+ /** The asset's presets, ids that name no span dropped; the defaults without one. */
6270
+ protected readonly presets: import("@angular/core").Signal<SectionChartPreset[]>;
6271
+ protected readonly presetIndex: import("@angular/core").Signal<number>;
6272
+ private readonly palette;
6273
+ /**
6274
+ * Every registered series with the colour it draws in. A series keeps the
6275
+ * slot it was given on arrival whether its neighbours hold data, gain it or
6276
+ * leave, so a line never repaints because another one changed.
6277
+ */
6278
+ private readonly painted;
6279
+ /** Every series as read: its points beside the colour it draws in. */
6280
+ protected readonly lines: import("@angular/core").Signal<Line[]>;
6281
+ /** The first and last time any series holds. */
6282
+ private readonly dataSpan;
6283
+ /**
6284
+ * The span drawn: the hand-set window under `custom`, the preset's span
6285
+ * otherwise. A `custom` range with no readable window, or a preset id that
6286
+ * names no span, draws everything rather than nothing.
6287
+ */
6288
+ protected readonly span: import("@angular/core").Signal<[number, number] | null>;
6289
+ /**
6290
+ * The span the navigator is dragging, drawn live but not yet written: the
6291
+ * models move once, on release, so whoever fetches hears one window per
6292
+ * gesture rather than one per pixel.
6293
+ */
6294
+ private readonly draft;
6295
+ private drag;
6296
+ /** What is drawn: the drag in progress, else the range's span. */
6297
+ protected readonly drawnSpan: import("@angular/core").Signal<[number, number] | null>;
6298
+ /** Each line cut to the span; a line with nothing in it keeps its legend row. */
6299
+ private readonly windowed;
6300
+ /** Whether the lines read as % change from their own first point. */
6301
+ protected readonly percent: import("@angular/core").Signal<boolean>;
6302
+ private readonly plotWidth;
6303
+ private readonly plotHeight;
6304
+ protected readonly left: import("@angular/core").Signal<number>;
6305
+ protected readonly top: import("@angular/core").Signal<number>;
6306
+ protected readonly right: import("@angular/core").Signal<number>;
6307
+ protected readonly bottom: import("@angular/core").Signal<number>;
6308
+ protected readonly viewBox: import("@angular/core").Signal<string>;
6309
+ /**
6310
+ * The lines in the axis's terms. A line starting at zero has no % change to
6311
+ * draw, so under `percent` it leaves the plot rather than drawing infinities;
6312
+ * its legend row stays.
6313
+ */
6314
+ protected readonly plotted: import("@angular/core").Signal<Plotted[]>;
6315
+ private readonly extent;
6316
+ private readonly sx;
6317
+ private readonly sy;
6318
+ protected readonly paths: import("@angular/core").Signal<{
6319
+ d: string;
6320
+ color: string;
6321
+ endX: number;
6322
+ endY: number;
6323
+ }[]>;
6324
+ protected readonly yTicks: import("@angular/core").Signal<{
6325
+ y: number;
6326
+ label: string;
6327
+ zero: boolean;
6328
+ }[]>;
6329
+ protected readonly xTicks: import("@angular/core").Signal<{
6330
+ x: number;
6331
+ label: string;
6332
+ }[]>;
6333
+ protected readonly windowLabel: import("@angular/core").Signal<string>;
6334
+ /** What the top row names the period: the authored text, else the window. */
6335
+ protected readonly periodLabel: import("@angular/core").Signal<string>;
6336
+ /**
6337
+ * Each series' legend row: its colour, and its change measured across the
6338
+ * window — `—` for a series with nothing in it. Every registered series has
6339
+ * one, so every series has an element of its own to be selected by.
6340
+ */
6341
+ private readonly legendRows;
6342
+ /**
6343
+ * The times the crosshair snaps to: the longest line's, which holds every
6344
+ * date a shorter one does whenever the series share a calendar.
6345
+ */
6346
+ private readonly times;
6347
+ /** Where the crosshair stands, as an index into `times`. New data clears it. */
6348
+ protected readonly hoverIndex: import("@angular/core").WritableSignal<number | null>;
6349
+ /**
6350
+ * The stretch being measured: where it was anchored, then where it reaches,
6351
+ * both times off `times`. New data or a new window clears it — a band over
6352
+ * a span no longer drawn would measure something the reader cannot see.
6353
+ */
6354
+ protected readonly measured: import("@angular/core").WritableSignal<[number, number] | null>;
6355
+ private measuring;
6356
+ private anchored;
6357
+ protected readonly measureView: import("@angular/core").Signal<{
6358
+ start: number;
6359
+ width: number;
6360
+ card: null;
6361
+ } | {
6362
+ start: number;
6363
+ width: number;
6364
+ card: {
6365
+ title: string;
6366
+ rows: {
6367
+ color: string;
6368
+ label: string;
6369
+ noTranslate: boolean;
6370
+ params: Record<string, string> | undefined;
6371
+ value: string;
6372
+ sub: string;
6373
+ }[];
6374
+ flip: boolean;
6375
+ x: number;
6376
+ };
6377
+ } | null>;
6378
+ protected readonly hover: import("@angular/core").Signal<{
6379
+ x: number;
6380
+ title: string;
6381
+ rows: {
6382
+ color: string;
6383
+ label: string;
6384
+ noTranslate: boolean;
6385
+ params: Record<string, string> | undefined;
6386
+ v: number;
6387
+ value: string;
6388
+ sub: string;
6389
+ cx: number;
6390
+ cy: number;
6391
+ }[];
6392
+ flip: boolean;
6393
+ } | null>;
6394
+ /** Where the navigator puts a time, over all the data rather than the window. */
6395
+ private readonly navScale;
6396
+ /**
6397
+ * The navigator as drawn: the first series over all its data, muted — it
6398
+ * says where the window sits, not what the series did — and the window on it.
6399
+ */
6400
+ protected readonly navigatorView: import("@angular/core").Signal<{
6401
+ d: string;
6402
+ area: string;
6403
+ base: number;
6404
+ start: number;
6405
+ end: number;
6406
+ position: number;
6407
+ ticks: {
6408
+ x: number;
6409
+ label: string;
6410
+ }[];
6411
+ } | null>;
6412
+ protected readonly navHeight = 64;
6413
+ protected readonly navTop = 4;
6414
+ protected readonly navViewBox: import("@angular/core").Signal<string>;
6415
+ /** The table view: every drawn point, newest first, one column per line. */
6416
+ protected readonly table: import("@angular/core").Signal<{
6417
+ columns: {
6418
+ label: string;
6419
+ noTranslate: boolean;
6420
+ params: Record<string, string> | undefined;
6421
+ }[];
6422
+ rows: {
6423
+ date: string;
6424
+ cells: string[];
6425
+ }[];
6426
+ }>;
6427
+ constructor();
6428
+ /**
6429
+ * A series arriving takes the lowest slot no other series holds — the slot
6430
+ * a departed series freed, before a new one — so colours stay with the
6431
+ * series they were first given to.
6432
+ */
6433
+ readonly register: (member: SectionChartMember) => void;
6434
+ readonly unregister: (member: SectionChartMember) => void;
6435
+ readonly legendOf: (member: SectionChartMember) => import("@angular/core").Signal<SectionChartLegendRow | undefined>;
6436
+ /**
6437
+ * The reader picked a preset: both models move, so `rangeChange` and
6438
+ * `windowChange` fire together. The window written is the span the preset
6439
+ * names over the data as it stands.
6440
+ */
6441
+ protected readonly selectPreset: (index: number) => void;
6442
+ /** A window set by hand: the range becomes `custom` and the window says where. */
6443
+ private readonly commit;
6444
+ private readonly toWindow;
6445
+ private readonly navTime;
6446
+ /**
6447
+ * A press on the navigator: an edge resizes, the window pans, and the strip
6448
+ * outside it jumps the window there — drawn at once, written on release.
6449
+ */
6450
+ protected readonly onNavigatorDown: (event: PointerEvent) => void;
6451
+ protected readonly onNavigatorMove: (event: PointerEvent) => void;
6452
+ /** Release writes the window once; a press that moved nothing writes nothing. */
6453
+ protected readonly onNavigatorUp: () => void;
6454
+ /** The navigator on the keyboard: ← → pan a tenth of the window, Home End. */
6455
+ protected readonly onNavigatorKeydown: (event: KeyboardEvent) => void;
6456
+ /** The time off `times` nearest a pointer over the plot; null off it. */
6457
+ private readonly plotTime;
6458
+ protected readonly onPointerMove: (event: PointerEvent) => void;
6459
+ /** A press on the plot starts a measure where it lands, when measuring is on. */
6460
+ protected readonly onPlotDown: (event: PointerEvent) => void;
6461
+ /** Release keeps the band; a press that went nowhere was a click, and clears it. */
6462
+ protected readonly onPlotUp: () => void;
6463
+ protected readonly clearHover: () => void;
6464
+ /**
6465
+ * The crosshair on the keyboard: ← → step a point, Shift ten, Home End, Esc.
6466
+ * With measuring on, Enter anchors a measure at the crosshair, the arrows
6467
+ * stretch it, and Enter again leaves it standing; Esc clears both.
6468
+ */
6469
+ protected readonly onKeydown: (event: KeyboardEvent) => void;
6470
+ /** A change as read out: arrow, signed %, and which way it went. */
6471
+ private readonly signedChange;
6472
+ private readonly percentFormats;
6473
+ private readonly formatPercent;
6474
+ static ɵfac: i0.ɵɵFactoryDeclaration<SectionChartComponent, never>;
6475
+ static ɵcmp: i0.ɵɵComponentDeclaration<SectionChartComponent, "m-section-chart", never, {
6476
+ "scale": {
6477
+ "alias": "scale";
6478
+ "required": false;
6479
+ "isSignal": true;
6480
+ };
6481
+ "variant": {
6482
+ "alias": "variant";
6483
+ "required": false;
6484
+ "isSignal": true;
6485
+ };
6486
+ "displayPeriod": {
6487
+ "alias": "displayPeriod";
6488
+ "required": false;
6489
+ "isSignal": true;
6490
+ };
6491
+ "height": {
6492
+ "alias": "height";
6493
+ "required": false;
6494
+ "isSignal": true;
6495
+ };
6496
+ "navigator": {
6497
+ "alias": "navigator";
6498
+ "required": false;
6499
+ "isSignal": true;
6500
+ };
6501
+ "measure": {
6502
+ "alias": "measure";
6503
+ "required": false;
6504
+ "isSignal": true;
6505
+ };
6506
+ "range": {
6507
+ "alias": "range";
6508
+ "required": false;
6509
+ "isSignal": true;
6510
+ };
6511
+ "window": {
6512
+ "alias": "window";
6513
+ "required": false;
6514
+ "isSignal": true;
6515
+ };
6516
+ }, {
6517
+ "range": "rangeChange";
6518
+ "window": "windowChange";
6519
+ }, never, ["*"], true, never>;
6520
+ }
6521
+ /**
6522
+ * One line of a SectionChart (GLOSSARY.md SectionChartSeries). It registers
6523
+ * with the chart it sits in, at any depth, and the chart draws every
6524
+ * registered series on one axis; what the series draws itself is its legend
6525
+ * row — so the row is the series' own element, which is what an editor selects
6526
+ * it by. Composed rather than configured, SectionTableRow's way — a series
6527
+ * written inside an `@for` is one line per item, one written outside it is one
6528
+ * line.
6529
+ *
6530
+ * Reads any collection as it stands: `x` and `y` name the members holding each
6531
+ * row's time and value, so an api's rows bind with no reshaping first.
6532
+ */
6533
+ export declare class SectionChartSeriesComponent {
6534
+ /** The rows this line reads. Unset or empty draws no line. */
6535
+ readonly data: import("@angular/core").InputSignal<readonly unknown[] | null | undefined>;
6536
+ /** The member holding each row's time: epoch ms, an ISO date or a Date. */
6537
+ readonly x: import("@angular/core").InputSignal<string>;
6538
+ /** The member holding each row's value. */
6539
+ readonly y: import("@angular/core").InputSignal<string>;
6540
+ /** What the legend and the tooltip call this line — a translation key. */
6541
+ readonly label: import("@angular/core").InputSignal<string>;
6542
+ /** Draws `label` as written: a name read off the data is not a key. */
6543
+ readonly noTranslate: import("@angular/core").InputSignal<boolean>;
6544
+ /**
6545
+ * The [MessageVariable] values `label` is resolved with — the legend, the
6546
+ * tooltip and the table all read the same record. Ignored under
6547
+ * `noTranslate`, where the label is not looked up.
6548
+ */
6549
+ readonly params: import("@angular/core").InputSignal<Record<string, string> | undefined>;
6550
+ /**
6551
+ * A ThemeColor key or any CSS colour. Unset takes the palette slot the chart
6552
+ * gave this series when it arrived, and keeps it while siblings come and go.
6553
+ */
6554
+ readonly color: import("@angular/core").InputSignal<string | undefined>;
6555
+ readonly points: Signal<import("@magmonium/one").SectionChartPoints>;
6556
+ /** The legend row the chart worked out for this series; none outside one. */
6557
+ protected readonly row: Signal<SectionChartLegendRow | undefined>;
6558
+ constructor();
6559
+ static ɵfac: i0.ɵɵFactoryDeclaration<SectionChartSeriesComponent, never>;
6560
+ static ɵcmp: i0.ɵɵComponentDeclaration<SectionChartSeriesComponent, "m-section-chart-series", never, {
6561
+ "data": {
6562
+ "alias": "data";
6563
+ "required": false;
6564
+ "isSignal": true;
6565
+ };
6566
+ "x": {
6567
+ "alias": "x";
6568
+ "required": false;
6569
+ "isSignal": true;
6570
+ };
6571
+ "y": {
6572
+ "alias": "y";
6573
+ "required": false;
6574
+ "isSignal": true;
6575
+ };
6576
+ "label": {
6577
+ "alias": "label";
6578
+ "required": false;
6579
+ "isSignal": true;
6580
+ };
6581
+ "noTranslate": {
6582
+ "alias": "noTranslate";
6583
+ "required": false;
6584
+ "isSignal": true;
6585
+ };
6586
+ "params": {
6587
+ "alias": "params";
6588
+ "required": false;
6589
+ "isSignal": true;
6590
+ };
6591
+ "color": {
6592
+ "alias": "color";
6593
+ "required": false;
6594
+ "isSignal": true;
6595
+ };
6596
+ }, {}, never, never, true, never>;
6597
+ }
6598
+ /**
6599
+ * A row's time as epoch ms: a finite number as it stands, a numeric string as
6600
+ * the number it spells, any other string through `Date.parse`, a Date as its
6601
+ * own time. Anything else is no time, and the row it came from is dropped.
6602
+ */
6603
+ declare const toChartTime: (value: unknown) => number | null;
6604
+ /**
6605
+ * Reads one series out of any collection: `x` names the member holding each
6606
+ * row's time and `y` the member holding its value. A positional row — a tuple
6607
+ * — is read the same way, its places named `0`, `1` and so on. Rows with no
6608
+ * time or no finite value drop; what is left comes back time-ascending.
6609
+ */
6610
+ export declare const readChartPoints: (rows: readonly unknown[] | null | undefined, x: string, y: string) => SectionChartPoints;
6611
+ /** The first index whose time is not before `x`. */
6612
+ declare const lowerBound: (times: readonly number[], x: number) => number;
6613
+ /** The index whose time is closest to `x`; the earlier one on a tie. */
6614
+ declare const nearestIndex: (times: readonly number[], x: number) => number;
6615
+ /**
6616
+ * Each value as % change from the first one. A series starting at zero has
6617
+ * no % change to speak of, so it comes back `null` rather than as infinities.
6618
+ */
6619
+ declare const rebase: (values: readonly number[]) => number[] | null;
6620
+ /** % change from a series' first value to its last, or null when it has none. */
6621
+ declare const chartChange: (values: readonly number[]) => number | null;
6622
+ /**
6623
+ * Largest-Triangle-Three-Buckets: at most `n` points that keep the shape —
6624
+ * peaks and troughs survive where every-k-th sampling drops them. The triangle
6625
+ * is measured on the index rather than the time, so milliseconds against
6626
+ * percent never weights one axis over the other.
6627
+ */
6628
+ declare const downsample: (t: readonly number[], y: readonly number[], n: number) => SectionChartPoints;
6629
+ /**
6630
+ * Round-number ticks covering `min`–`max`, about `count` of them, stepped in
6631
+ * 1, 2 or 5 of a power of ten. The domain widens to the outer ticks so the
6632
+ * plot never ends between two gridlines.
6633
+ */
6634
+ declare const niceTicks: (min: number, max: number, count?: number) => {
6635
+ min: number;
6636
+ max: number;
6637
+ ticks: number[];
6638
+ };
6639
+ /**
6640
+ * Ticks for a time axis at most `maxTicks` wide, read in UTC: Mondays a week
6641
+ * or more apart for spans up to ~100 days, month starts beyond that, and year
6642
+ * starts once months would crowd. A January tick names its year.
6643
+ */
6644
+ declare const timeTicks: (t0: number, t1: number, maxTicks: number) => SectionChartTimeTick[];
6645
+ /**
6646
+ * The span a preset id names, ending on the last point and measured back from
6647
+ * it rather than from today — data may lag the clock, and a 1M chart of a
6648
+ * series a week stale should still hold a month of it. Calendar months and
6649
+ * years, in UTC. Never reaches before the first point: a 5Y preset over two
6650
+ * years of data is those two years, not three empty ones.
6651
+ *
6652
+ * `max` is everything and `ytd` runs from the last point's 1 January. Any
6653
+ * other id is a count and a unit — `10d`, `2w`, `3m`, `5y` — and anything
6654
+ * else names no span.
6655
+ */
6656
+ declare const presetSpan: (id: string, first: number, last: number) => [number, number] | null;
6657
+ /** Whether an id names a span at all — what a preset list keeps. */
6658
+ declare const isPresetId: (id: unknown) => id is string;
6659
+ /** What a preset's button reads: its id, upper-cased — `1M`, `YTD`, `MAX`. */
6660
+ declare const presetLabel: (id: string) => string;
6661
+ /** The points of a series that fall in `from`–`to`, both ends included. */
6662
+ declare const sliceSpan: (points: SectionChartPoints, from: number, to: number) => SectionChartPoints;
6663
+ /** What a press on the navigator takes hold of. */
6664
+ type NavigatorGrip = 'start' | 'end' | 'move' | 'outside';
6665
+ /**
6666
+ * Which part of the window a press at `t` takes hold of: an edge within
6667
+ * `slop` of it, the window itself between them, or the strip outside. The
6668
+ * nearer edge wins when a narrow window puts both within reach.
6669
+ */
6670
+ declare const navigatorGrip: (t: number, span: readonly [number, number], slop: number) => NavigatorGrip;
6671
+ /** A span moved by `delta`, its width kept and its ends kept inside `bounds`. */
6672
+ declare const panSpan: (span: readonly [number, number], delta: number, bounds: readonly [number, number]) => [number, number];
6673
+ /** A span of the same width centred on `t`, kept inside `bounds`. */
6674
+ declare const centreSpan: (span: readonly [number, number], t: number, bounds: readonly [number, number]) => [number, number];
6675
+ /**
6676
+ * A span with one edge dragged to `t`. The edge stops `minWidth` short of the
6677
+ * other one rather than crossing it, and never leaves `bounds`.
6678
+ */
6679
+ declare const resizeSpan: (span: readonly [number, number], edge: "start" | "end", t: number, bounds: readonly [number, number], minWidth: number) => [number, number];
6680
+ /** An SVG path through the points, straight segments — a curve invents highs. */
6681
+ declare const linePath: (t: readonly number[], y: readonly number[], sx: (t: number) => number, sy: (v: number) => number) => string;
6682
+ /**
6683
+ * The points a SectionChart draws on the Canvas when its series hold no data:
6684
+ * a year of weekly closes per series, deterministic so a screenshot never
6685
+ * moves, each series drifting its own way so a comparison reads as one.
6686
+ */
6687
+ declare const sampleChartPoints: (index: number, end?: number) => SectionChartPoints;
6063
6688
  type TabGroup = Config & {
6064
6689
  tabs: Button[];
6065
6690
  activeTabId?: string;
@@ -7587,7 +8212,7 @@ declare class ColorPickerBoxComponent implements AfterViewInit, OnDestroy {
7587
8212
  protected readonly _eyedropperConfig: import("@magmonium/one").Button;
7588
8213
  protected readonly _headerContextMenu: ContextMenu;
7589
8214
  protected readonly themeSwatches: import("@angular/core").Signal<{
7590
- key: "text" | "error" | "focus" | "mm" | "mmLite" | "mmDark" | "background" | "border" | "textSecondary" | "errorLight" | "warning" | "successLite" | "success" | "highlight" | "wealth";
8215
+ key: "mm" | "mmLite" | "mmDark" | "background" | "border" | "text" | "textSecondary" | "focus" | "error" | "errorLight" | "warning" | "successLite" | "success" | "highlight" | "wealth";
7591
8216
  color: string;
7592
8217
  }[]>;
7593
8218
  hue: import("@angular/core").WritableSignal<number>;
@@ -11403,7 +12028,7 @@ export type DocAiPhase = 'idle' | 'asking' | 'question' | 'outline' | 'writing'
11403
12028
  */
11404
12029
  export declare class DocEditorComponent implements ControlValueAccessor {
11405
12030
  protected readonly groups: readonly import("@magmonium/one").DocToolbarGroup[];
11406
- protected readonly icons: Record<"code" | "link" | "table" | "strike" | "list" | "bold" | "heading" | "italic" | "quote", string>;
12031
+ protected readonly icons: Record<"list" | "code" | "link" | "table" | "strike" | "bold" | "heading" | "italic" | "quote", string>;
11407
12032
  protected readonly docActionKey: typeof docActionKey;
11408
12033
  private readonly translate;
11409
12034
  protected readonly value: import("@angular/core").WritableSignal<string>;
@@ -17196,4 +17821,4 @@ export declare const toggleUid: (audience: Audience, uid: string) => Audience;
17196
17821
  export declare const toggleGroup: (audience: Audience, groupId: string) => Audience;
17197
17822
  /** How many Users and Groups an Audience names. */
17198
17823
  export declare const pickCount: (audience: Audience) => number;
17199
- export type { Accordion, AccordionGroup, AccordionVariant, AppCardData, AppCardInputs, AppCardVariant, AppLogoTone, AppLogoVariant, AppManifest, AppTileData, AssetOption, Audience, AudienceLevel, AudienceMember, AudiencePicker, AuthResult, Badge, BadgeCount, BadgePosition, BadgeVariant, Button, ButtonGroup, CellChangeEvent, CellClickEvent, ColBreakpoint, ColSpan, ColorPallet, ColumnDef, Comment, CommentItem, Config, ContextMenu, ContextMenuEvent, Cursor, CustomIcon, DragListReorder, Draggable, DraggableState, FileUploadConfig, FileUploadEvent, FilterGroupContext, FilterGroupMember, FilterOption, FilterPanel, FilterPanelIo, FilterRangeMode, FilterSelectionMap, FilterValue, FilterVariant, FilteredTreeGrid, FlatTreeGridRow, FlexAlign, FlexAlignSelf, FlexConfig, FlexDirection, FlexItemConfig, FlexJustify, FlexVariant, GridAlignX, GridAlignY, GroupActionEvent, GroupDropEvent, GroupKind, GroupMenuEvent, Header, HeaderLevel, HeatSwatchRadius, Icon, KeyValueVariant, LabelSegment, ListConfig, ListContext, ListItem, ListOrientation, ListVariant, MenuItem, MoneySystem, NavCountConfig, NavInstanceConfig, NavMenuConfig, NavRowsConfig, NavVisibilityConfig, NavVisibleAnswer, NavWidgetConfig, NavWidgetEntry, NavWidgetMap, OverlayWidgetLoader, OverlayWidgetMap, PageChangeEvent, Pagination, PaginationWindow, ResolvedUserTab, RowDropEvent, SearchChangeEvent, SectionAccordion, SectionAccordionGroup, SectionAccordionGroupContext, SectionAccordionRef, SectionButtonGroupConfig, SectionFilterGroupConfig, SectionHero, SectionHeroVariant, SectionTableAlign, SectionTableColumn, SectionTableConfig, SectionTableDataType, SectionTableSort, SectionTableSortDirection, SectionTableVariant, SectionToggleItem, SectionToggleItemContext, SelectionAction, SelectionActionEvent, SelectionChangeEvent, SelectorConfig, SharingClient, SharingGroup, SocketMessage, Sort, SortChange, SortChangeEvent, SortOption, SortOrder, SourceAudience, SpacingInward, SqueezeMode, StatAlign, StatCornerEdge, StatCornerPosition, StatCornerSide, StatSurface, StatVariant, TabGroup, TableConfig, TableFilterCondition, TableFilterDef, TableGroup, TextOrNumberInput, Timeline, TimelineItem, TreeGridCellClickEvent, TreeGridLoadChildrenEvent, TreeGridRow, TreeGridRowSelectEvent, TreeGridToggleEvent, User };
17824
+ export type { Accordion, AccordionGroup, AccordionVariant, AppCardData, AppCardInputs, AppCardVariant, AppLogoTone, AppLogoVariant, AppManifest, AppTileData, AssetOption, Audience, AudienceLevel, AudienceMember, AudiencePicker, AuthResult, Badge, BadgeCount, BadgePosition, BadgeVariant, Button, ButtonGroup, CellChangeEvent, CellClickEvent, ColBreakpoint, ColSpan, ColorPallet, ColumnDef, Comment, CommentItem, Config, ContextMenu, ContextMenuEvent, Cursor, CustomIcon, DragListReorder, Draggable, DraggableState, FileUploadConfig, FileUploadEvent, FilterGroupContext, FilterGroupMember, FilterOption, FilterPanel, FilterPanelIo, FilterRangeMode, FilterSelectionMap, FilterValue, FilterVariant, FilteredTreeGrid, FlatTreeGridRow, FlexAlign, FlexAlignSelf, FlexConfig, FlexDirection, FlexItemConfig, FlexJustify, FlexVariant, GridAlignX, GridAlignY, GroupActionEvent, GroupDropEvent, GroupKind, GroupMenuEvent, Header, HeaderLevel, HeatSwatchRadius, Icon, KeyValueVariant, LabelSegment, ListConfig, ListContext, ListItem, ListOrientation, ListVariant, MenuItem, MoneySystem, NavCountConfig, NavInstanceConfig, NavMenuConfig, NavRowsConfig, NavVisibilityConfig, NavVisibleAnswer, NavWidgetConfig, NavWidgetEntry, NavWidgetMap, OverlayWidgetLoader, OverlayWidgetMap, PageChangeEvent, Pagination, PaginationWindow, ResolvedUserTab, RowDropEvent, SearchChangeEvent, SectionAccordion, SectionAccordionGroup, SectionAccordionGroupContext, SectionAccordionRef, SectionButtonGroupConfig, SectionChartConfig, SectionChartPoints, SectionChartScale, SectionChartWindow, SectionFilterGroupConfig, SectionHero, SectionHeroVariant, SectionTableAlign, SectionTableColumn, SectionTableConfig, SectionTableDataType, SectionTableSort, SectionTableSortDirection, SectionTableVariant, SectionToggleItem, SectionToggleItemContext, SelectionAction, SelectionActionEvent, SelectionChangeEvent, SelectorConfig, SharingClient, SharingGroup, SocketMessage, Sort, SortChange, SortChangeEvent, SortOption, SortOrder, SourceAudience, SpacingInward, SqueezeMode, StatAlign, StatCornerEdge, StatCornerPosition, StatCornerSide, StatSurface, StatVariant, TabGroup, TableConfig, TableFilterCondition, TableFilterDef, TableGroup, TextOrNumberInput, Timeline, TimelineItem, TreeGridCellClickEvent, TreeGridLoadChildrenEvent, TreeGridRow, TreeGridRowSelectEvent, TreeGridToggleEvent, User };