@bicharts/chart-host 0.6.82 → 0.6.84

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/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  formatSourceDateFor,
6
6
  isExcelDateFormat,
7
7
  normaliseAggregation
8
- } from "./chunk-7HPVGRQ2.mjs";
8
+ } from "./chunk-GG4U66E4.mjs";
9
9
  import {
10
10
  ANNOTATION_CLASS,
11
11
  ANNOTATION_LAYER_CLASS,
@@ -111,31 +111,68 @@ import {
111
111
  toSourceRows,
112
112
  unpinScrolledAxis,
113
113
  valuePlacementFlag
114
- } from "./chunk-MP5S6MVW.mjs";
114
+ } from "./chunk-2HKO6GEK.mjs";
115
+ import {
116
+ LASSO_AXES_SLOT,
117
+ LASSO_COUNT_CLASS,
118
+ LASSO_DEFAULT_ACTIONS,
119
+ LASSO_DRAG_PX,
120
+ LASSO_EVENT,
121
+ LASSO_KNOB_KEY,
122
+ LASSO_MAX_VERTICES,
123
+ LASSO_MODE_ATTR,
124
+ LASSO_NOTE_CLASS,
125
+ LASSO_OUTLINE_CLASS,
126
+ LASSO_PLOT_CLASS,
127
+ LASSO_RESTORE_MAX_SHAPES,
128
+ LASSO_RESTORE_MAX_VERTICES,
129
+ LASSO_ROW_CAP,
130
+ LASSO_SAMPLE_PX,
131
+ LASSO_SURFACE_CLASS,
132
+ clearLasso,
133
+ installLasso,
134
+ lassoActions,
135
+ lassoRowCap,
136
+ lassoVerdict,
137
+ pointInShape,
138
+ registerLassoAction
139
+ } from "./chunk-QIRLWJBI.mjs";
115
140
  import {
116
141
  _3,
117
142
  l,
118
143
  o
119
- } from "./chunk-ZRSEKV4I.mjs";
144
+ } from "./chunk-2ZUUIZWL.mjs";
120
145
  import {
121
146
  MIN_HIT_BAND_PX,
122
- SELECTION_GLYPH_CLASS,
123
147
  censusHitBands,
148
+ ensureCrossfilterHitTargets,
149
+ hitBandFlag
150
+ } from "./chunk-7HKVV5T5.mjs";
151
+ import {
152
+ CONTAINER_SLOT_PRESS_AT,
153
+ DRAG_NOT_CLICK_PX,
154
+ ROW_SET_MAX,
155
+ SELECTION_GLYPH_CLASS,
156
+ clearPress,
124
157
  clearSelectionGlyphs,
158
+ clickWasDrag,
125
159
  collectD3GlyphCenters,
126
160
  createMarkResolver,
127
- ensureCrossfilterHitTargets,
128
- hitBandFlag,
161
+ dispatchRowSet,
162
+ gestureWasDrag,
129
163
  isInsideControl,
130
164
  markKeyOf,
131
165
  nextClickedMarks,
132
166
  nextSelection,
133
167
  paintSelectionGlyphs,
134
168
  planSelectionPaint,
169
+ pressOf,
135
170
  rowIdxsFromMark,
136
171
  sameRowSet,
137
- selectionRuleOf
138
- } from "./chunk-MGAO2DR7.mjs";
172
+ selectionRuleOf,
173
+ trackPress,
174
+ validRowSet
175
+ } from "./chunk-IURROJT7.mjs";
139
176
  import "./chunk-A2GMXZP7.mjs";
140
177
  import {
141
178
  ACTIVE_TICK_CLASS,
@@ -187,7 +224,7 @@ import {
187
224
  chartOwnsTimeline,
188
225
  periodTickSuppressesFeedback,
189
226
  withoutViewOnlyKeys
190
- } from "./chunk-7JWL6LYE.mjs";
227
+ } from "./chunk-MR6TL7QZ.mjs";
191
228
  import "./chunk-GHODWOAL.mjs";
192
229
 
193
230
  // src/optionsVocabulary.ts
@@ -1132,7 +1169,21 @@ function qualifyGroupHeadingFor(row, state) {
1132
1169
  return null;
1133
1170
  }
1134
1171
  function newQualifyRefusalGroupState() {
1135
- return { poorFit: false, cannotDraw: false };
1172
+ return { poorFit: false, tooSmall: false, cannotDraw: false };
1173
+ }
1174
+ var QUALIFY_TILE_REFUSAL_CODES = Object.freeze([
1175
+ "TILE_TOO_NARROW",
1176
+ "TILE_TOO_SHORT",
1177
+ "TILE_NOT_SQUARE",
1178
+ "TILE_NOT_TALL",
1179
+ "TILE_TOO_SMALL",
1180
+ "EMBED_NOTHING_FITS_TILE",
1181
+ "EMBED_BEESWARM_TILE_TOO_SMALL"
1182
+ ]);
1183
+ var QUALIFY_TOO_SMALL_HEADING = "Needs a bigger tile";
1184
+ function refusalIsTileBound(row) {
1185
+ const code = row?.reasonCode;
1186
+ return typeof code === "string" && QUALIFY_TILE_REFUSAL_CODES.includes(code);
1136
1187
  }
