@okf/ootils 1.30.0 → 1.31.0
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/browser.d.mts +42 -7
- package/dist/browser.d.ts +42 -7
- package/dist/browser.js +27 -5
- package/dist/browser.mjs +27 -5
- package/dist/node.d.mts +42 -7
- package/dist/node.d.ts +42 -7
- package/dist/node.js +27 -5
- package/dist/node.mjs +27 -5
- package/dist/universal.d.mts +42 -7
- package/dist/universal.d.ts +42 -7
- package/dist/universal.js +27 -5
- package/dist/universal.mjs +27 -5
- package/package.json +1 -1
package/dist/browser.d.mts
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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;
|
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
|
-
/**
|
|
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;
|
package/dist/node.js
CHANGED
|
@@ -3863,18 +3863,16 @@ var LexicalTextEditor = {
|
|
|
3863
3863
|
// Capabilities
|
|
3864
3864
|
capabilities: {
|
|
3865
3865
|
hasPlainText: true,
|
|
3866
|
-
hasLexicalShape: true,
|
|
3867
3866
|
annotation: true,
|
|
3868
3867
|
aiAnnotation: true,
|
|
3869
3868
|
aiEnrichment: true,
|
|
3870
|
-
aiChatQualField: true,
|
|
3871
|
-
aiChatQuantField: false,
|
|
3872
3869
|
searchable: true,
|
|
3873
3870
|
directDataImport: true,
|
|
3874
3871
|
csvExport: true,
|
|
3875
3872
|
translatable: true,
|
|
3876
3873
|
documentSummarizer: true,
|
|
3877
|
-
stripFromMainOnAnnoChunkSync: true
|
|
3874
|
+
stripFromMainOnAnnoChunkSync: true,
|
|
3875
|
+
excludeFromListingProjection: true
|
|
3878
3876
|
},
|
|
3879
3877
|
// Field paths
|
|
3880
3878
|
fieldPaths: {
|
|
@@ -3911,7 +3909,8 @@ var LexicalTextEditor = {
|
|
|
3911
3909
|
// Content block option — TCI template builder & direct import UI
|
|
3912
3910
|
contentBlockOption: {
|
|
3913
3911
|
display: "Rich Text Field",
|
|
3914
|
-
icon: "TextAa"
|
|
3912
|
+
icon: "TextAa",
|
|
3913
|
+
directImportGroupsIdx: [2, 2]
|
|
3915
3914
|
},
|
|
3916
3915
|
// Chunking config — used by okf-sub CreateChunksHandler
|
|
3917
3916
|
chunkingConfig: CHUNKING_PRESETS.lexicalSemantic
|
|
@@ -3978,6 +3977,29 @@ var BlockRegistry = class {
|
|
|
3978
3977
|
getAll() {
|
|
3979
3978
|
return Array.from(this.blocks.values());
|
|
3980
3979
|
}
|
|
3980
|
+
/**
|
|
3981
|
+
* Get compName strings for all registered blocks that have a chunking config.
|
|
3982
|
+
* Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
|
|
3983
|
+
* description) to know which fields actually have chunks to search.
|
|
3984
|
+
*/
|
|
3985
|
+
getCompsWithChunking() {
|
|
3986
|
+
return Array.from(this.blocks.values()).filter((b) => !!b.chunkingConfig).map((b) => b.compName);
|
|
3987
|
+
}
|
|
3988
|
+
/**
|
|
3989
|
+
* Filter a list of block instances down to those where annotation is enabled.
|
|
3990
|
+
* A block is annotation-enabled if its registry capability `annotation` is true.
|
|
3991
|
+
* For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
|
|
3992
|
+
* falls back to the legacy per-instance `props.annotation.enable` toggle.
|
|
3993
|
+
*
|
|
3994
|
+
* Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
|
|
3995
|
+
*/
|
|
3996
|
+
getAnnotationEnabledBlocks(allBlocks) {
|
|
3997
|
+
return allBlocks.filter((block) => {
|
|
3998
|
+
const blockDef = this.blocks.get(block.comp);
|
|
3999
|
+
if (blockDef) return !!blockDef.capabilities.annotation;
|
|
4000
|
+
return block.props?.annotation?.enable === true;
|
|
4001
|
+
});
|
|
4002
|
+
}
|
|
3981
4003
|
};
|
|
3982
4004
|
var blockRegistry = new BlockRegistry();
|
|
3983
4005
|
|
package/dist/node.mjs
CHANGED
|
@@ -3796,18 +3796,16 @@ var LexicalTextEditor = {
|
|
|
3796
3796
|
// Capabilities
|
|
3797
3797
|
capabilities: {
|
|
3798
3798
|
hasPlainText: true,
|
|
3799
|
-
hasLexicalShape: true,
|
|
3800
3799
|
annotation: true,
|
|
3801
3800
|
aiAnnotation: true,
|
|
3802
3801
|
aiEnrichment: true,
|
|
3803
|
-
aiChatQualField: true,
|
|
3804
|
-
aiChatQuantField: false,
|
|
3805
3802
|
searchable: true,
|
|
3806
3803
|
directDataImport: true,
|
|
3807
3804
|
csvExport: true,
|
|
3808
3805
|
translatable: true,
|
|
3809
3806
|
documentSummarizer: true,
|
|
3810
|
-
stripFromMainOnAnnoChunkSync: true
|
|
3807
|
+
stripFromMainOnAnnoChunkSync: true,
|
|
3808
|
+
excludeFromListingProjection: true
|
|
3811
3809
|
},
|
|
3812
3810
|
// Field paths
|
|
3813
3811
|
fieldPaths: {
|
|
@@ -3844,7 +3842,8 @@ var LexicalTextEditor = {
|
|
|
3844
3842
|
// Content block option — TCI template builder & direct import UI
|
|
3845
3843
|
contentBlockOption: {
|
|
3846
3844
|
display: "Rich Text Field",
|
|
3847
|
-
icon: "TextAa"
|
|
3845
|
+
icon: "TextAa",
|
|
3846
|
+
directImportGroupsIdx: [2, 2]
|
|
3848
3847
|
},
|
|
3849
3848
|
// Chunking config — used by okf-sub CreateChunksHandler
|
|
3850
3849
|
chunkingConfig: CHUNKING_PRESETS.lexicalSemantic
|
|
@@ -3911,6 +3910,29 @@ var BlockRegistry = class {
|
|
|
3911
3910
|
getAll() {
|
|
3912
3911
|
return Array.from(this.blocks.values());
|
|
3913
3912
|
}
|
|
3913
|
+
/**
|
|
3914
|
+
* Get compName strings for all registered blocks that have a chunking config.
|
|
3915
|
+
* Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
|
|
3916
|
+
* description) to know which fields actually have chunks to search.
|
|
3917
|
+
*/
|
|
3918
|
+
getCompsWithChunking() {
|
|
3919
|
+
return Array.from(this.blocks.values()).filter((b) => !!b.chunkingConfig).map((b) => b.compName);
|
|
3920
|
+
}
|
|
3921
|
+
/**
|
|
3922
|
+
* Filter a list of block instances down to those where annotation is enabled.
|
|
3923
|
+
* A block is annotation-enabled if its registry capability `annotation` is true.
|
|
3924
|
+
* For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
|
|
3925
|
+
* falls back to the legacy per-instance `props.annotation.enable` toggle.
|
|
3926
|
+
*
|
|
3927
|
+
* Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
|
|
3928
|
+
*/
|
|
3929
|
+
getAnnotationEnabledBlocks(allBlocks) {
|
|
3930
|
+
return allBlocks.filter((block) => {
|
|
3931
|
+
const blockDef = this.blocks.get(block.comp);
|
|
3932
|
+
if (blockDef) return !!blockDef.capabilities.annotation;
|
|
3933
|
+
return block.props?.annotation?.enable === true;
|
|
3934
|
+
});
|
|
3935
|
+
}
|
|
3914
3936
|
};
|
|
3915
3937
|
var blockRegistry = new BlockRegistry();
|
|
3916
3938
|
|
package/dist/universal.d.mts
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
|
-
/**
|
|
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.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
|
-
/**
|
|
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:
|
package/dist/universal.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 {
|