@okf/ootils 1.30.0 → 1.31.1

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.
@@ -1428,6 +1428,14 @@ interface BlockDef {
1428
1428
  icon?: string;
1429
1429
  iconWeight?: string;
1430
1430
  displayInDirectImportUI?: string;
1431
+ /**
1432
+ * Position of this comp in the direct import field selector dropdown,
1433
+ * as a tuple [groupIdx, orderInGroup]. Groups are rendered in ascending
1434
+ * groupIdx order with separators between them. Within a group, items are
1435
+ * rendered in ascending orderInGroup.
1436
+ * Currently: 1 = title, 2 = content fields, 3 = tags. Add more as needed.
1437
+ */
1438
+ directImportGroupsIdx?: [number, number];
1431
1439
  };
1432
1440
  /** Full chunking config used by okf-sub CreateChunksHandler */
1433
1441
  chunkingConfig?: {
@@ -1436,10 +1444,16 @@ interface BlockDef {
1436
1444
  };
1437
1445
  }
1438
1446
  interface BlockCapabilities {
1439
- /** Block's value contains extractable plain text (even if value also has other structure like JSON) */
1447
+ /**
1448
+ * Block's value contains extractable plain text — even if the value also has other structure
1449
+ * (like Lexical's JSON editorState alongside its allText). True for: TextInput, TitleInput,
1450
+ * SubtitleInput, LexicalTextEditor, etc. False for: media inputs, selection inputs, tags, dates.
1451
+ *
1452
+ * Used wherever code needs "give me all the blocks I can pull readable text from" — e.g.
1453
+ * AI annotation context extraction, document text usage stats, AI suggestion text field
1454
+ * filtering. Combine with `fieldPaths.plainTextString` to know HOW to extract the text.
1455
+ */
1440
1456
  hasPlainText: boolean;
1441
- /** Block's value is in the Lexical shape — editorState, allText, etc. */
1442
- hasLexicalShape: boolean;
1443
1457
  /**
1444
1458
  * General annotation flag — this block type supports annotation
1445
1459
  * (human, human-in-the-loop, or AI). Used by general checks: should the
@@ -1456,10 +1470,6 @@ interface BlockCapabilities {
1456
1470
  aiAnnotation: boolean;
1457
1471
  /** Supports AI enrichment — categorization, sentiment analysis, NER */
1458
1472
  aiEnrichment: boolean;
1459
- /** Treated as qualitative in AI Chat? */
1460
- aiChatQualField: boolean;
1461
- /** Treated as quantitative in AI Chat? */
1462
- aiChatQuantField: boolean;
1463
1473
  /** Can be searched via ES/listing search? */
1464
1474
  searchable: boolean;
1465
1475
  /** Supported in direct data import? */
@@ -1476,6 +1486,13 @@ interface BlockCapabilities {
1476
1486
  * in chunk/anno metadata — the actual text already lives in the chunks/annos themselves.
1477
1487
  */
1478
1488
  stripFromMainOnAnnoChunkSync: boolean;
1489
+ /**
1490
+ * Project this block out of listing fetches (e.g. published listings) for performance.
1491
+ * Used for large-payload blocks (like Lexical) where the listing UI doesn't need the
1492
+ * full content. Independent of stripFromMainOnAnnoChunkSync — same blocks today, but
1493
+ * the two concerns may diverge later.
1494
+ */
1495
+ excludeFromListingProjection: boolean;
1479
1496
  }
1480
1497
 
1481
1498
  /**
@@ -1545,6 +1562,24 @@ declare class BlockRegistry {
1545
1562
  hasCapability(compType: string, capability: keyof BlockCapabilities): boolean;
1546
1563
  /** Get all registered block descriptors. */
1547
1564
  getAll(): BlockDef[];
1565
+ /**
1566
+ * Get compName strings for all registered blocks that have a chunking config.
1567
+ * Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
1568
+ * description) to know which fields actually have chunks to search.
1569
+ */
1570
+ getCompsWithChunking(): string[];
1571
+ /**
1572
+ * Filter a list of block instances down to those where annotation is enabled.
1573
+ * A block is annotation-enabled if its registry capability `annotation` is true.
1574
+ * For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
1575
+ * falls back to the legacy per-instance `props.annotation.enable` toggle.
1576
+ *
1577
+ * Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
1578
+ */
1579
+ getAnnotationEnabledBlocks(allBlocks: Array<{
1580
+ comp: string;
1581
+ props?: any;
1582
+ }>): any[];
1548
1583
  }
1549
1584
  /** Singleton instance — the one registry shared across the app. */
1550
1585
  declare const blockRegistry: BlockRegistry;
package/dist/browser.d.ts CHANGED
@@ -1428,6 +1428,14 @@ interface BlockDef {
1428
1428
  icon?: string;
1429
1429
  iconWeight?: string;
1430
1430
  displayInDirectImportUI?: string;
1431
+ /**
1432
+ * Position of this comp in the direct import field selector dropdown,
1433
+ * as a tuple [groupIdx, orderInGroup]. Groups are rendered in ascending
1434
+ * groupIdx order with separators between them. Within a group, items are
1435
+ * rendered in ascending orderInGroup.
1436
+ * Currently: 1 = title, 2 = content fields, 3 = tags. Add more as needed.
1437
+ */
1438
+ directImportGroupsIdx?: [number, number];
1431
1439
  };
1432
1440
  /** Full chunking config used by okf-sub CreateChunksHandler */
1433
1441
  chunkingConfig?: {
@@ -1436,10 +1444,16 @@ interface BlockDef {
1436
1444
  };
1437
1445
  }