1137
1188
  function refusalIsSelectable(row) {
1138
1189
  return !!row && row.isVeto !== true;
@@ -1140,9 +1191,23 @@ function refusalIsSelectable(row) {
1140
1191
  function orderRefusalsForDisplay(rows) {
1141
1192
  if (!Array.isArray(rows)) return [];
1142
1193
  const named = rows.filter((r2) => !!r2 && typeof r2.name === "string" && r2.name.trim() !== "");
1143
- return [...named.filter(refusalIsSelectable), ...named.filter((r2) => !refusalIsSelectable(r2))];
1194
+ const tile = named.filter(refusalIsTileBound);
1195
+ const rest = named.filter((r2) => !refusalIsTileBound(r2));
1196
+ return [
1197
+ ...rest.filter(refusalIsSelectable),
1198
+ ...tile.filter(refusalIsSelectable),
1199
+ ...tile.filter((r2) => !refusalIsSelectable(r2)),
1200
+ ...rest.filter((r2) => !refusalIsSelectable(r2))
1201
+ ];
1144
1202
  }
1145
1203
  function qualifyRefusalHeadingFor(row, state) {
1204
+ if (refusalIsTileBound(row)) {
1205
+ if (!state.tooSmall) {
1206
+ state.tooSmall = true;
1207
+ return "tooSmall";
1208
+ }
1209
+ return null;
1210
+ }
1146
1211
  if (refusalIsSelectable(row)) {
1147
1212
  if (!state.poorFit) {
1148
1213
  state.poorFit = true;
@@ -2073,6 +2138,11 @@ function markerArmedBlind(m2) {
2073
2138
  if (!m2) return false;
2074
2139
  return (m2.h ?? m2.v - 1) <= 0;
2075
2140
  }
2141
+ function markerArmedAtMs(m2) {
2142
+ if (!m2) return void 0;
2143
+ const t2 = Math.floor(m2.t);
2144
+ return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
2145
+ }
2076
2146
  function isBlindMarker(m2) {
2077
2147
  if (!m2) return false;
2078
2148
  return typeof m2.c !== "string" || m2.c.trim() === "";
@@ -2131,10 +2201,11 @@ function recoveryFinalOutcome(r2) {
2131
2201
  if (!r2) return null;
2132
2202
  const o3 = String(r2.pollOutcome ?? "").trim().toLowerCase();
2133
2203
  if (r2.isGenerationCancelled === true || r2.isPollFinal === true && o3 === "cancelled") return "cancelled";
2134
- if (r2.isPollFinal === true) return o3 === "not-received" ? "not-received" : "failed";
2204
+ if (r2.isPollFinal === true) return o3 === "not-received" ? "not-received" : o3 === "lost-in-restart" ? "lost-in-restart" : "failed";
2135
2205
  if (r2.isPollFinal == null && r2.isVersionNotFound === true) {
2136
2206
  const c2 = String(r2.errorCode ?? "").trim().toUpperCase();
2137
2207
  if (c2 === "GENERATION_NOT_RECEIVED") return "not-received";
2208
+ if (c2 === "GENERATION_LOST_IN_RESTART") return "lost-in-restart";
2138
2209
  if (c2 === "GENERATION_FAILED") return "failed";
2139
2210
  if (c2 === "GENERATION_CANCELLED") return "cancelled";
2140
2211
  }
@@ -2152,11 +2223,12 @@ function recoveryLooksUnreachable(transportFailuresInARow, everAnswered) {
2152
2223
  }
2153
2224
  var GENERATION_NOT_RECEIVED_MESSAGE = "The charting service has no record of that request, so nothing was generated and nothing was charged. Generate again.";
2154
2225
  var GENERATION_FAILED_MESSAGE = "That chart didn't finish on the server, so there's nothing to show. Generate again.";
2226
+ var GENERATION_LOST_IN_RESTART_MESSAGE = "The charting service restarted while your chart was being built, so nothing was delivered. Click Generate to build it again.";
2155
2227
  var RECOVERY_UNREACHABLE_MESSAGE = "We couldn't reach the charting service to check on your chart - it may be offline, or blocked on this network. Try again in a moment.";
2156
2228
  function recoveryFinalMessage(o3, serverMessage) {
2157
2229
  const s2 = String(serverMessage ?? "").trim();
2158
2230
  if (s2 !== "") return s2;
2159
- return o3 === "cancelled" ? GENERATION_CANCELLED_MESSAGE : o3 === "not-received" ? GENERATION_NOT_RECEIVED_MESSAGE : GENERATION_FAILED_MESSAGE;
2231
+ return o3 === "cancelled" ? GENERATION_CANCELLED_MESSAGE : o3 === "not-received" ? GENERATION_NOT_RECEIVED_MESSAGE : o3 === "lost-in-restart" ? GENERATION_LOST_IN_RESTART_MESSAGE : GENERATION_FAILED_MESSAGE;
2160
2232
  }
2161
2233
 
2162
2234
  // src/chartPick.ts
@@ -2318,6 +2390,7 @@ export {
2318
2390
  CONTAINER_SLOT_ANIM_STOP,
2319
2391
  CONTAINER_SLOT_CLICKED_MARKS,
2320
2392
  CONTAINER_SLOT_INITIAL_XF_MARK,
2393
+ CONTAINER_SLOT_PRESS_AT,
2321
2394
  CONTAINER_SLOT_UI_STATE,
2322
2395
  CONTAINER_SLOT_XF_CLEAR,
2323
2396
  CONTROL_CLASS,
@@ -2327,6 +2400,7 @@ export {
2327
2400
  DEFAULT_MODEL_SUFFIX,
2328
2401
  DIM_OPACITY_DEFAULT,
2329
2402
  DIM_OPACITY_VAR,
2403
+ DRAG_NOT_CLICK_PX,
2330
2404
  DUPLICATE_GENERATE_WINDOW_MS,
2331
2405
  FILTER_MIN_HEIGHT_PX,
2332
2406
  FILTER_MIN_TERM_CHARS,
@@ -2339,6 +2413,7 @@ export {
2339
2413
  FLIP_MODE_DEFAULT,
2340
2414
  GENERATION_CANCELLED_MESSAGE,
2341
2415
  GENERATION_FAILED_MESSAGE,
2416
+ GENERATION_LOST_IN_RESTART_MESSAGE,
2342
2417
  GENERATION_NOT_RECEIVED_MESSAGE,
2343
2418
  GEO_POINT_PRECISIONS,
2344
2419
  GLYPH_SAMPLE_N,
@@ -2348,6 +2423,22 @@ export {
2348
2423
  LABEL_CONTRAST_CAP,
2349
2424
  LABEL_CONTRAST_DONE_ATTR,
2350
2425
  LABEL_PILL_CLASS,
2426
+ LASSO_AXES_SLOT,
2427
+ LASSO_COUNT_CLASS,
2428
+ LASSO_DEFAULT_ACTIONS,
2429
+ LASSO_DRAG_PX,
2430
+ LASSO_EVENT,
2431
+ LASSO_KNOB_KEY,
2432
+ LASSO_MAX_VERTICES,
2433
+ LASSO_MODE_ATTR,
2434
+ LASSO_NOTE_CLASS,
2435
+ LASSO_OUTLINE_CLASS,
2436
+ LASSO_PLOT_CLASS,
2437
+ LASSO_RESTORE_MAX_SHAPES,
2438
+ LASSO_RESTORE_MAX_VERTICES,
2439
+ LASSO_ROW_CAP,
2440
+ LASSO_SAMPLE_PX,
2441
+ LASSO_SURFACE_CLASS,
2351
2442
  LEGEND_MARK_CLASS,
2352
2443
  LEGIBLE_LIGHTNESS,
2353
2444
  LIFT_SELECTED_CLASS,
@@ -2383,8 +2474,11 @@ export {
2383
2474
  PRODUCT_FEEDBACK_MAX_CHARS,
2384
2475
  PRODUCT_FEEDBACK_MIN_CHARS,
2385
2476
  QUALIFY_REFUSAL_UNSPECIFIED,
2477
+ QUALIFY_TILE_REFUSAL_CODES,
2478
+ QUALIFY_TOO_SMALL_HEADING,
2386
2479
  RECOVERY_UNREACHABLE_MESSAGE,
2387
2480
  ROW_IDX_ATTR,
2481
+ ROW_SET_MAX,
2388
2482
  SAME_SHADE_DELTA_E,
2389
2483
  SCROLL_SLACK_PX,
2390
2484
  SEASONAL_MARKERS_DEFAULT,
@@ -2433,7 +2527,10 @@ export {
2433
2527
  chartSvgOf,
2434
2528
  chooserFitsViewport,
2435
2529
  clearGeoCache,
2530
+ clearLasso,
2531
+ clearPress,
2436
2532
  clearSelectionGlyphs,
2533
+ clickWasDrag,
2437
2534
  clippedTextFlag,
2438
2535
  codeReadsDatesInLocalTime,
2439
2536
  codeReadsOption,
@@ -2456,6 +2553,7 @@ export {
2456
2553
  decidePendingRecovery,
2457
2554
  defaultModelFirst,
2458
2555
  deltaEHex,
2556
+ dispatchRowSet,
2459
2557
  encodePendingGenerate,
2460
2558
  ensureCrossfilterHitTargets,
2461
2559
  explainRenderFailure,
@@ -2470,12 +2568,14 @@ export {
2470
2568
  generationCancelledMessage,
2471
2569
  geoAssetFor,
2472
2570
  geoFromCache,
2571
+ gestureWasDrag,
2473
2572
  glyphSampleGrid,
2474
2573
  hasRefusalsToShow,
2475
2574
  hitBandFlag,
2476
2575
  htmlNaturalSize,
2477
2576
  htmlToSvgDataUrl,
2478
2577
  inlineFilterGate,
2578
+ installLasso,
2479
2579
  invalidSentinelReason,
2480
2580
  isBlankRender,
2481
2581
  isBlindMarker,
@@ -2490,6 +2590,9 @@ export {
2490
2590
  isPickableModelCode,
2491
2591
  isPillBackdropAlpha,
2492
2592
  labelBand,
2593
+ lassoActions,
2594
+ lassoRowCap,
2595
+ lassoVerdict,
2493
2596
  latePickupAction,
2494
2597
  latePickupKeepsMarker,
2495
2598
  launchFavorStyle,
@@ -2498,6 +2601,7 @@ export {
2498
2601
  loadGeo,
2499
2602
  markDefaultModel,
2500
2603
  markKeyOf,
2604
+ markerArmedAtMs,
2501
2605
  markerArmedBlind,
2502
2606
  measureContainerBoxes,
2503
2607
  minContrastOver,
@@ -2527,7 +2631,9 @@ export {
2527
2631
  planFrameGrow,
2528
2632
  planSelectionPaint,
2529
2633
  planTrivialChart,
2634
+ pointInShape,
2530
2635
  pollGiveUpKeepsMarker,
2636
+ pressOf,
2531
2637
  productFeedbackSendable,
2532
2638
  qualifyAuto,
2533
2639
  qualifyCancel,
@@ -2553,9 +2659,11 @@ export {
2553
2659
  recoveryPollRunning,
2554
2660
  recoveryProvesNothingCharged,
2555
2661
  refusalIsSelectable,
2662
+ refusalIsTileBound,
2556
2663
  registerCityTable,
2557
2664
  registerGeo,
2558
2665
  registerGeoAsset,
2666
+ registerLassoAction,
2559
2667
  relativeLuminance,
2560
2668
  requiredD3Plugins,
2561
2669
  resolveAutoColorScale,
@@ -2585,9 +2693,11 @@ export {
2585
2693
  tableHostOf,
2586
2694
  toRGBA,
2587
2695
  toSourceRows,
2696
+ trackPress,
2588
2697
  transportFailureShouldRecover,
2589
2698
  unpinScrolledAxis,
2590
2699
  updateRowHighWater,
2700
+ validRowSet,
2591
2701
  valuePlacementFlag,
2592
2702
  vegaSpecReadsDatesInLocalTime,
2593
2703
  wireLimitCount,
package/dist/page.mjs CHANGED
@@ -14,7 +14,10 @@ import {
14
14
  readControls,
15
15
  viewFromToken,
16
16
  viewToken
17
- } from "./chunk-XIAL6EEC.mjs";
17
+ } from "./chunk-DTOGTKAJ.mjs";
18
+ import "./chunk-QIRLWJBI.mjs";
19
+ import "./chunk-IURROJT7.mjs";
20
+ import "./chunk-MR6TL7QZ.mjs";
18
21
  import "./chunk-GHODWOAL.mjs";
19
22
  export {
20
23
  LINKED_HOVER_CLASS,
package/dist/react.mjs CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  payloadRowReader,
14
14
  viewFromToken,
15
15
  viewToken
16
- } from "./chunk-XIAL6EEC.mjs";
16
+ } from "./chunk-DTOGTKAJ.mjs";
17
17
  import {
18
18
  assembleD3,
19
19
  createChartGroup,
@@ -22,11 +22,13 @@ import {
22
22
  loadGeo,
23
23
  syncMemberSelection,
24
24
  toSourceRows
25
- } from "./chunk-MP5S6MVW.mjs";
26
- import "./chunk-ZRSEKV4I.mjs";
27
- import "./chunk-MGAO2DR7.mjs";
25
+ } from "./chunk-2HKO6GEK.mjs";
26
+ import "./chunk-QIRLWJBI.mjs";
27
+ import "./chunk-2ZUUIZWL.mjs";
28
+ import "./chunk-7HKVV5T5.mjs";
29
+ import "./chunk-IURROJT7.mjs";
28
30
  import "./chunk-A2GMXZP7.mjs";
29
- import "./chunk-7JWL6LYE.mjs";
31
+ import "./chunk-MR6TL7QZ.mjs";
30
32
  import "./chunk-GHODWOAL.mjs";
31
33
 
32
34
  // src/react.tsx
package/dist/testing.mjs CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  MARK_CLASS,
5
5
  MARK_SELECTED_CLASS,
6
6
  ROW_IDX_ATTR
7
- } from "./chunk-7JWL6LYE.mjs";
7
+ } from "./chunk-MR6TL7QZ.mjs";
8
8
  import "./chunk-GHODWOAL.mjs";
9
9
 
10
10
  // src/testing/interact.ts
@@ -1,4 +1,4 @@
1
- export declare const HOST_CONTRACT_VERSION = "1.14.0";
1
+ export declare const HOST_CONTRACT_VERSION = "1.16.0";
2
2
  export type GeoPointPrecision = "latlon" | "city" | "zip3" | "state" | "country";
3
3
  /** Every valid tier, ordered most precise → coarsest. Runtime form of GeoPointPrecision. */
4
4
  export declare const GEO_POINT_PRECISIONS: readonly GeoPointPrecision[];
@@ -19,6 +19,18 @@ export declare const MARK_KEY_ATTR = "data-mark-key";
19
19
  export declare const NO_ROW_MARKS_ATTR = "data-lch-no-row-marks";
20
20
  export declare const SNAPSHOT_SVG_ATTR = "data-lch-snapshot";
21
21
  export declare const XFILTER_REFRESH_EVENT = "llm-xfilter-refresh";
22
+ /** What the event carries. `source` names who selected ("user" when a reader's gesture did); the host
23
+ * passes it on to its subscribers, and "chart" stands in when it is absent. */
24
+ export type XfilterRefreshDetail = {
25
+ clear: true;
26
+ source?: string;
27
+ } | {
28
+ mark: Element;
29
+ source?: string;
30
+ } | {
31
+ rows: readonly number[];
32
+ source?: string;
33
+ };
22
34
  export declare const CONTAINER_SLOT_ANIM_STOP = "__llmAnimStop";
23
35
  export declare const CONTAINER_SLOT_XF_CLEAR = "__llmXfClear";
24
36
  export declare const CONTAINER_SLOT_INITIAL_XF_MARK = "__llmInitialXfMark";
@@ -109,6 +121,9 @@ export interface RenderOptions {
109
121
  rolesRefused?: string[];
110
122
  } | null;
111
123
  dateCellsAreUtcDays?: boolean;
124
+ dataComplete?: boolean;
125
+ rowsWithheld?: number;
126
+ rowsFilteredOut?: number;
112
127
  geoPointDest?: {
113
128
  precision: GeoPointPrecision | null;
114
129
  precisionCounts: Record<GeoPointPrecision, number>;
@@ -178,6 +193,25 @@ export interface RenderOptions {
178
193
  * take the reader's gesture with it: the helper swallows anything this raises.
179
194
  */
180
195
  onControlChange?: (e: ChartControlChange) => void;
196
+ /**
197
+ * THE HOST LASSO (contract 1.16.0): whether this chart gets the gesture that draws around marks and selects the
198
+ * ones inside, and what the host does when it ends. A chart never draws the gesture; it hears it as an
199
+ * `llm-lasso` event on its container.
200
+ * capable - the capability the SERVER sent with this chart (the chart's type declares that it has no drag
201
+ * gesture of its own and that a lasso means something for it). ABSENT MEANS NOT CAPABLE: no host
202
+ * holds a list of chart types, so a chart saved before the capability existed has none.
203
+ * enabled - the reader's setting; on unless it is exactly false. Both must hold for a surface to be drawn.
204
+ * rowCap - the most rows in view that still get a lasso; above it the whole lasso is off and a caption says
205
+ * so. Absent is LASSO_ROW_CAP (provisional).
206
+ * actions - what the host runs on release, in order, by name. Absent is ["select"]; a name the host does
207
+ * not know is skipped, so a list can be sent ahead of the build that understands it.
208
+ */
209
+ lasso?: {
210
+ enabled?: boolean;
211
+ rowCap?: number;
212
+ actions?: string[];
213
+ capable?: boolean;
214
+ };
181
215
  }
182
216
  /** One reader gesture on a chart's own control. */
183
217
  export interface ChartControlChange {
@@ -1,4 +1,4 @@
1
- export { HOST_CONTRACT_VERSION, GEO_POINT_PRECISIONS, MARK_CLASS, LEGEND_MARK_CLASS, AXIS_FILTER_CLASS, ROW_IDX_ATTR, LIFT_SELECTED_CLASS, CONTROL_CLASS, NO_ROW_MARKS_ATTR, SELECTION_RULE_ATTR, SELECTION_RULE_CLICKED_MARKS, MARK_KEY_ATTR, CONTAINER_SLOT_CLICKED_MARKS, SNAPSHOT_SVG_ATTR, XFILTER_REFRESH_EVENT, CONTAINER_SLOT_ANIM_STOP, CONTAINER_SLOT_XF_CLEAR, CONTAINER_SLOT_INITIAL_XF_MARK, CONTAINER_SLOT_UI_STATE, VIEW_ONLY_UI_STATE_KEYS, withoutViewOnlyKeys, HOST_CONTAINER_CLASS, SELECTION_ACTIVE_CLASS, MARK_SELECTED_CLASS, ACTIVE_TICK_CLASS, DIM_OPACITY_VAR, DIM_OPACITY_DEFAULT, chartOwnsTimeline, periodTickSuppressesFeedback, ANIM_PLAY_SPEED_DEFAULT, ANIM_PLAY_SPEED_MIN, ANIM_PLAY_SPEED_MAX, ANIM_LOOP_DELAY_DEFAULT, ANIM_LOOP_DELAY_MIN, ANIM_MAX_IDEAL_FRAMES_DEFAULT, ANIM_MAX_IDEAL_FRAMES_MIN, ANIM_MAX_IDEAL_FRAMES_MAX, ANIMATION_OPTION_KEYS, COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT, COLOR_SCALE_SELF_CLAMP_PCT_MIN, COLOR_SCALE_SELF_CLAMP_PCT_MAX, FLIP_MODE_DEFAULT, FLIP_INTERVAL_MIN_MS, FLIP_INTERVAL_MAX_MS, FLIP_DIRECTION_DEFAULT, APPROXIMATE_POSITIONS_DEFAULT, VALUE_AXIS_BASELINE_DEFAULT, SEASONAL_MARKERS_DEFAULT, MAX_MAP_POINTS_DEFAULT, type GeoPointPrecision, type GeoMapKind, type TimelineStyle, type FlipMode, type FlipDirection, type ApproximatePositions, type ValueAxisBaseline, type SeasonalMarkers, type ColorScaleScope, type RenderOptions, type ViewStateProvider, type ChartControlChange, } from "./contract";
1
+ export { HOST_CONTRACT_VERSION, GEO_POINT_PRECISIONS, MARK_CLASS, LEGEND_MARK_CLASS, AXIS_FILTER_CLASS, ROW_IDX_ATTR, LIFT_SELECTED_CLASS, CONTROL_CLASS, NO_ROW_MARKS_ATTR, SELECTION_RULE_ATTR, SELECTION_RULE_CLICKED_MARKS, MARK_KEY_ATTR, CONTAINER_SLOT_CLICKED_MARKS, SNAPSHOT_SVG_ATTR, XFILTER_REFRESH_EVENT, CONTAINER_SLOT_ANIM_STOP, CONTAINER_SLOT_XF_CLEAR, CONTAINER_SLOT_INITIAL_XF_MARK, CONTAINER_SLOT_UI_STATE, VIEW_ONLY_UI_STATE_KEYS, withoutViewOnlyKeys, HOST_CONTAINER_CLASS, SELECTION_ACTIVE_CLASS, MARK_SELECTED_CLASS, ACTIVE_TICK_CLASS, DIM_OPACITY_VAR, DIM_OPACITY_DEFAULT, chartOwnsTimeline, periodTickSuppressesFeedback, ANIM_PLAY_SPEED_DEFAULT, ANIM_PLAY_SPEED_MIN, ANIM_PLAY_SPEED_MAX, ANIM_LOOP_DELAY_DEFAULT, ANIM_LOOP_DELAY_MIN, ANIM_MAX_IDEAL_FRAMES_DEFAULT, ANIM_MAX_IDEAL_FRAMES_MIN, ANIM_MAX_IDEAL_FRAMES_MAX, ANIMATION_OPTION_KEYS, COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT, COLOR_SCALE_SELF_CLAMP_PCT_MIN, COLOR_SCALE_SELF_CLAMP_PCT_MAX, FLIP_MODE_DEFAULT, FLIP_INTERVAL_MIN_MS, FLIP_INTERVAL_MAX_MS, FLIP_DIRECTION_DEFAULT, APPROXIMATE_POSITIONS_DEFAULT, VALUE_AXIS_BASELINE_DEFAULT, SEASONAL_MARKERS_DEFAULT, MAX_MAP_POINTS_DEFAULT, type GeoPointPrecision, type GeoMapKind, type TimelineStyle, type FlipMode, type FlipDirection, type ApproximatePositions, type ValueAxisBaseline, type SeasonalMarkers, type ColorScaleScope, type RenderOptions, type ViewStateProvider, type ChartControlChange, type XfilterRefreshDetail, } from "./contract";
2
2
  export { resolveOptions, type ResolveOptionsInput } from "./defaults";
3
3
  export { OPTIONS_VOCABULARY, LIVE_OPTION_KEYS, MAX_MAP_POINTS_MIN, MAX_MAP_POINTS_MAX, LIMIT_COUNT_MAX, wireLimitCount, codeReadsOption, type OptionVocabularyEntry, type OptionTiming, type OptionWire, type OptionKey, } from "./optionsVocabulary";
4
4
  export { loadGeo, geoFromCache, registerGeo, registerGeoAsset, geoAssetFor, clearGeoCache, type GeoAssetName, } from "./geoLazy";
@@ -13,14 +13,15 @@ export type { MarkNoteLike, NoteBadgeOptions } from "./markNotes";
13
13
  export type { Controls, ControlInfo, ControlsAttachment } from "./controls";
14
14
  export { createChartGroup, toSourceRows, syncMemberSelection, type ChartGroup, type ChartGroupMember, type ChartGroupSelection, type ChartGroupChange, type ChartGroupMemberOptions, type ChartGroupSourceOptions, type ChartGroupPayload } from "./group";
15
15
  export type { Filter, FilterScope, FilterOptions, FilterKey, FilterChangeReason, FilterBinding, BindFilterOptions, VegaInteractionEvent, PageView } from "./filterScope";
16
- export { createMarkResolver, isInsideControl, rowIdxsFromMark, nextSelection, selectionRuleOf, markKeyOf, planSelectionPaint, nextClickedMarks, sameRowSet, type SelectionRule, type ClickedMarks, type SelectionPaintMark, type SelectionPaintMode, type SelectionPaintPlan, collectD3GlyphCenters, clearSelectionGlyphs, paintSelectionGlyphs, SELECTION_GLYPH_CLASS, type MarkResolver, type MarkResolverEnv, type GlyphCenter, type SelectionGlyphStyle, type SelectionModifiers, } from "./selection";
16
+ export { createMarkResolver, isInsideControl, rowIdxsFromMark, nextSelection, DRAG_NOT_CLICK_PX, gestureWasDrag, trackPress, pressOf, clearPress, clickWasDrag, CONTAINER_SLOT_PRESS_AT, type PressPoint, dispatchRowSet, validRowSet, ROW_SET_MAX, selectionRuleOf, markKeyOf, planSelectionPaint, nextClickedMarks, sameRowSet, type SelectionRule, type ClickedMarks, type SelectionPaintMark, type SelectionPaintMode, type SelectionPaintPlan, collectD3GlyphCenters, clearSelectionGlyphs, paintSelectionGlyphs, SELECTION_GLYPH_CLASS, type MarkResolver, type MarkResolverEnv, type GlyphCenter, type SelectionGlyphStyle, type SelectionModifiers, } from "./selection";
17
+ export { installLasso, clearLasso, lassoVerdict, lassoRowCap, lassoActions, registerLassoAction, pointInShape, LASSO_ROW_CAP, LASSO_DRAG_PX, LASSO_SAMPLE_PX, LASSO_MAX_VERTICES, LASSO_RESTORE_MAX_VERTICES, LASSO_RESTORE_MAX_SHAPES, LASSO_EVENT, LASSO_SURFACE_CLASS, LASSO_OUTLINE_CLASS, LASSO_COUNT_CLASS, LASSO_NOTE_CLASS, LASSO_PLOT_CLASS, LASSO_MODE_ATTR, LASSO_KNOB_KEY, LASSO_AXES_SLOT, LASSO_DEFAULT_ACTIONS, type LassoSetting, type LassoVerdict, type LassoMode, type LassoSpace, type LassoShape, type LassoStored, type LassoEventDetail, type LassoAxes, type LassoAction, type LassoActionContext, type LassoEnv, type LassoHandle, } from "./lasso";
17
18
  export type { AdapterEvent, AdapterHit, AdapterId, AdapterScene, MarkHandle, MarkInfo, MarkRole, PaintRequest, RendererAdapter, RowTable, } from "./adapters/types";
18
19
  export { planTrivialChart, compileTrivialSource, type TrivialPlan, type TrivialShapeKind } from "./trivial";
19
20
  export { captureSvgSnapshot, svgToDataUrl, svgNaturalSize, rasterizeSvgToPngDataUrl, tableHostOf, chartSvgOf, htmlToSvgDataUrl, htmlNaturalSize, type SnapshotOptions } from "./snapshot";
20
21
  export { shouldReview, buildReviewWire, bareBase64, actionFor, type ReviewGate, type ReviewWire, type ReviewVerdict, type ReviewAction } from "./review";
21
22
  export { askApplyImprovements, type ReviewDialogOptions, type ReviewDialogText } from "./reviewDialog";
22
23
  export { mountProductFeedbackBox, normaliseProductFeedbackText, productFeedbackSendable, buildProductFeedbackPayload, PRODUCT_FEEDBACK_MAX_CHARS, PRODUCT_FEEDBACK_MIN_CHARS, type ProductFeedbackBox, type ProductFeedbackBoxOptions, type ProductFeedbackText, type ProductFeedbackSendResult, type ProductFeedbackPayload, type ProductFeedbackIdentity, type ProductFeedbackHost, } from "./productFeedback";
23
- export { qualifyGroupHeadingFor, newQualifyGroupState, type QualifyGroupRow, type QualifyGroupState, type QualifyGroupHeading, orderRefusalsForDisplay, refusalIsSelectable, hasRefusalsToShow, qualifyRefusalHeadingFor, newQualifyRefusalGroupState, qualifyRefusalReason, QUALIFY_REFUSAL_UNSPECIFIED, type QualifyRefusalRow, type QualifyRefusalGroupState, type QualifyRefusalHeading, } from "./qualifyGroups";
24
+ export { qualifyGroupHeadingFor, newQualifyGroupState, type QualifyGroupRow, type QualifyGroupState, type QualifyGroupHeading, orderRefusalsForDisplay, refusalIsSelectable, hasRefusalsToShow, qualifyRefusalHeadingFor, newQualifyRefusalGroupState, qualifyRefusalReason, QUALIFY_REFUSAL_UNSPECIFIED, refusalIsTileBound, QUALIFY_TILE_REFUSAL_CODES, QUALIFY_TOO_SMALL_HEADING, type QualifyRefusalRow, type QualifyRefusalGroupState, type QualifyRefusalHeading, } from "./qualifyGroups";
24
25
  export { qualifyPick, qualifyAuto, qualifyCancel, launchGenerates, launchFavorStyle, chooserFitsViewport, shouldOpenChooserOnGenerate, shouldOpenInlineChooserOnGenerate, canConfirmLaunch, confirmLaunch, qualifyFailureFallsOpen, CHOOSER_MIN_WIDTH_PX, CHOOSER_MIN_HEIGHT_PX, type QualifyLaunchOutcome, type ChooserGateInput, } from "./qualifyLaunch";
25
26
  export { normalizeFilterTerm, filterQualifyRows, readQualifyChartRow, readQualifyRefusalRow, DEFAULT_FILTER_MATCH_STYLE, filterMatchStyleOf, type FilterMatchStyle, filterFitsChooser, listNeedsFilter, qualifyFilterGate, inlineFilterGate, FILTER_MIN_TERM_CHARS, FILTER_ROW_PX, FILTER_MIN_WIDTH_PX, FILTER_MIN_HEIGHT_PX, INLINE_FILTER_MIN_ROWS, computeQualifyFilterView, qualifyFilterCountText, type QualifyFilterTier, type QualifyFilterResult, type QualifyFilterRead, type QualifyFilterGateReason, type QualifyFilterGateInput, type QualifyFilterRow, type QualifyFilterGroup, type QualifyFilterView, type QualifyFilterNoteKind, } from "./qualifyFilter";
26
27
  export { qualifyTableRows, type QualifyTableRow, type QualifyTableSource } from "./qualifyTable";
@@ -44,7 +45,7 @@ export { pinScrolledAxis, unpinScrolledAxis, type AxisPinReport } from "./fitDom
44
45
  export { MIN_DELTA_E, pickDistinctColorFromSeed, buildPalette, buildPaletteFromSeed, orderMostDistinct, LEGIBLE_LIGHTNESS, type PaletteResult, type SeedForSlot, type PaletteOptions, } from "./palette";
45
46
  export { deltaEHex } from "./deltaE";
46
47
  export { resolveAutoColorScale, autoRampMinStep, autoRampCanvas, AUTO_RAMP_CLASSES, AUTO_RAMP_DRAWN_OPACITY, AUTO_RAMP_MIN_STEP_DELTA_E, type AutoColorScale, type AutoColorScaleInput } from "./autoRamp";
47
- export { PENDING_RECOVERY_WINDOW_MS, PENDING_RECOVERY_POLL_MS, PENDING_RECOVERY_FIRST_POLL_MS, PENDING_RECOVERY_FAST_PHASE_MS, PENDING_RECOVERY_MID_POLL_MS, PENDING_RECOVERY_SLOW_PHASE_MS, PENDING_RECOVERY_SLOW_POLL_MS, pendingRecoveryNextDelayMs, encodePendingGenerate, parsePendingGenerate, markerArmedBlind, isBlindMarker, servedCorrelationProves, sameMarker, decidePendingRecovery, recoveryPollRunning, recoveryOwnsTheSentence, latePickupAction, latePickupKeepsMarker, pollGiveUpKeepsMarker, pendingRecoveryRemainingMs, transportFailureShouldRecover, TRANSPORT_LOST_CHECKING_MESSAGE, GENERATION_CANCELLED_MESSAGE, recoveryAnswerIsCancelled, generationCancelledMessage, recoveryFinalOutcome, recoveryProvesNothingCharged, recoveryGiveUpRefunds, recoveryLooksUnreachable, recoveryFinalMessage, PENDING_RECOVERY_UNREACHABLE_POLLS, GENERATION_NOT_RECEIVED_MESSAGE, GENERATION_FAILED_MESSAGE, RECOVERY_UNREACHABLE_MESSAGE, type PendingGenerateMarker, type PendingRecoveryDecision, type LatePickupAction, type RecoveryFinalOutcome, } from "./pendingGenerate";
48
+ export { PENDING_RECOVERY_WINDOW_MS, PENDING_RECOVERY_POLL_MS, PENDING_RECOVERY_FIRST_POLL_MS, PENDING_RECOVERY_FAST_PHASE_MS, PENDING_RECOVERY_MID_POLL_MS, PENDING_RECOVERY_SLOW_PHASE_MS, PENDING_RECOVERY_SLOW_POLL_MS, pendingRecoveryNextDelayMs, encodePendingGenerate, parsePendingGenerate, markerArmedBlind, markerArmedAtMs, isBlindMarker, servedCorrelationProves, sameMarker, decidePendingRecovery, recoveryPollRunning, recoveryOwnsTheSentence, latePickupAction, latePickupKeepsMarker, pollGiveUpKeepsMarker, pendingRecoveryRemainingMs, transportFailureShouldRecover, TRANSPORT_LOST_CHECKING_MESSAGE, GENERATION_CANCELLED_MESSAGE, recoveryAnswerIsCancelled, generationCancelledMessage, recoveryFinalOutcome, recoveryProvesNothingCharged, recoveryGiveUpRefunds, recoveryLooksUnreachable, recoveryFinalMessage, PENDING_RECOVERY_UNREACHABLE_POLLS, GENERATION_NOT_RECEIVED_MESSAGE, GENERATION_FAILED_MESSAGE, GENERATION_LOST_IN_RESTART_MESSAGE, RECOVERY_UNREACHABLE_MESSAGE, type PendingGenerateMarker, type PendingRecoveryDecision, type LatePickupAction, type RecoveryFinalOutcome, } from "./pendingGenerate";
48
49
  export { stripJsComments } from "./codeComments";
49
50
  export { reconcileChartPick, type ChartPickReconciliation } from "./chartPick";
50
51
  export { isDuplicateGenerate, armGenerateGuard, DUPLICATE_GENERATE_WINDOW_MS, type GenerateGuardKey, type GenerateGuardState, } from "./duplicateGenerateGuard";
@@ -0,0 +1,143 @@
1
+ import { type RenderOptions } from "./contract";
2
+ /**
3
+ * THE MOST ROWS A CHART MAY HAVE IN VIEW AND STILL OFFER A LASSO.
4
+ *
5
+ * PROVISIONAL. Unmeasured: 5,000 is a stand-in until the time Power BI Desktop takes to apply a selection
6
+ * of that many ids is measured on a release-test page (1,000, 5,000 and 13,000 ids), and that number
7
+ * replaces this one. Do not read it as a finding. It is the worst case that is allowed for, not the
8
+ * typical one: a reader can lasso everything.
9
+ *
10
+ * Above it the WHOLE lasso is off: no surface is installed, and a one-line caption says why. It is one
11
+ * number for every host; a host may pass its own through RenderOptions.lasso.rowCap.
12
+ */
13
+ export declare const LASSO_ROW_CAP = 5000;
14
+ /** Travel, in px on either axis, at which a press stops being a click and becomes a lasso. */
15
+ export declare const LASSO_DRAG_PX = 5;
16
+ /** A freeform point is kept only when it is this far from the last one kept. */
17
+ export declare const LASSO_SAMPLE_PX = 3;
18
+ /** A freeform shape longer than this is thinned before it is used, so what is published, stored and
19
+ * restored is one and the same shape. */
20
+ export declare const LASSO_MAX_VERTICES = 400;
21
+ /** What a restore will read, per shape and in all: a bag is untrusted, and a poisoned one must not be able
22
+ * to ask for unbounded work. */
23
+ export declare const LASSO_RESTORE_MAX_VERTICES = 2000;
24
+ export declare const LASSO_RESTORE_MAX_SHAPES = 32;
25
+ /** The DOM event a chart listens for on its container. detail is a LassoEventDetail. */
26
+ export declare const LASSO_EVENT = "llm-lasso";
27
+ export declare const LASSO_SURFACE_CLASS = "lch-lasso-surface";
28
+ export declare const LASSO_OUTLINE_CLASS = "lch-lasso-outline";
29
+ export declare const LASSO_COUNT_CLASS = "lch-lasso-count";
30
+ export declare const LASSO_NOTE_CLASS = "lch-lasso-note";
31
+ /** The group a chart draws its plot in; the surface goes over it. Without one the chart's svg is the plot. */
32
+ export declare const LASSO_PLOT_CLASS = "lch-plot";
33
+ /** Set on the container to switch to a rectangle ("rect"); anything else is freeform. */
34
+ export declare const LASSO_MODE_ATTR = "data-lch-lasso-mode";
35
+ /** The key in the shared knob bag. */
36
+ export declare const LASSO_KNOB_KEY = "lasso";
37
+ /** A chart registers { toData([x, y]), toScreen([dx, dy]) } here so the shape is stored in data coordinates.
38
+ * x and y are in the user space of the element the surface sits in (the plot group). */
39
+ export declare const LASSO_AXES_SLOT = "__lchLassoAxes";
40
+ /** The action list a host runs when none is configured. */
41
+ export declare const LASSO_DEFAULT_ACTIONS: readonly string[];
42
+ /** RenderOptions.lasso. `capable` is the capability the server sent with this chart (absent means not
43
+ * capable); `enabled` is the reader's setting (default on); both must hold. */
44
+ export type LassoSetting = NonNullable<RenderOptions["lasso"]>;
45
+ /** "on" installs a surface. The others say why not; only "over-cap" shows a caption. */
46
+ export type LassoVerdict = "on" | "not-capable" | "disabled" | "over-cap";
47
+ /** The row cap in force: the setting's when it is a positive number, else LASSO_ROW_CAP. */
48
+ export declare function lassoRowCap(setting: LassoSetting | null | undefined): number;
49
+ /** The action names to run on release, in order. Anything that is not a list of names is the default. */
50
+ export declare function lassoActions(setting: LassoSetting | null | undefined): string[];
51
+ /** Whether a chart with `rows` rows in view gets a lasso under `setting`. */
52
+ export declare function lassoVerdict(setting: LassoSetting | null | undefined, rows: number): LassoVerdict;
53
+ type Pt = [number, number];
54
+ export type LassoMode = "free" | "rect";
55
+ export type LassoSpace = "data" | "unit";
56
+ /** One drawn shape as stored: a freeform polygon, or the four corners of a rectangle. */
57
+ export interface LassoShape {
58
+ mode: LassoMode;
59
+ pts: Pt[];
60
+ }
61
+ /** What the knob bag holds under LASSO_KNOB_KEY. */
62
+ export interface LassoStored {
63
+ v: 1;
64
+ space: LassoSpace;
65
+ shapes: LassoShape[];
66
+ }
67
+ /** detail of the `llm-lasso` DOM event. `polygon` is the last shape drawn, `polygons` every shape in the
68
+ * lasso, both in `space` (data coordinates, or fractions of the plot box); `rows` is empty when the lasso
69
+ * was cleared. source: "user" a gesture or a clear, "restore" a lasso re-applied on draw, "host" a clear the
70
+ * host made because the selection was replaced from outside. */
71
+ export interface LassoEventDetail {
72
+ rows: number[];
73
+ polygon: Pt[];
74
+ polygons: Pt[][];
75
+ mode: LassoMode;
76
+ space: LassoSpace;
77
+ source: "user" | "restore" | "host";
78
+ }
79
+ export interface LassoAxes {
80
+ toData(p: [number, number]): ArrayLike<unknown>;
81
+ toScreen(p: [number, number]): ArrayLike<unknown>;
82
+ }
83
+ /** Point in a shape: the bounding box rejects first; a rectangle is then done, and a freeform polygon is
84
+ * an even-odd ray cast. Implemented here so the host takes no dependency on a geometry library. */
85
+ export declare function pointInShape(shape: {
86
+ mode: LassoMode;
87
+ pts: ReadonlyArray<{
88
+ x: number;
89
+ y: number;
90
+ }>;
91
+ }, x: number, y: number): boolean;
92
+ /** What an action is given on release. */
93
+ export interface LassoActionContext {
94
+ /** The rows inside the lasso (every shape of it), ascending. */
95
+ rows: number[];
96
+ mode: LassoMode;
97
+ source: "user";
98
+ env: LassoEnv;
99
+ }
100
+ export type LassoAction = (ctx: LassoActionContext) => void;
101
+ /**
102
+ * Make `name` available to the action list (RenderOptions.lasso.actions). A name in the list that nothing
103
+ * registered is skipped, so a host can carry a list ahead of the build that understands it.
104
+ */
105
+ export declare function registerLassoAction(name: string, action: LassoAction): void;
106
+ /** What the host gives the lasso. The lasso never reaches into the host's selection itself. */
107
+ export interface LassoEnv {
108
+ container: HTMLElement;
109
+ /** The options of the render now on screen (a function, because setOptions replaces them). */
110
+ options: () => RenderOptions;
111
+ /** How many rows the chart was handed: the number the cap is measured against. */
112
+ rows: number;
113
+ /** Publish this row set as the selection (what the "select" action does). */
114
+ select(rows: number[]): void;
115
+ /** Clear the host's selection the way an empty click does: the chart's own clear slot first when the
116
+ * chart owns the selection, then a published clear. A no-op when nothing is selected. */
117
+ clearSelection(): void;
118
+ }
119
+ export interface LassoHandle {
120
+ /** The surface the gesture is read on; null when the lasso is off at this row count. */
121
+ readonly surface: Element | null;
122
+ /** The rows inside the lasso now drawn, ascending; empty when none. */
123
+ rows(): number[];
124
+ /** Erase the lasso. By default it also clears the host's selection and says so with `llm-lasso`. */
125
+ clear(opts?: {
126
+ publish?: boolean;
127
+ source?: "user" | "host";
128
+ }): void;
129
+ /** Remove the listeners and everything the lasso drew. Nothing is persisted. */
130
+ destroy(): void;
131
+ }
132
+ /**
133
+ * Put the lasso on the chart in `env.container`, which has just drawn. Returns null when the chart gets none
134
+ * (not capable, switched off, nothing to draw on); a handle for the caption when the rows exceed the cap;
135
+ * otherwise the live handle. A lasso already installed on the container is destroyed first.
136
+ */
137
+ export declare function installLasso(env: LassoEnv): LassoHandle | null;
138
+ /** Erase the lasso on `container`, if it has one, and clear the selection with it. */
139
+ export declare function clearLasso(container: Element | null | undefined, opts?: {
140
+ publish?: boolean;
141
+ source?: "user" | "host";
142
+ }): void;
143
+ export {};
@@ -55,6 +55,17 @@ export type PendingRecoveryDecision = "none" | "delivered" | "expired" | "blind"
55
55
  * `v - 1` fallback says the same thing for markers written by older builds.
56
56
  */
57
57
  export declare function markerArmedBlind(m: PendingGenerateMarker | null | undefined): boolean;
58
+ /**
59
+ * WHEN THIS MARKER'S GENERATE STARTED, as a recovery poll states it: the marker's own `t`, epoch milliseconds on
60
+ * this host's clock, as a whole number - the `fetchArmedAtMs` a poll by correlation passes to `fetchFields`.
61
+ *
62
+ * With it the server can tell a generate that died with a server restart (started before the running process,
63
+ * no record of it) from one still running, and say so at the first poll instead of after the whole window.
64
+ * Nothing is shifted or checked against the clock here: a slow or fast host clock is the server's margin to
65
+ * absorb, and a future time it reads as absent. undefined for no marker or a time that is not a positive
66
+ * number, so the poll sends exactly what it always sent.
67
+ */
68
+ export declare function markerArmedAtMs(m: PendingGenerateMarker | null | undefined): number | undefined;
58
69
  /**
59
70
  * Can this marker be recovered AT ALL? Only by CORRELATION, so only if it carries one.
60
71
  *
@@ -198,7 +209,7 @@ export declare function generationCancelledMessage(serverMessage: string | null
198
209
  * beside it for older hosts, so this is read FIRST. null = not final. A final answer with an outcome
199
210
  * this build does not know reads as "failed": it is final, and it claims nothing about charges.
200
211
  */
201
- export type RecoveryFinalOutcome = "cancelled" | "failed" | "not-received";
212
+ export type RecoveryFinalOutcome = "cancelled" | "failed" | "not-received" | "lost-in-restart";
202
213
  export declare function recoveryFinalOutcome(r: {
203
214
  isPollFinal?: boolean | null;
204
215
  pollOutcome?: string | null;
@@ -207,7 +218,8 @@ export declare function recoveryFinalOutcome(r: {
207
218
  errorCode?: string | null;
208
219
  } | null | undefined): RecoveryFinalOutcome | null;
209
220
  /** Did the server PROVE nothing was charged? Only a cancel and a request it never received do; a
210
- * failed generation's charge is its own, and a host claims nothing about it. */
221
+ * failed generation's charge is its own, and a generate that died with a restart may have been charged
222
+ * before its record was written, so a host claims nothing about either. */
211
223
  export declare function recoveryProvesNothingCharged(o: string | null | undefined): boolean;
212
224
  /** Does a recovery that ended this way send the refund? Only when it ended with NOTHING PAINTED and
213
225
  * nothing proven - the window closed, the poll itself was refused, or the service could not be
@@ -222,6 +234,10 @@ export declare function recoveryLooksUnreachable(transportFailuresInARow: number
222
234
  * localises by code. */
223
235
  export declare const GENERATION_NOT_RECEIVED_MESSAGE = "The charting service has no record of that request, so nothing was generated and nothing was charged. Generate again.";
224
236
  export declare const GENERATION_FAILED_MESSAGE = "That chart didn't finish on the server, so there's nothing to show. Generate again.";
237
+ /** The process that was building the chart is gone, so nothing will arrive. Says what happened and what to
238
+ * do, and claims nothing about a charge: a free-tier meter can be charged before the generation's record
239
+ * exists, so a restart in between can leave a charge that no record shows. */
240
+ export declare const GENERATION_LOST_IN_RESTART_MESSAGE = "The charting service restarted while your chart was being built, so nothing was delivered. Click Generate to build it again.";
225
241
  /** Neither the generate's answer nor any check reached us. Claims nothing about a charge: behind a
226
242
  * proxy the generate may have arrived when the checks did not. */
227
243
  export declare const RECOVERY_UNREACHABLE_MESSAGE = "We couldn't reach the charting service to check on your chart - it may be offline, or blocked on this network. Try again in a moment.";