@epam/ai-dial-quotations 1.2.0-dev.3 → 1.2.0-dev.300
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/components/CitationCard/CitationCard.d.ts +21 -1
- package/components/CitationCard/CitationCard.d.ts.map +1 -1
- package/components/CitationDropdown/CitationDropdown.d.ts +7 -1
- package/components/CitationDropdown/CitationDropdown.d.ts.map +1 -1
- package/components/CitationMarker/CitationMarker.d.ts.map +1 -1
- package/constants/public-class-names.d.ts +14 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/context/CitationCardContext.d.ts +3 -3
- package/hooks/useCitationMarkdownComponents/useCitationMarkdownComponents.d.ts +13 -1
- package/hooks/useCitationMarkdownComponents/useCitationMarkdownComponents.d.ts.map +1 -1
- package/index.css +2 -2
- package/index.d.ts +3 -2
- package/index.d.ts.map +1 -1
- package/index.js +377 -229
- package/models/office-highlight.d.ts +23 -3
- package/models/office-highlight.d.ts.map +1 -1
- package/package.json +3 -3
- package/utils/annotation.d.ts +42 -8
- package/utils/annotation.d.ts.map +1 -1
- package/utils/group-annotations-by-source.d.ts +3 -1
- package/utils/group-annotations-by-source.d.ts.map +1 -1
- package/utils/office-table-anchor.d.ts +5 -0
- package/utils/office-table-anchor.d.ts.map +1 -0
- package/utils/useCitationCard.d.ts +14 -7
- package/utils/useCitationCard.d.ts.map +1 -1
|
@@ -3,7 +3,7 @@ import { ExcelCellAddress } from '@epam/ai-dial-chat-shared';
|
|
|
3
3
|
* A validated, normalised DOCX character-range location. `endExclusive` is
|
|
4
4
|
* the wire's `end` copied through unchanged — confirmed exclusive on the
|
|
5
5
|
* wire, unlike `TextCharacterRangeSelector`'s inclusive `end` (see the
|
|
6
|
-
* `annotation.ts` normaliser and `design.md` D3 for the evidence).
|
|
6
|
+
* `annotation.ts` normaliser and `openspec/changes/archive/2026-09-10-highlight-office-document-annotations/design.md` D3 for the evidence).
|
|
7
7
|
*/
|
|
8
8
|
export interface DocxOfficeHighlightLocation {
|
|
9
9
|
/** Discriminates this location within `OfficeHighlightLocation`. Mirrors the wire selector's `type`. */
|
|
@@ -22,7 +22,7 @@ export interface DocxOfficeHighlightLocation {
|
|
|
22
22
|
/**
|
|
23
23
|
* A validated, normalised PPTX character-range location. `endExclusive` is
|
|
24
24
|
* the wire's `end` copied through unchanged — confirmed exclusive on the
|
|
25
|
-
* wire (see `design.md` D3).
|
|
25
|
+
* wire (see `openspec/changes/archive/2026-09-10-highlight-office-document-annotations/design.md` D3).
|
|
26
26
|
*/
|
|
27
27
|
export interface PptxOfficeHighlightLocation {
|
|
28
28
|
/** Discriminates this location within `OfficeHighlightLocation`. Mirrors the wire selector's `type`. */
|
|
@@ -38,6 +38,26 @@ export interface PptxOfficeHighlightLocation {
|
|
|
38
38
|
/** The cited text, expected to equal the text resolved over `[start, endExclusive)`. */
|
|
39
39
|
text: string;
|
|
40
40
|
}
|
|
41
|
+
/** Temporary table-row location decoded from a DOCX text anchor. */
|
|
42
|
+
export interface DocxTableRowOfficeHighlightLocation {
|
|
43
|
+
/** Wire selector type. */
|
|
44
|
+
type: 'docx_text_anchor';
|
|
45
|
+
/** Plain text of each cell, in column order. */
|
|
46
|
+
cells: string[];
|
|
47
|
+
/** 1-based matching row in the document body. */
|
|
48
|
+
occurrence: number;
|
|
49
|
+
}
|
|
50
|
+
/** Temporary table-row location decoded from a PPTX text anchor. */
|
|
51
|
+
export interface PptxTableRowOfficeHighlightLocation {
|
|
52
|
+
/** Wire selector type. */
|
|
53
|
+
type: 'pptx_text_anchor';
|
|
54
|
+
/** Plain text of each cell, in column order. */
|
|
55
|
+
cells: string[];
|
|
56
|
+
/** 1-based matching row on the specified slide. */
|
|
57
|
+
occurrence: number;
|
|
58
|
+
/** 1-based slide number. */
|
|
59
|
+
slide: number;
|
|
60
|
+
}
|
|
41
61
|
/** A validated, normalised XLSX cell or same-row cell-range location. */
|
|
42
62
|
export interface ExcelOfficeHighlightLocation {
|
|
43
63
|
/** Discriminates this location within `OfficeHighlightLocation`. Mirrors the wire selector's `type`. */
|
|
@@ -58,5 +78,5 @@ export interface ExcelOfficeHighlightLocation {
|
|
|
58
78
|
* cycle is not permitted). `libs/chat-hooks`, which already depends on both,
|
|
59
79
|
* maps this into `OoxmlHighlight`/`OoxmlHighlightLocation`.
|
|
60
80
|
*/
|
|
61
|
-
export type OfficeHighlightLocation = DocxOfficeHighlightLocation | PptxOfficeHighlightLocation | ExcelOfficeHighlightLocation;
|
|
81
|
+
export type OfficeHighlightLocation = DocxOfficeHighlightLocation | PptxOfficeHighlightLocation | DocxTableRowOfficeHighlightLocation | PptxTableRowOfficeHighlightLocation | ExcelOfficeHighlightLocation;
|
|
62
82
|
//# sourceMappingURL=office-highlight.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"office-highlight.d.ts","sourceRoot":"","sources":["../../src/models/office-highlight.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,wGAAwG;IACxG,IAAI,EAAE,iBAAiB,CAAC;IACxB,4GAA4G;IAC5G,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,wFAAwF;IACxF,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,wGAAwG;IACxG,IAAI,EAAE,iBAAiB,CAAC;IACxB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,wFAAwF;IACxF,IAAI,EAAE,MAAM,CAAC;CACd;AAED,yEAAyE;AACzE,MAAM,WAAW,4BAA4B;IAC3C,wGAAwG;IACxG,IAAI,EAAE,gBAAgB,CAAC;IACvB,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,KAAK,EAAE,gBAAgB,CAAC;IACxB,iGAAiG;IACjG,GAAG,CAAC,EAAE,gBAAgB,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,uBAAuB,GAC/B,2BAA2B,GAC3B,2BAA2B,GAC3B,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"office-highlight.d.ts","sourceRoot":"","sources":["../../src/models/office-highlight.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,wGAAwG;IACxG,IAAI,EAAE,iBAAiB,CAAC;IACxB,4GAA4G;IAC5G,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,wFAAwF;IACxF,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,wGAAwG;IACxG,IAAI,EAAE,iBAAiB,CAAC;IACxB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,wFAAwF;IACxF,IAAI,EAAE,MAAM,CAAC;CACd;AAED,oEAAoE;AACpE,MAAM,WAAW,mCAAmC;IAClD,0BAA0B;IAC1B,IAAI,EAAE,kBAAkB,CAAC;IACzB,gDAAgD;IAChD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,oEAAoE;AACpE,MAAM,WAAW,mCAAmC;IAClD,0BAA0B;IAC1B,IAAI,EAAE,kBAAkB,CAAC;IACzB,gDAAgD;IAChD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,mDAAmD;IACnD,UAAU,EAAE,MAAM,CAAC;IACnB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,yEAAyE;AACzE,MAAM,WAAW,4BAA4B;IAC3C,wGAAwG;IACxG,IAAI,EAAE,gBAAgB,CAAC;IACvB,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,KAAK,EAAE,gBAAgB,CAAC;IACxB,iGAAiG;IACjG,GAAG,CAAC,EAAE,gBAAgB,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,uBAAuB,GAC/B,2BAA2B,GAC3B,2BAA2B,GAC3B,mCAAmC,GACnC,mCAAmC,GACnC,4BAA4B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-quotations",
|
|
3
3
|
"description": "Citation and annotation components, hooks, and utilities for AI DIAL conversations",
|
|
4
|
-
"version": "1.2.0-dev.
|
|
4
|
+
"version": "1.2.0-dev.300",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": "^19.2.8",
|
|
26
|
-
"@epam/ai-dial-chat-shared": "1.2.0-dev.
|
|
27
|
-
"@epam/ai-dial-ui-kit": "^0.
|
|
26
|
+
"@epam/ai-dial-chat-shared": "1.2.0-dev.300",
|
|
27
|
+
"@epam/ai-dial-ui-kit": "^0.15.0-dev.39"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|
package/utils/annotation.d.ts
CHANGED
|
@@ -5,17 +5,51 @@ import { OfficeHighlightLocation } from '../models/office-highlight';
|
|
|
5
5
|
* Maps a list of annotations to `InputHighlightData` entries for the PDF viewer.
|
|
6
6
|
* Recognizes `pdf_bbox` selectors and both `pdf_region` coordinate forms
|
|
7
7
|
* (`lt`/`wh` and legacy `left`/`top`/`width`/`height`); annotations whose
|
|
8
|
-
* `body.selector` contains none of these are skipped.
|
|
9
|
-
*
|
|
8
|
+
* `body.selector` contains none of these are skipped. Each highlight `id` is
|
|
9
|
+
* the entry's id from `annotationHighlightIds(annotations)`, unique within
|
|
10
|
+
* this input list.
|
|
10
11
|
*/
|
|
11
12
|
export declare const annotationsToPdfHighlights: (annotations: Annotation[]) => InputHighlightData[];
|
|
12
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Returns a stable string ID for a given annotation — the id
|
|
15
|
+
* `annotationHighlightIds` (and so `annotationsToPdfHighlights` and the Office
|
|
16
|
+
* highlight path) assigns it whenever no earlier entry of the same list
|
|
17
|
+
* already holds that id.
|
|
18
|
+
*
|
|
19
|
+
* Resolved in order:
|
|
20
|
+
* 1. `annotation.index` when the wire supplied one — short, but not guaranteed
|
|
21
|
+
* unique: a payload may repeat an `index`, which `annotationHighlightIds`
|
|
22
|
+
* disambiguates.
|
|
23
|
+
* 2. Otherwise an id derived from the annotation's own identity: its `cit` tag
|
|
24
|
+
* id plus a digest of its selectors. Two annotations differing in either
|
|
25
|
+
* part get different ids; two agreeing in both describe the same cited
|
|
26
|
+
* region and may share one.
|
|
27
|
+
* 3. Otherwise `fallbackIndex` — the annotation's position in the caller's
|
|
28
|
+
* list, for an annotation carrying neither an index, a `cit` id, nor a
|
|
29
|
+
* recognised selector.
|
|
30
|
+
*
|
|
31
|
+
* The id is opaque: compare it, never parse it. A position-derived id is not
|
|
32
|
+
* unique beyond the list it came from, which is why it is the last resort — a
|
|
33
|
+
* caller gathering one citation group at a time would otherwise give every
|
|
34
|
+
* single-annotation group the same id, and the canvas could not tell two
|
|
35
|
+
* citations of one document apart ([#8907](https://github.com/epam/ai-dial-chat/issues/8907)). Ids are never persisted and
|
|
36
|
+
* never sent over the wire.
|
|
37
|
+
*/
|
|
13
38
|
export declare const annotationHighlightId: (annotation: Annotation, fallbackIndex: number) => string;
|
|
14
39
|
/**
|
|
15
|
-
* Returns
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
|
|
40
|
+
* Returns one highlight id per entry of `annotations`, unique within the list:
|
|
41
|
+
* the entry's `annotationHighlightId` when no earlier entry holds it, otherwise
|
|
42
|
+
* that id with a `-<n>` suffix no other entry's id uses.
|
|
43
|
+
*/
|
|
44
|
+
export declare const annotationHighlightIds: (annotations: Annotation[]) => string[];
|
|
45
|
+
/**
|
|
46
|
+
* Returns the PDF page to open for the annotation, or `undefined` when none
|
|
47
|
+
* exists. Recognizes `pdf_bbox` selectors and both `pdf_region` coordinate
|
|
48
|
+
* forms. The first selector whose geometry validates wins (see
|
|
49
|
+
* `readPdfSelectorBox`), so the page matches the selected highlight; when no
|
|
50
|
+
* selector has valid geometry, the first `pdf_bbox`/`pdf_region` selector
|
|
51
|
+
* with a positive integer `page` is used, so a page-only selector still
|
|
52
|
+
* navigates without a highlight.
|
|
19
53
|
*/
|
|
20
54
|
export declare const getAnnotationPdfPage: (annotation: Annotation) => number | undefined;
|
|
21
55
|
/**
|
|
@@ -45,7 +79,7 @@ export declare const isExcelRcRangeSelector: (selector: AnnotationSelector) => s
|
|
|
45
79
|
/**
|
|
46
80
|
* Converts an annotation's `body.selector` (scalar or array) to validated
|
|
47
81
|
* `OfficeHighlightLocation` entries, skipping any selector that is not a
|
|
48
|
-
* recognised Office range or that fails validation
|
|
82
|
+
* recognised Office range or temporary table-row anchor, or that fails validation.
|
|
49
83
|
*/
|
|
50
84
|
export declare const annotationToOfficeHighlightLocations: (annotation: Annotation) => OfficeHighlightLocation[];
|
|
51
85
|
//# sourceMappingURL=annotation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotation.d.ts","sourceRoot":"","sources":["../../src/utils/annotation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,OAAO,EACP,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAMnC,OAAO,KAAK,EAGV,kBAAkB,EACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"annotation.d.ts","sourceRoot":"","sources":["../../src/utils/annotation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,OAAO,EACP,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAMnC,OAAO,KAAK,EAGV,kBAAkB,EACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAmM1E;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,GACrC,aAAa,UAAU,EAAE,KACxB,kBAAkB,EAsBpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,qBAAqB,GAChC,YAAY,UAAU,EACtB,eAAe,MAAM,KACpB,MAG+D,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,aAAa,UAAU,EAAE,KAAG,MAAM,EAqBxE,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,GAC/B,YAAY,UAAU,KACrB,MAAM,GAAG,SAeX,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GAAI,SAAS,OAAO,KAAG,UAAU,EAoBtE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAC9B,UAAU,kBAAkB,KAC3B,QAAQ,IAAI,iBAWd,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,UAAU,kBAAkB,KAC3B,QAAQ,IAAI,iBAUd,CAAC;AAUF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,UAAU,kBAAkB,KAC3B,QAAQ,IAAI,oBAQd,CAAC;AA8FF;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,GAC/C,YAAY,UAAU,KACrB,uBAAuB,EAuBzB,CAAC"}
|
|
@@ -8,7 +8,7 @@ export interface AnnotationGroup {
|
|
|
8
8
|
* cit ids citing the same document never share popup state.
|
|
9
9
|
*/
|
|
10
10
|
groupKey: string;
|
|
11
|
-
/** The cited attachment's URL — used for Preview/
|
|
11
|
+
/** The cited attachment's URL — used for Preview/Open in browser. */
|
|
12
12
|
sourceUrl: string;
|
|
13
13
|
/**
|
|
14
14
|
* Human-readable name derived from the URL: the last non-empty path segment
|
|
@@ -20,6 +20,8 @@ export interface AnnotationGroup {
|
|
|
20
20
|
/** The first annotation in the group — used for the inline citation marker position. */
|
|
21
21
|
primaryAnnotation: Annotation;
|
|
22
22
|
}
|
|
23
|
+
/** Returns the cited file's extension with a leading dot (e.g. `'.pdf'`), read from its URL and then its title, or `undefined` when neither carries one. */
|
|
24
|
+
export declare const getSourceFileExtension: (annotation: Annotation) => string | undefined;
|
|
23
25
|
/**
|
|
24
26
|
* Groups annotations by their source attachment URL. Annotations without a
|
|
25
27
|
* `body.source.attachment.url` are excluded, as are `html_tag`-selector
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-annotations-by-source.d.ts","sourceRoot":"","sources":["../../src/utils/group-annotations-by-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAmB,MAAM,2BAA2B,CAAC;AAE7E,uEAAuE;AACvE,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,
|
|
1
|
+
{"version":3,"file":"group-annotations-by-source.d.ts","sourceRoot":"","sources":["../../src/utils/group-annotations-by-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAmB,MAAM,2BAA2B,CAAC;AAE7E,uEAAuE;AACvE,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,wFAAwF;IACxF,iBAAiB,EAAE,UAAU,CAAC;CAC/B;AAkCD,4JAA4J;AAC5J,eAAO,MAAM,sBAAsB,GACjC,YAAY,UAAU,KACrB,MAAM,GAAG,SAOX,CAAC;AAyBF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GACnC,aAAa,UAAU,EAAE,KACxB,eAAe,EAuBjB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAClC,aAAa,UAAU,EAAE,KACxB,eAAe,EAwBjB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAC3B,aAAa,UAAU,EAAE,KACxB,eAAe,EAGjB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,GACtC,SAAS,UAAU,EACnB,aAAa,UAAU,EAAE,KACxB,UAAU,EAKZ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AnnotationSelector } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { DocxTableRowOfficeHighlightLocation, PptxTableRowOfficeHighlightLocation } from '../models/office-highlight';
|
|
3
|
+
/** Returns a validated table-row location for the temporary Office anchor format. */
|
|
4
|
+
export declare const normalizeOfficeTableAnchor: (selector: AnnotationSelector) => DocxTableRowOfficeHighlightLocation | PptxTableRowOfficeHighlightLocation | undefined;
|
|
5
|
+
//# sourceMappingURL=office-table-anchor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"office-table-anchor.d.ts","sourceRoot":"","sources":["../../src/utils/office-table-anchor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EACV,mCAAmC,EACnC,mCAAmC,EACpC,MAAM,4BAA4B,CAAC;AAwCpC,qFAAqF;AACrF,eAAO,MAAM,0BAA0B,GACrC,UAAU,kBAAkB,KAE1B,mCAAmC,GACnC,mCAAmC,GACnC,SA2BH,CAAC"}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Manages open/close state and per-group active annotation index for citation
|
|
3
|
-
* cards within a single assistant message.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* cards within a single assistant message. The hook carries two distinct key
|
|
4
|
+
* spaces:
|
|
5
|
+
*
|
|
6
|
+
* - Openness (`openPopup`/`closePopup`/`isOpen`) is keyed by **occurrence
|
|
7
|
+
* owner key** — a stable per-instance id derived by the rendered
|
|
8
|
+
* `CitationDropdown` (see its `ownerKey`), not by `AnnotationGroup.groupKey`
|
|
9
|
+
* or `sourceUrl`. Two rendered occurrences resolving to the same group are
|
|
10
|
+
* therefore always independent popup owners.
|
|
11
|
+
* - The switcher index (`setActiveIndex`/`getActiveIndex`) is keyed by
|
|
12
|
+
* `groupKey`, because the index indexes into `group.annotations`, which is
|
|
13
|
+
* group data, not occurrence data.
|
|
7
14
|
*/
|
|
8
15
|
export declare const useCitationCard: () => {
|
|
9
|
-
openPopup: (
|
|
10
|
-
closePopup: () => void;
|
|
16
|
+
openPopup: (ownerKey: string) => void;
|
|
17
|
+
closePopup: (ownerKey: string) => void;
|
|
11
18
|
setActiveIndex: (groupKey: string, index: number) => void;
|
|
12
|
-
isOpen: (
|
|
19
|
+
isOpen: (ownerKey: string) => boolean;
|
|
13
20
|
getActiveIndex: (groupKey: string) => number;
|
|
14
21
|
};
|
|
15
22
|
//# sourceMappingURL=useCitationCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCitationCard.d.ts","sourceRoot":"","sources":["../../src/utils/useCitationCard.ts"],"names":[],"mappings":"AAcA
|
|
1
|
+
{"version":3,"file":"useCitationCard.d.ts","sourceRoot":"","sources":["../../src/utils/useCitationCard.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe;0BAGe,MAAM;2BAIL,MAAM;+BAMF,MAAM,SAAS,MAAM;uBAY5C,MAAM;+BACE,MAAM;CAKtC,CAAC"}
|