1438
1446
  interface BlockCapabilities {
1439
- /** Block's value contains extractable plain text (even if value also has other structure like JSON) */
1447
+ /**
1448
+ * Block's value contains extractable plain text — even if the value also has other structure
1449
+ * (like Lexical's JSON editorState alongside its allText). True for: TextInput, TitleInput,
1450
+ * SubtitleInput, LexicalTextEditor, etc. False for: media inputs, selection inputs, tags, dates.
1451
+ *
1452
+ * Used wherever code needs "give me all the blocks I can pull readable text from" — e.g.
1453
+ * AI annotation context extraction, document text usage stats, AI suggestion text field
1454
+ * filtering. Combine with `fieldPaths.plainTextString` to know HOW to extract the text.
1455
+ */
1440
1456
  hasPlainText: boolean;
1441
- /** Block's value is in the Lexical shape — editorState, allText, etc. */
1442
- hasLexicalShape: boolean;
1443
1457
  /**
1444
1458
  * General annotation flag — this block type supports annotation
1445
1459
  * (human, human-in-the-loop, or AI). Used by general checks: should the
@@ -1456,10 +1470,6 @@ interface BlockCapabilities {
1456
1470
  aiAnnotation: boolean;
1457
1471
  /** Supports AI enrichment — categorization, sentiment analysis, NER */
1458
1472
  aiEnrichment: boolean;
1459
- /** Treated as qualitative in AI Chat? */
1460
- aiChatQualField: boolean;
1461
- /** Treated as quantitative in AI Chat? */
1462
- aiChatQuantField: boolean;
1463
1473
  /** Can be searched via ES/listing search? */
1464
1474
  searchable: boolean;
1465
1475
  /** Supported in direct data import? */
@@ -1476,6 +1486,13 @@ interface BlockCapabilities {
1476
1486
  * in chunk/anno metadata — the actual text already lives in the chunks/annos themselves.
1477
1487
  */
1478
1488
  stripFromMainOnAnnoChunkSync: boolean;
1489
+ /**
1490
+ * Project this block out of listing fetches (e.g. published listings) for performance.
1491
+ * Used for large-payload blocks (like Lexical) where the listing UI doesn't need the
1492
+ * full content. Independent of stripFromMainOnAnnoChunkSync — same blocks today, but
1493
+ * the two concerns may diverge later.
1494
+ */
1495
+ excludeFromListingProjection: boolean;
1479
1496
  }
1480
1497
 
1481
1498
  /**
@@ -1545,6 +1562,24 @@ declare class BlockRegistry {
1545
1562
  hasCapability(compType: string, capability: keyof BlockCapabilities): boolean;
1546
1563
  /** Get all registered block descriptors. */
1547
1564
  getAll(): BlockDef[];
1565
+ /**
1566
+ * Get compName strings for all registered blocks that have a chunking config.
1567
+ * Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
1568
+ * description) to know which fields actually have chunks to search.
1569
+ */
1570
+ getCompsWithChunking(): string[];
1571
+ /**
1572
+ * Filter a list of block instances down to those where annotation is enabled.
1573
+ * A block is annotation-enabled if its registry capability `annotation` is true.
1574
+ * For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
1575
+ * falls back to the legacy per-instance `props.annotation.enable` toggle.
1576
+ *
1577
+ * Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
1578
+ */
1579
+ getAnnotationEnabledBlocks(allBlocks: Array<{
1580
+ comp: string;
1581
+ props?: any;
1582
+ }>): any[];
1548
1583
  }
1549
1584
  /** Singleton instance — the one registry shared across the app. */
1550
1585
  declare const blockRegistry: BlockRegistry;
