@magmonium/one 0.4.59 → 0.4.61

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magmonium/one",
3
- "version": "0.4.59",
3
+ "version": "0.4.61",
4
4
  "description": "Magmonium One — Angular design-system primitives for mm Apps",
5
5
  "author": "magmonium",
6
6
  "license": "MIT",
@@ -1539,7 +1539,7 @@ export declare class DraggableDirective {
1539
1539
  readonly max: import("@angular/core").InputSignal<Position | undefined>;
1540
1540
  readonly dragStart: import("@angular/core").OutputEmitterRef<void>;
1541
1541
  readonly dragEnd: import("@angular/core").OutputEmitterRef<void>;
1542
- 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">;
1543
1543
  protected state: DraggableState;
1544
1544
  set pos(position: Position);
1545
1545
  /**
@@ -6069,6 +6069,13 @@ export declare const sortSectionTableRows: <T>(rows: readonly T[] | null | undef
6069
6069
  */
6070
6070
  type SectionChartScale = 'auto' | 'percent' | 'value';
6071
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[];
6072
6079
  /**
6073
6080
  * The span a SectionChart draws, as the two ISO 8601 instants it runs between
6074
6081
  * (GLOSSARY.md SectionChartWindow). Text rather than epoch ms: what reads a
@@ -6102,6 +6109,8 @@ type SectionChartConfig = Config & {
6102
6109
  ranges?: string[];
6103
6110
  range?: string;
6104
6111
  scale?: SectionChartScale;
6112
+ variant?: SectionChartVariant;
6113
+ displayPeriod?: string;
6105
6114
  height?: number;
6106
6115
  navigator?: boolean;
6107
6116
  measure?: boolean;
@@ -6191,6 +6200,8 @@ type Plotted = {
6191
6200
  * The x axis is time, not position: series sampled on different days still
6192
6201
  * line up, and a gap in the data is a gap on the axis. Lines are straight
6193
6202
  * between points — a smoothed curve draws highs and lows that never happened.
6203
+ * The `minimal` variant alone curves them, and only monotonically
6204
+ * (`smoothPath`), which passes through every point without swinging past one.
6194
6205
  *
6195
6206
  * What it draws is a window of the data: a preset (`1m`, `ytd`, `max`, …)
6196
6207
  * measured back from the last point, or a window set by hand. `range` and
@@ -6205,6 +6216,16 @@ type Plotted = {
6205
6216
  export declare class SectionChartComponent extends ConfigComponent<SectionChartConfig> {
6206
6217
  subFolder: "section_charts";
6207
6218
  readonly scale: import("@angular/core").InputSignal<SectionChartScale | undefined>;
6219
+ /**
6220
+ * `minimal` draws the line alone under each series' name, change and the
6221
+ * period — no axes, grid, tooltip, measure, presets or navigator.
6222
+ */
6223
+ readonly variant: import("@angular/core").InputSignal<SectionChartVariant | undefined>;
6224
+ /**
6225
+ * The period the top row names, as written — `1Y`, `Past year`. Unset reads
6226
+ * the window's own dates.
6227
+ */
6228
+ readonly displayPeriod: import("@angular/core").InputSignal<string | undefined>;
6208
6229
  /** The whole chart's height in px, the time axis included. */
6209
6230
  readonly height: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
6210
6231
  /**
@@ -6232,9 +6253,8 @@ export declare class SectionChartComponent extends ConfigComponent<SectionChartC
6232
6253
  /** Every series that registered, in arrival order, each with its slot. */
6233
6254
  private readonly members;
6234
6255
  private readonly locale;
6256
+ private readonly uid;
6235
6257
  protected readonly tableId: string;
6236
- protected readonly left: number;
6237
- protected readonly top: number;
6238
6258
  protected readonly width: import("@angular/core").WritableSignal<number>;
6239
6259
  private readonly dateFormat;
6240
6260
  private readonly dayFormat;
@@ -6245,6 +6265,8 @@ export declare class SectionChartComponent extends ConfigComponent<SectionChartC
6245
6265
  protected readonly resolvedHeight: import("@angular/core").Signal<number>;
6246
6266
  private readonly resolvedScale;
6247
6267
  private readonly resolvedRange;
6268
+ protected readonly minimal: import("@angular/core").Signal<boolean>;
6269
+ private readonly margin;
6248
6270
  protected readonly showNavigator: import("@angular/core").Signal<boolean>;
6249
6271
  protected readonly canMeasure: import("@angular/core").Signal<boolean>;
6250
6272
  /** The asset's presets, ids that name no span dropped; the defaults without one. */
@@ -6282,6 +6304,8 @@ export declare class SectionChartComponent extends ConfigComponent<SectionChartC
6282
6304
  protected readonly percent: import("@angular/core").Signal<boolean>;
6283
6305
  private readonly plotWidth;
6284
6306
  private readonly plotHeight;
6307
+ protected readonly left: import("@angular/core").Signal<number>;
6308
+ protected readonly top: import("@angular/core").Signal<number>;
6285
6309
  protected readonly right: import("@angular/core").Signal<number>;
6286
6310
  protected readonly bottom: import("@angular/core").Signal<number>;
6287
6311
  protected readonly viewBox: import("@angular/core").Signal<string>;
@@ -6299,6 +6323,9 @@ export declare class SectionChartComponent extends ConfigComponent<SectionChartC
6299
6323
  color: string;
6300
6324
  endX: number;
6301
6325
  endY: number;
6326
+ area: string | null;
6327
+ fillId: string;
6328
+ fill: string;
6302
6329
  }[]>;
