bank20baht-ui 0.4.2 → 0.4.3

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.
@@ -62,6 +62,8 @@ export declare class BahtBarChart extends BahtChartBase {
62
62
  private markersFor;
63
63
  /** Markers that apply to every row / column. */
64
64
  private get chartMarkers();
65
+ /** Markers pinned to one category — they ride that row / column, not the chart. */
66
+ private categoryMarkers;
65
67
  /** What a marker reads as: its own label, else its formatted value. */
66
68
  private markerText;
67
69
  /**
@@ -72,8 +74,14 @@ export declare class BahtBarChart extends BahtChartBase {
72
74
  /**
73
75
  * Marker labels, sorted along the axis and thinned so neighbours never collide:
74
76
  * a dropped label keeps its line, and its value still reads in the table twin.
77
+ * Thinning is scoped to the list it is given — chart-wide markers compete with
78
+ * each other, a row's own markers only with that row's.
75
79
  */
80
+ private place;
81
+ /** Chart-wide marker labels — the strip above the rows / the end of the line. */
76
82
  private placedMarkers;
83
+ /** A row's own marker labels, drawn beside their line inside that row. */
84
+ private rowMarkerLabels;
77
85
  /** Legend rows: one per series, plus the muted `compare` key when it is set. */
78
86
  private legendEntries;
79
87
  private renderHorizontal;
@@ -2314,6 +2314,25 @@
2314
2314
  "description": "Markers that apply to every row / column.",
2315
2315
  "readonly": true
2316
2316
  },
2317
+ {
2318
+ "kind": "method",
2319
+ "name": "categoryMarkers",
2320
+ "privacy": "private",
2321
+ "return": {
2322
+ "type": {
2323
+ "text": "ChartMarker[]"
2324
+ }
2325
+ },
2326
+ "parameters": [
2327
+ {
2328
+ "name": "category",
2329
+ "type": {
2330
+ "text": "string"
2331
+ }
2332
+ }
2333
+ ],
2334
+ "description": "Markers pinned to one category — they ride that row / column, not the chart."
2335
+ },
2317
2336
  {
2318
2337
  "kind": "method",
2319
2338
  "name": "markerText",
@@ -2358,6 +2377,31 @@
2358
2377
  ],
2359
2378
  "description": "Marker lines, positioned along the value axis. The label is drawn separately\n(`markerLabels`) as real text — a `title` attribute alone never reaches AT."
2360
2379
  },
2380
+ {
2381
+ "kind": "method",
2382
+ "name": "place",
2383
+ "privacy": "private",
2384
+ "return": {
2385
+ "type": {
2386
+ "text": "{ m: ChartMarker; pct: number }[]"
2387
+ }
2388
+ },
2389
+ "parameters": [
2390
+ {
2391
+ "name": "markers",
2392
+ "type": {
2393
+ "text": "ChartMarker[]"
2394
+ }
2395
+ },
2396
+ {
2397
+ "name": "max",
2398
+ "type": {
2399
+ "text": "number"
2400
+ }
2401
+ }
2402
+ ],
2403
+ "description": "Marker labels, sorted along the axis and thinned so neighbours never collide:\na dropped label keeps its line, and its value still reads in the table twin.\nThinning is scoped to the list it is given — chart-wide markers compete with\neach other, a row's own markers only with that row's."
2404
+ },
2361
2405
  {
2362
2406
  "kind": "method",
2363
2407
  "name": "placedMarkers",
@@ -2375,7 +2419,32 @@
2375
2419
  }
2376
2420
  }
2377
2421
  ],
2378
- "description": "Marker labels, sorted along the axis and thinned so neighbours never collide:\na dropped label keeps its line, and its value still reads in the table twin."
2422
+ "description": "Chart-wide marker labels — the strip above the rows / the end of the line."
2423
+ },
2424
+ {
2425
+ "kind": "method",
2426
+ "name": "rowMarkerLabels",
2427
+ "privacy": "private",
2428
+ "return": {
2429
+ "type": {
2430
+ "text": "TemplateResult[]"
2431
+ }
2432
+ },
2433
+ "parameters": [
2434
+ {
2435
+ "name": "category",
2436
+ "type": {
2437
+ "text": "string"
2438
+ }
2439
+ },
2440
+ {
2441
+ "name": "max",
2442
+ "type": {
2443
+ "text": "number"
2444
+ }
2445
+ }
2446
+ ],
2447
+ "description": "A row's own marker labels, drawn beside their line inside that row."
2379
2448
  },