package/dist/browser.js CHANGED
@@ -2269,18 +2269,16 @@ var LexicalTextEditor = {
2269
2269
  // Capabilities
2270
2270
  capabilities: {
2271
2271
  hasPlainText: true,
2272
- hasLexicalShape: true,
2273
2272
  annotation: true,
2274
2273
  aiAnnotation: true,
2275
2274
  aiEnrichment: true,
2276
- aiChatQualField: true,
2277
- aiChatQuantField: false,
2278
2275
  searchable: true,
2279
2276
  directDataImport: true,
2280
2277
  csvExport: true,
2281
2278
  translatable: true,
2282
2279
  documentSummarizer: true,
2283
- stripFromMainOnAnnoChunkSync: true
2280
+ stripFromMainOnAnnoChunkSync: true,
2281
+ excludeFromListingProjection: true
2284
2282
  },
2285
2283
  // Field paths
2286
2284
  fieldPaths: {
@@ -2317,7 +2315,8 @@ var LexicalTextEditor = {
2317
2315
  // Content block option — TCI template builder & direct import UI
2318
2316
  contentBlockOption: {
2319
2317
  display: "Rich Text Field",
2320
- icon: "TextAa"
2318
+ icon: "TextAa",
2319
+ directImportGroupsIdx: [2, 2]
2321
2320
  },
2322
2321
  // Chunking config — used by okf-sub CreateChunksHandler
2323
2322
  chunkingConfig: CHUNKING_PRESETS.lexicalSemantic
@@ -2384,6 +2383,29 @@ var BlockRegistry = class {
2384
2383
  getAll() {
2385
2384
  return Array.from(this.blocks.values());
2386
2385
  }
2386
+ /**
2387
+ * Get compName strings for all registered blocks that have a chunking config.
2388
+ * Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
2389
+ * description) to know which fields actually have chunks to search.
2390
+ */
2391
+ getCompsWithChunking() {
2392
+ return Array.from(this.blocks.values()).filter((b) => !!b.chunkingConfig).map((b) => b.compName);
2393
+ }
2394
+ /**
2395
+ * Filter a list of block instances down to those where annotation is enabled.
2396
+ * A block is annotation-enabled if its registry capability `annotation` is true.
2397
+ * For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
2398
+ * falls back to the legacy per-instance `props.annotation.enable` toggle.
2399
+ *
2400
+ * Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
2401
+ */
2402
+ getAnnotationEnabledBlocks(allBlocks) {
2403
+ return allBlocks.filter((block) => {
2404
+ const blockDef = this.blocks.get(block.comp);
2405
+ if (blockDef) return !!blockDef.capabilities.annotation;
2406
+ return block.props?.annotation?.enable === true;
2407
+ });
2408
+ }
2387
2409
  };
2388
2410
  var blockRegistry = new BlockRegistry();
2389
2411
  // Annotate the CommonJS export names for ESM import in node:
package/dist/browser.mjs CHANGED
@@ -2203,18 +2203,16 @@ var LexicalTextEditor = {
2203
2203
  // Capabilities
2204
2204
  capabilities: {
2205
2205
  hasPlainText: true,
2206
- hasLexicalShape: true,
2207
2206
  annotation: true,
2208
2207
  aiAnnotation: true,
2209
2208
  aiEnrichment: true,
2210
- aiChatQualField: true,
2211
- aiChatQuantField: false,
2212
2209
  searchable: true,
2213
2210
  directDataImport: true,
2214
2211
  csvExport: true,
2215
2212
  translatable: true,
2216
2213
  documentSummarizer: true,
2217
- stripFromMainOnAnnoChunkSync: true
2214
+ stripFromMainOnAnnoChunkSync: true,
2215
+ excludeFromListingProjection: true
2218
2216
  },
2219
2217
  // Field paths
2220
2218
  fieldPaths: {
@@ -2251,7 +2249,8 @@ var LexicalTextEditor = {
2251
2249
  // Content block option — TCI template builder & direct import UI
2252
2250
  contentBlockOption: {
2253
2251
  display: "Rich Text Field",
2254
- icon: "TextAa"
2252
+ icon: "TextAa",
2253
+ directImportGroupsIdx: [2, 2]
2255
2254
  },
2256
2255
  // Chunking config — used by okf-sub CreateChunksHandler
2257
2256
  chunkingConfig: CHUNKING_PRESETS.lexicalSemantic
@@ -2318,6 +2317,29 @@ var BlockRegistry = class {
2318
2317
  getAll() {
2319
2318
  return Array.from(this.blocks.values());
2320
2319
  }
2320
+ /**
2321
+ * Get compName strings for all registered blocks that have a chunking config.
2322
+ * Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
2323
+ * description) to know which fields actually have chunks to search.
2324
+ */
2325
+ getCompsWithChunking() {
2326
+ return Array.from(this.blocks.values()).filter((b) => !!b.chunkingConfig).map((b) => b.compName);
2327
+ }
2328
+ /**
2329
+ * Filter a list of block instances down to those where annotation is enabled.
2330
+ * A block is annotation-enabled if its registry capability `annotation` is true.
2331
+ * For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
2332
+ * falls back to the legacy per-instance `props.annotation.enable` toggle.
2333
+ *
2334
+ * Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
2335
+ */
2336
+ getAnnotationEnabledBlocks(allBlocks) {
2337
+ return allBlocks.filter((block) => {
2338
+ const blockDef = this.blocks.get(block.comp);
2339
+ if (blockDef) return !!blockDef.capabilities.annotation;
2340
+ return block.props?.annotation?.enable === true;
2341
+ });
2342
+ }
2321
2343
  };
2322
2344
  var blockRegistry = new BlockRegistry();
2323
2345
  export {
package/dist/node.d.mts CHANGED
@@ -1435,6 +1435,14 @@ interface BlockDef {
1435
1435
  icon?: string;
1436
1436
  iconWeight?: string;
1437
1437
  displayInDirectImportUI?: string;
1438
+ /**
1439
+ * Position of this comp in the direct import field selector dropdown,
1440
+ * as a tuple [groupIdx, orderInGroup]. Groups are rendered in ascending
1441
+ * groupIdx order with separators between them. Within a group, items are
1442
+ * rendered in ascending orderInGroup.
1443
+ * Currently: 1 = title, 2 = content fields, 3 = tags. Add more as needed.
1444
+ */
1445
+ directImportGroupsIdx?: [number, number];
1438
1446
  };
1439
1447
  /** Full chunking config used by okf-sub CreateChunksHandler */
1440
1448
  chunkingConfig?: {
@@ -1443,10 +1451,16 @@ interface BlockDef {
1443
1451
  };
1444
1452
  }
1445
1453
  interface BlockCapabilities {
1446
- /** Block's value contains extractable plain text (even if value also has other structure like JSON) */
1454
+ /**
1455
+ * Block's value contains extractable plain text — even if the value also has other structure
1456
+ * (like Lexical's JSON editorState alongside its allText). True for: TextInput, TitleInput,
1457
+ * SubtitleInput, LexicalTextEditor, etc. False for: media inputs, selection inputs, tags, dates.
1458
+ *
1459
+ * Used wherever code needs "give me all the blocks I can pull readable text from" — e.g.
1460
+ * AI annotation context extraction, document text usage stats, AI suggestion text field
1461
+ * filtering. Combine with `fieldPaths.plainTextString` to know HOW to extract the text.
1462
+ */
1447
1463
  hasPlainText: boolean;
1448
- /** Block's value is in the Lexical shape — editorState, allText, etc. */
1449
- hasLexicalShape: boolean;
1450
1464
  /**
1451
1465
  * General annotation flag — this block type supports annotation
1452
1466
  * (human, human-in-the-loop, or AI). Used by general checks: should the
@@ -1463,10 +1477,6 @@ interface BlockCapabilities {
1463
1477
  aiAnnotation: boolean;
1464
1478
  /** Supports AI enrichment — categorization, sentiment analysis, NER */
1465
1479
  aiEnrichment: boolean;
1466
- /** Treated as qualitative in AI Chat? */
1467
- aiChatQualField: boolean;
1468
- /** Treated as quantitative in AI Chat? */
1469
- aiChatQuantField: boolean;
1470
1480
  /** Can be searched via ES/listing search? */
1471
1481
  searchable: boolean;
1472
1482
  /** Supported in direct data import? */
@@ -1483,6 +1493,13 @@ interface BlockCapabilities {
1483
1493
  * in chunk/anno metadata — the actual text already lives in the chunks/annos themselves.
1484
1494
  */
1485
1495
  stripFromMainOnAnnoChunkSync: boolean;
1496
+ /**
1497
+ * Project this block out of listing fetches (e.g. published listings) for performance.
1498
+ * Used for large-payload blocks (like Lexical) where the listing UI doesn't need the
1499
+ * full content. Independent of stripFromMainOnAnnoChunkSync — same blocks today, but
1500
+ * the two concerns may diverge later.
1501
+ */
1502
+ excludeFromListingProjection: boolean;
1486
1503
  }
1487
1504
 
1488
1505
  /**
@@ -1552,6 +1569,24 @@ declare class BlockRegistry {
1552
1569
  hasCapability(compType: string, capability: keyof BlockCapabilities): boolean;
1553
1570
  /** Get all registered block descriptors. */
1554
1571
  getAll(): BlockDef[];
1572
+ /**
1573
+ * Get compName strings for all registered blocks that have a chunking config.
1574
+ * Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
1575
+ * description) to know which fields actually have chunks to search.
1576
+ */
1577
+ getCompsWithChunking(): string[];
1578
+ /**
1579
+ * Filter a list of block instances down to those where annotation is enabled.
1580
+ * A block is annotation-enabled if its registry capability `annotation` is true.
1581
+ * For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
1582
+ * falls back to the legacy per-instance `props.annotation.enable` toggle.
1583
+ *
1584
+ * Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
1585
+ */
1586
+ getAnnotationEnabledBlocks(allBlocks: Array<{
1587
+ comp: string;
1588
+ props?: any;
1589
+ }>): any[];
1555
1590
  }
1556
1591
  /** Singleton instance — the one registry shared across the app. */
1557
1592
  declare const blockRegistry: BlockRegistry;
@@ -2025,6 +2060,10 @@ interface IGeneral {
2025
2060
  formFieldNumbering?: {
2026
2061
  enable?: boolean;
2027
2062
  };
2063
+ autoGenTitle?: {
2064
+ enable?: boolean;
2065
+ prefix?: string;
2066
+ };
2028
2067
  postPblRedirPath?: object;
2029
2068
  templateIndex?: object;
2030
2069
  sharing?: {
package/dist/node.d.ts CHANGED
@@ -1435,6 +1435,14 @@ interface BlockDef {
1435
1435
  icon?: string;
1436
1436
  iconWeight?: string;
1437
1437
  displayInDirectImportUI?: string;
1438
+ /**
1439
+ * Position of this comp in the direct import field selector dropdown,
1440
+ * as a tuple [groupIdx, orderInGroup]. Groups are rendered in ascending
1441
+ * groupIdx order with separators between them. Within a group, items are
1442
+ * rendered in ascending orderInGroup.
1443
+ * Currently: 1 = title, 2 = content fields, 3 = tags. Add more as needed.
1444
+ */
1445
+ directImportGroupsIdx?: [number, number];
1438
1446
  };
1439
1447
  /** Full chunking config used by okf-sub CreateChunksHandler */
1440
1448
  chunkingConfig?: {
@@ -1443,10 +1451,16 @@ interface BlockDef {
1443
1451
  };
1444
1452
  }
1445
1453
  interface BlockCapabilities {
1446
- /** Block's value contains extractable plain text (even if value also has other structure like JSON) */
1454
+ /**
1455
+ * Block's value contains extractable plain text — even if the value also has other structure
1456
+ * (like Lexical's JSON editorState alongside its allText). True for: TextInput, TitleInput,
1457
+ * SubtitleInput, LexicalTextEditor, etc. False for: media inputs, selection inputs, tags, dates.
1458
+ *
1459
+ * Used wherever code needs "give me all the blocks I can pull readable text from" — e.g.
1460
+ * AI annotation context extraction, document text usage stats, AI suggestion text field
1461
+ * filtering. Combine with `fieldPaths.plainTextString` to know HOW to extract the text.
1462
+ */
1447
1463
  hasPlainText: boolean;
1448
- /** Block's value is in the Lexical shape — editorState, allText, etc. */
1449
- hasLexicalShape: boolean;
1450
1464
  /**
1451
1465
  * General annotation flag — this block type supports annotation
1452
1466
  * (human, human-in-the-loop, or AI). Used by general checks: should the
@@ -1463,10 +1477,6 @@ interface BlockCapabilities {
1463
1477
  aiAnnotation: boolean;
1464
1478
  /** Supports AI enrichment — categorization, sentiment analysis, NER */
1465
1479
  aiEnrichment: boolean;
1466
- /** Treated as qualitative in AI Chat? */
1467
- aiChatQualField: boolean;
1468
- /** Treated as quantitative in AI Chat? */
1469
- aiChatQuantField: boolean;
1470
1480
  /** Can be searched via ES/listing search? */
1471
1481
  searchable: boolean;
1472
1482
  /** Supported in direct data import? */
@@ -1483,6 +1493,13 @@ interface BlockCapabilities {
1483
1493
  * in chunk/anno metadata — the actual text already lives in the chunks/annos themselves.
1484
1494
  */
1485
1495
  stripFromMainOnAnnoChunkSync: boolean;
1496
+ /**
1497
+ * Project this block out of listing fetches (e.g. published listings) for performance.
1498
+ * Used for large-payload blocks (like Lexical) where the listing UI doesn't need the
1499
+ * full content. Independent of stripFromMainOnAnnoChunkSync — same blocks today, but
1500
+ * the two concerns may diverge later.
1501
+ */
1502
+ excludeFromListingProjection: boolean;
1486
1503
  }
1487
1504
 
1488
1505
  /**
@@ -1552,6 +1569,24 @@ declare class BlockRegistry {
1552
1569
  hasCapability(compType: string, capability: keyof BlockCapabilities): boolean;
1553
1570
  /** Get all registered block descriptors. */
1554
1571
  getAll(): BlockDef[];
1572
+ /**
1573
+ * Get compName strings for all registered blocks that have a chunking config.
1574
+ * Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
1575
+ * description) to know which fields actually have chunks to search.
1576
+ */
1577
+ getCompsWithChunking(): string[];
1578
+ /**
1579
+ * Filter a list of block instances down to those where annotation is enabled.
1580
+ * A block is annotation-enabled if its registry capability `annotation` is true.
1581
+ * For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
1582
+ * falls back to the legacy per-instance `props.annotation.enable` toggle.
1583
+ *
1584
+ * Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
1585
+ */
1586
+ getAnnotationEnabledBlocks(allBlocks: Array<{
1587
+ comp: string;
1588
+ props?: any;
1589
+ }>): any[];
1555
1590
  }
1556
1591
  /** Singleton instance — the one registry shared across the app. */
1557
1592
  declare const blockRegistry: BlockRegistry;
@@ -2025,6 +2060,10 @@ interface IGeneral {
2025
2060
  formFieldNumbering?: {
2026
2061
  enable?: boolean;
2027
2062
  };
2063
+ autoGenTitle?: {
2064
+ enable?: boolean;
2065
+ prefix?: string;
2066
+ };
2028
2067
  postPblRedirPath?: object;
2029
2068
  templateIndex?: object;
2030
2069
  sharing?: {
package/dist/node.js CHANGED
@@ -669,6 +669,10 @@ var init_Tpl = __esm({
669
669
  formFieldNumbering: {
670
670
  enable: Boolean
671
671
  },
672
+ autoGenTitle: {
673
+ enable: Boolean,
674
+ prefix: String
675
+ },
672
676
  postPblRedirPath: Object,
673
677
  templateIndex: Object,
674
678
  sharing: {
@@ -3863,18 +3867,16 @@ var LexicalTextEditor = {
3863
3867
  // Capabilities
3864
3868
  capabilities: {
3865
3869
  hasPlainText: true,
3866
- hasLexicalShape: true,
3867
3870
  annotation: true,
3868
3871
  aiAnnotation: true,
3869
3872
  aiEnrichment: true,
3870
- aiChatQualField: true,
3871
- aiChatQuantField: false,
3872
3873
  searchable: true,
3873
3874
  directDataImport: true,
3874
3875
  csvExport: true,
3875
3876
  translatable: true,
3876
3877
  documentSummarizer: true,
3877
- stripFromMainOnAnnoChunkSync: true
3878
+ stripFromMainOnAnnoChunkSync: true,
3879
+ excludeFromListingProjection: true
3878
3880
  },
3879
3881
  // Field paths
3880
3882
  fieldPaths: {
@@ -3911,7 +3913,8 @@ var LexicalTextEditor = {
3911
3913
  // Content block option — TCI template builder & direct import UI
3912
3914
  contentBlockOption: {
3913
3915
  display: "Rich Text Field",
3914
- icon: "TextAa"
3916
+ icon: "TextAa",
3917
+ directImportGroupsIdx: [2, 2]
3915
3918
  },
3916
3919
  // Chunking config — used by okf-sub CreateChunksHandler
3917
3920
  chunkingConfig: CHUNKING_PRESETS.lexicalSemantic
@@ -3978,6 +3981,29 @@ var BlockRegistry = class {
3978
3981
  getAll() {
3979
3982
  return Array.from(this.blocks.values());
3980
3983
  }
3984
+ /**
3985
+ * Get compName strings for all registered blocks that have a chunking config.
3986
+ * Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
3987
+ * description) to know which fields actually have chunks to search.
3988
+ */
3989
+ getCompsWithChunking() {
3990
+ return Array.from(this.blocks.values()).filter((b) => !!b.chunkingConfig).map((b) => b.compName);
3991
+ }
3992
+ /**
3993
+ * Filter a list of block instances down to those where annotation is enabled.
3994
+ * A block is annotation-enabled if its registry capability `annotation` is true.
3995
+ * For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
3996
+ * falls back to the legacy per-instance `props.annotation.enable` toggle.
3997
+ *
3998
+ * Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
3999
+ */
4000
+ getAnnotationEnabledBlocks(allBlocks) {
4001
+ return allBlocks.filter((block) => {
4002
+ const blockDef = this.blocks.get(block.comp);
4003
+ if (blockDef) return !!blockDef.capabilities.annotation;
4004
+ return block.props?.annotation?.enable === true;
4005
+ });
4006
+ }
3981
4007
  };
3982
4008
  var blockRegistry = new BlockRegistry();
3983
4009
 
package/dist/node.mjs CHANGED
@@ -674,6 +674,10 @@ var init_Tpl = __esm({
674
674
  formFieldNumbering: {
675
675
  enable: Boolean
676
676
  },
677
+ autoGenTitle: {
678
+ enable: Boolean,
679
+ prefix: String
680
+ },
677
681
  postPblRedirPath: Object,
678
682
  templateIndex: Object,
679
683
  sharing: {
@@ -3796,18 +3800,16 @@ var LexicalTextEditor = {
3796
3800
  // Capabilities
3797
3801
  capabilities: {
3798
3802
  hasPlainText: true,
3799
- hasLexicalShape: true,
3800
3803
  annotation: true,
3801
3804
  aiAnnotation: true,
3802
3805
  aiEnrichment: true,
3803
- aiChatQualField: true,
3804
- aiChatQuantField: false,
3805
3806
  searchable: true,
3806
3807
  directDataImport: true,
3807
3808
  csvExport: true,
3808
3809
  translatable: true,
3809
3810
  documentSummarizer: true,
3810
- stripFromMainOnAnnoChunkSync: true
3811
+ stripFromMainOnAnnoChunkSync: true,
3812
+ excludeFromListingProjection: true
3811
3813
  },
3812
3814
  // Field paths
3813
3815
  fieldPaths: {
@@ -3844,7 +3846,8 @@ var LexicalTextEditor = {
3844
3846
  // Content block option — TCI template builder & direct import UI
3845
3847
  contentBlockOption: {
3846
3848
  display: "Rich Text Field",
3847
- icon: "TextAa"
3849
+ icon: "TextAa",
3850
+ directImportGroupsIdx: [2, 2]
3848
3851
  },
3849
3852
  // Chunking config — used by okf-sub CreateChunksHandler
3850
3853
  chunkingConfig: CHUNKING_PRESETS.lexicalSemantic
@@ -3911,6 +3914,29 @@ var BlockRegistry = class {
3911
3914
  getAll() {
3912
3915
  return Array.from(this.blocks.values());
3913
3916
  }
3917
+ /**
3918
+ * Get compName strings for all registered blocks that have a chunking config.
3919
+ * Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
3920
+ * description) to know which fields actually have chunks to search.
3921
+ */
3922
+ getCompsWithChunking() {
3923
+ return Array.from(this.blocks.values()).filter((b) => !!b.chunkingConfig).map((b) => b.compName);
3924
+ }
3925
+ /**
3926
+ * Filter a list of block instances down to those where annotation is enabled.
3927
+ * A block is annotation-enabled if its registry capability `annotation` is true.
3928
+ * For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
3929
+ * falls back to the legacy per-instance `props.annotation.enable` toggle.
3930
+ *
3931
+ * Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
3932
+ */
3933
+ getAnnotationEnabledBlocks(allBlocks) {
3934
+ return allBlocks.filter((block) => {
3935
+ const blockDef = this.blocks.get(block.comp);
3936
+ if (blockDef) return !!blockDef.capabilities.annotation;
3937
+ return block.props?.annotation?.enable === true;
3938
+ });
3939
+ }
3914
3940
  };
3915
3941
  var blockRegistry = new BlockRegistry();
3916
3942
 
@@ -1428,6 +1428,14 @@ interface BlockDef {
1428
1428
  icon?: string;
1429
1429
  iconWeight?: string;
1430
1430
  displayInDirectImportUI?: string;
1431
+ /**
1432
+ * Position of this comp in the direct import field selector dropdown,
1433
+ * as a tuple [groupIdx, orderInGroup]. Groups are rendered in ascending
1434
+ * groupIdx order with separators between them. Within a group, items are
1435
+ * rendered in ascending orderInGroup.
1436
+ * Currently: 1 = title, 2 = content fields, 3 = tags. Add more as needed.
1437
+ */
1438
+ directImportGroupsIdx?: [number, number];
1431
1439
  };
1432
1440
  /** Full chunking config used by okf-sub CreateChunksHandler */
1433
1441
  chunkingConfig?: {
@@ -1436,10 +1444,16 @@ interface BlockDef {
1436
1444
  };
1437
1445
  }
1438
1446
  interface BlockCapabilities {
1439
- /** Block's value contains extractable plain text (even if value also has other structure like JSON) */
1447
+ /**
1448
+ * Block's value contains extractable plain text — even if the value also has other structure
1449
+ * (like Lexical's JSON editorState alongside its allText). True for: TextInput, TitleInput,
1450
+ * SubtitleInput, LexicalTextEditor, etc. False for: media inputs, selection inputs, tags, dates.
1451
+ *
1452
+ * Used wherever code needs "give me all the blocks I can pull readable text from" — e.g.
1453
+ * AI annotation context extraction, document text usage stats, AI suggestion text field
1454
+ * filtering. Combine with `fieldPaths.plainTextString` to know HOW to extract the text.
1455
+ */
1440
1456
  hasPlainText: boolean;
1441
- /** Block's value is in the Lexical shape — editorState, allText, etc. */
1442
- hasLexicalShape: boolean;
1443
1457
  /**
1444
1458
  * General annotation flag — this block type supports annotation
1445
1459
  * (human, human-in-the-loop, or AI). Used by general checks: should the
@@ -1456,10 +1470,6 @@ interface BlockCapabilities {
1456
1470
  aiAnnotation: boolean;
1457
1471
  /** Supports AI enrichment — categorization, sentiment analysis, NER */
1458
1472
  aiEnrichment: boolean;
1459
- /** Treated as qualitative in AI Chat? */
1460
- aiChatQualField: boolean;
1461
- /** Treated as quantitative in AI Chat? */
1462
- aiChatQuantField: boolean;
1463
1473
  /** Can be searched via ES/listing search? */
1464
1474
  searchable: boolean;
1465
1475
  /** Supported in direct data import? */
@@ -1476,6 +1486,13 @@ interface BlockCapabilities {
1476
1486
  * in chunk/anno metadata — the actual text already lives in the chunks/annos themselves.
1477
1487
  */
1478
1488
  stripFromMainOnAnnoChunkSync: boolean;
1489
+ /**
1490
+ * Project this block out of listing fetches (e.g. published listings) for performance.
1491
+ * Used for large-payload blocks (like Lexical) where the listing UI doesn't need the
1492
+ * full content. Independent of stripFromMainOnAnnoChunkSync — same blocks today, but
1493
+ * the two concerns may diverge later.
1494
+ */
1495
+ excludeFromListingProjection: boolean;
1479
1496
  }
1480
1497
 
1481
1498
  /**
@@ -1545,6 +1562,24 @@ declare class BlockRegistry {
1545
1562
  hasCapability(compType: string, capability: keyof BlockCapabilities): boolean;
1546
1563
  /** Get all registered block descriptors. */
1547
1564
  getAll(): BlockDef[];
1565
+ /**
1566
+ * Get compName strings for all registered blocks that have a chunking config.
1567
+ * Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
1568
+ * description) to know which fields actually have chunks to search.
1569
+ */
1570
+ getCompsWithChunking(): string[];
1571
+ /**
1572
+ * Filter a list of block instances down to those where annotation is enabled.
1573
+ * A block is annotation-enabled if its registry capability `annotation` is true.
1574
+ * For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
1575
+ * falls back to the legacy per-instance `props.annotation.enable` toggle.
1576
+ *
1577
+ * Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
1578
+ */
1579
+ getAnnotationEnabledBlocks(allBlocks: Array<{
1580
+ comp: string;
1581
+ props?: any;
1582
+ }>): any[];
1548
1583
  }
1549
1584
  /** Singleton instance — the one registry shared across the app. */
1550
1585
  declare const blockRegistry: BlockRegistry;
@@ -1428,6 +1428,14 @@ interface BlockDef {
1428
1428
  icon?: string;
1429
1429
  iconWeight?: string;
1430
1430
  displayInDirectImportUI?: string;
1431
+ /**
1432
+ * Position of this comp in the direct import field selector dropdown,
1433
+ * as a tuple [groupIdx, orderInGroup]. Groups are rendered in ascending
1434
+ * groupIdx order with separators between them. Within a group, items are
1435
+ * rendered in ascending orderInGroup.
1436
+ * Currently: 1 = title, 2 = content fields, 3 = tags. Add more as needed.
1437
+ */
1438
+ directImportGroupsIdx?: [number, number];
1431
1439
  };
1432
1440
  /** Full chunking config used by okf-sub CreateChunksHandler */
1433
1441
  chunkingConfig?: {
@@ -1436,10 +1444,16 @@ interface BlockDef {
1436
1444
  };
1437
1445
  }
1438
1446
  interface BlockCapabilities {
1439
- /** Block's value contains extractable plain text (even if value also has other structure like JSON) */
1447
+ /**
1448
+ * Block's value contains extractable plain text — even if the value also has other structure
1449
+ * (like Lexical's JSON editorState alongside its allText). True for: TextInput, TitleInput,
1450
+ * SubtitleInput, LexicalTextEditor, etc. False for: media inputs, selection inputs, tags, dates.
1451
+ *
1452
+ * Used wherever code needs "give me all the blocks I can pull readable text from" — e.g.
1453
+ * AI annotation context extraction, document text usage stats, AI suggestion text field
1454
+ * filtering. Combine with `fieldPaths.plainTextString` to know HOW to extract the text.
1455
+ */
1440
1456
  hasPlainText: boolean;
1441
- /** Block's value is in the Lexical shape — editorState, allText, etc. */
1442
- hasLexicalShape: boolean;
1443
1457
  /**
1444
1458
  * General annotation flag — this block type supports annotation
1445
1459
  * (human, human-in-the-loop, or AI). Used by general checks: should the
@@ -1456,10 +1470,6 @@ interface BlockCapabilities {
1456
1470
  aiAnnotation: boolean;
1457
1471
  /** Supports AI enrichment — categorization, sentiment analysis, NER */
1458
1472
  aiEnrichment: boolean;
1459
- /** Treated as qualitative in AI Chat? */
1460
- aiChatQualField: boolean;
1461
- /** Treated as quantitative in AI Chat? */
1462
- aiChatQuantField: boolean;
1463
1473
  /** Can be searched via ES/listing search? */
1464
1474
  searchable: boolean;
1465
1475
  /** Supported in direct data import? */
@@ -1476,6 +1486,13 @@ interface BlockCapabilities {
1476
1486
  * in chunk/anno metadata — the actual text already lives in the chunks/annos themselves.
1477
1487
  */
1478
1488
  stripFromMainOnAnnoChunkSync: boolean;
1489
+ /**
1490
+ * Project this block out of listing fetches (e.g. published listings) for performance.
1491
+ * Used for large-payload blocks (like Lexical) where the listing UI doesn't need the
1492
+ * full content. Independent of stripFromMainOnAnnoChunkSync — same blocks today, but
1493
+ * the two concerns may diverge later.
1494
+ */
1495
+ excludeFromListingProjection: boolean;
1479
1496
  }
1480
1497
 
1481
1498
  /**
@@ -1545,6 +1562,24 @@ declare class BlockRegistry {
1545
1562
  hasCapability(compType: string, capability: keyof BlockCapabilities): boolean;
1546
1563
  /** Get all registered block descriptors. */
1547
1564
  getAll(): BlockDef[];
1565
+ /**
1566
+ * Get compName strings for all registered blocks that have a chunking config.
1567
+ * Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
1568
+ * description) to know which fields actually have chunks to search.
1569
+ */
1570
+ getCompsWithChunking(): string[];
1571
+ /**
1572
+ * Filter a list of block instances down to those where annotation is enabled.
1573
+ * A block is annotation-enabled if its registry capability `annotation` is true.
1574
+ * For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
1575
+ * falls back to the legacy per-instance `props.annotation.enable` toggle.
1576
+ *
1577
+ * Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
1578
+ */
1579
+ getAnnotationEnabledBlocks(allBlocks: Array<{
1580
+ comp: string;
1581
+ props?: any;
1582
+ }>): any[];
1548
1583
  }
1549
1584
  /** Singleton instance — the one registry shared across the app. */
1550
1585
  declare const blockRegistry: BlockRegistry;
package/dist/universal.js CHANGED
@@ -2269,18 +2269,16 @@ var LexicalTextEditor = {
2269
2269
  // Capabilities
2270
2270
  capabilities: {
2271
2271
  hasPlainText: true,
2272
- hasLexicalShape: true,
2273
2272
  annotation: true,
2274
2273
  aiAnnotation: true,
2275
2274
  aiEnrichment: true,
2276
- aiChatQualField: true,
2277
- aiChatQuantField: false,
2278
2275
  searchable: true,
2279
2276
  directDataImport: true,
2280
2277
  csvExport: true,
2281
2278
  translatable: true,
2282
2279
  documentSummarizer: true,
2283
- stripFromMainOnAnnoChunkSync: true
2280
+ stripFromMainOnAnnoChunkSync: true,
2281
+ excludeFromListingProjection: true
2284
2282
  },
2285
2283
  // Field paths
2286
2284
  fieldPaths: {
@@ -2317,7 +2315,8 @@ var LexicalTextEditor = {
2317
2315
  // Content block option — TCI template builder & direct import UI
2318
2316
  contentBlockOption: {
2319
2317
  display: "Rich Text Field",
2320
- icon: "TextAa"
2318
+ icon: "TextAa",
2319
+ directImportGroupsIdx: [2, 2]
2321
2320
  },
2322
2321
  // Chunking config — used by okf-sub CreateChunksHandler
2323
2322
  chunkingConfig: CHUNKING_PRESETS.lexicalSemantic
@@ -2384,6 +2383,29 @@ var BlockRegistry = class {
2384
2383
  getAll() {
2385
2384
  return Array.from(this.blocks.values());
2386
2385
  }
2386
+ /**
2387
+ * Get compName strings for all registered blocks that have a chunking config.
2388
+ * Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
2389
+ * description) to know which fields actually have chunks to search.
2390
+ */
2391
+ getCompsWithChunking() {
2392
+ return Array.from(this.blocks.values()).filter((b) => !!b.chunkingConfig).map((b) => b.compName);
2393
+ }
2394
+ /**
2395
+ * Filter a list of block instances down to those where annotation is enabled.
2396
+ * A block is annotation-enabled if its registry capability `annotation` is true.
2397
+ * For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
2398
+ * falls back to the legacy per-instance `props.annotation.enable` toggle.
2399
+ *
2400
+ * Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
2401
+ */
2402
+ getAnnotationEnabledBlocks(allBlocks) {
2403
+ return allBlocks.filter((block) => {
2404
+ const blockDef = this.blocks.get(block.comp);
2405
+ if (blockDef) return !!blockDef.capabilities.annotation;
2406
+ return block.props?.annotation?.enable === true;
2407
+ });
2408
+ }
2387
2409
  };
2388
2410
  var blockRegistry = new BlockRegistry();
2389
2411
  // Annotate the CommonJS export names for ESM import in node:
@@ -2203,18 +2203,16 @@ var LexicalTextEditor = {
2203
2203
  // Capabilities
2204
2204
  capabilities: {
2205
2205
  hasPlainText: true,
2206
- hasLexicalShape: true,
2207
2206
  annotation: true,
2208
2207
  aiAnnotation: true,
2209
2208
  aiEnrichment: true,
2210
- aiChatQualField: true,
2211
- aiChatQuantField: false,
2212
2209
  searchable: true,
2213
2210
  directDataImport: true,
2214
2211
  csvExport: true,
2215
2212
  translatable: true,
2216
2213
  documentSummarizer: true,
2217
- stripFromMainOnAnnoChunkSync: true
2214
+ stripFromMainOnAnnoChunkSync: true,
2215
+ excludeFromListingProjection: true
2218
2216
  },
2219
2217
  // Field paths
2220
2218
  fieldPaths: {
@@ -2251,7 +2249,8 @@ var LexicalTextEditor = {
2251
2249
  // Content block option — TCI template builder & direct import UI
2252
2250
  contentBlockOption: {
2253
2251
  display: "Rich Text Field",
2254
- icon: "TextAa"
2252
+ icon: "TextAa",
2253
+ directImportGroupsIdx: [2, 2]
2255
2254
  },
2256
2255
  // Chunking config — used by okf-sub CreateChunksHandler
2257
2256
  chunkingConfig: CHUNKING_PRESETS.lexicalSemantic
@@ -2318,6 +2317,29 @@ var BlockRegistry = class {
2318
2317
  getAll() {
2319
2318
  return Array.from(this.blocks.values());
2320
2319
  }
2320
+ /**
2321
+ * Get compName strings for all registered blocks that have a chunking config.
2322
+ * Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
2323
+ * description) to know which fields actually have chunks to search.
2324
+ */
2325
+ getCompsWithChunking() {
2326
+ return Array.from(this.blocks.values()).filter((b) => !!b.chunkingConfig).map((b) => b.compName);
2327
+ }
2328
+ /**
2329
+ * Filter a list of block instances down to those where annotation is enabled.
2330
+ * A block is annotation-enabled if its registry capability `annotation` is true.
2331
+ * For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
2332
+ * falls back to the legacy per-instance `props.annotation.enable` toggle.
2333
+ *
2334
+ * Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
2335
+ */
2336
+ getAnnotationEnabledBlocks(allBlocks) {
2337
+ return allBlocks.filter((block) => {
2338
+ const blockDef = this.blocks.get(block.comp);
2339
+ if (blockDef) return !!blockDef.capabilities.annotation;
2340
+ return block.props?.annotation?.enable === true;
2341
+ });
2342
+ }
2321
2343
  };
2322
2344
  var blockRegistry = new BlockRegistry();
2323
2345
  export {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.30.0",
6
+ "version": "1.31.1",
7
7
  "description": "Utility functions for both browser and Node.js",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/index.mjs",