6303
6330
  protected readonly yTicks: import("@angular/core").Signal<{
6304
6331
  y: number;
@@ -6310,6 +6337,8 @@ export declare class SectionChartComponent extends ConfigComponent<SectionChartC
6310
6337
  label: string;
6311
6338
  }[]>;
6312
6339
  protected readonly windowLabel: import("@angular/core").Signal<string>;
6340
+ /** What the top row names the period: the authored text, else the window. */
6341
+ protected readonly periodLabel: import("@angular/core").Signal<string>;
6313
6342
  /**
6314
6343
  * Each series' legend row: its colour, and its change measured across the
6315
6344
  * window — `—` for a series with nothing in it. Every registered series has
@@ -6455,6 +6484,16 @@ export declare class SectionChartComponent extends ConfigComponent<SectionChartC
6455
6484
  "required": false;
6456
6485
  "isSignal": true;
6457
6486
  };
6487
+ "variant": {
6488
+ "alias": "variant";
6489
+ "required": false;
6490
+ "isSignal": true;
6491
+ };
6492
+ "displayPeriod": {
6493
+ "alias": "displayPeriod";
6494
+ "required": false;
6495
+ "isSignal": true;
6496
+ };
6458
6497
  "height": {
6459
6498
  "alias": "height";
6460
6499
  "required": false;
@@ -6646,6 +6685,13 @@ declare const centreSpan: (span: readonly [number, number], t: number, bounds: r
6646
6685
  declare const resizeSpan: (span: readonly [number, number], edge: "start" | "end", t: number, bounds: readonly [number, number], minWidth: number) => [number, number];
6647
6686
  /** An SVG path through the points, straight segments — a curve invents highs. */
6648
6687
  declare const linePath: (t: readonly number[], y: readonly number[], sx: (t: number) => number, sy: (v: number) => number) => string;
