@platforma-open/milaboratories.repertoire-mutation-heatmap.block 1.1.1 → 1.1.2

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/AGENTS.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/author_marker.d.ts
1
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/author_marker.d.ts
2
2
  //#region src/author_marker.d.ts
3
3
  /** Structure to help resolve conflicts if multiple participants writes to
4
4
  * the same state */
@@ -1100,7 +1100,7 @@ declare const ErrorLike: ZodUnion<[ZodType<StandardErrorLike, ZodTypeDef, Standa
1100
1100
  type ErrorLike = TypeOf<typeof ErrorLike>;
1101
1101
  /** Converts everything into ErrorLike. */
1102
1102
  //#endregion
1103
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/common_types.d.ts
1103
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/common_types.d.ts
1104
1104
  type OutputWithStatus<T> = {
1105
1105
  ok: true;
1106
1106
  value: T;
@@ -1113,7 +1113,7 @@ type OutputWithStatus<T> = {
1113
1113
  /** Base type for block outputs */
1114
1114
  type BlockOutputsBase = Record<string, OutputWithStatus<unknown>>;
1115
1115
  //#endregion
1116
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/navigation.d.ts
1116
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/navigation.d.ts
1117
1117
  /**
1118
1118
  * Part of the block state, representing current navigation information
1119
1119
  * (i.e. currently selected section)
@@ -1122,7 +1122,7 @@ type NavigationState<Href extends `/${string}` = `/${string}`> = {
1122
1122
  readonly href: Href;
1123
1123
  };
1124
1124
  //#endregion
1125
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/json.d.ts
1125
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/json.d.ts
1126
1126
  //#region src/json.d.ts
1127
1127
  type JsonPrimitive = string | number | boolean | null;
1128
1128
  type JsonValue = JsonPrimitive | JsonValue[] | {
@@ -1133,8 +1133,11 @@ type JsonCompatible<T> = unknown extends T ? unknown : [T] extends [JsonValue] ?
1133
1133
  type StringifiedJson<T = unknown> = JsonCompatible<T> extends never ? never : string & {
1134
1134
  __json_stringified: T;
1135
1135
  };
1136
+ type CanonicalizedJson<T = unknown> = JsonCompatible<T> extends never ? never : string & {
1137
+ __json_canonicalized: T;
1138
+ };
1136
1139
  //#endregion
1137
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/block_state.d.ts
1140
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/block_state.d.ts
1138
1141
  //#region src/block_state.d.ts
1139
1142
  /**
1140
1143
  * @template Args sets type of block arguments passed to the workflow
@@ -1160,12 +1163,12 @@ type BlockStateV3<_Data = unknown, Outputs extends BlockOutputsBase = BlockOutpu
1160
1163
  readonly author: AuthorMarker | undefined;
1161
1164
  }; //#endregion
1162
1165
  //#endregion
1163
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/branding.d.ts
1166
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/branding.d.ts
1164
1167
  //#region src/branding.d.ts
1165
1168
  type Brand<B, K extends string = "__pl_model_brand__"> = { [key in K]: B };
1166
1169
  type Branded$1<T, B, K extends string = "__pl_model_brand__"> = T & Brand<B, K>; //#endregion
1167
1170
  //#endregion
1168
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/dialog/index.d.ts
1171
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/dialog/index.d.ts
1169
1172
  //#region src/dialog/index.d.ts
1170
1173
  /**
1171
1174
  * File filter passed to the native save dialog. Matches Electron's
@@ -1198,7 +1201,7 @@ interface DialogService {
1198
1201
  showSaveDialog(options: ShowSaveDialogOptions): Promise<ShowSaveDialogResult>;
1199
1202
  } //#endregion
1200
1203
  //#endregion
1201
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/pool_entry.d.ts
1204
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/pool_entry.d.ts
1202
1205
  //#region src/pool_entry.d.ts
1203
1206
  interface PoolEntry<K extends string = string, R extends {} = {}> extends Disposable {
1204
1207
  /** Resource key, calculated using provided `calculateParamsKey` function */
@@ -1217,7 +1220,7 @@ interface PoolEntry<K extends string = string, R extends {} = {}> extends Dispos
1217
1220
  * unless `keep()` is called to transfer ownership to the caller.
1218
1221
  */
1219
1222
  //#endregion
1220
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/table_common.d.ts
1223
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/table_common.d.ts
1221
1224
  //#region src/drivers/pframe/table_common.d.ts
1222
1225
  type PTableColumnSpecAxis = {
1223
1226
  type: "axis";
@@ -1226,7 +1229,13 @@ type PTableColumnSpecAxis = {
1226
1229
  };
1227
1230
  type PTableColumnSpecColumn = {
1228
1231
  type: "column";
1229
- id: PObjectId;
1232
+ /**
1233
+ * Leaf column id as it appears in the SpecQuery — may be a rich
1234
+ * {@link ColumnUniversalId} (Discovered / Overridden / Filtered) or a bare
1235
+ * {@link PObjectId}. The host resolver strips to bare via `extractPObjectId`
1236
+ * before physical lookup.
1237
+ */
1238
+ id: ColumnUniversalId;
1230
1239
  spec: PColumnSpec;
1231
1240
  };
1232
1241
  /** Unified spec object for axes and columns */
@@ -1236,13 +1245,13 @@ type PTableColumnIdAxis = {
1236
1245
  id: AxisId;
1237
1246
  };
1238
1247
  type PTableColumnIdColumn = {
1239
- type: "column";
1240
- id: PObjectId;
1248
+ type: "column"; /** @see PTableColumnSpecColumn.id */
1249
+ id: ColumnUniversalId;
1241
1250
  };
1242
1251
  /** Unified PTable column identifier */
1243
1252
  type PTableColumnId = PTableColumnIdAxis | PTableColumnIdColumn;
1244
1253
  //#endregion
1245
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/data_types.d.ts
1254
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/data_types.d.ts
1246
1255
  //#region src/drivers/pframe/data_types.d.ts
1247
1256
  type PVectorDataInt = Int32Array;
1248
1257
  type PVectorDataLong = BigInt64Array;
@@ -1282,6 +1291,18 @@ interface WritePTableToFsOptions {
1282
1291
  path: string;
1283
1292
  format: PTableDownloadFormat;
1284
1293
  columnIndices: number[];
1294
+ /**
1295
+ * Optional header names aligned 1:1 with {@link columnIndices}. When provided,
1296
+ * each is written verbatim — letting callers supply disambiguated labels the
1297
+ * spec's intrinsic `pl7.app/label` may not carry. When omitted (or an
1298
+ * individual entry is empty), the header falls back to the column's
1299
+ * spec-derived label.
1300
+ *
1301
+ * Additive on purpose: the UI (ui-vue) and the desktop-app runtime version
1302
+ * independently, so a newer UI must not send a shape an older runtime cannot
1303
+ * read. Older runtimes ignore this field and use {@link columnIndices} alone.
1304
+ */
1305
+ headerNames?: string[];
1285
1306
  range?: TableRange;
1286
1307
  chunkSize?: number;
1287
1308
  includeHeader?: boolean;
@@ -1311,9 +1332,21 @@ interface ExportPTableOptions {
1311
1332
  /** Unified indices of the columns to export, in output order
1312
1333
  * (axes first, then data columns). */
1313
1334
  columnIndices: number[];
1335
+ /**
1336
+ * Optional header names aligned 1:1 with {@link columnIndices}. When provided,
1337
+ * each is written verbatim — letting callers supply disambiguated labels the
1338
+ * spec's intrinsic `pl7.app/label` may not carry. When omitted (or an
1339
+ * individual entry is empty), the header falls back to the column's
1340
+ * spec-derived label.
1341
+ *
1342
+ * Additive on purpose: the UI (ui-vue) and the desktop-app runtime version
1343
+ * independently, so a newer UI must not send a shape an older runtime cannot
1344
+ * read. Older runtimes ignore this field and use {@link columnIndices} alone.
1345
+ */
1346
+ headerNames?: string[];
1314
1347
  } //#endregion
1315
1348
  //#endregion
1316
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/data_info.d.ts
1349
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/data_info.d.ts
1317
1350
  //#region src/drivers/pframe/data_info.d.ts
1318
1351
  /**
1319
1352
  * Represents a JavaScript representation of a value in a PColumn. Can be null, a number, or a string.
@@ -1406,7 +1439,46 @@ type PColumnValues = PColumnValuesEntry[];
1406
1439
  * Entry-based representation of JsonDataInfo
1407
1440
  */
1408
1441
  //#endregion
1409
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/query/query_common.d.ts
1442
+ //#region ../node_modules/.pnpm/@milaboratories+helpers@1.14.5/node_modules/@milaboratories/helpers/dist/types/brand.d.ts
1443
+ //#region src/types/brand.d.ts
1444
+ /**
1445
+ * Phantom-property brand. The key is a plain string literal rather than a
1446
+ * `unique symbol` so the resulting type stays fully nameable across packages.
1447
+ *
1448
+ * A `unique symbol` key forces TS, when forced to expand `Branded<T, B>` into
1449
+ * its structural form (e.g. inside `Record<BrandedUnion, V>` index signatures
1450
+ * during dts emit), to write out `typeof __brand` — a value-level reference
1451
+ * to the symbol. If the symbol's declaring module isn't reachable from the
1452
+ * compilation root, dts emit fails with TS4023 ("cannot be named"). Using a
1453
+ * string key sidesteps this entirely: `{ __brand: B }` is a plain structural
1454
+ * type, nameable from anywhere.
1455
+ *
1456
+ * Phantom keys provide compile-time discrimination only — two different brand
1457
+ * tags `B1 ≠ B2` make `Branded<T, B1>` and `Branded<T, B2>` mutually
1458
+ * incompatible regardless of whether the key is a symbol or a string.
1459
+ */
1460
+ type Branded<T, B> = T & {
1461
+ readonly __brand: B;
1462
+ };
1463
+ //#endregion
1464
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/overridden.d.ts
1465
+ //#region src/drivers/pframe/spec/overridden.d.ts
1466
+ type SpecOverrides = Pick<PColumnSpec, "domain" | "contextDomain" | "annotations"> & {
1467
+ axesSpec?: AxisPatches;
1468
+ };
1469
+ /**
1470
+ * `source` can reference a leaf or a Filtered/Discovered id, but never another
1471
+ * Overridden id — there is no `Overridden<Overridden<...>>`. Repeated overrides
1472
+ * merge at the outer wrapper via {@link mergeSpecOverrides}.
1473
+ */
1474
+ interface ColumnOverriddenKey {
1475
+ __isOverridden: true;
1476
+ source: Exclude<ColumnUniversalId, ColumnOverriddenId>;
1477
+ specOverrides: SpecOverrides;
1478
+ }
1479
+ type ColumnOverriddenId = Branded<CanonicalizedJson<ColumnOverriddenKey>, "ColumnOverriddenId">;
1480
+ //#endregion
1481
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/query/query_common.d.ts
1410
1482
  //#region src/drivers/pframe/query/query_common.d.ts
1411
1483
  /**
1412
1484
  * Structural type information for a single column: the axis value types (in
@@ -2428,154 +2500,497 @@ interface QueryTransformColumns<Q, E, SO> {
2428
2500
  mode: TransformColumnsMode;
2429
2501
  /** Derived columns to compute (at least one). */
2430
2502
  columns: [TransformColumnEntry<E, SO>, ...TransformColumnEntry<E, SO>[]];
2503
+ }
2504
+ /**
2505
+ * Spec-override query operation — client-side-only structural node.
2506
+ *
2507
+ * Overlays a {@link SpecOverrides} patch on top of the inner query's spec.
2508
+ * Carries no topological change — it is collapsed at the host boundary
2509
+ * (`resolvePColumn`) before the query reaches pframe-engine. The engine
2510
+ * never sees this node.
2511
+ *
2512
+ * Emitted by `ColumnOverriddenRecipe.getQuery()`; the only currently
2513
+ * supported shape is `specOverride{ input: <plain column ref>, override }`
2514
+ * (i.e. `Overridden<Lazy>`). More complex projections under Overridden are
2515
+ * a future engine work item.
2516
+ *
2517
+ * @template Q - Input query type
2518
+ * @template SO - Spec override type
2519
+ */
2520
+ interface QuerySpecOverride<Q, SO> {
2521
+ type: "specOverride";
2522
+ /** Input query whose spec is to be overridden. */
2523
+ input: Q;
2524
+ /** Spec override patch to overlay on the inner spec. */
2525
+ override: SO;
2431
2526
  } //#endregion
2432
2527
  //#endregion
2433
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/query/query_spec.d.ts
2434
- //#region src/drivers/pframe/query/query_spec.d.ts
2528
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/query/query_data.d.ts
2529
+ //#region src/drivers/pframe/query/query_data.d.ts
2435
2530
  /**
2436
- * Join entry for spec-layer queries — the base join entry extended with
2437
- * per-axis domain constraints. Absent `qualifications` is equivalent to `[]`.
2531
+ * Column identifier with type specification.
2438
2532
  *
2439
- * @example
2440
- * {
2441
- * entry: querySpec,
2442
- * qualifications: [{ axis: { name: 'sample' }, contextDomain: { ... } }]
2443
- * }
2533
+ * Pairs a column ID with its full type specification (axes and column types).
2534
+ * Used in data layer to carry type information alongside column references.
2444
2535
  */
2445
- type SpecQueryJoinEntry<C = PObjectId> = QueryJoinEntry<SpecQuery<C>> & {
2446
- qualifications?: {
2447
- /** Axis to qualify. */axis: SingleAxisSelector; /** Additional domain constraints for this axis. */
2448
- contextDomain: Domain;
2449
- }[];
2536
+ type ColumnIdAndTypeSpec = {
2537
+ /** Unique identifier of the column */id: PObjectId; /** Type specification defining the axes and the single column value type */
2538
+ spec: ColumnTypeSpec;
2450
2539
  };
2540
+ /**
2541
+ * Join entry for data layer queries.
2542
+ *
2543
+ * Extends the base join entry with axes mapping information.
2544
+ * The mapping specifies how axes from this entry align with the joined result.
2545
+ *
2546
+ * @example
2547
+ * // Join entry with axes mapping [0, 2] means:
2548
+ * // - This entry's axis 0 maps to result axis 0
2549
+ * // - This entry's axis 1 maps to result axis 2
2550
+ * { entry: queryData, axesMapping: [0, 2] }
2551
+ */
2552
+ interface DataQueryJoinEntry extends QueryJoinEntry<DataQuery> {
2553
+ /** Maps this entry's axes to the result axes by index */
2554
+ axesMapping: number[];
2555
+ }
2451
2556
  /** @see QueryColumn */
2452
- type SpecQueryColumn<C = PObjectId> = QueryColumn<C>;
2557
+ type DataQueryColumn = QueryColumn;
2453
2558
  /** @see QueryInlineColumn */
2454
- type SpecQueryInlineColumn = QueryInlineColumn<PColumnIdAndSpec>;
2559
+ type DataQueryInlineColumn = QueryInlineColumn<ColumnIdAndTypeSpec>;
2455
2560
  /** @see QuerySparseToDenseColumn */
2456
- type SpecQuerySparseToDenseColumn<C = PObjectId> = QuerySparseToDenseColumn<C, SingleAxisSelector, PColumnIdAndSpec>;
2561
+ type DataQuerySparseToDenseColumn = QuerySparseToDenseColumn<PObjectId, number, ColumnIdAndTypeSpec>;
2457
2562
  /** @see QuerySymmetricJoin */
2458
- type SpecQuerySymmetricJoin<C = PObjectId> = QuerySymmetricJoin<SpecQueryJoinEntry<C>>;
2563
+ type DataQuerySymmetricJoin = QuerySymmetricJoin<DataQueryJoinEntry>;
2459
2564
  /** @see QueryOuterJoin */
2460
- type SpecQueryOuterJoin<C = PObjectId> = QueryOuterJoin<SpecQueryJoinEntry<C>>;
2565
+ type DataQueryOuterJoin = QueryOuterJoin<DataQueryJoinEntry>;
2461
2566
  /**
2462
- * Linker side of a spec-layer linker-join.
2567
+ * Linker side of a data-layer linker-join.
2463
2568
  *
2464
- * At the spec layer the linker is just a column reference — integration artifacts
2465
- * (axes mapping, one-side indices) are derived during spec→data conversion.
2569
+ * Carries the linker column id along with integration-derived artifacts needed
2570
+ * for execution:
2571
+ * - `axesMapping` — how the linker's axes map into the joined result
2572
+ * - `oneSideAxesIndices` — which axis indices in the joined result to project out
2466
2573
  */
2467
- type SpecQueryLinkerJoinLinker<C = PObjectId> = {
2468
- /** Linker column reference. */column: C;
2574
+ type DataQueryLinkerJoinLinker = {
2575
+ /** Linker column reference. */column: PObjectId; /** Linker's axes mapped into the joined result. */
2576
+ axesMapping: number[]; /** Axis indices (in the joined result) to project out — the linker's one-side axes. */
2577
+ oneSideAxesIndices: number[];
2469
2578
  };
2470
2579
  /** @see QueryLinkerJoin */
2471
- type SpecQueryLinkerJoin<C = PObjectId> = QueryLinkerJoin<SpecQueryLinkerJoinLinker<C>, SpecQueryJoinEntry<C>>;
2580
+ type DataQueryLinkerJoin = QueryLinkerJoin<DataQueryLinkerJoinLinker, DataQueryJoinEntry>;
2472
2581
  /** @see QuerySliceAxes */
2473
- type SpecQuerySliceAxes<C = PObjectId> = QuerySliceAxes<SpecQuery<C>, SingleAxisSelector>;
2582
+ type DataQuerySliceAxes = QuerySliceAxes<DataQuery, number>;
2474
2583
  /** @see QuerySort */
2475
- type SpecQuerySort<C = PObjectId> = QuerySort<SpecQuery<C>, SpecQueryExpression>;
2584
+ type DataQuerySort = QuerySort<DataQuery, DataQueryExpression>;
2476
2585
  /** @see QueryFilter */
2477
- type SpecQueryFilter<C = PObjectId> = QueryFilter<SpecQuery<C>, SpecQueryBooleanExpression>;
2586
+ type DataQueryFilter = QueryFilter<DataQuery, DataQueryBooleanExpression>;
2478
2587
  /** @see QueryTransformColumns */
2479
- type SpecQueryTransformColumns<C = PObjectId> = QueryTransformColumns<SpecQuery<C>, SpecQueryExpression, PColumnIdAndSpec>;
2588
+ type DataQueryTransformColumns = QueryTransformColumns<DataQuery, DataQueryExpression, ColumnIdAndTypeSpec>;
2480
2589
  /**
2481
- * Union of all spec layer query types.
2482
- *
2483
- * The spec layer operates with named selectors and column IDs,
2484
- * making it suitable for user-facing query construction and validation.
2590
+ * Union of all data layer query types.
2485
2591
  *
2486
- * @template C - Column reference type. Defaults to PObjectId (ID-only).
2487
- * Can be parameterized with richer types (e.g., PColumn<Data>) to carry
2488
- * full column data directly in the query tree.
2592
+ * The data layer operates with numeric indices for axes and columns,
2593
+ * making it suitable for runtime query execution and optimization.
2489
2594
  *
2490
2595
  * Includes:
2491
2596
  * - Leaf nodes: column, inlineColumn, sparseToDenseColumn
2492
2597
  * - Join operations: innerJoin, fullJoin, outerJoin, linkerJoin
2493
2598
  * - Transformations: sliceAxes, sort, filter, transformColumns
2494
2599
  */
2495
- type SpecQuery<C = PObjectId> = SpecQueryColumn<C> | SpecQueryInlineColumn | SpecQuerySparseToDenseColumn<C> | SpecQuerySymmetricJoin<C> | SpecQueryOuterJoin<C> | SpecQueryLinkerJoin<C> | SpecQuerySliceAxes<C> | SpecQuerySort<C> | SpecQueryFilter<C> | SpecQueryTransformColumns<C>;
2600
+ type DataQuery = DataQueryColumn | DataQueryInlineColumn | DataQuerySparseToDenseColumn | DataQuerySymmetricJoin | DataQueryOuterJoin | DataQueryLinkerJoin | DataQuerySliceAxes | DataQuerySort | DataQueryFilter | DataQueryTransformColumns;
2496
2601
  /** @see ExprAxisRef */
2497
- type SpecExprAxisRef = ExprAxisRef<SingleAxisSelector>;
2602
+ type DataExprAxisRef = ExprAxisRef<number>;
2498
2603
  /** @see ExprColumnRef */
2499
- type SpecExprColumnRef = ExprColumnRef<PObjectId>;
2500
- type SpecQueryExpression = SpecExprColumnRef | SpecExprAxisRef | ExprConstant | ExprNumericBinary<SpecQueryExpression> | ExprNumericComparison<SpecQueryExpression> | ExprNumericUnary<SpecQueryExpression> | ExprStringEquals<SpecQueryExpression> | ExprStringContains<SpecQueryExpression> | ExprStringRegex<SpecQueryExpression> | ExprStringContainsFuzzy<SpecQueryExpression> | ExprIsNull<SpecQueryExpression> | ExprFillNull<SpecQueryExpression> | ExprLogicalUnary<SpecQueryExpression> | ExprLogicalVariadic<SpecQueryExpression> | ExprIsIn<SpecQueryExpression, string> | ExprIsIn<SpecQueryExpression, number> | ExprCast<SpecQueryExpression> | ExprConditional<SpecQueryExpression> | ExprRanking<SpecQueryExpression, SingleAxisSelector, PObjectId>;
2501
- type SpecQueryBooleanExpression = InferBooleanExpressionUnion<SpecQueryExpression>; //#endregion
2604
+ type DataExprColumnRef = ExprColumnRef<number>;
2605
+ type DataQueryExpression = DataExprColumnRef | DataExprAxisRef | ExprConstant | ExprNumericBinary<DataQueryExpression> | ExprNumericComparison<DataQueryExpression> | ExprNumericUnary<DataQueryExpression> | ExprStringEquals<DataQueryExpression> | ExprStringContains<DataQueryExpression> | ExprStringRegex<DataQueryExpression> | ExprStringContainsFuzzy<DataQueryExpression> | ExprIsNull<DataQueryExpression> | ExprFillNull<DataQueryExpression> | ExprLogicalUnary<DataQueryExpression> | ExprLogicalVariadic<DataQueryExpression> | ExprIsIn<DataQueryExpression, string> | ExprIsIn<DataQueryExpression, number> | ExprCast<DataQueryExpression> | ExprConditional<DataQueryExpression> | ExprRanking<DataQueryExpression, number, number>;
2606
+ type DataQueryBooleanExpression = InferBooleanExpressionUnion<DataQueryExpression>; //#endregion
2502
2607
  //#endregion
2503
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/table_calculate.d.ts
2504
- //#region src/drivers/pframe/table_calculate.d.ts
2505
- /** Defines a terminal column node in the join request tree */
2506
- interface ColumnJoinEntry<Col> {
2507
- /** Node type discriminator */
2508
- readonly type: "column";
2509
- /** Local column */
2510
- readonly column: Col;
2608
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec_driver.d.ts
2609
+ //#region src/drivers/pframe/spec_driver.d.ts
2610
+ /** Matches a string value either exactly or by regex pattern */
2611
+ type StringMatcher = {
2612
+ type: "exact";
2613
+ value: string;
2614
+ } | {
2615
+ type: "regex";
2616
+ value: string;
2617
+ };
2618
+ /** Map of key to array of string matchers (OR-ed per key, AND-ed across keys) */
2619
+ type MatcherMap = Record<string, StringMatcher[]>;
2620
+ /** Selector for matching axes by various criteria */
2621
+ interface MultiAxisSelector {
2622
+ /** Match any of the axis types listed here */
2623
+ readonly type?: AxisValueType[];
2624
+ /** Match any of the axis names listed here */
2625
+ readonly name?: StringMatcher[];
2626
+ /** Match requires all the domains listed here */
2627
+ readonly domain?: MatcherMap;
2628
+ /** Match requires all the context domains listed here */
2629
+ readonly contextDomain?: MatcherMap;
2630
+ /** Match requires all the annotations listed here */
2631
+ readonly annotations?: MatcherMap;
2511
2632
  }
2512
- /**
2513
- * Axis filter slicing target axis from column axes.
2514
- * If the axis has parents or is a parent, slicing cannot be applied (an error will be thrown).
2515
- * */
2516
- interface ConstantAxisFilter {
2517
- /** Filter type discriminator */
2518
- readonly type: "constant";
2519
- /** Index of axis to slice (zero-based) */
2520
- readonly axisIndex: number;
2521
- /** Equality filter reference value, see {@link SingleValueEqualPredicate} */
2522
- readonly constant: string | number;
2633
+ /** Column selector for discover columns request, matching columns by various criteria.
2634
+ * Multiple selectors are OR-ed: a column matches if it satisfies any selector. */
2635
+ interface MultiColumnSelector {
2636
+ /** Match any of the value types listed here */
2637
+ readonly type?: ColumnValueType[];
2638
+ /** Match any of the names listed here */
2639
+ readonly name?: StringMatcher[];
2640
+ /** Match requires all the domains listed here */
2641
+ readonly domain?: MatcherMap;
2642
+ /** Match requires all the context domains listed here */
2643
+ readonly contextDomain?: MatcherMap;
2644
+ /** Match requires all the annotations listed here */
2645
+ readonly annotations?: MatcherMap;
2646
+ /** Match any of the axis selectors listed here */
2647
+ readonly axes?: MultiAxisSelector[];
2648
+ /** When true (default), allows matching if only a subset of axes match */
2649
+ readonly partialAxesMatch?: boolean;
2523
2650
  }
2524
- /** Defines a terminal column node in the join request tree */
2525
- interface SlicedColumnJoinEntry<Col> {
2526
- /** Node type discriminator */
2527
- readonly type: "slicedColumn";
2528
- /** Local column */
2529
- readonly column: Col;
2530
- /** New column id */
2531
- readonly newId: PObjectId;
2532
- /** Non-empty list of axis filters */
2533
- readonly axisFilters: ConstantAxisFilter[];
2651
+ /** Qualifications needed for both query (already-integrated) columns and the hit column. */
2652
+ interface ColumnAxesWithQualifications {
2653
+ /** Already integrated (query) columns with their qualifications. */
2654
+ axesSpec: AxisSpec[];
2655
+ /** Qualifications for each already integrated (query) column. */
2656
+ qualifications: AxisQualification[];
2534
2657
  }
2535
- interface ArtificialColumnJoinEntry<Col> {
2536
- /** Node type discriminator */
2537
- readonly type: "artificialColumn";
2538
- /** Column definition */
2539
- readonly column: Col;
2540
- /** New column id */
2541
- readonly newId: PObjectId;
2542
- /** Indices of axes to pick from the column (zero-based) */
2543
- readonly axesIndices: number[];
2658
+ /** Fine-grained constraints controlling axes matching and qualification behavior */
2659
+ interface DiscoverColumnsConstraints {
2660
+ /** Allow source (query) axes that have no match in the hit column */
2661
+ allowFloatingSourceAxes: boolean;
2662
+ /** Allow hit column axes that have no match in the source (query) */
2663
+ allowFloatingHitAxes: boolean;
2664
+ /** Allow source (query) axes to be qualified (contextDomain extended) */
2665
+ allowSourceQualifications: boolean;
2666
+ /** Allow hit column axes to be qualified (contextDomain extended) */
2667
+ allowHitQualifications: boolean;
2544
2668
  }
2545
- /** Defines a terminal column node in the join request tree */
2546
- interface InlineColumnJoinEntry {
2547
- /** Node type discriminator */
2548
- readonly type: "inlineColumn";
2549
- /** Column definition */
2550
- readonly column: PColumn<PColumnValues>;
2669
+ /** Request for discovering columns compatible with a given axes integration */
2670
+ interface DiscoverColumnsRequest {
2671
+ /** Include columns matching these selectors (OR-ed); empty or omitted matches all columns */
2672
+ includeColumns?: MultiColumnSelector[];
2673
+ /** Exclude columns matching these selectors (OR-ed); applied after include filter */
2674
+ excludeColumns?: MultiColumnSelector[];
2675
+ /** Already integrated axes with qualifications */
2676
+ axes: ColumnAxesWithQualifications[];
2677
+ /** Maximum number of hops allowed between provided axes integration and returned hits (0 = direct only) */
2678
+ maxHops?: number;
2679
+ /** Constraints controlling axes matching and qualification behavior */
2680
+ constraints: DiscoverColumnsConstraints;
2551
2681
  }
2552
- /**
2553
- * Defines a join request tree node that will output only records present in
2554
- * all child nodes ({@link entries}).
2555
- * */
2556
- interface InnerJoin<Col> {
2557
- /** Node type discriminator */
2558
- readonly type: "inner";
2559
- /** Child nodes to be inner joined */
2560
- readonly entries: JoinEntry<Col>[];
2682
+ /** Linker step: traversal through a linker column */
2683
+ interface DiscoverColumnsLinkerStep {
2684
+ type: "linker";
2685
+ /** The linker column traversed in this step */
2686
+ linker: PColumnIdAndSpec;
2561
2687
  }
2562
2688
  /**
2563
- * Defines a join request tree node that will output all records present at
2564
- * least in one of the child nodes ({@link entries}), values for those PColumns
2565
- * that lack corresponding combinations of axis values will be null.
2566
- * */
2567
- interface FullJoin<Col> {
2568
- /** Node type discriminator */
2569
- readonly type: "full";
2570
- /** Child nodes to be fully outer joined */
2571
- readonly entries: JoinEntry<Col>[];
2689
+ * Filter step: intersects the current subquery with a filter column on shared
2690
+ * axes. Filter columns carry `pl7.app/isSubset: "true"` with axes ⊆ dataset
2691
+ * axes, so the inner-join narrows the key space to rows where the filter is
2692
+ * present.
2693
+ */
2694
+ interface DiscoverColumnsFilterStep {
2695
+ type: "filter";
2696
+ /** The filter column applied in this step */
2697
+ filter: PColumnIdAndSpec;
2572
2698
  }
2699
+ /** A step traversed during path-based column discovery. Discriminated by `type`. */
2700
+ type DiscoverColumnsStepInfo = DiscoverColumnsLinkerStep | DiscoverColumnsFilterStep;
2573
2701
  /**
2574
- * Defines a join request tree node that will output all records present in
2575
- * {@link primary} child node, and records from the {@link secondary} nodes will
2576
- * be added to the output only if present, values for those PColumns from the
2577
- * {@link secondary} list, that lack corresponding combinations of axis values
2578
- * will be null.
2702
+ * Input to `buildQuery`: a terminal column plus an ordered
2703
+ * path of wrapping steps (linker hops, filter joins). Produces a
2704
+ * {@link SpecQueryJoinEntry} ready to be plugged into an
2705
+ * `innerJoin`/`fullJoin`/`outerJoin` entry list.
2706
+ *
2707
+ * Path ordering: `path[0]` is outermost (first applied), `path[N-1]` is
2708
+ * closest to `column`. Omit or pass `[]` for a direct column with no
2709
+ * wrapping.
2710
+ *
2711
+ * Columns are referenced by id — specs are resolved later at
2712
+ * `evaluateQuery` against the registered specs of the PFrame, so the
2713
+ * caller cannot disagree with the frame about spec content.
2714
+ *
2715
+ * Qualifications annotate the resulting outermost entry; they do not
2716
+ * propagate into the inner query.
2717
+ */
2718
+ type BuildQueryInput = {
2719
+ /** Shape version marker — bumped only on breaking structural changes. */readonly version: "v1"; /** Terminal column id — the column actually returning data. */
2720
+ readonly column: PObjectId; /** Ordered path from source integration to `column`. Outermost first. */
2721
+ readonly path?: DiscoverColumnsStepInfo[]; /** Axis qualifications attached to the resulting join entry. */
2722
+ readonly qualifications?: AxisQualification[];
2723
+ };
2724
+ /** Qualifications info for a discover columns response mapping variant */
2725
+ interface DiscoverColumnsResponseQualifications {
2726
+ /** Qualifications for each query (already-integrated) column set */
2727
+ forQueries: AxisQualification[][];
2728
+ /** Qualifications for the hit column */
2729
+ forHit: AxisQualification[];
2730
+ }
2731
+ /** A single mapping variant describing how a hit column can be integrated */
2732
+ interface DiscoverColumnsMappingVariant {
2733
+ /** Full qualifications needed for integration */
2734
+ qualifications: DiscoverColumnsResponseQualifications;
2735
+ /** Distinctive (minimal) qualifications needed for integration */
2736
+ distinctiveQualifications: DiscoverColumnsResponseQualifications;
2737
+ }
2738
+ /** A single hit in the discover columns response */
2739
+ interface DiscoverColumnsResponseHit {
2740
+ /** The column that was found compatible */
2741
+ hit: PColumnIdAndSpec;
2742
+ /** Linker steps traversed to reach this hit; empty for direct matches */
2743
+ path: DiscoverColumnsStepInfo[];
2744
+ /** Possible ways to integrate this column with the existing set */
2745
+ mappingVariants: DiscoverColumnsMappingVariant[];
2746
+ }
2747
+ /** Response from discover columns */
2748
+ interface DiscoverColumnsResponse {
2749
+ /** Columns that could be integrated and possible ways to integrate them */
2750
+ hits: DiscoverColumnsResponseHit[];
2751
+ }
2752
+ /** Request for deleting an entry from a given axes integration */
2753
+ interface DeleteColumnRequest {
2754
+ /** Already integrated axes with qualifications */
2755
+ axes: ColumnAxesWithQualifications[];
2756
+ /** Zero based index of the entry to be deleted */
2757
+ delete: number;
2758
+ }
2759
+ /** Response from delete column */
2760
+ interface DeleteColumnResponse {
2761
+ axes: ColumnAxesWithQualifications[];
2762
+ }
2763
+ /** Response from evaluating a query against a PFrame. */
2764
+ type EvaluateQueryResponse = {
2765
+ /**
2766
+ * The table specification describing the structure of the query result,
2767
+ * including all axes and columns that will be present in the output.
2768
+ */
2769
+ tableSpec: PTableColumnSpec[];
2770
+ /**
2771
+ * The data layer query representation with numeric indices,
2772
+ * suitable for execution by the data processing engine.
2773
+ */
2774
+ dataQuery: DataQuery;
2775
+ };
2776
+ /** Handle to a spec-only PFrame (no data, synchronous operations). */
2777
+ type SpecFrameHandle = Branded<string, "SpecFrameHandle">;
2778
+ /**
2779
+ * Synchronous driver for spec-level PFrame operations.
2780
+ *
2781
+ * Unlike the async PFrameDriver (which works with data), this driver
2782
+ * operates on column specifications only. All methods are synchronous
2783
+ * because the underlying WASM PFrame computes results immediately.
2784
+ */
2785
+ interface PFrameSpecDriver {
2786
+ /** Create a spec-only PFrame from column specs. Returns a pool entry with handle and unref. */
2787
+ createSpecFrame(specs: Record<string, PColumnSpec>): PoolEntry<SpecFrameHandle>;
2788
+ /** List all columns currently registered in the frame. */
2789
+ listColumns(handle: SpecFrameHandle): PColumnIdAndSpec[];
2790
+ /** Discover columns compatible with given axes integration. */
2791
+ discoverColumns(handle: SpecFrameHandle, request: DiscoverColumnsRequest): DiscoverColumnsResponse;
2792
+ /** Delete an entry from a given axes integration */
2793
+ deleteColumn(handle: SpecFrameHandle, request: DeleteColumnRequest): DeleteColumnResponse;
2794
+ /** Evaluates a query specification against this PFrame */
2795
+ evaluateQuery(handle: SpecFrameHandle, request: SpecQuery): EvaluateQueryResponse;
2796
+ /**
2797
+ * Assembles a {@link SpecQueryJoinEntry} from a terminal column plus an
2798
+ * ordered path of wrapping steps (linker hops, filter joins).
2799
+ *
2800
+ * Pure over its input — no frame handle is needed. Column ids are resolved
2801
+ * later at {@link evaluateQuery} against the registered specs.
2802
+ */
2803
+ buildQuery(input: BuildQueryInput): SpecQueryJoinEntry;
2804
+ /** Expand index-based parentAxes in AxesSpec to resolved AxisId parents in AxesId. */
2805
+ expandAxes(spec: AxesSpec): AxesId;
2806
+ /** Collapse resolved AxisId parents back to index-based parentAxes in AxesSpec. */
2807
+ collapseAxes(ids: AxesId): AxesSpec;
2808
+ /** Find the index of an axis matching the given selector. Returns -1 if not found. */
2809
+ findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
2810
+ /** Find the flat index of a table column matching the given selector. Returns -1 if not found. */
2811
+ findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
2812
+ /**
2813
+ * Upgrades selector-based legacy record filters into index-based data-layer
2814
+ * boolean expressions, resolved against the provided unified table spec
2815
+ * (axes first, then columns).
2816
+ */
2817
+ rewriteLegacyFilters(request: {
2818
+ tableSpec: PTableColumnSpec[];
2819
+ filters: PTableRecordFilter[];
2820
+ }): DataQueryBooleanExpression[];
2821
+ } //#endregion
2822
+ //#endregion
2823
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/selectors.d.ts
2824
+ /** Single axis selector */
2825
+ interface SingleAxisSelector {
2826
+ /** Axis name (required) */
2827
+ name: string;
2828
+ /** Axis type (optional) */
2829
+ type?: AxisValueType;
2830
+ /** Domain requirements (optional) */
2831
+ domain?: Domain;
2832
+ /** Context-domain requirements (optional) */
2833
+ contextDomain?: Domain;
2834
+ /** Parent axes requirements (optional) */
2835
+ parentAxes?: SingleAxisSelector[];
2836
+ }
2837
+ /** Qualification applied to a single axis to make it compatible during integration. */
2838
+ interface AxisQualification {
2839
+ /** Axis selector identifying which axis is qualified. */
2840
+ readonly axis: SingleAxisSelector;
2841
+ /** Additional context domain entries applied to the axis. */
2842
+ readonly contextDomain: Record<string, string>;
2843
+ }
2844
+ /**
2845
+ * Reference to an axis by its numerical index within the anchor column's axes array
2846
+ * Format: [anchorId, axisIndex]
2847
+ */
2848
+ //#endregion
2849
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/query/query_spec.d.ts
2850
+ //#region src/drivers/pframe/query/query_spec.d.ts
2851
+ /**
2852
+ * Join entry for spec-layer queries — the base join entry extended with
2853
+ * per-axis domain constraints. Absent `qualifications` is equivalent to `[]`.
2854
+ *
2855
+ * @example
2856
+ * {
2857
+ * entry: querySpec,
2858
+ * qualifications: [{ axis: { name: 'sample' }, contextDomain: { ... } }]
2859
+ * }
2860
+ */
2861
+ type SpecQueryJoinEntry<C = ColumnUniversalId> = QueryJoinEntry<SpecQuery<C>> & {
2862
+ qualifications?: readonly {
2863
+ /** Axis to qualify. */axis: SingleAxisSelector; /** Additional domain constraints for this axis. */
2864
+ contextDomain: Domain;
2865
+ }[];
2866
+ };
2867
+ /** @see QueryColumn */
2868
+ type SpecQueryColumn<C = ColumnUniversalId> = QueryColumn<C>;
2869
+ /** @see QueryInlineColumn */
2870
+ type SpecQueryInlineColumn = QueryInlineColumn<PColumnIdAndSpec>;
2871
+ /** @see QuerySparseToDenseColumn */
2872
+ type SpecQuerySparseToDenseColumn<C = ColumnUniversalId> = QuerySparseToDenseColumn<C, SingleAxisSelector, PColumnIdAndSpec>;
2873
+ /** @see QuerySymmetricJoin */
2874
+ type SpecQuerySymmetricJoin<C = ColumnUniversalId> = QuerySymmetricJoin<SpecQueryJoinEntry<C>>;
2875
+ /** @see QueryOuterJoin */
2876
+ type SpecQueryOuterJoin<C = ColumnUniversalId> = QueryOuterJoin<SpecQueryJoinEntry<C>>;
2877
+ /** @see QueryLinkerJoin */
2878
+ type SpecQueryLinkerJoin<C = ColumnUniversalId> = QueryLinkerJoin<SpecQuery<C>, SpecQueryJoinEntry<C>>;
2879
+ /** @see QuerySliceAxes */
2880
+ type SpecQuerySliceAxes<C = ColumnUniversalId> = QuerySliceAxes<SpecQuery<C>, SingleAxisSelector>;
2881
+ /** @see QuerySort */
2882
+ type SpecQuerySort<C = ColumnUniversalId> = QuerySort<SpecQuery<C>, SpecQueryExpression>;
2883
+ /** @see QueryFilter */
2884
+ type SpecQueryFilter<C = ColumnUniversalId> = QueryFilter<SpecQuery<C>, SpecQueryBooleanExpression>;
2885
+ /** @see QueryTransformColumns */
2886
+ type SpecQueryTransformColumns<C = ColumnUniversalId> = QueryTransformColumns<SpecQuery<C>, SpecQueryExpression, PColumnIdAndSpec>;
2887
+ /**
2888
+ * Client-side spec-override node — collapsed at the host boundary, never
2889
+ * sent to pframe-engine.
2890
+ *
2891
+ * @see QuerySpecOverride
2892
+ */
2893
+ type SpecQuerySpecOverride<C = ColumnUniversalId> = QuerySpecOverride<SpecQuery<C>, SpecOverrides>;
2894
+ /**
2895
+ * Union of all spec layer query types.
2896
+ *
2897
+ * The spec layer operates with named selectors and column IDs,
2898
+ * making it suitable for user-facing query construction and validation.
2899
+ *
2900
+ * @template C - Column reference type. Defaults to PObjectId (ID-only).
2901
+ * Can be parameterized with richer types (e.g., PColumn<Data>) to carry
2902
+ * full column data directly in the query tree.
2903
+ *
2904
+ * Includes:
2905
+ * - Leaf nodes: column, inlineColumn, sparseToDenseColumn
2906
+ * - Join operations: innerJoin, fullJoin, outerJoin, linkerJoin
2907
+ * - Transformations: sliceAxes, sort, filter, transformColumns
2908
+ * - Client-side overlays: specOverride (collapsed before reaching the engine)
2909
+ */
2910
+ type SpecQuery<C = ColumnUniversalId> = SpecQueryColumn<C> | SpecQueryInlineColumn | SpecQuerySparseToDenseColumn<C> | SpecQuerySymmetricJoin<C> | SpecQueryOuterJoin<C> | SpecQueryLinkerJoin<C> | SpecQuerySliceAxes<C> | SpecQuerySort<C> | SpecQueryFilter<C> | SpecQueryTransformColumns<C> | SpecQuerySpecOverride<C>;
2911
+ /** @see ExprAxisRef */
2912
+ type SpecExprAxisRef = ExprAxisRef<SingleAxisSelector>;
2913
+ /** @see ExprColumnRef */
2914
+ type SpecExprColumnRef = ExprColumnRef<ColumnUniversalId>;
2915
+ type SpecQueryExpression = SpecExprColumnRef | SpecExprAxisRef | ExprConstant | ExprNumericBinary<SpecQueryExpression> | ExprNumericComparison<SpecQueryExpression> | ExprNumericUnary<SpecQueryExpression> | ExprStringEquals<SpecQueryExpression> | ExprStringContains<SpecQueryExpression> | ExprStringRegex<SpecQueryExpression> | ExprStringContainsFuzzy<SpecQueryExpression> | ExprIsNull<SpecQueryExpression> | ExprFillNull<SpecQueryExpression> | ExprLogicalUnary<SpecQueryExpression> | ExprLogicalVariadic<SpecQueryExpression> | ExprIsIn<SpecQueryExpression, string> | ExprIsIn<SpecQueryExpression, number> | ExprCast<SpecQueryExpression> | ExprConditional<SpecQueryExpression> | ExprRanking<SpecQueryExpression, SingleAxisSelector, PObjectId>;
2916
+ type SpecQueryBooleanExpression = InferBooleanExpressionUnion<SpecQueryExpression>; //#endregion
2917
+ //#endregion
2918
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/table_calculate.d.ts
2919
+ //#region src/drivers/pframe/table_calculate.d.ts
2920
+ /** Defines a terminal column node in the join request tree */
2921
+ interface ColumnJoinEntry<Col> {
2922
+ /** Node type discriminator */
2923
+ readonly type: "column";
2924
+ /** Local column */
2925
+ readonly column: Col;
2926
+ }
2927
+ /**
2928
+ * Axis filter slicing target axis from column axes.
2929
+ * If the axis has parents or is a parent, slicing cannot be applied (an error will be thrown).
2930
+ * */
2931
+ interface ConstantAxisFilter {
2932
+ /** Filter type discriminator */
2933
+ readonly type: "constant";
2934
+ /** Index of axis to slice (zero-based) */
2935
+ readonly axisIndex: number;
2936
+ /** Equality filter reference value, see {@link SingleValueEqualPredicate} */
2937
+ readonly constant: string | number;
2938
+ }
2939
+ /** Defines a terminal column node in the join request tree */
2940
+ interface SlicedColumnJoinEntry<Col> {
2941
+ /** Node type discriminator */
2942
+ readonly type: "slicedColumn";
2943
+ /** Local column */
2944
+ readonly column: Col;
2945
+ /** New column id */
2946
+ readonly newId: PObjectId;
2947
+ /** Non-empty list of axis filters */
2948
+ readonly axisFilters: ConstantAxisFilter[];
2949
+ }
2950
+ interface ArtificialColumnJoinEntry<Col> {
2951
+ /** Node type discriminator */
2952
+ readonly type: "artificialColumn";
2953
+ /** Column definition */
2954
+ readonly column: Col;
2955
+ /** New column id */
2956
+ readonly newId: PObjectId;
2957
+ /** Indices of axes to pick from the column (zero-based) */
2958
+ readonly axesIndices: number[];
2959
+ }
2960
+ /** Defines a terminal column node in the join request tree */
2961
+ interface InlineColumnJoinEntry {
2962
+ /** Node type discriminator */
2963
+ readonly type: "inlineColumn";
2964
+ /** Column definition */
2965
+ readonly column: PColumn<PColumnValues>;
2966
+ }
2967
+ /**
2968
+ * Defines a join request tree node that will output only records present in
2969
+ * all child nodes ({@link entries}).
2970
+ * */
2971
+ interface InnerJoin<Col> {
2972
+ /** Node type discriminator */
2973
+ readonly type: "inner";
2974
+ /** Child nodes to be inner joined */
2975
+ readonly entries: JoinEntry<Col>[];
2976
+ }
2977
+ /**
2978
+ * Defines a join request tree node that will output all records present at
2979
+ * least in one of the child nodes ({@link entries}), values for those PColumns
2980
+ * that lack corresponding combinations of axis values will be null.
2981
+ * */
2982
+ interface FullJoin<Col> {
2983
+ /** Node type discriminator */
2984
+ readonly type: "full";
2985
+ /** Child nodes to be fully outer joined */
2986
+ readonly entries: JoinEntry<Col>[];
2987
+ }
2988
+ /**
2989
+ * Defines a join request tree node that will output all records present in
2990
+ * {@link primary} child node, and records from the {@link secondary} nodes will
2991
+ * be added to the output only if present, values for those PColumns from the
2992
+ * {@link secondary} list, that lack corresponding combinations of axis values
2993
+ * will be null.
2579
2994
  *
2580
2995
  * This node can be thought as a chain of SQL LEFT JOIN operations starting from
2581
2996
  * the {@link primary} node and adding {@link secondary} nodes one by one.
@@ -2783,7 +3198,7 @@ type CalculateTableDataRequest<Col> = {
2783
3198
  /** Response for {@link CalculateTableDataRequest} */
2784
3199
  type CalculateTableDataResponse = FullPTableColumnData[];
2785
3200
  //#endregion
2786
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/ref.d.ts
3201
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/ref.d.ts
2787
3202
  //#region src/ref.d.ts
2788
3203
  declare const PlRef: ZodReadonly<ZodObject<{
2789
3204
  __isRef: ZodLiteral<true>;
@@ -2804,7 +3219,7 @@ declare const PlRef: ZodReadonly<ZodObject<{
2804
3219
  type PlRef = TypeOf<typeof PlRef>;
2805
3220
  /** @deprecated use {@link PlRef} */
2806
3221
  //#endregion
2807
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/pool/spec.d.ts
3222
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/pool/spec.d.ts
2808
3223
  //#region src/pool/spec.d.ts
2809
3224
  /** Any object exported into the result pool by the block always have spec attached to it */
2810
3225
  type PObjectSpec = {
@@ -2816,8 +3231,15 @@ type PObjectSpec = {
2816
3231
  readonly contextDomain?: Record<string, string>; /** Additional information attached to the object */
2817
3232
  readonly annotations?: Record<string, string>;
2818
3233
  };
3234
+ type LocalPObjectKey = {
3235
+ resolvePath: string[];
3236
+ name: string;
3237
+ };
3238
+ type LocalPObjectId = Branded<CanonicalizedJson<LocalPObjectKey>, "LocalPObjectId">;
3239
+ type GlobalPObjectKey = PlRef;
3240
+ type GlobalPObjectId = Branded<CanonicalizedJson<GlobalPObjectKey>, "GlobalPObjectId">;
2819
3241
  /** Stable PObject id */
2820
- type PObjectId = Branded$1<string, "PColumnId">;
3242
+ type PObjectId = LocalPObjectId | GlobalPObjectId;
2821
3243
  /**
2822
3244
  * Full PObject representation.
2823
3245
  *
@@ -2832,7 +3254,7 @@ interface PObject<Data> {
2832
3254
  readonly data: Data;
2833
3255
  }
2834
3256
  //#endregion
2835
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.d.ts
3257
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.d.ts
2836
3258
  //#region src/drivers/pframe/spec/spec.d.ts
2837
3259
  declare const ValueType: {
2838
3260
  readonly Int: "Int";
@@ -2907,416 +3329,141 @@ type AxisSpec = {
2907
3329
  /** Parents are specs, not indexes; normalized axis can be used considering its parents independently from column */
2908
3330
  /** Common type representing spec for all the axes in a column */
2909
3331
  type AxesSpec = AxisSpec[];
2910
- /**
2911
- * Full column specification including all axes specs and specs of the column
2912
- * itself.
2913
- *
2914
- * A PColumn in its essence represents a mapping from a fixed size, explicitly
2915
- * typed tuple to an explicitly typed value.
2916
- *
2917
- * (axis1Value1, axis2Value1, ...) -> columnValue
2918
- *
2919
- * Each element in tuple correspond to the axis having the same index in axesSpec.
2920
- */
2921
- type PUniversalColumnSpec = PObjectSpec & {
2922
- /** Defines specific type of BObject, the most generic type of unit of
2923
- * information in Platforma Project. */
2924
- readonly kind: "PColumn"; /** Type of column values */
2925
- readonly valueType: string; /** Column name */
2926
- readonly name: string;
2927
- /** Adds auxiliary information to the axis name, type and parents to form a
2928
- * unique identifier */
2929
- readonly domain?: Record<string, string>;
2930
- /** Context domain provides additional column identity that is matched
2931
- * by kinship rules (subset/superset/overlap) rather than exact equality */
2932
- readonly contextDomain?: Record<string, string>;
2933
- /** Any additional information attached to the column that does not affect its
2934
- * identifier */
2935
- readonly annotations?: Record<string, string>; /** A list of zero-based indices of parent axes from the {@link axesSpec} array. */
2936
- readonly parentAxes?: number[]; /** Axes specifications */
2937
- readonly axesSpec: AxesSpec;
2938
- };
2939
- /**
2940
- * Specification of a data column.
2941
- *
2942
- * Data column is a specialized type of PColumn that stores only simple values (strings and numbers)
2943
- * addressed by multiple keys. This is in contrast to other PColumn variants that can store more complex
2944
- * values like files or other abstract data types. Data columns are optimized for storing and processing
2945
- * basic tabular data.
2946
- */
2947
- type PDataColumnSpec = PUniversalColumnSpec & {
2948
- /** Type of column values */readonly valueType: ValueType;
2949
- };
2950
- type PColumnSpec = PDataColumnSpec;
2951
- /** Unique PColumnSpec identifier */
2952
- interface PColumn<Data> extends PObject<Data> {
2953
- /** PColumn spec, allowing it to be found among other PObjects */
2954
- readonly spec: PColumnSpec;
2955
- }
2956
- /** Columns in a PFrame also have internal identifier, this object represents
2957
- * combination of specs and such id */
2958
- interface PColumnIdAndSpec {
2959
- /** Internal column id within the PFrame */
2960
- readonly columnId: PObjectId;
2961
- /** Column spec */
2962
- readonly spec: PColumnSpec;
2963
- }
2964
- /** Get column id and spec from a column */
2965
- interface AxisId {
2966
- /** Type of the axis or column value. For an axis should not use non-key
2967
- * types like float or double. */
2968
- readonly type: AxisValueType;
2969
- /** Name of the axis or column */
2970
- readonly name: string;
2971
- /** Adds auxiliary information to the axis or column name and type to form a
2972
- * unique identifier */
2973
- readonly domain?: Record<string, string>;
2974
- /** Context domain provides additional axis identity that is matched
2975
- * by kinship rules (subset/superset/overlap) rather than exact equality */
2976
- readonly contextDomain?: Record<string, string>;
2977
- }
2978
- /** Array of axis ids */
2979
- type AxesId = AxisId[];
2980
- /** Extracts axis ids from axis spec */
2981
- //#endregion
2982
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/query/query_data.d.ts
2983
- //#region src/drivers/pframe/query/query_data.d.ts
2984
- /**
2985
- * Column identifier with type specification.
2986
- *
2987
- * Pairs a column ID with its full type specification (axes and column types).
2988
- * Used in data layer to carry type information alongside column references.
2989
- */
2990
- type ColumnIdAndTypeSpec = {
2991
- /** Unique identifier of the column */id: PObjectId; /** Type specification defining the axes and the single column value type */
2992
- spec: ColumnTypeSpec;
2993
- };
2994
- /**
2995
- * Join entry for data layer queries.
2996
- *
2997
- * Extends the base join entry with axes mapping information.
2998
- * The mapping specifies how axes from this entry align with the joined result.
2999
- *
3000
- * @example
3001
- * // Join entry with axes mapping [0, 2] means:
3002
- * // - This entry's axis 0 maps to result axis 0
3003
- * // - This entry's axis 1 maps to result axis 2
3004
- * { entry: queryData, axesMapping: [0, 2] }
3005
- */
3006
- interface DataQueryJoinEntry extends QueryJoinEntry<DataQuery> {
3007
- /** Maps this entry's axes to the result axes by index */
3008
- axesMapping: number[];
3009
- }
3010
- /** @see QueryColumn */
3011
- type DataQueryColumn = QueryColumn;
3012
- /** @see QueryInlineColumn */
3013
- type DataQueryInlineColumn = QueryInlineColumn<ColumnIdAndTypeSpec>;
3014
- /** @see QuerySparseToDenseColumn */
3015
- type DataQuerySparseToDenseColumn = QuerySparseToDenseColumn<PObjectId, number, ColumnIdAndTypeSpec>;
3016
- /** @see QuerySymmetricJoin */
3017
- type DataQuerySymmetricJoin = QuerySymmetricJoin<DataQueryJoinEntry>;
3018
- /** @see QueryOuterJoin */
3019
- type DataQueryOuterJoin = QueryOuterJoin<DataQueryJoinEntry>;
3020
- /**
3021
- * Linker side of a data-layer linker-join.
3022
- *
3023
- * Carries the linker column id along with integration-derived artifacts needed
3024
- * for execution:
3025
- * - `axesMapping` — how the linker's axes map into the joined result
3026
- * - `oneSideAxesIndices` — which axis indices in the joined result to project out
3027
- */
3028
- type DataQueryLinkerJoinLinker = {
3029
- /** Linker column reference. */column: PObjectId; /** Linker's axes mapped into the joined result. */
3030
- axesMapping: number[]; /** Axis indices (in the joined result) to project out — the linker's one-side axes. */
3031
- oneSideAxesIndices: number[];
3032
- };
3033
- /** @see QueryLinkerJoin */
3034
- type DataQueryLinkerJoin = QueryLinkerJoin<DataQueryLinkerJoinLinker, DataQueryJoinEntry>;
3035
- /** @see QuerySliceAxes */
3036
- type DataQuerySliceAxes = QuerySliceAxes<DataQuery, number>;
3037
- /** @see QuerySort */
3038
- type DataQuerySort = QuerySort<DataQuery, DataQueryExpression>;
3039
- /** @see QueryFilter */
3040
- type DataQueryFilter = QueryFilter<DataQuery, DataQueryBooleanExpression>;
3041
- /** @see QueryTransformColumns */
3042
- type DataQueryTransformColumns = QueryTransformColumns<DataQuery, DataQueryExpression, ColumnIdAndTypeSpec>;
3043
- /**
3044
- * Union of all data layer query types.
3045
- *
3046
- * The data layer operates with numeric indices for axes and columns,
3047
- * making it suitable for runtime query execution and optimization.
3048
- *
3049
- * Includes:
3050
- * - Leaf nodes: column, inlineColumn, sparseToDenseColumn
3051
- * - Join operations: innerJoin, fullJoin, outerJoin, linkerJoin
3052
- * - Transformations: sliceAxes, sort, filter, transformColumns
3053
- */
3054
- type DataQuery = DataQueryColumn | DataQueryInlineColumn | DataQuerySparseToDenseColumn | DataQuerySymmetricJoin | DataQueryOuterJoin | DataQueryLinkerJoin | DataQuerySliceAxes | DataQuerySort | DataQueryFilter | DataQueryTransformColumns;
3055
- /** @see ExprAxisRef */
3056
- type DataExprAxisRef = ExprAxisRef<number>;
3057
- /** @see ExprColumnRef */
3058
- type DataExprColumnRef = ExprColumnRef<number>;
3059
- type DataQueryExpression = DataExprColumnRef | DataExprAxisRef | ExprConstant | ExprNumericBinary<DataQueryExpression> | ExprNumericComparison<DataQueryExpression> | ExprNumericUnary<DataQueryExpression> | ExprStringEquals<DataQueryExpression> | ExprStringContains<DataQueryExpression> | ExprStringRegex<DataQueryExpression> | ExprStringContainsFuzzy<DataQueryExpression> | ExprIsNull<DataQueryExpression> | ExprFillNull<DataQueryExpression> | ExprLogicalUnary<DataQueryExpression> | ExprLogicalVariadic<DataQueryExpression> | ExprIsIn<DataQueryExpression, string> | ExprIsIn<DataQueryExpression, number> | ExprCast<DataQueryExpression> | ExprConditional<DataQueryExpression> | ExprRanking<DataQueryExpression, number, number>;
3060
- type DataQueryBooleanExpression = InferBooleanExpressionUnion<DataQueryExpression>; //#endregion
3061
- //#endregion
3062
- //#region ../node_modules/.pnpm/@milaboratories+helpers@1.14.3/node_modules/@milaboratories/helpers/dist/types/brand.d.ts
3063
- //#region src/types/brand.d.ts
3064
- declare const __brand: unique symbol;
3065
- type Branded<T, B> = T & {
3066
- readonly [__brand]: B;
3067
- };
3068
- //#endregion
3069
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec_driver.d.ts
3070
- //#region src/drivers/pframe/spec_driver.d.ts
3071
- /** Matches a string value either exactly or by regex pattern */
3072
- type StringMatcher = {
3073
- type: "exact";
3074
- value: string;
3075
- } | {
3076
- type: "regex";
3077
- value: string;
3078
- };
3079
- /** Map of key to array of string matchers (OR-ed per key, AND-ed across keys) */
3080
- type MatcherMap = Record<string, StringMatcher[]>;
3081
- /** Selector for matching axes by various criteria */
3082
- interface MultiAxisSelector {
3083
- /** Match any of the axis types listed here */
3084
- readonly type?: AxisValueType[];
3085
- /** Match any of the axis names listed here */
3086
- readonly name?: StringMatcher[];
3087
- /** Match requires all the domains listed here */
3088
- readonly domain?: MatcherMap;
3089
- /** Match requires all the context domains listed here */
3090
- readonly contextDomain?: MatcherMap;
3091
- /** Match requires all the annotations listed here */
3092
- readonly annotations?: MatcherMap;
3093
- }
3094
- /** Column selector for discover columns request, matching columns by various criteria.
3095
- * Multiple selectors are OR-ed: a column matches if it satisfies any selector. */
3096
- interface MultiColumnSelector {
3097
- /** Match any of the value types listed here */
3098
- readonly type?: ColumnValueType[];
3099
- /** Match any of the names listed here */
3100
- readonly name?: StringMatcher[];
3101
- /** Match requires all the domains listed here */
3102
- readonly domain?: MatcherMap;
3103
- /** Match requires all the context domains listed here */
3104
- readonly contextDomain?: MatcherMap;
3105
- /** Match requires all the annotations listed here */
3106
- readonly annotations?: MatcherMap;
3107
- /** Match any of the axis selectors listed here */
3108
- readonly axes?: MultiAxisSelector[];
3109
- /** When true (default), allows matching if only a subset of axes match */
3110
- readonly partialAxesMatch?: boolean;
3111
- }
3112
- /** Qualifications needed for both query (already-integrated) columns and the hit column. */
3113
- interface ColumnAxesWithQualifications {
3114
- /** Already integrated (query) columns with their qualifications. */
3115
- axesSpec: AxisSpec[];
3116
- /** Qualifications for each already integrated (query) column. */
3117
- qualifications: AxisQualification[];
3118
- }
3119
- /** Fine-grained constraints controlling axes matching and qualification behavior */
3120
- interface DiscoverColumnsConstraints {
3121
- /** Allow source (query) axes that have no match in the hit column */
3122
- allowFloatingSourceAxes: boolean;
3123
- /** Allow hit column axes that have no match in the source (query) */
3124
- allowFloatingHitAxes: boolean;
3125
- /** Allow source (query) axes to be qualified (contextDomain extended) */
3126
- allowSourceQualifications: boolean;
3127
- /** Allow hit column axes to be qualified (contextDomain extended) */
3128
- allowHitQualifications: boolean;
3129
- }
3130
- /** Request for discovering columns compatible with a given axes integration */
3131
- interface DiscoverColumnsRequest {
3132
- /** Include columns matching these selectors (OR-ed); empty or omitted matches all columns */
3133
- includeColumns?: MultiColumnSelector[];
3134
- /** Exclude columns matching these selectors (OR-ed); applied after include filter */
3135
- excludeColumns?: MultiColumnSelector[];
3136
- /** Already integrated axes with qualifications */
3137
- axes: ColumnAxesWithQualifications[];
3138
- /** Maximum number of hops allowed between provided axes integration and returned hits (0 = direct only) */
3139
- maxHops?: number;
3140
- /** Constraints controlling axes matching and qualification behavior */
3141
- constraints: DiscoverColumnsConstraints;
3142
- }
3143
- /** Linker step: traversal through a linker column */
3144
- interface DiscoverColumnsLinkerStep {
3145
- type: "linker";
3146
- /** The linker column traversed in this step */
3147
- linker: PColumnIdAndSpec;
3148
- }
3149
- /**
3150
- * Filter step: intersects the current subquery with a filter column on shared
3151
- * axes. Filter columns carry `pl7.app/isSubset: "true"` with axes ⊆ dataset
3152
- * axes, so the inner-join narrows the key space to rows where the filter is
3153
- * present.
3154
- */
3155
- interface DiscoverColumnsFilterStep {
3156
- type: "filter";
3157
- /** The filter column applied in this step */
3158
- filter: PColumnIdAndSpec;
3159
- }
3160
- /** A step traversed during path-based column discovery. Discriminated by `type`. */
3161
- type DiscoverColumnsStepInfo = DiscoverColumnsLinkerStep | DiscoverColumnsFilterStep;
3162
- /**
3163
- * Input to `buildQuery`: a terminal column plus an ordered
3164
- * path of wrapping steps (linker hops, filter joins). Produces a
3165
- * {@link SpecQueryJoinEntry} ready to be plugged into an
3166
- * `innerJoin`/`fullJoin`/`outerJoin` entry list.
3332
+ /**
3333
+ * Full column specification including all axes specs and specs of the column
3334
+ * itself.
3167
3335
  *
3168
- * Path ordering: `path[0]` is outermost (first applied), `path[N-1]` is
3169
- * closest to `column`. Omit or pass `[]` for a direct column with no
3170
- * wrapping.
3336
+ * A PColumn in its essence represents a mapping from a fixed size, explicitly
3337
+ * typed tuple to an explicitly typed value.
3171
3338
  *
3172
- * Columns are referenced by id — specs are resolved later at
3173
- * `evaluateQuery` against the registered specs of the PFrame, so the
3174
- * caller cannot disagree with the frame about spec content.
3339
+ * (axis1Value1, axis2Value1, ...) -> columnValue
3175
3340
  *
3176
- * Qualifications annotate the resulting outermost entry; they do not
3177
- * propagate into the inner query.
3341
+ * Each element in tuple correspond to the axis having the same index in axesSpec.
3178
3342
  */
3179
- type BuildQueryInput = {
3180
- /** Shape version marker — bumped only on breaking structural changes. */readonly version: "v1"; /** Terminal column id — the column actually returning data. */
3181
- readonly column: PObjectId; /** Ordered path from source integration to `column`. Outermost first. */
3182
- readonly path?: DiscoverColumnsStepInfo[]; /** Axis qualifications attached to the resulting join entry. */
3183
- readonly qualifications?: AxisQualification[];
3343
+ type PUniversalColumnSpec = PObjectSpec & {
3344
+ /** Defines specific type of BObject, the most generic type of unit of
3345
+ * information in Platforma Project. */
3346
+ readonly kind: "PColumn"; /** Type of column values */
3347
+ readonly valueType: string; /** Column name */
3348
+ readonly name: string;
3349
+ /** Adds auxiliary information to the axis name, type and parents to form a
3350
+ * unique identifier */
3351
+ readonly domain?: Record<string, string>;
3352
+ /** Context domain provides additional column identity that is matched
3353
+ * by kinship rules (subset/superset/overlap) rather than exact equality */
3354
+ readonly contextDomain?: Record<string, string>;
3355
+ /** Any additional information attached to the column that does not affect its
3356
+ * identifier */
3357
+ readonly annotations?: Record<string, string>; /** A list of zero-based indices of parent axes from the {@link axesSpec} array. */
3358
+ readonly parentAxes?: number[]; /** Axes specifications */
3359
+ readonly axesSpec: AxesSpec;
3184
3360
  };
3185
- /** Qualifications info for a discover columns response mapping variant */
3186
- interface DiscoverColumnsResponseQualifications {
3187
- /** Qualifications for each query (already-integrated) column set */
3188
- forQueries: AxisQualification[][];
3189
- /** Qualifications for the hit column */
3190
- forHit: AxisQualification[];
3191
- }
3192
- /** A single mapping variant describing how a hit column can be integrated */
3193
- interface DiscoverColumnsMappingVariant {
3194
- /** Full qualifications needed for integration */
3195
- qualifications: DiscoverColumnsResponseQualifications;
3196
- /** Distinctive (minimal) qualifications needed for integration */
3197
- distinctiveQualifications: DiscoverColumnsResponseQualifications;
3198
- }
3199
- /** A single hit in the discover columns response */
3200
- interface DiscoverColumnsResponseHit {
3201
- /** The column that was found compatible */
3202
- hit: PColumnIdAndSpec;
3203
- /** Possible ways to integrate this column with the existing set */
3204
- mappingVariants: DiscoverColumnsMappingVariant[];
3205
- /** Linker steps traversed to reach this hit; empty for direct matches */
3206
- path: DiscoverColumnsStepInfo[];
3361
+ /**
3362
+ * Specification of a data column.
3363
+ *
3364
+ * Data column is a specialized type of PColumn that stores only simple values (strings and numbers)
3365
+ * addressed by multiple keys. This is in contrast to other PColumn variants that can store more complex
3366
+ * values like files or other abstract data types. Data columns are optimized for storing and processing
3367
+ * basic tabular data.
3368
+ */
3369
+ type PDataColumnSpec = PUniversalColumnSpec & {
3370
+ /** Type of column values */readonly valueType: ValueType;
3371
+ };
3372
+ type PColumnSpec = PDataColumnSpec;
3373
+ /** Unique PColumnSpec identifier */
3374
+ interface PColumn<Data> extends PObject<Data> {
3375
+ /** PColumn spec, allowing it to be found among other PObjects */
3376
+ readonly spec: PColumnSpec;
3207
3377
  }
3208
- /** Response from discover columns */
3209
- interface DiscoverColumnsResponse {
3210
- /** Columns that could be integrated and possible ways to integrate them */
3211
- hits: DiscoverColumnsResponseHit[];
3378
+ /** Columns in a PFrame also have internal identifier, this object represents
3379
+ * combination of specs and such id */
3380
+ interface PColumnIdAndSpec {
3381
+ /** Internal column id within the PFrame */
3382
+ readonly columnId: PObjectId;
3383
+ /** Column spec */
3384
+ readonly spec: PColumnSpec;
3212
3385
  }
3213
- /** Request for deleting an entry from a given axes integration */
3214
- interface DeleteColumnRequest {
3215
- /** Already integrated axes with qualifications */
3216
- axes: ColumnAxesWithQualifications[];
3217
- /** Zero based index of the entry to be deleted */
3218
- delete: number;
3386
+ /** Get column id and spec from a column */
3387
+ interface AxisId {
3388
+ /** Type of the axis or column value. For an axis should not use non-key
3389
+ * types like float or double. */
3390
+ readonly type: AxisValueType;
3391
+ /** Name of the axis or column */
3392
+ readonly name: string;
3393
+ /** Adds auxiliary information to the axis or column name and type to form a
3394
+ * unique identifier */
3395
+ readonly domain?: Record<string, string>;
3396
+ /** Context domain provides additional axis identity that is matched
3397
+ * by kinship rules (subset/superset/overlap) rather than exact equality */
3398
+ readonly contextDomain?: Record<string, string>;
3219
3399
  }
3220
- /** Response from delete column */
3221
- interface DeleteColumnResponse {
3222
- axes: ColumnAxesWithQualifications[];
3400
+ /** Array of axis ids */
3401
+ type AxesId = AxisId[];
3402
+ /** Extracts axis ids from axis spec */
3403
+ //#endregion
3404
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/filtered_column.d.ts
3405
+ //#region src/drivers/pframe/spec/filtered_column.d.ts
3406
+ /** Value of an axis filter */
3407
+ type AxisFilterValue = number | string;
3408
+ /** Axis filter by index */
3409
+ type AxisFilterByIdx = [number, AxisFilterValue];
3410
+ /** Axis filter by name */
3411
+ /**
3412
+ * `source` is either a leaf {@link PObjectId} or a {@link ColumnDiscoveredId}.
3413
+ * Filtered never nests inside Filtered (flat-merge invariant), and Filtered is
3414
+ * never the outer wrapper around Overridden — Overridden is always outermost.
3415
+ */
3416
+ interface ColumnFilteredKey {
3417
+ __isFiltered: true;
3418
+ source: ColumnUniversalId;
3419
+ axisFilters: AxisFilterByIdx[];
3223
3420
  }
3224
- /** Response from evaluating a query against a PFrame. */
3225
- type EvaluateQueryResponse = {
3226
- /**
3227
- * The table specification describing the structure of the query result,
3228
- * including all axes and columns that will be present in the output.
3229
- */
3230
- tableSpec: PTableColumnSpec[];
3231
- /**
3232
- * The data layer query representation with numeric indices,
3233
- * suitable for execution by the data processing engine.
3234
- */
3235
- dataQuery: DataQuery;
3236
- };
3237
- /** Handle to a spec-only PFrame (no data, synchronous operations). */
3238
- type SpecFrameHandle = Branded<string, "SpecFrameHandle">;
3421
+ type ColumnFilteredId = Branded<CanonicalizedJson<ColumnFilteredKey>, "ColumnFilteredId">;
3422
+ //#endregion
3423
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/ids.d.ts
3424
+ //#region src/drivers/pframe/spec/ids.d.ts
3239
3425
  /**
3240
- * Synchronous driver for spec-level PFrame operations.
3426
+ * Per-axis patches keyed by positional index in the base spec's `axesSpec`.
3241
3427
  *
3242
- * Unlike the async PFrameDriver (which works with data), this driver
3243
- * operates on column specifications only. All methods are synchronous
3244
- * because the underlying WASM PFrame computes results immediately.
3428
+ * Using position rather than `name` lets us disambiguate linker-style specs
3429
+ * that carry multiple axes with the same `name` differentiated by `domain` /
3430
+ * `contextDomain` (e.g. a `group`, `group/primary`, `group/secondary` triple).
3431
+ *
3432
+ * A patch at index `>= base.axesSpec.length` appends a new axis at that slot.
3245
3433
  */
3246
- interface PFrameSpecDriver {
3247
- /** Create a spec-only PFrame from column specs. Returns a pool entry with handle and unref. */
3248
- createSpecFrame(specs: Record<string, PColumnSpec>): PoolEntry<SpecFrameHandle>;
3249
- /** List all columns currently registered in the frame. */
3250
- listColumns(handle: SpecFrameHandle): PColumnIdAndSpec[];
3251
- /** Discover columns compatible with given axes integration. */
3252
- discoverColumns(handle: SpecFrameHandle, request: DiscoverColumnsRequest): DiscoverColumnsResponse;
3253
- /** Delete an entry from a given axes integration */
3254
- deleteColumn(handle: SpecFrameHandle, request: DeleteColumnRequest): DeleteColumnResponse;
3255
- /** Evaluates a query specification against this PFrame */
3256
- evaluateQuery(handle: SpecFrameHandle, request: SpecQuery): EvaluateQueryResponse;
3257
- /**
3258
- * Assembles a {@link SpecQueryJoinEntry} from a terminal column plus an
3259
- * ordered path of wrapping steps (linker hops, filter joins).
3260
- *
3261
- * Pure over its input — no frame handle is needed. Column ids are resolved
3262
- * later at {@link evaluateQuery} against the registered specs.
3263
- */
3264
- buildQuery(input: BuildQueryInput): SpecQueryJoinEntry;
3265
- /** Expand index-based parentAxes in AxesSpec to resolved AxisId parents in AxesId. */
3266
- expandAxes(spec: AxesSpec): AxesId;
3267
- /** Collapse resolved AxisId parents back to index-based parentAxes in AxesSpec. */
3268
- collapseAxes(ids: AxesId): AxesSpec;
3269
- /** Find the index of an axis matching the given selector. Returns -1 if not found. */
3270
- findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
3271
- /** Find the flat index of a table column matching the given selector. Returns -1 if not found. */
3272
- findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
3273
- /**
3274
- * Upgrades selector-based legacy record filters into index-based data-layer
3275
- * boolean expressions, resolved against the provided unified table spec
3276
- * (axes first, then columns).
3277
- */
3278
- rewriteLegacyFilters(request: {
3279
- tableSpec: PTableColumnSpec[];
3280
- filters: PTableRecordFilter[];
3281
- }): DataQueryBooleanExpression[];
3282
- } //#endregion
3283
- //#endregion
3284
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/selectors.d.ts
3285
- /** Single axis selector */
3286
- interface SingleAxisSelector {
3287
- /** Axis name (required) */
3288
- name: string;
3289
- /** Axis type (optional) */
3290
- type?: AxisValueType;
3291
- /** Domain requirements (optional) */
3292
- domain?: Domain;
3293
- /** Parent axes requirements (optional) */
3294
- parentAxes?: SingleAxisSelector[];
3295
- }
3296
- /** Qualification applied to a single axis to make it compatible during integration. */
3297
- interface AxisQualification {
3298
- /** Axis selector identifying which axis is qualified. */
3299
- readonly axis: SingleAxisSelector;
3300
- /** Additional context domain entries applied to the axis. */
3301
- readonly contextDomain: Record<string, string>;
3302
- }
3434
+ type AxisPatches = Record<number, Partial<AxisSpec>>;
3303
3435
  /**
3304
- * Reference to an axis by its numerical index within the anchor column's axes array
3305
- * Format: [anchorId, axisIndex]
3436
+ * Universal column identifier optionally anchored and optionally filtered.
3437
+ * @deprecated use {@link ColumnUniversalKey}
3306
3438
  */
3307
- //#endregion
3308
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/ids.d.ts
3309
3439
  /**
3310
3440
  * Canonically serialized {@link UniversalPColumnId}.
3441
+ * @deprecated use {@link ColumnUniversalId}
3311
3442
  */
3312
- type SUniversalPColumnId = Branded$1<PObjectId, "SUniversalPColumnId", "__pl_model_brand_2__">;
3443
+ type SUniversalPColumnId = ColumnUniversalId;
3444
+ type ColumnUniversalId = LocalPObjectId | GlobalPObjectId | ColumnFilteredId | ColumnDiscoveredId | ColumnOverriddenId;
3313
3445
  /**
3314
- * Canonically serializes a {@link UniversalPColumnId} to a string.
3315
- * @param id - The column identifier to serialize
3316
- * @returns The canonically serialized string
3446
+ * Canonically serializes a column key to a branded string id. Accepts both
3447
+ * the new {@link ColumnUniversalKey} and the deprecated {@link UniversalPColumnId}
3448
+ * (anchored / old filtered object form).
3317
3449
  */
3318
3450
  //#endregion
3319
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/interfaces.d.ts
3451
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/discovered_column.d.ts
3452
+ //#region src/drivers/pframe/spec/discovered_column.d.ts
3453
+ interface ColumnDiscoveredKey {
3454
+ __isDiscovered: true;
3455
+ column: ColumnUniversalId;
3456
+ path?: PathItem[];
3457
+ columnQualifications?: AxisQualification[];
3458
+ queriesQualifications?: Record<PObjectId, AxisQualification[]>;
3459
+ }
3460
+ type ColumnDiscoveredId = Branded<CanonicalizedJson<ColumnDiscoveredKey>, "ColumnDiscoveredId">;
3461
+ type PathItem = {
3462
+ type: "linker";
3463
+ column: ColumnUniversalId;
3464
+ };
3465
+ //#endregion
3466
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/interfaces.d.ts
3320
3467
  //#region src/drivers/interfaces.d.ts
3321
3468
  /**
3322
3469
  * Intended to match web.Blob, node.Blob, node-fetch.Blob, etc.
@@ -3341,7 +3488,7 @@ interface FileLike extends BlobLike {
3341
3488
  readonly name: string;
3342
3489
  } //#endregion
3343
3490
  //#endregion
3344
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.d.ts
3491
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.d.ts
3345
3492
  //#region src/drivers/blob.d.ts
3346
3493
  /** Handle of locally downloaded blob. This handle is issued only after the
3347
3494
  * blob's content is downloaded locally, and ready for quick access. */
@@ -3376,7 +3523,7 @@ interface BlobDriver {
3376
3523
  * Operational metrics of the blob download driver.
3377
3524
  */
3378
3525
  //#endregion
3379
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/log.d.ts
3526
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/log.d.ts
3380
3527
  //#region src/drivers/log.d.ts
3381
3528
  /** Prefix constants — single source of truth for handle format. */
3382
3529
  declare const LIVE_LOG_PREFIX = "log+live://log/";
@@ -3443,7 +3590,7 @@ type StreamingApiResponseHandleOutdated = {
3443
3590
  shouldUpdateHandle: true;
3444
3591
  };
3445
3592
  //#endregion
3446
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/column_filter.d.ts
3593
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/column_filter.d.ts
3447
3594
  //#region src/drivers/pframe/column_filter.d.ts
3448
3595
  /** Allows to search multiple columns in different contexts. */
3449
3596
  interface ColumnFilter {
@@ -3462,7 +3609,7 @@ interface ColumnFilter {
3462
3609
  readonly annotationPattern?: Record<string, string>;
3463
3610
  } //#endregion
3464
3611
  //#endregion
3465
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/find_columns.d.ts
3612
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/find_columns.d.ts
3466
3613
  //#region src/drivers/pframe/find_columns.d.ts
3467
3614
  /**
3468
3615
  * Request to search among existing columns in the PFrame. Two filtering
@@ -3489,7 +3636,7 @@ interface FindColumnsResponse {
3489
3636
  readonly hits: PColumnIdAndSpec[];
3490
3637
  } //#endregion
3491
3638
  //#endregion
3492
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/unique_values.d.ts
3639
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/unique_values.d.ts
3493
3640
  //#region src/drivers/pframe/unique_values.d.ts
3494
3641
  /** Calculate set of unique values for a specific axis for the filtered set of records */
3495
3642
  interface UniqueValuesRequest {
@@ -3509,7 +3656,79 @@ interface UniqueValuesResponse {
3509
3656
  readonly overflow: boolean;
3510
3657
  } //#endregion
3511
3658
  //#endregion
3512
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/ls.d.ts
3659
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/pframe.d.ts
3660
+ /** Information required to instantiate a PFrame. */
3661
+ type PFrameDef<Col> = Col[]; //#endregion
3662
+ //#endregion
3663
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/driver.d.ts
3664
+ //#region src/drivers/pframe/driver.d.ts
3665
+ /** PFrame handle */
3666
+ type PFrameHandle = Branded$1<string, "PFrame">;
3667
+ /** PFrame handle */
3668
+ type PTableHandle = Branded$1<string, "PTable">;
3669
+ /** Model-side PFrame service — creates frames/tables from column definitions. */
3670
+ interface PFrameModelDriver<Col = PColumn<string | PColumnValues | DataInfo<string>>> {
3671
+ createPFrame(def: PFrameDef<Col>): PFrameHandle;
3672
+ createPTable(def: PTableDef<Col>): PTableHandle;
3673
+ createPTableV2(def: PTableDefV2<Col>): PTableHandle;
3674
+ }
3675
+ /** Allows to access main data layer features of platforma */
3676
+ interface PFrameDriver {
3677
+ /**
3678
+ * Finds columns given filtering criteria on column name, annotations etc.
3679
+ * and a set of axes ids to find only columns with compatible specs.
3680
+ * */
3681
+ findColumns(handle: PFrameHandle, request: FindColumnsRequest): Promise<FindColumnsResponse>;
3682
+ /** Retrieve single column spec */
3683
+ getColumnSpec(handle: PFrameHandle, columnId: PObjectId): Promise<PColumnSpec | null>;
3684
+ /** Retrieve information about all columns currently added to the PFrame */
3685
+ listColumns(handle: PFrameHandle): Promise<PColumnIdAndSpec[]>;
3686
+ /** Calculates data for the table and returns complete data representation of it */
3687
+ calculateTableData(handle: PFrameHandle, request: CalculateTableDataRequest<PObjectId>, range?: TableRange): Promise<CalculateTableDataResponse>;
3688
+ /** Calculate set of unique values for a specific axis for the filtered set of records */
3689
+ getUniqueValues(handle: PFrameHandle, request: UniqueValuesRequest): Promise<UniqueValuesResponse>;
3690
+ /** Unified table shape */
3691
+ getShape(handle: PTableHandle): Promise<PTableShape>;
3692
+ /**
3693
+ * Returns ordered array of table axes specs (primary key "columns" in SQL
3694
+ * terms) and data column specs (regular "columns" in SQL terms).
3695
+ *
3696
+ * Data for a specific table column can be retrieved using unified indexing
3697
+ * corresponding to elements in this array.
3698
+ *
3699
+ * Axes are always listed first.
3700
+ * */
3701
+ getSpec(handle: PTableHandle): Promise<PTableColumnSpec[]>;
3702
+ /**
3703
+ * Retrieve the data from the table. To retrieve only data required, it can be
3704
+ * sliced both horizontally ({@link columnIndices}) and vertically
3705
+ * ({@link range}).
3706
+ *
3707
+ * @param columnIndices unified indices of columns to be retrieved
3708
+ * @param range optionally limit the range of records to retrieve
3709
+ * */
3710
+ getData(handle: PTableHandle, columnIndices: number[], range?: TableRange): Promise<PTableVector[]>;
3711
+ /**
3712
+ * Stream the table to a file at the given path. Caller is responsible
3713
+ * for producing the destination path (e.g. via the `Dialog` service).
3714
+ */
3715
+ writePTableToFs(handle: PTableHandle, options: WritePTableToFsOptions): Promise<WritePTableToFsResult>;
3716
+ /**
3717
+ * Export the table to a file. The output format is selected from the file
3718
+ * extension of `options.path` (`csv`, `tsv`, `parquet`, or `xlsx`).
3719
+ *
3720
+ * `options.columnIndices` selects the columns to export (output order). Column
3721
+ * headers are derived on the driver side from each field's label annotation
3722
+ * (falling back to its spec name), so the caller supplies only the path and
3723
+ * the columns.
3724
+ *
3725
+ * For `xlsx` the driver rejects tables whose row count would exceed the
3726
+ * 1,000,000-row per-sheet limit (below Excel's hard cap of 1,048,576).
3727
+ */
3728
+ exportPTable(handle: PTableHandle, options: ExportPTableOptions): Promise<void>;
3729
+ } //#endregion
3730
+ //#endregion
3731
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/ls.d.ts
3513
3732
  //#region src/drivers/ls.d.ts
3514
3733
  type ImportFileHandleUpload = `upload://upload/${string}`;
3515
3734
  type ImportFileHandleIndex = `index://index/${string}`;
@@ -3584,88 +3803,297 @@ interface LsDriver {
3584
3803
  }
3585
3804
  /** Gets a file path from an import handle. */
3586
3805
  //#endregion
3587
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/pframe.d.ts
3588
- /** Information required to instantiate a PFrame. */
3589
- type PFrameDef<Col> = Col[]; //#endregion
3806
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/columns/column_selector.d.ts
3807
+ //#region src/columns/column_selector.d.ts
3808
+ /** Relaxed string matcher input: plain string, single matcher, or array of mixed. */
3809
+ type RelaxedStringMatchers = string | StringMatcher | (string | StringMatcher)[];
3810
+ /** Relaxed record matcher: values can be plain strings or relaxed matchers. */
3811
+ type RelaxedRecord = Record<string, RelaxedStringMatchers>;
3812
+ /** Relaxed axis selector — accepts plain strings where strict requires StringMatcher[]. */
3813
+ interface RelaxedAxisSelector {
3814
+ name?: RelaxedStringMatchers;
3815
+ type?: AxisValueType | AxisValueType[];
3816
+ domain?: RelaxedRecord;
3817
+ contextDomain?: RelaxedRecord;
3818
+ annotations?: RelaxedRecord;
3819
+ }
3820
+ /** Relaxed column selector — convenient hand-written form. */
3821
+ interface RelaxedColumnSelector {
3822
+ name?: RelaxedStringMatchers;
3823
+ type?: ColumnValueType | ColumnValueType[];
3824
+ domain?: RelaxedRecord;
3825
+ contextDomain?: RelaxedRecord;
3826
+ annotations?: RelaxedRecord;
3827
+ axes?: RelaxedAxisSelector[];
3828
+ partialAxesMatch?: boolean;
3829
+ }
3830
+ /** One or many relaxed column selectors; normalizes to MultiColumnSelector[]. */
3831
+ type ColumnSelector = RelaxedColumnSelector | RelaxedColumnSelector[];
3590
3832
  //#endregion
3591
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/driver.d.ts
3592
- //#region src/drivers/pframe/driver.d.ts
3593
- /** PFrame handle */
3594
- type PFrameHandle = Branded$1<string, "PFrame">;
3595
- /** PFrame handle */
3596
- type PTableHandle = Branded$1<string, "PTable">;
3597
- /** Model-side PFrame service — creates frames/tables from column definitions. */
3598
- interface PFrameModelDriver<Col = PColumn<string | PColumnValues | DataInfo<string>>> {
3599
- createPFrame(def: PFrameDef<Col>): PFrameHandle;
3600
- createPTable(def: PTableDef<Col>): PTableHandle;
3601
- createPTableV2(def: PTableDefV2<Col>): PTableHandle;
3833
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/columns/discover_columns_options.d.ts
3834
+ //#region src/drivers/columns/discover_columns_options.d.ts
3835
+ /**
3836
+ * Axis matching behaviour applied to `discover` requests.
3837
+ *
3838
+ * - `enrichment` (default) — anchor axes may float over un-mapped hit axes;
3839
+ * used by tooling that "extends" a query.
3840
+ * - `related` — both source and hit axes may float; widest match.
3841
+ * - `exact` — no floating, no qualifications; strict equality.
3842
+ */
3843
+ type MatchingMode = "enrichment" | "related" | "exact";
3844
+ /**
3845
+ * Single entry accepted by `DiscoverColumnsOptions.anchors`. All variants are
3846
+ * trivially JSON-serialisable so the option carrier crosses the
3847
+ * sandbox/host VM bridge unchanged.
3848
+ */
3849
+ type AnchorEntry = PlRef | PObjectId | PColumnSpec | RelaxedColumnSelector;
3850
+ /** Qualifications needed for both already-integrated anchor columns and the hit column. */
3851
+ /**
3852
+ * Options object accepted by sandbox `discoverColumns()` and by the host
3853
+ * `ColumnsCollectionDriver.discover` / `.filter` methods. Pure JSON shape —
3854
+ * no class instances, no closures.
3855
+ */
3856
+ interface DiscoverColumnsOptions {
3857
+ /** Include columns matching these selectors. If omitted, includes all. */
3858
+ include?: ColumnSelector;
3859
+ /** Exclude columns matching these selectors. */
3860
+ exclude?: ColumnSelector;
3861
+ /** Axis matching behavior. Default: 'enrichment'. Ignored if no anchors. */
3862
+ mode?: MatchingMode;
3863
+ /** Anchors enable axis-aware discovery + linker traversal. */
3864
+ anchors?: Record<string, AnchorEntry>;
3865
+ /** Maximum linker hops. Default: 4 when anchors present, 0 otherwise. */
3866
+ maxHops?: number;
3602
3867
  }
3603
- /** Allows to access main data layer features of platforma */
3604
- interface PFrameDriver {
3605
- /**
3606
- * Finds columns given filtering criteria on column name, annotations etc.
3607
- * and a set of axes ids to find only columns with compatible specs.
3608
- * */
3609
- findColumns(handle: PFrameHandle, request: FindColumnsRequest): Promise<FindColumnsResponse>;
3610
- /** Retrieve single column spec */
3611
- getColumnSpec(handle: PFrameHandle, columnId: PObjectId): Promise<PColumnSpec | null>;
3612
- /** Retrieve information about all columns currently added to the PFrame */
3613
- listColumns(handle: PFrameHandle): Promise<PColumnIdAndSpec[]>;
3614
- /** Calculates data for the table and returns complete data representation of it */
3615
- calculateTableData(handle: PFrameHandle, request: CalculateTableDataRequest<PObjectId>, range?: TableRange): Promise<CalculateTableDataResponse>;
3616
- /** Calculate set of unique values for a specific axis for the filtered set of records */
3617
- getUniqueValues(handle: PFrameHandle, request: UniqueValuesRequest): Promise<UniqueValuesResponse>;
3618
- /** Unified table shape */
3619
- getShape(handle: PTableHandle): Promise<PTableShape>;
3620
- /**
3621
- * Returns ordered array of table axes specs (primary key "columns" in SQL
3622
- * terms) and data column specs (regular "columns" in SQL terms).
3623
- *
3624
- * Data for a specific table column can be retrieved using unified indexing
3625
- * corresponding to elements in this array.
3626
- *
3627
- * Axes are always listed first.
3628
- * */
3629
- getSpec(handle: PTableHandle): Promise<PTableColumnSpec[]>;
3868
+ /**
3869
+ * Options accepted by `ColumnsCollection.discover` / driver `.discover`.
3870
+ * Traversal scope (`mode`, `maxHops`) must be specified explicitly — the
3871
+ * defaults from {@link DiscoverColumnsOptions} are intentionally surfaced as
3872
+ * required choices at the discovery entrypoint.
3873
+ */
3874
+ type ColumnsDiscoverOptions = DiscoverColumnsOptions;
3875
+ /**
3876
+ * Options accepted by `ColumnsCollection.filter` / driver `.filter`. Traversal
3877
+ * scope is fixed by the source collection, so `mode` / `maxHops` are not part
3878
+ * of the filter surface — only `include` / `exclude` / `anchors`.
3879
+ */
3880
+ type ColumnsFilterOptions = Omit<DiscoverColumnsOptions, "mode" | "maxHops">;
3881
+ /** Translate a {@link MatchingMode} into the boolean-flag form the spec driver consumes. */
3882
+ //#endregion
3883
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/columns/types.d.ts
3884
+ //#region src/columns/types.d.ts
3885
+ /**
3886
+ * Opaque sandbox/host accessor handle.
3887
+ *
3888
+ * Both the sandbox `TreeNodeAccessor.handle` and the host-issued accessor
3889
+ * keys alias this brand — `sdk/model` re-exports the same type so the two
3890
+ * sides stay structurally identical.
3891
+ */
3892
+ type AccessorHandle = Branded$1<string, "AccessorHandle">;
3893
+ /**
3894
+ * Structural subset of {@link FieldTraversalStep} (from `@platforma-sdk/model`)
3895
+ * needed by the host/sandbox column-providers traversal.
3896
+ *
3897
+ * Defined locally so this module does not depend on the sandbox `render`
3898
+ * subtree. Both `TreeNodeAccessor.traverse` (sandbox) and
3899
+ * `PlTreeNodeAccessor.traverse` (host) accept a superset of these fields, so
3900
+ * structural compatibility is preserved.
3901
+ */
3902
+ interface FieldTraversalStepLike {
3903
+ /** Field name */
3904
+ readonly field: string;
3905
+ /** Asserted field type — used by `accessor.traverse` to validate. */
3906
+ readonly assertFieldType?: "Input" | "Output" | "Service" | "OTW" | "Dynamic" | "MTW";
3907
+ /** Don't terminate chain if current resource or field has an error associated. */
3908
+ readonly ignoreError?: true;
3909
+ }
3910
+ /**
3911
+ * Raw entry returned by {@link GlobalCfgRenderCtxMethods.getUpstreamBlockCtx}
3912
+ * on the sandbox side, or by `collectUpstreamBlockCtx` on the host side.
3913
+ * Carries handle ids only — providers wrap them into accessor instances as
3914
+ * needed.
3915
+ *
3916
+ * Generic over the handle type so the same shape backs both:
3917
+ * - sandbox (`AHandle = AccessorHandle`, a `Branded<string, "AccessorHandle">`)
3918
+ * - host (`AHandle = PlTreeNodeAccessor`, the resolved accessor instance)
3919
+ *
3920
+ * Default `AHandle = string` since `AccessorHandle` is a brand on `string` —
3921
+ * the default is safe for the sandbox case.
3922
+ */
3923
+ interface UpstreamBlockCtx<AHandle = string> {
3924
+ blockId: string;
3925
+ prodCtx?: AHandle;
3926
+ stagingCtx?: AHandle;
3927
+ /** True when the `prodCtx` ctx-holder exists but `prodUiCtx` is still rendering. */
3928
+ prodIncomplete?: boolean;
3929
+ /** True when the `stagingCtx` ctx-holder exists but `stagingUiCtx` is still rendering. */
3930
+ stagingIncomplete?: boolean;
3931
+ }
3932
+ /**
3933
+ * Minimal accessor surface used by column-providers / column-registry
3934
+ * traversal.
3935
+ *
3936
+ * Both sandbox `TreeNodeAccessor` and host `PlTreeNodeAccessor` satisfy this
3937
+ * contract directly — `traverse(step)` is defined on both, and the other
3938
+ * members already match by shape. No `resolvePath` member: when canonical
3939
+ * `PObjectId`s are required (local-id construction inside the
3940
+ * outputs/prerun branch), the traversal helpers thread the path explicitly.
3941
+ */
3942
+ interface AccessorLike<Self extends AccessorLike<Self>> {
3943
+ /** Resource type carried by the underlying node (only `.name` is used). */
3944
+ readonly resourceType: {
3945
+ readonly name: string;
3946
+ };
3630
3947
  /**
3631
- * Retrieve the data from the table. To retrieve only data required, it can be
3632
- * sliced both horizontally ({@link columnIndices}) and vertically
3633
- * ({@link range}).
3634
- *
3635
- * @param columnIndices unified indices of columns to be retrieved
3636
- * @param range optionally limit the range of records to retrieve
3637
- * */
3638
- getData(handle: PTableHandle, columnIndices: number[], range?: TableRange): Promise<PTableVector[]>;
3948
+ * Single-step field traversal. Returns `undefined` when the field is
3949
+ * absent / unresolved (with `ignoreError`). Same shape on sandbox and host —
3950
+ * sandbox `TreeNodeAccessor.traverse` is an alias for `resolveAny` and host
3951
+ * `PlTreeNodeAccessor.traverse` is the canonical method.
3952
+ */
3953
+ traverse(step: FieldTraversalStepLike): Self | undefined;
3954
+ /** List input-field names on this node. */
3955
+ listInputFields(): string[];
3956
+ /** Whether the input-field collection on this node is finalized. */
3957
+ getInputsLocked(): boolean;
3958
+ /** Whether this node has a data payload attached. */
3959
+ hasData(): boolean;
3960
+ /** Decode the data payload as JSON. Returns `undefined` if no data. */
3961
+ getDataAsJson<T = unknown>(): T | undefined;
3962
+ }
3963
+ /**
3964
+ * One indexed column — the canonical record produced by every traversal.
3965
+ * Carries everything needed to read spec/data/status under a stable id.
3966
+ *
3967
+ * Generic over the accessor flavour so the same record shape works for both
3968
+ * the sandbox `TreeNodeAccessor` and the host `PlTreeNodeAccessor`.
3969
+ */
3970
+ //#endregion
3971
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/drivers/columns/columns_collection_driver.d.ts
3972
+ //#region src/drivers/columns/columns_collection_driver.d.ts
3973
+ /**
3974
+ * Opaque host-owned handle for a `ColumnsCollection` instance. Issued by
3975
+ * {@link ColumnsCollectionDriver.create}, refcounted by the driver, and
3976
+ * pinned to the active render ctx via the VM injector — sandbox never
3977
+ * sees raw refcounting.
3978
+ */
3979
+ type CollectionHandle = Branded$1<string, "CollectionHandle">;
3980
+ /**
3981
+ * JSON descriptor crossing the VM bridge in place of a sandbox
3982
+ * `ColumnsSource`. Always plain data — no closures, no class instances.
3983
+ *
3984
+ * - `"collection"` – reference another driver-managed collection by handle
3985
+ * (chaining, splicing).
3986
+ * - `"result_pool"` – fan-out into the host's current render ctx upstream
3987
+ * block ctxes. Carries no payload — the host always uses its own pool.
3988
+ * - `"accessor"` – walk the host tree starting at the given accessor
3989
+ * handle from a `path` prefix.
3990
+ * - `"ids"` – pre-resolved id list (sandbox-materialised provider).
3991
+ */
3992
+ type SerializedColumnsSource = {
3993
+ readonly kind: "collection";
3994
+ readonly handle: CollectionHandle;
3995
+ } | {
3996
+ readonly kind: "result_pool";
3997
+ } | {
3998
+ readonly kind: "accessor";
3999
+ readonly accessor: AccessorHandle;
4000
+ readonly path: string[];
4001
+ } | {
4002
+ readonly kind: "ids";
4003
+ readonly ids: ColumnUniversalId[];
4004
+ readonly isFinal: boolean;
4005
+ };
4006
+ /**
4007
+ * Per-call host bindings the driver needs to resolve sources whose
4008
+ * shape references render-ctx state (`"accessor"`, `"result_pool"`).
4009
+ *
4010
+ * The VM injector inside `pl-middle-layer` supplies these on every call;
4011
+ * UI-side direct callers that only build collections out of `"ids"` /
4012
+ * `"collection"` sources may omit the bindings entirely.
4013
+ *
4014
+ * Parameterised on the concrete accessor flavour so host implementations
4015
+ * keep their static types (e.g. `PlTreeNodeAccessor`) without leaking that
4016
+ * dependency into `@milaboratories/pl-model-common`.
4017
+ */
4018
+ interface ColumnsCollectionDriverHost<A extends AccessorLike<A> = AccessorLike<any>> {
4019
+ /** Resolve an {@link AccessorHandle} to the host's concrete accessor. */
4020
+ resolveAccessor(handle: AccessorHandle): A;
4021
+ /** Snapshot of upstream-block ctx pairs from the current render ctx. */
4022
+ getUpstreamBlockCtxes(): ReadonlyArray<UpstreamBlockCtx<A>>;
3639
4023
  /**
3640
- * Stream the table to a file at the given path. Caller is responsible
3641
- * for producing the destination path (e.g. via the `Dialog` service).
4024
+ * Per-call spec driver. The injector supplies the active render ctx's
4025
+ * `PFrameSpec` service; `discover` / `filter` use it to build a spec
4026
+ * frame and run a single discovery query.
3642
4027
  */
3643
- writePTableToFs(handle: PTableHandle, options: WritePTableToFsOptions): Promise<WritePTableToFsResult>;
4028
+ getSpecDriver(): PFrameSpecDriver;
3644
4029
  /**
3645
- * Export the table to a file. The output format is selected from the file
3646
- * extension of `options.path` (`csv`, `tsv`, `parquet`, or `xlsx`).
3647
- *
3648
- * `options.columnIndices` selects the columns to export (output order). Column
3649
- * headers are derived on the driver side from each field's label annotation
3650
- * (falling back to its spec name), so the caller supplies only the path and
3651
- * the columns.
3652
- *
3653
- * For `xlsx` the driver rejects tables whose row count would exceed the
3654
- * 1,000,000-row per-sheet limit (below Excel's hard cap of 1,048,576).
4030
+ * Resolve the canonical {@link PColumnSpec} for a leaf {@link PObjectId}.
4031
+ * Returns `undefined` when the id is not present in the active registry
4032
+ * (e.g. handed to the driver via a `{kind:"ids"}` source whose underlying
4033
+ * column has since left the visible scope). Override-wrapped ids are
4034
+ * unwrapped by the caller — this method only resolves the underlying leaf.
3655
4035
  */
3656
- exportPTable(handle: PTableHandle, options: ExportPTableOptions): Promise<void>;
4036
+ resolveSpec(id: PObjectId): PColumnSpec | undefined;
4037
+ }
4038
+ /**
4039
+ * Sandbox / UI view of the `ColumnsCollection` driver. Same methods as
4040
+ * {@link ColumnsCollectionDriver}, but the `host` parameters are dropped —
4041
+ * the VM bridge / UI wrapper supplies them on every call so callers only
4042
+ * pass plain data (handles + source descriptors + option objects).
4043
+ *
4044
+ * `getService("columnsCollection")` returns a value of this shape on both
4045
+ * sandbox and UI sides.
4046
+ */
4047
+ interface ColumnsCollectionDriverModel {
4048
+ /** Build a fresh collection from the supplied source descriptors. */
4049
+ create(sources: ReadonlyArray<SerializedColumnsSource>): CollectionHandle;
4050
+ /** Whether the collection currently exposes zero columns. */
4051
+ isEmpty(handle: CollectionHandle): boolean;
4052
+ /** Whether enumeration is finalised across every contributing source. */
4053
+ isFinal(handle: CollectionHandle): boolean;
4054
+ /** Canonical id list for the columns visible through this collection. */
4055
+ getColumns(handle: CollectionHandle): ColumnUniversalId[];
4056
+ /** Append one or more sources and return a fresh collection handle. */
4057
+ addSource(handle: CollectionHandle, sources: ReadonlyArray<SerializedColumnsSource>): CollectionHandle;
4058
+ /** Anchored/selector-driven discovery. Returns a fresh handle. */
4059
+ discover(handle: CollectionHandle, options: ColumnsDiscoverOptions): CollectionHandle;
4060
+ /** Selector-only filter (no anchor traversal). Returns a fresh handle. */
4061
+ filter(handle: CollectionHandle, options: ColumnsFilterOptions): CollectionHandle;
4062
+ }
4063
+ /**
4064
+ * Synchronous host-side driver for `ColumnsCollection` operations. All
4065
+ * collection state lives on the host side, addressable through opaque
4066
+ * {@link CollectionHandle}s. Every handle-minting method returns a
4067
+ * {@link PoolEntry} so callers can wire the refcount into their own
4068
+ * lifecycle; the VM bridge pins each entry to the active render ctx and
4069
+ * forwards only the handle string to sandbox.
4070
+ *
4071
+ * Sandbox / UI callers consume {@link ColumnsCollectionDriverModel}
4072
+ * instead; the bridge maps that surface onto this one by injecting
4073
+ * {@link ColumnsCollectionDriverHost} bindings.
4074
+ */
4075
+ interface ColumnsCollectionDriver {
4076
+ create(sources: ReadonlyArray<SerializedColumnsSource>, host: ColumnsCollectionDriverHost): PoolEntry<CollectionHandle>;
4077
+ isEmpty(handle: CollectionHandle): boolean;
4078
+ isFinal(handle: CollectionHandle): boolean;
4079
+ getColumns(handle: CollectionHandle, host: ColumnsCollectionDriverHost): ColumnUniversalId[];
4080
+ addSource(handle: CollectionHandle, sources: ReadonlyArray<SerializedColumnsSource>, host: ColumnsCollectionDriverHost): PoolEntry<CollectionHandle>;
4081
+ discover(handle: CollectionHandle, options: ColumnsDiscoverOptions, host: ColumnsCollectionDriverHost): PoolEntry<CollectionHandle>;
4082
+ filter(handle: CollectionHandle, options: ColumnsFilterOptions, host: ColumnsCollectionDriverHost): PoolEntry<CollectionHandle>;
3657
4083
  } //#endregion
3658
4084
  //#endregion
3659
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/services/service_types.d.ts
4085
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/services/service_types.d.ts
3660
4086
  //#region src/services/service_types.d.ts
3661
- type ServiceTypesLike<Model = unknown, Ui = unknown, Kind extends ServiceType = ServiceType> = {
4087
+ type ServiceTypesLike<Model = unknown, Ui = unknown, Kind extends ServiceType = ServiceType, ModelHost = Model, UiHost = Ui> = {
3662
4088
  readonly __types?: {
3663
4089
  model: Model;
3664
4090
  ui: Ui;
3665
4091
  kind: Kind;
4092
+ modelHost: ModelHost;
4093
+ uiHost: UiHost;
3666
4094
  };
3667
4095
  };
3668
- type InferServiceUi<S extends ServiceTypesLike> = S extends ServiceTypesLike<unknown, infer U, ServiceType> ? U : unknown;
4096
+ type InferServiceUi<S extends ServiceTypesLike> = S extends ServiceTypesLike<unknown, infer U, ServiceType, unknown, unknown> ? U : unknown;
3669
4097
  type ServiceName<S extends ServiceTypesLike = ServiceTypesLike> = Branded$1<string, S>;
3670
4098
  type ServiceType = "node" | "wasm" | "main";
3671
4099
  type ServiceBrand<T> = T extends Branded$1<string, infer S extends ServiceTypesLike> ? S : never;
@@ -3685,15 +4113,16 @@ type ServiceNameLiterals = { [K in keyof TServices]: ExtractServiceName<TService
3685
4113
  /** Auto-derived requires* feature flags from Services keys. */
3686
4114
  type ServiceRequireFlags = { [K in keyof TServices as `requires${K & string}`]?: boolean };
3687
4115
  //#endregion
3688
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/services/service_declarations.d.ts
4116
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/services/service_declarations.d.ts
3689
4117
  //#region src/services/service_declarations.d.ts
3690
4118
  declare const Services: {
3691
- PFrameSpec: Branded$1<"pframeSpec", ServiceTypesLike<PFrameSpecDriver, PFrameSpecDriver, "wasm">>;
3692
- PFrame: Branded$1<"pframe", ServiceTypesLike<PFrameModelDriver<PColumn<string | PColumnValues | DataInfo<string>>>, PFrameDriver, "node">>;
3693
- Dialog: Branded$1<"dialog", ServiceTypesLike<Record<string, never>, DialogService, "main">>;
4119
+ PFrameSpec: Branded$1<"pframeSpec", ServiceTypesLike<PFrameSpecDriver, PFrameSpecDriver, "wasm", PFrameSpecDriver, PFrameSpecDriver>>;
4120
+ PFrame: Branded$1<"pframe", ServiceTypesLike<PFrameModelDriver<PColumn<string | PColumnValues | DataInfo<string>>>, PFrameDriver, "node", PFrameModelDriver<PColumn<string | PColumnValues | DataInfo<string>>>, PFrameDriver>>;
4121
+ Dialog: Branded$1<"dialog", ServiceTypesLike<Record<string, never>, DialogService, "main", Record<string, never>, DialogService>>;
4122
+ ColumnsCollection: Branded$1<"columnsCollection", ServiceTypesLike<ColumnsCollectionDriverModel, ColumnsCollectionDriverModel, "wasm", ColumnsCollectionDriver, ColumnsCollectionDriver>>;
3694
4123
  }; //#endregion
3695
4124
  //#endregion
3696
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/flags/block_flags.d.ts
4125
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/flags/block_flags.d.ts
3697
4126
  /**
3698
4127
  * Known block flags. Flags are set during model compilation, see `BlockModel.create` for more details and for initial values.
3699
4128
  */
@@ -3711,7 +4140,7 @@ type BlockCodeKnownFeatureFlags = {
3711
4140
  * older desktop apps.
3712
4141
  */
3713
4142
  //#endregion
3714
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/driver_kit.d.ts
4143
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/driver_kit.d.ts
3715
4144
  //#region src/driver_kit.d.ts
3716
4145
  /** Set of all drivers exposed in UI SDK via the platforma object. */
3717
4146
  interface DriverKit {
@@ -3732,7 +4161,7 @@ interface DriverKit {
3732
4161
  readonly pFrameDriver: PFrameDriver;
3733
4162
  } //#endregion
3734
4163
  //#endregion
3735
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/errors.d.ts
4164
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/errors.d.ts
3736
4165
  type ResultOrError<S, F = Error> = {
3737
4166
  value: S;
3738
4167
  error?: undefined;
@@ -3740,7 +4169,7 @@ type ResultOrError<S, F = Error> = {
3740
4169
  error: F;
3741
4170
  };
3742
4171
  //#endregion
3743
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.46.4/node_modules/@milaboratories/pl-model-common/dist/utag.d.ts
4172
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.48.0/node_modules/@milaboratories/pl-model-common/dist/utag.d.ts
3744
4173
  //#region src/utag.d.ts
3745
4174
  /** Value returned for changing states supporting reactive listening for changes */
3746
4175
  interface ValueWithUTag<V> {
@@ -3759,7 +4188,7 @@ interface ValueWithUTagAndAuthor<V> extends ValueWithUTag<V> {
3759
4188
  readonly author?: AuthorMarker;
3760
4189
  } //#endregion
3761
4190
  //#endregion
3762
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.79.27/node_modules/@platforma-sdk/model/dist/block_state_patch.d.ts
4191
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.82.0/node_modules/@platforma-sdk/model/dist/block_state_patch.d.ts
3763
4192
  //#region src/block_state_patch.d.ts
3764
4193
  /** Patch for the structural object */
3765
4194
  type Patch<K, V> = {
@@ -3771,7 +4200,7 @@ type Unionize<T extends Record<string, unknown>> = { [K in keyof T]: Patch<K, T[
3771
4200
  /** Patch for the BlockState, pushed by onStateUpdates method in SDK. */
3772
4201
  type BlockStatePatch<Args = unknown, Outputs extends BlockOutputsBase = BlockOutputsBase, UiState = unknown, Href extends `/${string}` = `/${string}`> = Unionize<BlockState<Args, Outputs, UiState, Href>>; //#endregion
3773
4202
  //#endregion
3774
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.79.27/node_modules/@platforma-sdk/model/dist/plugin_handle.d.ts
4203
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.82.0/node_modules/@platforma-sdk/model/dist/plugin_handle.d.ts
3775
4204
  //#region src/plugin_handle.d.ts
3776
4205
  /**
3777
4206
  * Phantom-only base type for constraining PluginHandle's type parameter.
@@ -3800,7 +4229,7 @@ interface PluginFactoryLike<Data extends Record<string, unknown> = Record<string
3800
4229
  type PluginHandle<F extends PluginFactoryLike = PluginFactoryLike> = Branded<string, F>;
3801
4230
  /** Construct the output key for a plugin output in the block outputs map. */
3802
4231
  //#endregion
3803
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.79.27/node_modules/@platforma-sdk/model/dist/block_storage.d.ts
4232
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.82.0/node_modules/@platforma-sdk/model/dist/block_storage.d.ts
3804
4233
  /** Payload for storage mutation operations. SDK defines specific operations. */
3805
4234
  type MutateStoragePayload<T = unknown> = {
3806
4235
  operation: "update-block-data";
@@ -3818,7 +4247,7 @@ type MutateStoragePayload<T = unknown> = {
3818
4247
  * @returns A new BlockStorage with updated data
3819
4248
  */
3820
4249
  //#endregion
3821
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.79.27/node_modules/@platforma-sdk/model/dist/bconfig/lambdas.d.ts
4250
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.82.0/node_modules/@platforma-sdk/model/dist/bconfig/lambdas.d.ts
3822
4251
  /** Additional information that may alter lambda rendering procedure. */
3823
4252
  type ConfigRenderLambdaFlags = {
3824
4253
  /**
@@ -3855,7 +4284,7 @@ type InferOutputsFromLambdas<OutputsCfg extends Record<string, ConfigRenderLambd
3855
4284
  } ? false : true;
3856
4285
  } }; //#endregion
3857
4286
  //#endregion
3858
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.79.27/node_modules/@platforma-sdk/model/dist/block_api_v1.d.ts
4287
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.82.0/node_modules/@platforma-sdk/model/dist/block_api_v1.d.ts
3859
4288
  //#region src/block_api_v1.d.ts
3860
4289
  /** Returned by state subscription methods to be able to cancel the subscription. */
3861
4290
  type CancelSubscription = () => void;
@@ -3950,7 +4379,7 @@ interface GetOperation<T> extends BaseOperation {
3950
4379
  value: T;
3951
4380
  }
3952
4381
  //#endregion
3953
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.79.27/node_modules/@platforma-sdk/model/dist/block_api_v2.d.ts
4382
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.82.0/node_modules/@platforma-sdk/model/dist/block_api_v2.d.ts
3954
4383
  //#region src/block_api_v2.d.ts
3955
4384
  /** Defines methods to read and write current block data. */
3956
4385
  interface BlockApiV2<Args = unknown, Outputs extends BlockOutputsBase = BlockOutputsBase, UiState = unknown, Href extends `/${string}` = `/${string}`> {
@@ -4000,12 +4429,12 @@ interface BlockApiV2<Args = unknown, Outputs extends BlockOutputsBase = BlockOut
4000
4429
  dispose(): Promise<ResultOrError<void>>;
4001
4430
  } //#endregion
4002
4431
  //#endregion
4003
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.79.27/node_modules/@platforma-sdk/model/dist/version.d.ts
4432
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.82.0/node_modules/@platforma-sdk/model/dist/version.d.ts
4004
4433
  type SdkInfo = {
4005
4434
  readonly sdkVersion: string;
4006
4435
  };
4007
4436
  //#endregion
4008
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.79.27/node_modules/@platforma-sdk/model/dist/services/block_services.d.ts
4437
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.82.0/node_modules/@platforma-sdk/model/dist/services/block_services.d.ts
4009
4438
  //#region src/services/block_services.d.ts
4010
4439
  /**
4011
4440
  * Services required by all V3 blocks by default.
@@ -4018,20 +4447,18 @@ declare const BLOCK_SERVICE_FLAGS: {
4018
4447
  readonly requiresPFrameSpec: true;
4019
4448
  readonly requiresPFrame: true;
4020
4449
  readonly requiresDialog: true;
4450
+ readonly requiresColumnsCollection: true;
4021
4451
  };
4022
4452
  type BlockServiceFlags = typeof BLOCK_SERVICE_FLAGS;
4023
4453
  //#endregion
4024
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.79.27/node_modules/@platforma-sdk/model/dist/services/service_resolve.d.ts
4454
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.82.0/node_modules/@platforma-sdk/model/dist/services/service_resolve.d.ts
4025
4455
  //#region src/services/service_resolve.d.ts
4026
4456
  type FlagToName<Flag extends string> = Flag extends `requires${infer K}` ? K extends keyof ServiceNameLiterals ? ServiceNameLiterals[K] : never : never;
4027
4457
  type RequiredServiceNames<Flags> = { [K in keyof Flags & `requires${string}`]: Flags[K] extends true ? FlagToName<K & string> : never }[keyof Flags & `requires${string}`];
4028
4458
  type ResolveUiServices<Flags> = Pick<UiServices$1, RequiredServiceNames<Flags> & keyof UiServices$1>;
4029
4459
  type BlockDefaultUiServices = ResolveUiServices<BlockServiceFlags>; //#endregion
4030
4460
  //#endregion
4031
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.79.27/node_modules/@platforma-sdk/model/dist/render/internal.d.ts
4032
- type AccessorHandle = Branded$1<string, "AccessorHandle">;
4033
- //#endregion
4034
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.79.27/node_modules/@platforma-sdk/model/dist/plugin_model.d.ts
4461
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.82.0/node_modules/@platforma-sdk/model/dist/plugin_model.d.ts
4035
4462
  /**
4036
4463
  * Runtime definition for a single public output field.
4037
4464
  * Stored in PluginModel and passed through BlockModelInfo to the UI layer.
@@ -4040,7 +4467,7 @@ type PublicOutputFieldDef = {
4040
4467
  readonly getter: (data: unknown) => unknown;
4041
4468
  };
4042
4469
  //#endregion
4043
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.79.27/node_modules/@platforma-sdk/model/dist/block_api_v3.d.ts
4470
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.82.0/node_modules/@platforma-sdk/model/dist/block_api_v3.d.ts
4044
4471
  //#region src/block_api_v3.d.ts
4045
4472
  /** Defines methods to read and write current block data. */
4046
4473
  interface BlockApiV3<_Data = unknown, _Args = unknown, Outputs extends BlockOutputsBase = BlockOutputsBase, Href extends `/${string}` = `/${string}`> {
@@ -4071,7 +4498,7 @@ interface BlockApiV3<_Data = unknown, _Args = unknown, Outputs extends BlockOutp
4071
4498
  dispose(): Promise<ResultOrError<void>>;
4072
4499
  } //#endregion
4073
4500
  //#endregion
4074
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.79.27/node_modules/@platforma-sdk/model/dist/platforma.d.ts
4501
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.82.0/node_modules/@platforma-sdk/model/dist/platforma.d.ts
4075
4502
  //#region src/platforma.d.ts
4076
4503
  /** Defines all methods to interact with the platform environment from within a block UI. @deprecated */
4077
4504
  interface PlatformaV1<Args = unknown, Outputs extends Record<string, OutputWithStatus<unknown>> = Record<string, OutputWithStatus<unknown>>, UiState = unknown, Href extends `/${string}` = `/${string}`> extends BlockApiV1<Args, Outputs, UiState, Href>, DriverKit {
@@ -4112,10 +4539,10 @@ type InferOutputsType<Pl extends Platforma> = Pl extends Platforma<unknown, infe
4112
4539
  type InferDataType<Pl extends Platforma> = Pl extends Platforma<unknown, Record<string, OutputWithStatus<unknown>>, infer Data> ? Data : never;
4113
4540
  type InferHrefType<Pl extends Platforma> = Pl extends Platforma<unknown, BlockOutputsBase, unknown, infer Href> ? Href : never;
4114
4541
  //#endregion
4115
- //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model@1.79.27/node_modules/@milaboratories/pf-plots/dist/spec.d.ts
4542
+ //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model@1.82.0/node_modules/@milaboratories/pf-plots/dist/spec.d.ts
4116
4543
  type ColumnOrAxisIdString = string;
4117
4544
  //#endregion
4118
- //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model@1.79.27/node_modules/@milaboratories/pf-plots/dist/common.d.ts
4545
+ //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model@1.82.0/node_modules/@milaboratories/pf-plots/dist/common.d.ts
4119
4546
  type InputStateMap = Record<string, ComponentStateSimple | ComponentStateFilter>;
4120
4547
  type ChartType = 'discrete' | 'scatterplot' | 'scatterplot-umap' | 'heatmap' | 'dendro' | 'histogram' | 'bubble' | 'selection';
4121
4548
  interface InputStateParent<Type extends ChartType> {
@@ -4145,7 +4572,7 @@ interface ComponentStateFilter {
4145
4572
  selectorStates: SelectorStateFilter[];
4146
4573
  }
4147
4574
  //#endregion
4148
- //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model@1.79.27/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.d.ts
4575
+ //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model@1.82.0/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.d.ts
4149
4576
  interface BubbleUIState extends InputStateParent<'bubble'> {
4150
4577
  type: 'bubble';
4151
4578
  components: {
@@ -4164,7 +4591,7 @@ interface BubbleUIState extends InputStateParent<'bubble'> {
4164
4591
  };
4165
4592
  }
4166
4593
  //#endregion
4167
- //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model@1.79.27/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/dendro.d.ts
4594
+ //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model@1.82.0/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/dendro.d.ts
4168
4595
  interface DendroUIState extends InputStateParent<'dendro'> {
4169
4596
  components: {
4170
4597
  value: ComponentStateSimple;
@@ -4185,7 +4612,7 @@ interface DendroUIState extends InputStateParent<'dendro'> {
4185
4612
  };
4186
4613
  }
4187
4614
  //#endregion
4188
- //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model@1.79.27/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/discrete.d.ts
4615
+ //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model@1.82.0/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/discrete.d.ts
4189
4616
  interface DiscreteUIState extends InputStateParent<'discrete'> {
4190
4617
  type: 'discrete';
4191
4618
  components: {
@@ -4198,7 +4625,7 @@ interface DiscreteUIState extends InputStateParent<'discrete'> {
4198
4625
  };
4199
4626
  }
4200
4627
  //#endregion
4201
- //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model@1.79.27/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.d.ts
4628
+ //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model@1.82.0/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.d.ts
4202
4629
  interface HeatmapUIState extends InputStateParent<'heatmap'> {
4203
4630
  type: 'heatmap';
4204
4631
  components: {
@@ -4218,7 +4645,7 @@ interface HeatmapUIState extends InputStateParent<'heatmap'> {
4218
4645
  };
4219
4646
  }
4220
4647
  //#endregion
4221
- //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model@1.79.27/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/histogram.d.ts
4648
+ //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model@1.82.0/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/histogram.d.ts
4222
4649
  interface HistogramUIState extends InputStateParent<'histogram'> {
4223
4650
  type: 'histogram';
4224
4651
  components: {
@@ -4230,7 +4657,7 @@ interface HistogramUIState extends InputStateParent<'histogram'> {
4230
4657
  };
4231
4658
  }
4232
4659
  //#endregion
4233
- //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model@1.79.27/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.d.ts
4660
+ //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model@1.82.0/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.d.ts
4234
4661
  interface ScatterplotUIState extends InputStateParent<'scatterplot'> {
4235
4662
  type: 'scatterplot';
4236
4663
  components: {
@@ -4249,7 +4676,7 @@ interface ScatterplotUIState extends InputStateParent<'scatterplot'> {
4249
4676
  };
4250
4677
  }
4251
4678
  //#endregion
4252
- //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model@1.79.27/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.d.ts
4679
+ //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model@1.82.0/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.d.ts
4253
4680
  interface ScatterplotUmapUIState extends InputStateParent<'scatterplot-umap'> {
4254
4681
  type: 'scatterplot-umap';
4255
4682
  components: {
@@ -4267,7 +4694,7 @@ interface ScatterplotUmapUIState extends InputStateParent<'scatterplot-umap'> {
4267
4694
  };
4268
4695
  }
4269
4696
  //#endregion
4270
- //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model@1.79.27/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/selection.d.ts
4697
+ //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model@1.82.0/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/selection.d.ts
4271
4698
  interface SelectionUIState extends InputStateParent<'selection'> {
4272
4699
  type: 'selection';
4273
4700
  components: {
@@ -4280,7 +4707,7 @@ interface SelectionUIState extends InputStateParent<'selection'> {
4280
4707
  };
4281
4708
  }
4282
4709
  //#endregion
4283
- //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model@1.79.27/node_modules/@milaboratories/pf-plots/dist/index.d.ts
4710
+ //#region ../node_modules/.pnpm/@milaboratories+pf-plots@1.4.6_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model@1.82.0/node_modules/@milaboratories/pf-plots/dist/index.d.ts
4284
4711
  type InputNamesByChartType = { [K in ChartType]: K extends 'discrete' ? keyof DiscreteUIState['components'] : K extends 'heatmap' ? keyof HeatmapUIState['components'] : K extends 'dendro' ? keyof DendroUIState['components'] : K extends 'scatterplot' ? keyof ScatterplotUIState['components'] : K extends 'scatterplot-umap' ? keyof ScatterplotUmapUIState['components'] : K extends 'histogram' ? keyof HistogramUIState['components'] : K extends 'bubble' ? keyof BubbleUIState['components'] : K extends 'selection' ? keyof SelectionUIState['components'] : never };
4285
4712
  //#endregion
4286
4713
  //#region ../node_modules/.pnpm/@vue+shared@3.5.24/node_modules/@vue/shared/dist/shared.d.ts
@@ -5655,7 +6082,7 @@ declare module '@vue/runtime-core' {
5655
6082
  }
5656
6083
  }
5657
6084
  //#endregion
5658
- //#region ../node_modules/.pnpm/@milaboratories+graph-maker@1.4.8_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model_by7sexxy3ooosjcyoq4kak737i/node_modules/@milaboratories/graph-maker/dist/dataBindAes.d.ts
6085
+ //#region ../node_modules/.pnpm/@milaboratories+graph-maker@1.4.8_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model_odhcalrtmfkwa6guyyg5unhcdy/node_modules/@milaboratories/graph-maker/dist/dataBindAes.d.ts
5659
6086
  /** Mapping for categorical axes (string axes) */
5660
6087
  interface AestheticMappingCategorical {
5661
6088
  type: 'categorical';
@@ -5676,7 +6103,7 @@ interface AestheticValues {
5676
6103
  dotShape: DotShape;
5677
6104
  }
5678
6105
  //#endregion
5679
- //#region ../node_modules/.pnpm/@milaboratories+graph-maker@1.4.8_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model_by7sexxy3ooosjcyoq4kak737i/node_modules/@milaboratories/graph-maker/dist/components/AesSettings/types.d.ts
6106
+ //#region ../node_modules/.pnpm/@milaboratories+graph-maker@1.4.8_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model_odhcalrtmfkwa6guyyg5unhcdy/node_modules/@milaboratories/graph-maker/dist/components/AesSettings/types.d.ts
5680
6107
  type CategoricalPalette = 'light' | 'bright' | 'dark' | 'paired' | 'triadic' | 'magnetic';
5681
6108
  type SequentialPalette = 'viridis' | 'magma' | 'density' | 'salinity' | 'sunset' | 'perceptual_rainbow';
5682
6109
  type DivergingPalette = 'spectrum' | 'teal_red' | 'blue_red' | 'lime_rose' | 'viridis_magma';
@@ -5685,7 +6112,7 @@ type Palette = CategoricalPalette | ContinuousPalette;
5685
6112
  type DotShape = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '21' | '22' | '23' | '24' | '25';
5686
6113
  type LineType = 'solid' | 'dashed' | 'dotted' | 'dotdash' | 'longdash' | 'twodash';
5687
6114
  //#endregion
5688
- //#region ../node_modules/.pnpm/@milaboratories+graph-maker@1.4.8_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model_by7sexxy3ooosjcyoq4kak737i/node_modules/@milaboratories/graph-maker/dist/constantsCommon.d.ts
6115
+ //#region ../node_modules/.pnpm/@milaboratories+graph-maker@1.4.8_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model_odhcalrtmfkwa6guyyg5unhcdy/node_modules/@milaboratories/graph-maker/dist/constantsCommon.d.ts
5689
6116
  type DiscreteStatisticsState = {
5690
6117
  overall: {
5691
6118
  data: {
@@ -5992,7 +6419,7 @@ type AxesState = {
5992
6419
  };
5993
6420
  };
5994
6421
  //#endregion
5995
- //#region ../node_modules/.pnpm/@milaboratories+uikit@2.15.13_@vue+compiler-dom@3.5.39_@vue+server-renderer@3.5.24_vue@3.5.24_i24loeh3c43kyictz4gznw5cye/node_modules/@milaboratories/uikit/dist/types.d.ts
6422
+ //#region ../node_modules/.pnpm/@milaboratories+uikit@2.15.25_@vue+compiler-dom@3.5.39_@vue+server-renderer@3.5.24_vue@3.5.24_vmdfu5yztq7e55uj55xznpiuxi/node_modules/@milaboratories/uikit/dist/types.d.ts
5996
6423
  declare global {
5997
6424
  var platforma: Platforma | undefined;
5998
6425
  interface Window {
@@ -6000,7 +6427,7 @@ declare global {
6000
6427
  }
6001
6428
  } //# sourceMappingURL=types.d.ts.map
6002
6429
  //#endregion
6003
- //#region ../node_modules/.pnpm/@milaboratories+graph-maker@1.4.8_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model_by7sexxy3ooosjcyoq4kak737i/node_modules/@milaboratories/graph-maker/dist/forms/index.d.ts
6430
+ //#region ../node_modules/.pnpm/@milaboratories+graph-maker@1.4.8_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model_odhcalrtmfkwa6guyyg5unhcdy/node_modules/@milaboratories/graph-maker/dist/forms/index.d.ts
6004
6431
  declare const forms: {
6005
6432
  settings: {
6006
6433
  icon: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGSVGElement>;
@@ -6112,10 +6539,10 @@ type Polygon = {
6112
6539
  closed: boolean;
6113
6540
  };
6114
6541
  //#endregion
6115
- //#region ../node_modules/.pnpm/@milaboratories+graph-maker@1.4.8_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model_by7sexxy3ooosjcyoq4kak737i/node_modules/@milaboratories/graph-maker/dist/utils/loadDefaultSources.d.ts
6542
+ //#region ../node_modules/.pnpm/@milaboratories+graph-maker@1.4.8_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model_odhcalrtmfkwa6guyyg5unhcdy/node_modules/@milaboratories/graph-maker/dist/utils/loadDefaultSources.d.ts
6116
6543
  type LoadedDefaultOptionsMap<T extends ChartType> = Record<InputNamesByChartType[T], (SelectorStateFilter | SelectorStateSimple)[]>;
6117
6544
  //#endregion
6118
- //#region ../node_modules/.pnpm/@milaboratories+graph-maker@1.4.8_@milaboratories+pl-model-common@1.46.4_@platforma-sdk+model_by7sexxy3ooosjcyoq4kak737i/node_modules/@milaboratories/graph-maker/dist/types.d.ts
6545
+ //#region ../node_modules/.pnpm/@milaboratories+graph-maker@1.4.8_@milaboratories+pl-model-common@1.48.0_@platforma-sdk+model_odhcalrtmfkwa6guyyg5unhcdy/node_modules/@milaboratories/graph-maker/dist/types.d.ts
6119
6546
  type DeepPartial$1<T> = { [P in keyof T]?: Partial<T[P]> };
6120
6547
  type GraphMakerState = {
6121
6548
  /** Editable title on the top */title: string; /** 'box', 'violins', 'dots' etc, depends on chart type */
@@ -6158,31 +6585,12 @@ type HeatmapFrame = 'full' | 'none';
6158
6585
  //#endregion
6159
6586
  //#region ../model/dist/index.d.ts
6160
6587
  //#region src/index.d.ts
6161
- /** Sequence alphabet of the state matrix / variant axis. */
6162
- type Alphabet = "aminoacid" | "nucleotide";
6163
- /** Cell colour: summed abundance, or averaged per-variant property. */
6164
- type ValueMode = "abundance" | "property";
6165
- /** Variant-subset membership filter. */
6166
- type Membership = "all" | "known";
6167
- /**
6168
- * Variant-subset filter applied before aggregation.
6169
- * Changing it re-runs the precalc workflow over the new subset.
6170
- */
6171
- type VariantFilter = {
6172
- /** Per-variant property column to filter on (e.g. a Tite-Seq Kd). */propertyRef?: SUniversalPColumnId; /** Inclusive [min, max] range over `propertyRef`; null = unbounded. */
6173
- range?: [number | null, number | null]; /** Samples/rounds to restrict to; empty/undefined = all samples. */
6174
- sampleSelection?: string[]; /** Keep all variants, or only those assigned to a known variant. */
6175
- membership: Membership;
6176
- };
6177
6588
  /** Workflow-facing args, derived from `BlockData`. */
6178
6589
  type BlockArgs = {
6179
6590
  /** Profiler state matrix `[variantKey, parentId, position] -> state`. */stateMatrixRef: PlRef;
6180
6591
  /** Parent to scope the whole plot to. Required — the args projection throws until it is set
6181
6592
  * (the UI auto-selects the first parent), so the workflow only ever runs single-parent. */
6182
- selectedParentId: string; /** Per-sample abundance `[sampleId, variantKey]` (required in abundance mode). */
6183
- abundanceRef?: PlRef; /** Per-variant property `[variantKey] -> value` (required in property mode). */
6184
- propertyRef?: SUniversalPColumnId; /** Pre-aggregated known×sample abundance `[sampleId, knownVariantKey]` (heat map 2). */
6185
- knownAbundanceRef?: PlRef;
6593
+ selectedParentId: string;
6186
6594
  /**
6187
6595
  * Ordered per-round frequency columns from the enrichment block (composition-enrichment view).
6188
6596
  * Each is one round's `[variantKey] -> frequency` (`pl7.app/frequency`); `[0]` is the baseline round R0.
@@ -6195,32 +6603,26 @@ type BlockArgs = {
6195
6603
  * so this is a small value (default 1e-6), not a count pseudocount.
6196
6604
  */
6197
6605
  compositionEpsilon: number;
6198
- level: Alphabet;
6199
- valueMode: ValueMode; /** Per-(parent, position) frequency normalization (abundance mode only). */
6200
- normalize: boolean;
6201
- filter: VariantFilter;
6606
+ /**
6607
+ * Per-variant score columns plotted in the mutation landscape, in the user's chosen
6608
+ * order (which becomes the facet order). Empty = landscape off.
6609
+ */
6610
+ scoreRefs: SUniversalPColumnId[];
6202
6611
  };
6203
6612
  /** UI view state kept out of the workflow args. */
6204
6613
  type BlockUiState = {
6205
- stateHeatmapState: GraphMakerState;
6206
- knownHeatmapState: GraphMakerState;
6207
6614
  compositionHeatmapState: GraphMakerState;
6615
+ singleMutantHeatmapState: GraphMakerState;
6208
6616
  };
6209
6617
  /** Unified persisted data: workflow-relevant selections + UI view state. */
6210
6618
  type BlockData$1 = {
6211
6619
  customBlockLabel?: string;
6212
6620
  defaultBlockLabel?: string;
6213
6621
  stateMatrixRef?: PlRef; /** Parent the plot is scoped to (UI auto-selects the first available on load). */
6214
- selectedParentId?: string;
6215
- abundanceRef?: PlRef;
6216
- propertyRef?: SUniversalPColumnId;
6217
- knownAbundanceRef?: PlRef; /** Ordered per-round frequency columns; `[0]` = baseline R0. Empty = composition view off. */
6622
+ selectedParentId?: string; /** Ordered per-round frequency columns; `[0]` = baseline R0. Empty = composition view off. */
6218
6623
  roundFrequencyRefs: SUniversalPColumnId[]; /** Fraction-space epsilon for the composition ratio (default 1e-6). */
6219
- compositionEpsilon: number;
6220
- level: Alphabet;
6221
- valueMode: ValueMode;
6222
- normalize: boolean;
6223
- filter: VariantFilter;
6624
+ compositionEpsilon: number; /** Ordered per-variant score columns for the mutation landscape. Empty = no map rendered. */
6625
+ scoreRefs: SUniversalPColumnId[];
6224
6626
  } & BlockUiState;
6225
6627
  declare const platforma: PlatformaExtended<PlatformaV3<BlockData$1, BlockArgs, InferOutputsFromLambdas<{
6226
6628
  stateMatrixOptions: ConfigRenderLambda<{
@@ -6233,17 +6635,7 @@ declare const platforma: PlatformaExtended<PlatformaV3<BlockData$1, BlockArgs, I
6233
6635
  readonly label: string;
6234
6636
  }[]>;
6235
6637
  } & {
6236
- abundanceOptions: ConfigRenderLambda<{
6237
- readonly ref: {
6238
- readonly __isRef: true;
6239
- readonly blockId: string;
6240
- readonly name: string;
6241
- readonly requireEnrichments?: true | undefined | undefined;
6242
- };
6243
- readonly label: string;
6244
- }[] | undefined>;
6245
- } & {
6246
- propertyOptions: ConfigRenderLambda<{
6638
+ scoreOptions: ConfigRenderLambda<{
6247
6639
  label: string;
6248
6640
  value: SUniversalPColumnId;
6249
6641
  }[] | undefined>;
@@ -6252,60 +6644,16 @@ declare const platforma: PlatformaExtended<PlatformaV3<BlockData$1, BlockArgs, I
6252
6644
  label: string;
6253
6645
  value: SUniversalPColumnId;
6254
6646
  }[] | undefined>;
6255
- } & {
6256
- knownAbundanceOptions: ConfigRenderLambda<{
6257
- readonly ref: {
6258
- readonly __isRef: true;
6259
- readonly blockId: string;
6260
- readonly name: string;
6261
- readonly requireEnrichments?: true | undefined | undefined;
6262
- };
6263
- readonly label: string;
6264
- }[]>;
6265
- } & {
6266
- stateMatrixSpec: ConfigRenderLambda<{
6267
- readonly kind: "PColumn";
6268
- readonly name: string;
6269
- readonly domain?: {
6270
- [x: string]: string;
6271
- } | undefined;
6272
- readonly contextDomain?: {
6273
- [x: string]: string;
6274
- } | undefined;
6275
- readonly annotations?: {
6276
- [x: string]: string;
6277
- } | undefined;
6278
- readonly valueType: "Int" | "Long" | "Float" | "Double" | "String" | "Bytes";
6279
- readonly parentAxes?: number[] | undefined;
6280
- readonly axesSpec: {
6281
- readonly type: AxisValueType;
6282
- readonly name: string;
6283
- readonly domain?: {
6284
- [x: string]: string;
6285
- } | undefined;
6286
- readonly contextDomain?: {
6287
- [x: string]: string;
6288
- } | undefined;
6289
- readonly annotations?: {
6290
- [x: string]: string;
6291
- } | undefined;
6292
- readonly parentAxes?: number[] | undefined;
6293
- }[];
6294
- } | undefined>;
6295
6647
  } & {
6296
6648
  stateMatrixPf: ConfigRenderLambda<PFrameHandle | undefined>;
6297
6649
  } & {
6298
6650
  stateMatrixColId: ConfigRenderLambda<PObjectId | undefined>;
6299
6651
  } & {
6300
- sampleLabelPframe: ConfigRenderLambda<PFrameHandle | undefined>;
6301
- } & {
6302
- sampleLabelColId: ConfigRenderLambda<PObjectId | undefined>;
6303
- } & {
6304
- stateHeatmapPf: ConfigRenderLambda<PFrameHandle | undefined> & {
6652
+ singleMutantHeatmapPf: ConfigRenderLambda<PFrameHandle | undefined> & {
6305
6653
  withStatus: true;
6306
6654
  };
6307
6655
  } & {
6308
- stateHeatmapPCols: ConfigRenderLambda<{
6656
+ singleMutantHeatmapPCols: ConfigRenderLambda<{
6309
6657
  readonly spec: {
6310
6658
  readonly kind: "PColumn";
6311
6659
  readonly name: string;
@@ -6342,7 +6690,7 @@ declare const platforma: PlatformaExtended<PlatformaV3<BlockData$1, BlockArgs, I
6342
6690
  resolve: {};
6343
6691
  resolveOutput: {};
6344
6692
  resolveInput: {};
6345
- resolveAny: {};
6693
+ traverse: {};
6346
6694
  resolveWithCommon: {};
6347
6695
  readonly resourceType: {
6348
6696
  readonly name: string;
@@ -6359,15 +6707,16 @@ declare const platforma: PlatformaExtended<PlatformaV3<BlockData$1, BlockArgs, I
6359
6707
  getKeyValueBase64: {};
6360
6708
  getKeyValueAsString: {};
6361
6709
  getKeyValueAsJson: {};
6710
+ hasData: {};
6362
6711
  getDataBase64: {};
6363
6712
  getDataAsString: {};
6364
6713
  getDataAsJson: {};
6365
6714
  getDataAsJsonOrUndefined: {};
6366
- getPColumns: {};
6367
- parsePObjectCollection: {};
6368
6715
  getFileContentAsBase64: {};
6369
6716
  getFileContentAsString: {};
6370
6717
  getFileContentAsJson: {};
6718
+ getPColumns: {};
6719
+ parsePObjectCollection: {};
6371
6720
  getBlobContentAsBase64: {};
6372
6721
  getBlobContentAsString: {};
6373
6722
  getFileHandle: {};
@@ -6426,7 +6775,7 @@ declare const platforma: PlatformaExtended<PlatformaV3<BlockData$1, BlockArgs, I
6426
6775
  resolve: {};
6427
6776
  resolveOutput: {};
6428
6777
  resolveInput: {};
6429
- resolveAny: {};
6778
+ traverse: {};
6430
6779
  resolveWithCommon: {};
6431
6780
  readonly resourceType: {
6432
6781
  readonly name: string;
@@ -6443,99 +6792,16 @@ declare const platforma: PlatformaExtended<PlatformaV3<BlockData$1, BlockArgs, I
6443
6792
  getKeyValueBase64: {};
6444
6793
  getKeyValueAsString: {};
6445
6794
  getKeyValueAsJson: {};
6795
+ hasData: {};
6446
6796
  getDataBase64: {};
6447
6797
  getDataAsString: {};
6448
6798
  getDataAsJson: {};
6449
6799
  getDataAsJsonOrUndefined: {};
6450
- getPColumns: {};
6451
- parsePObjectCollection: {};
6452
6800
  getFileContentAsBase64: {};
6453
6801
  getFileContentAsString: {};
6454
6802
  getFileContentAsJson: {};
6455
- getBlobContentAsBase64: {};
6456
- getBlobContentAsString: {};
6457
- getFileHandle: {};
6458
- getDownloadedBlobHandle: {};
6459
- getRemoteFileHandle: {};
6460
- getOnDemandBlobHandle: {};
6461
- extractArchiveAndGetURL: {};
6462
- getImportProgress: {};
6463
- getLastLogs: {};
6464
- getProgressLog: {};
6465
- getProgressLogWithInfo: {};
6466
- getLogHandle: {};
6467
- allFieldsResolved: {};
6468
- mapFields: {};
6469
- };
6470
- }[] | undefined>;
6471
- } & {
6472
- knownHeatmapPf: ConfigRenderLambda<PFrameHandle | undefined> & {
6473
- withStatus: true;
6474
- };
6475
- } & {
6476
- knownHeatmapPCols: ConfigRenderLambda<{
6477
- readonly spec: {
6478
- readonly kind: "PColumn";
6479
- readonly name: string;
6480
- readonly domain?: {
6481
- [x: string]: string;
6482
- } | undefined;
6483
- readonly contextDomain?: {
6484
- [x: string]: string;
6485
- } | undefined;
6486
- readonly annotations?: {
6487
- [x: string]: string;
6488
- } | undefined;
6489
- readonly valueType: "Int" | "Long" | "Float" | "Double" | "String" | "Bytes";
6490
- readonly parentAxes?: number[] | undefined;
6491
- readonly axesSpec: {
6492
- readonly type: AxisValueType;
6493
- readonly name: string;
6494
- readonly domain?: {
6495
- [x: string]: string;
6496
- } | undefined;
6497
- readonly contextDomain?: {
6498
- [x: string]: string;
6499
- } | undefined;
6500
- readonly annotations?: {
6501
- [x: string]: string;
6502
- } | undefined;
6503
- readonly parentAxes?: number[] | undefined;
6504
- }[];
6505
- };
6506
- readonly id: PObjectId;
6507
- readonly data: {
6508
- readonly handle: AccessorHandle;
6509
- readonly resolvePath: string[];
6510
- resolve: {};
6511
- resolveOutput: {};
6512
- resolveInput: {};
6513
- resolveAny: {};
6514
- resolveWithCommon: {};
6515
- readonly resourceType: {
6516
- readonly name: string;
6517
- readonly version: string;
6518
- };
6519
- getInputsLocked: {};
6520
- getOutputsLocked: {};
6521
- getIsReadyOrError: {};
6522
- getIsFinal: {};
6523
- getError: {};
6524
- listInputFields: {};
6525
- listOutputFields: {};
6526
- listDynamicFields: {};
6527
- getKeyValueBase64: {};
6528
- getKeyValueAsString: {};
6529
- getKeyValueAsJson: {};
6530
- getDataBase64: {};
6531
- getDataAsString: {};
6532
- getDataAsJson: {};
6533
- getDataAsJsonOrUndefined: {};
6534
6803
  getPColumns: {};
6535
6804
  parsePObjectCollection: {};
6536
- getFileContentAsBase64: {};
6537
- getFileContentAsString: {};
6538
- getFileContentAsJson: {};
6539
6805
  getBlobContentAsBase64: {};
6540
6806
  getBlobContentAsString: {};
6541
6807
  getFileHandle: {};
@@ -6550,220 +6816,6 @@ declare const platforma: PlatformaExtended<PlatformaV3<BlockData$1, BlockArgs, I
6550
6816
  getLogHandle: {};
6551
6817
  allFieldsResolved: {};
6552
6818
  mapFields: {};
6553
- } | {
6554
- key: (string | number)[];
6555
- val: PColumnValue;
6556
- }[] | {
6557
- type: "Json";
6558
- keyLength: number;
6559
- data: {
6560
- [x: string]: PColumnValue;
6561
- };
6562
- } | {
6563
- type: "JsonPartitioned";
6564
- partitionKeyLength: number;
6565
- parts: {
6566
- [x: string]: {
6567
- readonly handle: AccessorHandle;
6568
- readonly resolvePath: string[];
6569
- resolve: {};
6570
- resolveOutput: {};
6571
- resolveInput: {};
6572
- resolveAny: {};
6573
- resolveWithCommon: {};
6574
- readonly resourceType: {
6575
- readonly name: string;
6576
- readonly version: string;
6577
- };
6578
- getInputsLocked: {};
6579
- getOutputsLocked: {};
6580
- getIsReadyOrError: {};
6581
- getIsFinal: {};
6582
- getError: {};
6583
- listInputFields: {};
6584
- listOutputFields: {};
6585
- listDynamicFields: {};
6586
- getKeyValueBase64: {};
6587
- getKeyValueAsString: {};
6588
- getKeyValueAsJson: {};
6589
- getDataBase64: {};
6590
- getDataAsString: {};
6591
- getDataAsJson: {};
6592
- getDataAsJsonOrUndefined: {};
6593
- getPColumns: {};
6594
- parsePObjectCollection: {};
6595
- getFileContentAsBase64: {};
6596
- getFileContentAsString: {};
6597
- getFileContentAsJson: {};
6598
- getBlobContentAsBase64: {};
6599
- getBlobContentAsString: {};
6600
- getFileHandle: {};
6601
- getDownloadedBlobHandle: {};
6602
- getRemoteFileHandle: {};
6603
- getOnDemandBlobHandle: {};
6604
- extractArchiveAndGetURL: {};
6605
- getImportProgress: {};
6606
- getLastLogs: {};
6607
- getProgressLog: {};
6608
- getProgressLogWithInfo: {};
6609
- getLogHandle: {};
6610
- allFieldsResolved: {};
6611
- mapFields: {};
6612
- };
6613
- };
6614
- } | {
6615
- type: "BinaryPartitioned";
6616
- partitionKeyLength: number;
6617
- parts: {
6618
- [x: string]: {
6619
- index: {
6620
- readonly handle: AccessorHandle;
6621
- readonly resolvePath: string[];
6622
- resolve: {};
6623
- resolveOutput: {};
6624
- resolveInput: {};
6625
- resolveAny: {};
6626
- resolveWithCommon: {};
6627
- readonly resourceType: {
6628
- readonly name: string;
6629
- readonly version: string;
6630
- };
6631
- getInputsLocked: {};
6632
- getOutputsLocked: {};
6633
- getIsReadyOrError: {};
6634
- getIsFinal: {};
6635
- getError: {};
6636
- listInputFields: {};
6637
- listOutputFields: {};
6638
- listDynamicFields: {};
6639
- getKeyValueBase64: {};
6640
- getKeyValueAsString: {};
6641
- getKeyValueAsJson: {};
6642
- getDataBase64: {};
6643
- getDataAsString: {};
6644
- getDataAsJson: {};
6645
- getDataAsJsonOrUndefined: {};
6646
- getPColumns: {};
6647
- parsePObjectCollection: {};
6648
- getFileContentAsBase64: {};
6649
- getFileContentAsString: {};
6650
- getFileContentAsJson: {};
6651
- getBlobContentAsBase64: {};
6652
- getBlobContentAsString: {};
6653
- getFileHandle: {};
6654
- getDownloadedBlobHandle: {};
6655
- getRemoteFileHandle: {};
6656
- getOnDemandBlobHandle: {};
6657
- extractArchiveAndGetURL: {};
6658
- getImportProgress: {};
6659
- getLastLogs: {};
6660
- getProgressLog: {};
6661
- getProgressLogWithInfo: {};
6662
- getLogHandle: {};
6663
- allFieldsResolved: {};
6664
- mapFields: {};
6665
- };
6666
- values: {
6667
- readonly handle: AccessorHandle;
6668
- readonly resolvePath: string[];
6669
- resolve: {};
6670
- resolveOutput: {};
6671
- resolveInput: {};
6672
- resolveAny: {};
6673
- resolveWithCommon: {};
6674
- readonly resourceType: {
6675
- readonly name: string;
6676
- readonly version: string;
6677
- };
6678
- getInputsLocked: {};
6679
- getOutputsLocked: {};
6680
- getIsReadyOrError: {};
6681
- getIsFinal: {};
6682
- getError: {};
6683
- listInputFields: {};
6684
- listOutputFields: {};
6685
- listDynamicFields: {};
6686
- getKeyValueBase64: {};
6687
- getKeyValueAsString: {};
6688
- getKeyValueAsJson: {};
6689
- getDataBase64: {};
6690
- getDataAsString: {};
6691
- getDataAsJson: {};
6692
- getDataAsJsonOrUndefined: {};
6693
- getPColumns: {};
6694
- parsePObjectCollection: {};
6695
- getFileContentAsBase64: {};
6696
- getFileContentAsString: {};
6697
- getFileContentAsJson: {};
6698
- getBlobContentAsBase64: {};
6699
- getBlobContentAsString: {};
6700
- getFileHandle: {};
6701
- getDownloadedBlobHandle: {};
6702
- getRemoteFileHandle: {};
6703
- getOnDemandBlobHandle: {};
6704
- extractArchiveAndGetURL: {};
6705
- getImportProgress: {};
6706
- getLastLogs: {};
6707
- getProgressLog: {};
6708
- getProgressLogWithInfo: {};
6709
- getLogHandle: {};
6710
- allFieldsResolved: {};
6711
- mapFields: {};
6712
- };
6713
- };
6714
- };
6715
- } | {
6716
- type: "ParquetPartitioned";
6717
- partitionKeyLength: number;
6718
- parts: {
6719
- [x: string]: {
6720
- readonly handle: AccessorHandle;
6721
- readonly resolvePath: string[];
6722
- resolve: {};
6723
- resolveOutput: {};
6724
- resolveInput: {};
6725
- resolveAny: {};
6726
- resolveWithCommon: {};
6727
- readonly resourceType: {
6728
- readonly name: string;
6729
- readonly version: string;
6730
- };
6731
- getInputsLocked: {};
6732
- getOutputsLocked: {};
6733
- getIsReadyOrError: {};
6734
- getIsFinal: {};
6735
- getError: {};
6736
- listInputFields: {};
6737
- listOutputFields: {};
6738
- listDynamicFields: {};
6739
- getKeyValueBase64: {};
6740
- getKeyValueAsString: {};
6741
- getKeyValueAsJson: {};
6742
- getDataBase64: {};
6743
- getDataAsString: {};
6744
- getDataAsJson: {};
6745
- getDataAsJsonOrUndefined: {};
6746
- getPColumns: {};
6747
- parsePObjectCollection: {};
6748
- getFileContentAsBase64: {};
6749
- getFileContentAsString: {};
6750
- getFileContentAsJson: {};
6751
- getBlobContentAsBase64: {};
6752
- getBlobContentAsString: {};
6753
- getFileHandle: {};
6754
- getDownloadedBlobHandle: {};
6755
- getRemoteFileHandle: {};
6756
- getOnDemandBlobHandle: {};
6757
- extractArchiveAndGetURL: {};
6758
- getImportProgress: {};
6759
- getLastLogs: {};
6760
- getProgressLog: {};
6761
- getProgressLogWithInfo: {};
6762
- getLogHandle: {};
6763
- allFieldsResolved: {};
6764
- mapFields: {};
6765
- };
6766
- };
6767
6819
  };
6768
6820
  }[] | undefined>;
6769
6821
  } & {