2380
2449
  {
2381
2450
  "kind": "method",
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { a as s, b as e, d as h, c as r, e as B, f as o, g as l, h as i, i as n,
2
2
  import { g as T, s as b, a as k, t as x } from "./chunks/i18n-BcPL9_Jh.js";
3
3
  import { LEGACY_KEY_MAP as F, normalizeLegacySchema as v } from "./engine.js";
4
4
  import { B as R, a as y, b as L, i as A, r as P } from "./chunks/baht-toast-CD1WrOYr.js";
5
- import { B as I, a as M, b as V, c as _, d as N, e as O, f as Y, g as G, h as H, i as K, j, k as q, l as z, m as U, n as W, o as J, p as Q, q as X, r as Z, s as $, t as aa, u as ta, v as sa, w as ea, x as ha, y as ra, z as Ba, A as oa, C as la, D as ia, E as na, F as da, G as pa, H as ca, I as ma, J as Sa, K as ga, L as fa, M as Ca, N as ua, O as Ta, P as ba, Q as ka, R as xa, S as Ea, T as Fa, U as va, V as Da, W as Ra, X as ya, Y as La, Z as Aa, _ as Pa, $ as wa, a0 as Ia, a1 as Ma, a2 as Va, a3 as _a, a4 as Na } from "./chunks/baht-workflow-Dy8HZQ_f.js";
5
+ import { B as I, a as M, b as V, c as _, d as N, e as O, f as Y, g as G, h as H, i as K, j, k as q, l as z, m as U, n as W, o as J, p as Q, q as X, r as Z, s as $, t as aa, u as ta, v as sa, w as ea, x as ha, y as ra, z as Ba, A as oa, C as la, D as ia, E as na, F as da, G as pa, H as ca, I as ma, J as Sa, K as ga, L as fa, M as Ca, N as ua, O as Ta, P as ba, Q as ka, R as xa, S as Ea, T as Fa, U as va, V as Da, W as Ra, X as ya, Y as La, Z as Aa, _ as Pa, $ as wa, a0 as Ia, a1 as Ma, a2 as Va, a3 as _a, a4 as Na } from "./chunks/baht-workflow-DR5MA2SS.js";
6
6
  import { B as Ya, a as Ga, S as Ha, b as Ka, h as ja, c as qa } from "./chunks/base-CajA2aCO.js";
7
7
  export {
8
8
  I as BahtAccordion,
package/dist/ssr.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { render as d } from "@lit-labs/ssr";
2
2
  import { collectResult as u } from "@lit-labs/ssr/lib/render-result.js";
3
3
  import "./chunks/baht-toast-CD1WrOYr.js";
4
- import "./chunks/baht-workflow-Dy8HZQ_f.js";
4
+ import "./chunks/baht-workflow-DR5MA2SS.js";
5
5
  import "./chunks/base-CajA2aCO.js";
6
6
  const c = /<template shadowroot="(?:open|closed)" shadowrootmode="(?:open|closed)"[^>]*>|<template\b[^>]*>|<\/template>/g, x = (e) => e.startsWith("baht-");
7
7
  function f(e, i = x) {
package/dist/tokens.css CHANGED
@@ -2714,6 +2714,28 @@ code.baht-code {
2714
2714
  vertical-align: middle;
2715
2715
  background: var(--baht-color-text-muted);
2716
2716
  }
2717
+ /* A row's own marker, beside its line — on the surface so a bar behind it
2718
+ never runs through the text. */
2719
+ .baht-bar-chart-marker-label--row {
2720
+ top: 50%;
2721
+ bottom: auto;
2722
+ z-index: 2;
2723
+ margin-top: -0.55rem;
2724
+ background: var(--baht-chart-surface);
2725
+ padding: 0 4px;
2726
+ border-radius: var(--baht-radius-xs);
2727
+ }
2728
+ .baht-bar-chart-marker-label--row::before {
2729
+ display: none; /* the line it names is right beside it */
2730
+ }
2731
+ .baht-bar-chart-marker-label--column {
2732
+ left: 50%;
2733
+ transform: translate(-50%, -2px);
2734
+ z-index: 2;
2735
+ background: var(--baht-chart-surface);
2736
+ padding: 0 2px;
2737
+ border-radius: var(--baht-radius-xs);
2738
+ }
2717
2739
  .baht-bar-chart-marker-label--end {
2718
2740
  right: 0;
2719
2741
  bottom: 0;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "bank20baht-ui",
4
- "version": "0.4.2",
4
+ "version": "0.4.3",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bank20baht-ui",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "type": "module",
5
5
  "description": "JSON-driven form + workflow engine. Send JSON in, get an interactive form out.",
6
6
  "license": "MIT",