6688
+ /**
6689
+ * An SVG path through the points as a monotone cubic (d3's `monotoneX`): each
6690
+ * tangent is held to the shallower of its two neighbouring slopes and flattens
6691
+ * at a turn, so the curve never swings past a point — smooth, without the
6692
+ * highs and lows an ordinary spline invents. Two points or fewer stay straight.
6693
+ */
6694
+ declare const smoothPath: (t: readonly number[], y: readonly number[], sx: (t: number) => number, sy: (v: number) => number) => string;
6649
6695
  /**
6650
6696
  * The points a SectionChart draws on the Canvas when its series hold no data:
6651
6697
  * a year of weekly closes per series, deterministic so a screenshot never
@@ -8179,7 +8225,7 @@ declare class ColorPickerBoxComponent implements AfterViewInit, OnDestroy {
8179
8225
  protected readonly _eyedropperConfig: import("@magmonium/one").Button;
8180
8226
  protected readonly _headerContextMenu: ContextMenu;
8181
8227
  protected readonly themeSwatches: import("@angular/core").Signal<{
8182
- key: "text" | "error" | "focus" | "mm" | "mmLite" | "mmDark" | "background" | "border" | "textSecondary" | "errorLight" | "warning" | "successLite" | "success" | "highlight" | "wealth";
8228
+ key: "mm" | "mmLite" | "mmDark" | "background" | "border" | "text" | "textSecondary" | "focus" | "error" | "errorLight" | "warning" | "successLite" | "success" | "highlight" | "wealth";
8183
8229
  color: string;
8184
8230
  }[]>;
8185
8231
  hue: import("@angular/core").WritableSignal<number>;
@@ -11995,7 +12041,7 @@ export type DocAiPhase = 'idle' | 'asking' | 'question' | 'outline' | 'writing'
11995
12041
  */
11996
12042
  export declare class DocEditorComponent implements ControlValueAccessor {
11997
12043
  protected readonly groups: readonly import("@magmonium/one").DocToolbarGroup[];
11998
- protected readonly icons: Record<"code" | "link" | "table" | "strike" | "list" | "bold" | "heading" | "italic" | "quote", string>;
12044
+ protected readonly icons: Record<"list" | "code" | "link" | "table" | "strike" | "bold" | "heading" | "italic" | "quote", string>;
11999
12045
  protected readonly docActionKey: typeof docActionKey;
12000
12046
  private readonly translate;
12001
12047
  protected readonly value: import("@angular/core").WritableSignal<string>;
@@ -17167,7 +17213,7 @@ export declare class AuthActivityPageComponent {
17167
17213
  showTerms: import("@angular/core").Signal<boolean | undefined>;
17168
17214
  signUp: import("@angular/core").Signal<boolean | undefined>;
17169
17215
  tokens: import("@angular/core").Signal<undefined> | import("@ngrx/signals").DeepSignal<import("@magmonium/one").Tokens>;
17170
- user: import("@ngrx/signals").DeepSignal<import("@magmonium/one").AuthUser> | import("@angular/core").Signal<undefined>;
17216
+ user: import("@angular/core").Signal<undefined> | import("@ngrx/signals").DeepSignal<import("@magmonium/one").AuthUser>;
17171
17217
  wrongPassword: import("@angular/core").Signal<boolean | undefined>;
17172
17218
  deployToken: import("@angular/core").Signal<string | undefined>;
17173
17219
  hostUserTabs: Record<string, import("@angular/core").Type<unknown>>;
@@ -17347,7 +17393,7 @@ export declare const AuthStore: Type<{
17347
17393
  showTerms: import("@angular/core").Signal<boolean | undefined>;
17348
17394
  signUp: import("@angular/core").Signal<boolean | undefined>;
17349
17395
  tokens: import("@angular/core").Signal<undefined> | import("@ngrx/signals").DeepSignal<Tokens>;
17350
- user: import("@ngrx/signals").DeepSignal<import("@magmonium/one").AuthUser> | import("@angular/core").Signal<undefined>;
17396
+ user: import("@angular/core").Signal<undefined> | import("@ngrx/signals").DeepSignal<import("@magmonium/one").AuthUser>;
17351
17397
  wrongPassword: import("@angular/core").Signal<boolean | undefined>;
17352
17398
  deployToken: import("@angular/core").Signal<string | undefined>;
17353
17399
  hostUserTabs: Record<string, Type<unknown>>;