pdfjs-reader-core 0.4.1 → 0.4.3
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/README.md +5 -0
- package/dist/index.cjs +1504 -450
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +115 -23
- package/dist/index.d.ts +115 -23
- package/dist/index.js +1493 -439
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1795,11 +1795,32 @@ interface TutorModeContainerProps {
|
|
|
1795
1795
|
* the `backgroundColor` surround.
|
|
1796
1796
|
*/
|
|
1797
1797
|
loadingComponent?: react__default.ReactNode;
|
|
1798
|
+
/**
|
|
1799
|
+
* Fired when the underlying viewer's page changes from any source — the
|
|
1800
|
+
* agent API (`agentTools.goToPage / nextPage / previousPage`), the sidebar
|
|
1801
|
+
* (bookmarks, thumbnails, search), or a programmatic
|
|
1802
|
+
* `useViewerStore().goToPage` call. Use this to keep your own
|
|
1803
|
+
* `pageNumber` state (the controlled prop you pass in) in lockstep with
|
|
1804
|
+
* the viewer, so agent-driven navigation actually moves the rendered
|
|
1805
|
+
* page and downstream concerns (progress save, recap, etc.) see the
|
|
1806
|
+
* right value.
|
|
1807
|
+
*
|
|
1808
|
+
* ```tsx
|
|
1809
|
+
* const [currentPage, setCurrentPage] = useState(1);
|
|
1810
|
+
* <TutorModeContainer
|
|
1811
|
+
* pageNumber={currentPage}
|
|
1812
|
+
* onPageChange={setCurrentPage} // ← bidirectional sync
|
|
1813
|
+
* />
|
|
1814
|
+
* ```
|
|
1815
|
+
*
|
|
1816
|
+
* Added in v0.4.2.
|
|
1817
|
+
*/
|
|
1818
|
+
onPageChange?: (page: number) => void;
|
|
1798
1819
|
className?: string;
|
|
1799
1820
|
}
|
|
1800
1821
|
/** Build a cross-page/block index from the raw bbox list. */
|
|
1801
1822
|
declare function buildBBoxIndex(bboxData: PageBBoxData[]): BBoxIndex;
|
|
1802
|
-
declare function TutorModeContainer({ pageNumber, bboxData, narrationStore, scale, rotation, currentChunk, llm, idleTimeoutMs, llmTimeoutMs, embeddingProvider, showSubtitles, showExitButton, onExitTutorMode, minOverlayDurationMs, backgroundColor, loadingComponent, className, }: TutorModeContainerProps): react_jsx_runtime.JSX.Element;
|
|
1823
|
+
declare function TutorModeContainer({ pageNumber, bboxData, narrationStore, scale, rotation, currentChunk, llm, idleTimeoutMs, llmTimeoutMs, embeddingProvider, showSubtitles, showExitButton, onExitTutorMode, minOverlayDurationMs, backgroundColor, loadingComponent, onPageChange, className, }: TutorModeContainerProps): react_jsx_runtime.JSX.Element;
|
|
1803
1824
|
|
|
1804
1825
|
interface CinemaLayerProps {
|
|
1805
1826
|
page: PageBBoxData;
|
|
@@ -1829,13 +1850,19 @@ interface SpotlightMaskProps {
|
|
|
1829
1850
|
durationMs?: number;
|
|
1830
1851
|
}
|
|
1831
1852
|
/**
|
|
1832
|
-
*
|
|
1833
|
-
*
|
|
1834
|
-
*
|
|
1835
|
-
*
|
|
1853
|
+
* Design: **Theatrical spotlight.** A warm-ink dim (not pure black)
|
|
1854
|
+
* closes over the whole page, then a feathered cutout reveals the
|
|
1855
|
+
* target block. A thin terracotta accent ring follows the cutout shape
|
|
1856
|
+
* — the same colour used by every other overlay so the spotlit region
|
|
1857
|
+
* is clearly part of the same annotation system.
|
|
1858
|
+
*
|
|
1859
|
+
* The dim colour is warm INK (`#2a2420`) rather than `#000` so the
|
|
1860
|
+
* dimmed area looks like the PDF pushed into shadow rather than
|
|
1861
|
+
* blacked out. On light textbook pages this reads as "atmosphere"
|
|
1862
|
+
* instead of "censorship".
|
|
1836
1863
|
*
|
|
1837
|
-
*
|
|
1838
|
-
*
|
|
1864
|
+
* The accent ring animates with a slight stagger after the dim, so the
|
|
1865
|
+
* reveal has a subtle two-beat cadence: darken → point.
|
|
1839
1866
|
*/
|
|
1840
1867
|
declare function SpotlightMask({ page, bbox, action, durationMs, }: SpotlightMaskProps): react_jsx_runtime.JSX.Element;
|
|
1841
1868
|
|
|
@@ -1849,12 +1876,40 @@ interface AnimatedHighlightProps {
|
|
|
1849
1876
|
bbox: BBoxCoords;
|
|
1850
1877
|
action: ActionHighlight;
|
|
1851
1878
|
}
|
|
1879
|
+
/**
|
|
1880
|
+
* Design: **Real highlighter stroke.** A flat rectangle feels digital;
|
|
1881
|
+
* a real highlighter has fibrous texture, a soft inner + harder outer
|
|
1882
|
+
* edge, a slight over-bleed past the baseline, and visible uneven
|
|
1883
|
+
* starts/ends where the pen hit and lifted the paper.
|
|
1884
|
+
*
|
|
1885
|
+
* Implementation:
|
|
1886
|
+
* - Double-stroke — a broad soft wash behind a tighter primary stroke
|
|
1887
|
+
* so the mark has depth where they overlap.
|
|
1888
|
+
* - Slight vertical over-bleed (2–3 px above/below the bbox) so the
|
|
1889
|
+
* highlight doesn't look clipped to the text baseline.
|
|
1890
|
+
* - Rounded caps + uneven left/right ends via tapered start/finish
|
|
1891
|
+
* for the "pen hit the page" look.
|
|
1892
|
+
* - Feathered edge mask via SVG filter for the fibrous marker feel.
|
|
1893
|
+
*/
|
|
1852
1894
|
declare function AnimatedHighlight({ bbox, action }: AnimatedHighlightProps): react_jsx_runtime.JSX.Element;
|
|
1853
1895
|
|
|
1854
1896
|
interface PulseOverlayProps {
|
|
1855
1897
|
bbox: BBoxCoords;
|
|
1856
1898
|
action: ActionPulse;
|
|
1857
1899
|
}
|
|
1900
|
+
/**
|
|
1901
|
+
* Design: **Camera viewfinder brackets.** Four L-shapes slide in from
|
|
1902
|
+
* each corner of the target block, like framing crosshairs on a camera.
|
|
1903
|
+
* Behind them, a soft radial glow pulses in sync with the bracket
|
|
1904
|
+
* emphasis — a "look here" cue that points without blocking content.
|
|
1905
|
+
*
|
|
1906
|
+
* Intensity controls bracket length + stroke weight + glow strength.
|
|
1907
|
+
* `count` controls how many emphasis pulses happen before the overlay
|
|
1908
|
+
* settles.
|
|
1909
|
+
*
|
|
1910
|
+
* Brackets slide in from OUTSIDE the block then snap to the corners,
|
|
1911
|
+
* which reads as "framing" rather than the usual bordered box.
|
|
1912
|
+
*/
|
|
1858
1913
|
declare function PulseOverlay({ bbox, action }: PulseOverlayProps): react_jsx_runtime.JSX.Element;
|
|
1859
1914
|
|
|
1860
1915
|
interface CalloutArrowProps {
|
|
@@ -1862,6 +1917,17 @@ interface CalloutArrowProps {
|
|
|
1862
1917
|
toBbox: BBoxCoords;
|
|
1863
1918
|
action: ActionCallout;
|
|
1864
1919
|
}
|
|
1920
|
+
/**
|
|
1921
|
+
* Design: **Editorial connector.** Hand-drawn feel via a refined stroke
|
|
1922
|
+
* + a small origin dot at the "from" end (like a teacher's pen planted
|
|
1923
|
+
* on the page before they draw the arrow). The arrowhead is a slender
|
|
1924
|
+
* open caret rather than a heavy filled triangle — reads as annotation,
|
|
1925
|
+
* not direction-signage.
|
|
1926
|
+
*
|
|
1927
|
+
* An optional label pill rides the arrow's trailing end using the same
|
|
1928
|
+
* editorial pin language as StickyLabel (cream paper, terracotta rule,
|
|
1929
|
+
* serif small-caps). Everything uses ACCENT for colour consistency.
|
|
1930
|
+
*/
|
|
1865
1931
|
declare function CalloutArrow({ fromBbox, toBbox, action }: CalloutArrowProps): react_jsx_runtime.JSX.Element;
|
|
1866
1932
|
|
|
1867
1933
|
interface GhostReferenceProps {
|
|
@@ -1871,24 +1937,50 @@ interface GhostReferenceProps {
|
|
|
1871
1937
|
sourcePageNumber: number;
|
|
1872
1938
|
action: ActionGhostReference;
|
|
1873
1939
|
}
|
|
1874
|
-
|
|
1875
|
-
* Renders a floating "ghost" card referencing a block from another page.
|
|
1876
|
-
* Shows a minimap of the source page with the target bbox highlighted,
|
|
1877
|
-
* plus the block's text description as a caption.
|
|
1878
|
-
*/
|
|
1879
|
-
declare function GhostReference({ page, sourceBbox, sourceBlockText, sourcePageNumber, action, }: GhostReferenceProps): react_jsx_runtime.JSX.Element;
|
|
1940
|
+
declare function GhostReference({ page, sourceBbox, sourceBlockText, action, }: GhostReferenceProps): react_jsx_runtime.JSX.Element;
|
|
1880
1941
|
|
|
1881
1942
|
interface BoxOverlayProps {
|
|
1882
1943
|
bbox: BBoxCoords;
|
|
1883
1944
|
action: ActionBox;
|
|
1884
1945
|
}
|
|
1946
|
+
/**
|
|
1947
|
+
* Design: **Framed region.** A structural region marker — thinner and
|
|
1948
|
+
* more refined than the previous generic 3px coloured border. A subtle
|
|
1949
|
+
* accent-tinted wash fills the interior so the framed region reads as
|
|
1950
|
+
* "selected" even without a thick border. Dashed style uses a custom
|
|
1951
|
+
* dash pattern that matches the editorial vocabulary.
|
|
1952
|
+
*
|
|
1953
|
+
* Honours `action.color` when the LLM specifies something non-default,
|
|
1954
|
+
* otherwise falls through to the terracotta accent so boxes fit the
|
|
1955
|
+
* system.
|
|
1956
|
+
*/
|
|
1885
1957
|
declare function BoxOverlay({ bbox, action }: BoxOverlayProps): react_jsx_runtime.JSX.Element;
|
|
1886
1958
|
|
|
1887
1959
|
interface StickyLabelProps {
|
|
1888
|
-
|
|
1960
|
+
/**
|
|
1961
|
+
* Pre-computed anchor point in viewport pixels — the label will be
|
|
1962
|
+
* placed at this point and positioned relative to it via
|
|
1963
|
+
* `action.position`. See `LabelOverlay` for the coordinate math that
|
|
1964
|
+
* maps a block's bbox + camera state to this value.
|
|
1965
|
+
*/
|
|
1966
|
+
screenAnchor: {
|
|
1967
|
+
x: number;
|
|
1968
|
+
y: number;
|
|
1969
|
+
};
|
|
1889
1970
|
action: ActionLabel;
|
|
1890
1971
|
}
|
|
1891
|
-
|
|
1972
|
+
/**
|
|
1973
|
+
* Editorial annotation pin. The label body sits a short distance from
|
|
1974
|
+
* the target block, connected by a hairline stem and a small marker
|
|
1975
|
+
* disc at the anchor point. Body uses a classical serif at small-caps
|
|
1976
|
+
* sizing — feels like a scholar's tag, not a browser toast.
|
|
1977
|
+
*
|
|
1978
|
+
* Positioning math: caller pre-computes the `screenAnchor` (usually the
|
|
1979
|
+
* midpoint of the block edge the label is attached to), and this
|
|
1980
|
+
* component lays out the pin on the appropriate side via CSS translate
|
|
1981
|
+
* offsets.
|
|
1982
|
+
*/
|
|
1983
|
+
declare function StickyLabel({ screenAnchor, action }: StickyLabelProps): react_jsx_runtime.JSX.Element;
|
|
1892
1984
|
|
|
1893
1985
|
interface SubtitleBarProps {
|
|
1894
1986
|
text: string | null;
|
|
@@ -2045,14 +2137,14 @@ declare const StoryboardActionSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
|
2045
2137
|
intensity: z.ZodDefault<z.ZodEnum<["subtle", "normal", "strong"]>>;
|
|
2046
2138
|
}, "strip", z.ZodTypeAny, {
|
|
2047
2139
|
type: "pulse";
|
|
2140
|
+
intensity: "subtle" | "normal" | "strong";
|
|
2048
2141
|
target_block: string;
|
|
2049
2142
|
count: number;
|
|
2050
|
-
intensity: "subtle" | "normal" | "strong";
|
|
2051
2143
|
}, {
|
|
2052
2144
|
type: "pulse";
|
|
2053
2145
|
target_block: string;
|
|
2054
|
-
count?: number | undefined;
|
|
2055
2146
|
intensity?: "subtle" | "normal" | "strong" | undefined;
|
|
2147
|
+
count?: number | undefined;
|
|
2056
2148
|
}>, z.ZodObject<{
|
|
2057
2149
|
type: z.ZodLiteral<"callout">;
|
|
2058
2150
|
from_block: z.ZodString;
|
|
@@ -2225,14 +2317,14 @@ declare const StoryboardSchema: z.ZodObject<{
|
|
|
2225
2317
|
intensity: z.ZodDefault<z.ZodEnum<["subtle", "normal", "strong"]>>;
|
|
2226
2318
|
}, "strip", z.ZodTypeAny, {
|
|
2227
2319
|
type: "pulse";
|
|
2320
|
+
intensity: "subtle" | "normal" | "strong";
|
|
2228
2321
|
target_block: string;
|
|
2229
2322
|
count: number;
|
|
2230
|
-
intensity: "subtle" | "normal" | "strong";
|
|
2231
2323
|
}, {
|
|
2232
2324
|
type: "pulse";
|
|
2233
2325
|
target_block: string;
|
|
2234
|
-
count?: number | undefined;
|
|
2235
2326
|
intensity?: "subtle" | "normal" | "strong" | undefined;
|
|
2327
|
+
count?: number | undefined;
|
|
2236
2328
|
}>, z.ZodObject<{
|
|
2237
2329
|
type: z.ZodLiteral<"callout">;
|
|
2238
2330
|
from_block: z.ZodString;
|
|
@@ -2333,9 +2425,9 @@ declare const StoryboardSchema: z.ZodObject<{
|
|
|
2333
2425
|
draw_duration_ms: number;
|
|
2334
2426
|
} | {
|
|
2335
2427
|
type: "pulse";
|
|
2428
|
+
intensity: "subtle" | "normal" | "strong";
|
|
2336
2429
|
target_block: string;
|
|
2337
2430
|
count: number;
|
|
2338
|
-
intensity: "subtle" | "normal" | "strong";
|
|
2339
2431
|
} | {
|
|
2340
2432
|
type: "callout";
|
|
2341
2433
|
curve: "straight" | "curved" | "zigzag";
|
|
@@ -2391,8 +2483,8 @@ declare const StoryboardSchema: z.ZodObject<{
|
|
|
2391
2483
|
} | {
|
|
2392
2484
|
type: "pulse";
|
|
2393
2485
|
target_block: string;
|
|
2394
|
-
count?: number | undefined;
|
|
2395
2486
|
intensity?: "subtle" | "normal" | "strong" | undefined;
|
|
2487
|
+
count?: number | undefined;
|
|
2396
2488
|
} | {
|
|
2397
2489
|
type: "callout";
|
|
2398
2490
|
from_block: string;
|
|
@@ -2451,9 +2543,9 @@ declare const StoryboardSchema: z.ZodObject<{
|
|
|
2451
2543
|
draw_duration_ms: number;
|
|
2452
2544
|
} | {
|
|
2453
2545
|
type: "pulse";
|
|
2546
|
+
intensity: "subtle" | "normal" | "strong";
|
|
2454
2547
|
target_block: string;
|
|
2455
2548
|
count: number;
|
|
2456
|
-
intensity: "subtle" | "normal" | "strong";
|
|
2457
2549
|
} | {
|
|
2458
2550
|
type: "callout";
|
|
2459
2551
|
curve: "straight" | "curved" | "zigzag";
|
|
@@ -2512,8 +2604,8 @@ declare const StoryboardSchema: z.ZodObject<{
|
|
|
2512
2604
|
} | {
|
|
2513
2605
|
type: "pulse";
|
|
2514
2606
|
target_block: string;
|
|
2515
|
-
count?: number | undefined;
|
|
2516
2607
|
intensity?: "subtle" | "normal" | "strong" | undefined;
|
|
2608
|
+
count?: number | undefined;
|
|
2517
2609
|
} | {
|
|
2518
2610
|
type: "callout";
|
|
2519
2611
|
from_block: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1795,11 +1795,32 @@ interface TutorModeContainerProps {
|
|
|
1795
1795
|
* the `backgroundColor` surround.
|
|
1796
1796
|
*/
|
|
1797
1797
|
loadingComponent?: react__default.ReactNode;
|
|
1798
|
+
/**
|
|
1799
|
+
* Fired when the underlying viewer's page changes from any source — the
|
|
1800
|
+
* agent API (`agentTools.goToPage / nextPage / previousPage`), the sidebar
|
|
1801
|
+
* (bookmarks, thumbnails, search), or a programmatic
|
|
1802
|
+
* `useViewerStore().goToPage` call. Use this to keep your own
|
|
1803
|
+
* `pageNumber` state (the controlled prop you pass in) in lockstep with
|
|
1804
|
+
* the viewer, so agent-driven navigation actually moves the rendered
|
|
1805
|
+
* page and downstream concerns (progress save, recap, etc.) see the
|
|
1806
|
+
* right value.
|
|
1807
|
+
*
|
|
1808
|
+
* ```tsx
|
|
1809
|
+
* const [currentPage, setCurrentPage] = useState(1);
|
|
1810
|
+
* <TutorModeContainer
|
|
1811
|
+
* pageNumber={currentPage}
|
|
1812
|
+
* onPageChange={setCurrentPage} // ← bidirectional sync
|
|
1813
|
+
* />
|
|
1814
|
+
* ```
|
|
1815
|
+
*
|
|
1816
|
+
* Added in v0.4.2.
|
|
1817
|
+
*/
|
|
1818
|
+
onPageChange?: (page: number) => void;
|
|
1798
1819
|
className?: string;
|
|
1799
1820
|
}
|
|
1800
1821
|
/** Build a cross-page/block index from the raw bbox list. */
|
|
1801
1822
|
declare function buildBBoxIndex(bboxData: PageBBoxData[]): BBoxIndex;
|
|
1802
|
-
declare function TutorModeContainer({ pageNumber, bboxData, narrationStore, scale, rotation, currentChunk, llm, idleTimeoutMs, llmTimeoutMs, embeddingProvider, showSubtitles, showExitButton, onExitTutorMode, minOverlayDurationMs, backgroundColor, loadingComponent, className, }: TutorModeContainerProps): react_jsx_runtime.JSX.Element;
|
|
1823
|
+
declare function TutorModeContainer({ pageNumber, bboxData, narrationStore, scale, rotation, currentChunk, llm, idleTimeoutMs, llmTimeoutMs, embeddingProvider, showSubtitles, showExitButton, onExitTutorMode, minOverlayDurationMs, backgroundColor, loadingComponent, onPageChange, className, }: TutorModeContainerProps): react_jsx_runtime.JSX.Element;
|
|
1803
1824
|
|
|
1804
1825
|
interface CinemaLayerProps {
|
|
1805
1826
|
page: PageBBoxData;
|
|
@@ -1829,13 +1850,19 @@ interface SpotlightMaskProps {
|
|
|
1829
1850
|
durationMs?: number;
|
|
1830
1851
|
}
|
|
1831
1852
|
/**
|
|
1832
|
-
*
|
|
1833
|
-
*
|
|
1834
|
-
*
|
|
1835
|
-
*
|
|
1853
|
+
* Design: **Theatrical spotlight.** A warm-ink dim (not pure black)
|
|
1854
|
+
* closes over the whole page, then a feathered cutout reveals the
|
|
1855
|
+
* target block. A thin terracotta accent ring follows the cutout shape
|
|
1856
|
+
* — the same colour used by every other overlay so the spotlit region
|
|
1857
|
+
* is clearly part of the same annotation system.
|
|
1858
|
+
*
|
|
1859
|
+
* The dim colour is warm INK (`#2a2420`) rather than `#000` so the
|
|
1860
|
+
* dimmed area looks like the PDF pushed into shadow rather than
|
|
1861
|
+
* blacked out. On light textbook pages this reads as "atmosphere"
|
|
1862
|
+
* instead of "censorship".
|
|
1836
1863
|
*
|
|
1837
|
-
*
|
|
1838
|
-
*
|
|
1864
|
+
* The accent ring animates with a slight stagger after the dim, so the
|
|
1865
|
+
* reveal has a subtle two-beat cadence: darken → point.
|
|
1839
1866
|
*/
|
|
1840
1867
|
declare function SpotlightMask({ page, bbox, action, durationMs, }: SpotlightMaskProps): react_jsx_runtime.JSX.Element;
|
|
1841
1868
|
|
|
@@ -1849,12 +1876,40 @@ interface AnimatedHighlightProps {
|
|
|
1849
1876
|
bbox: BBoxCoords;
|
|
1850
1877
|
action: ActionHighlight;
|
|
1851
1878
|
}
|
|
1879
|
+
/**
|
|
1880
|
+
* Design: **Real highlighter stroke.** A flat rectangle feels digital;
|
|
1881
|
+
* a real highlighter has fibrous texture, a soft inner + harder outer
|
|
1882
|
+
* edge, a slight over-bleed past the baseline, and visible uneven
|
|
1883
|
+
* starts/ends where the pen hit and lifted the paper.
|
|
1884
|
+
*
|
|
1885
|
+
* Implementation:
|
|
1886
|
+
* - Double-stroke — a broad soft wash behind a tighter primary stroke
|
|
1887
|
+
* so the mark has depth where they overlap.
|
|
1888
|
+
* - Slight vertical over-bleed (2–3 px above/below the bbox) so the
|
|
1889
|
+
* highlight doesn't look clipped to the text baseline.
|
|
1890
|
+
* - Rounded caps + uneven left/right ends via tapered start/finish
|
|
1891
|
+
* for the "pen hit the page" look.
|
|
1892
|
+
* - Feathered edge mask via SVG filter for the fibrous marker feel.
|
|
1893
|
+
*/
|
|
1852
1894
|
declare function AnimatedHighlight({ bbox, action }: AnimatedHighlightProps): react_jsx_runtime.JSX.Element;
|
|
1853
1895
|
|
|
1854
1896
|
interface PulseOverlayProps {
|
|
1855
1897
|
bbox: BBoxCoords;
|
|
1856
1898
|
action: ActionPulse;
|
|
1857
1899
|
}
|
|
1900
|
+
/**
|
|
1901
|
+
* Design: **Camera viewfinder brackets.** Four L-shapes slide in from
|
|
1902
|
+
* each corner of the target block, like framing crosshairs on a camera.
|
|
1903
|
+
* Behind them, a soft radial glow pulses in sync with the bracket
|
|
1904
|
+
* emphasis — a "look here" cue that points without blocking content.
|
|
1905
|
+
*
|
|
1906
|
+
* Intensity controls bracket length + stroke weight + glow strength.
|
|
1907
|
+
* `count` controls how many emphasis pulses happen before the overlay
|
|
1908
|
+
* settles.
|
|
1909
|
+
*
|
|
1910
|
+
* Brackets slide in from OUTSIDE the block then snap to the corners,
|
|
1911
|
+
* which reads as "framing" rather than the usual bordered box.
|
|
1912
|
+
*/
|
|
1858
1913
|
declare function PulseOverlay({ bbox, action }: PulseOverlayProps): react_jsx_runtime.JSX.Element;
|
|
1859
1914
|
|
|
1860
1915
|
interface CalloutArrowProps {
|
|
@@ -1862,6 +1917,17 @@ interface CalloutArrowProps {
|
|
|
1862
1917
|
toBbox: BBoxCoords;
|
|
1863
1918
|
action: ActionCallout;
|
|
1864
1919
|
}
|
|
1920
|
+
/**
|
|
1921
|
+
* Design: **Editorial connector.** Hand-drawn feel via a refined stroke
|
|
1922
|
+
* + a small origin dot at the "from" end (like a teacher's pen planted
|
|
1923
|
+
* on the page before they draw the arrow). The arrowhead is a slender
|
|
1924
|
+
* open caret rather than a heavy filled triangle — reads as annotation,
|
|
1925
|
+
* not direction-signage.
|
|
1926
|
+
*
|
|
1927
|
+
* An optional label pill rides the arrow's trailing end using the same
|
|
1928
|
+
* editorial pin language as StickyLabel (cream paper, terracotta rule,
|
|
1929
|
+
* serif small-caps). Everything uses ACCENT for colour consistency.
|
|
1930
|
+
*/
|
|
1865
1931
|
declare function CalloutArrow({ fromBbox, toBbox, action }: CalloutArrowProps): react_jsx_runtime.JSX.Element;
|
|
1866
1932
|
|
|
1867
1933
|
interface GhostReferenceProps {
|
|
@@ -1871,24 +1937,50 @@ interface GhostReferenceProps {
|
|
|
1871
1937
|
sourcePageNumber: number;
|
|
1872
1938
|
action: ActionGhostReference;
|
|
1873
1939
|
}
|
|
1874
|
-
|
|
1875
|
-
* Renders a floating "ghost" card referencing a block from another page.
|
|
1876
|
-
* Shows a minimap of the source page with the target bbox highlighted,
|
|
1877
|
-
* plus the block's text description as a caption.
|
|
1878
|
-
*/
|
|
1879
|
-
declare function GhostReference({ page, sourceBbox, sourceBlockText, sourcePageNumber, action, }: GhostReferenceProps): react_jsx_runtime.JSX.Element;
|
|
1940
|
+
declare function GhostReference({ page, sourceBbox, sourceBlockText, action, }: GhostReferenceProps): react_jsx_runtime.JSX.Element;
|
|
1880
1941
|
|
|
1881
1942
|
interface BoxOverlayProps {
|
|
1882
1943
|
bbox: BBoxCoords;
|
|
1883
1944
|
action: ActionBox;
|
|
1884
1945
|
}
|
|
1946
|
+
/**
|
|
1947
|
+
* Design: **Framed region.** A structural region marker — thinner and
|
|
1948
|
+
* more refined than the previous generic 3px coloured border. A subtle
|
|
1949
|
+
* accent-tinted wash fills the interior so the framed region reads as
|
|
1950
|
+
* "selected" even without a thick border. Dashed style uses a custom
|
|
1951
|
+
* dash pattern that matches the editorial vocabulary.
|
|
1952
|
+
*
|
|
1953
|
+
* Honours `action.color` when the LLM specifies something non-default,
|
|
1954
|
+
* otherwise falls through to the terracotta accent so boxes fit the
|
|
1955
|
+
* system.
|
|
1956
|
+
*/
|
|
1885
1957
|
declare function BoxOverlay({ bbox, action }: BoxOverlayProps): react_jsx_runtime.JSX.Element;
|
|
1886
1958
|
|
|
1887
1959
|
interface StickyLabelProps {
|
|
1888
|
-
|
|
1960
|
+
/**
|
|
1961
|
+
* Pre-computed anchor point in viewport pixels — the label will be
|
|
1962
|
+
* placed at this point and positioned relative to it via
|
|
1963
|
+
* `action.position`. See `LabelOverlay` for the coordinate math that
|
|
1964
|
+
* maps a block's bbox + camera state to this value.
|
|
1965
|
+
*/
|
|
1966
|
+
screenAnchor: {
|
|
1967
|
+
x: number;
|
|
1968
|
+
y: number;
|
|
1969
|
+
};
|
|
1889
1970
|
action: ActionLabel;
|
|
1890
1971
|
}
|
|
1891
|
-
|
|
1972
|
+
/**
|
|
1973
|
+
* Editorial annotation pin. The label body sits a short distance from
|
|
1974
|
+
* the target block, connected by a hairline stem and a small marker
|
|
1975
|
+
* disc at the anchor point. Body uses a classical serif at small-caps
|
|
1976
|
+
* sizing — feels like a scholar's tag, not a browser toast.
|
|
1977
|
+
*
|
|
1978
|
+
* Positioning math: caller pre-computes the `screenAnchor` (usually the
|
|
1979
|
+
* midpoint of the block edge the label is attached to), and this
|
|
1980
|
+
* component lays out the pin on the appropriate side via CSS translate
|
|
1981
|
+
* offsets.
|
|
1982
|
+
*/
|
|
1983
|
+
declare function StickyLabel({ screenAnchor, action }: StickyLabelProps): react_jsx_runtime.JSX.Element;
|
|
1892
1984
|
|
|
1893
1985
|
interface SubtitleBarProps {
|
|
1894
1986
|
text: string | null;
|
|
@@ -2045,14 +2137,14 @@ declare const StoryboardActionSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
|
2045
2137
|
intensity: z.ZodDefault<z.ZodEnum<["subtle", "normal", "strong"]>>;
|
|
2046
2138
|
}, "strip", z.ZodTypeAny, {
|
|
2047
2139
|
type: "pulse";
|
|
2140
|
+
intensity: "subtle" | "normal" | "strong";
|
|
2048
2141
|
target_block: string;
|
|
2049
2142
|
count: number;
|
|
2050
|
-
intensity: "subtle" | "normal" | "strong";
|
|
2051
2143
|
}, {
|
|
2052
2144
|
type: "pulse";
|
|
2053
2145
|
target_block: string;
|
|
2054
|
-
count?: number | undefined;
|
|
2055
2146
|
intensity?: "subtle" | "normal" | "strong" | undefined;
|
|
2147
|
+
count?: number | undefined;
|
|
2056
2148
|
}>, z.ZodObject<{
|
|
2057
2149
|
type: z.ZodLiteral<"callout">;
|
|
2058
2150
|
from_block: z.ZodString;
|
|
@@ -2225,14 +2317,14 @@ declare const StoryboardSchema: z.ZodObject<{
|
|
|
2225
2317
|
intensity: z.ZodDefault<z.ZodEnum<["subtle", "normal", "strong"]>>;
|
|
2226
2318
|
}, "strip", z.ZodTypeAny, {
|
|
2227
2319
|
type: "pulse";
|
|
2320
|
+
intensity: "subtle" | "normal" | "strong";
|
|
2228
2321
|
target_block: string;
|
|
2229
2322
|
count: number;
|
|
2230
|
-
intensity: "subtle" | "normal" | "strong";
|
|
2231
2323
|
}, {
|
|
2232
2324
|
type: "pulse";
|
|
2233
2325
|
target_block: string;
|
|
2234
|
-
count?: number | undefined;
|
|
2235
2326
|
intensity?: "subtle" | "normal" | "strong" | undefined;
|
|
2327
|
+
count?: number | undefined;
|
|
2236
2328
|
}>, z.ZodObject<{
|
|
2237
2329
|
type: z.ZodLiteral<"callout">;
|
|
2238
2330
|
from_block: z.ZodString;
|
|
@@ -2333,9 +2425,9 @@ declare const StoryboardSchema: z.ZodObject<{
|
|
|
2333
2425
|
draw_duration_ms: number;
|
|
2334
2426
|
} | {
|
|
2335
2427
|
type: "pulse";
|
|
2428
|
+
intensity: "subtle" | "normal" | "strong";
|
|
2336
2429
|
target_block: string;
|
|
2337
2430
|
count: number;
|
|
2338
|
-
intensity: "subtle" | "normal" | "strong";
|
|
2339
2431
|
} | {
|
|
2340
2432
|
type: "callout";
|
|
2341
2433
|
curve: "straight" | "curved" | "zigzag";
|
|
@@ -2391,8 +2483,8 @@ declare const StoryboardSchema: z.ZodObject<{
|
|
|
2391
2483
|
} | {
|
|
2392
2484
|
type: "pulse";
|
|
2393
2485
|
target_block: string;
|
|
2394
|
-
count?: number | undefined;
|
|
2395
2486
|
intensity?: "subtle" | "normal" | "strong" | undefined;
|
|
2487
|
+
count?: number | undefined;
|
|
2396
2488
|
} | {
|
|
2397
2489
|
type: "callout";
|
|
2398
2490
|
from_block: string;
|
|
@@ -2451,9 +2543,9 @@ declare const StoryboardSchema: z.ZodObject<{
|
|
|
2451
2543
|
draw_duration_ms: number;
|
|
2452
2544
|
} | {
|
|
2453
2545
|
type: "pulse";
|
|
2546
|
+
intensity: "subtle" | "normal" | "strong";
|
|
2454
2547
|
target_block: string;
|
|
2455
2548
|
count: number;
|
|
2456
|
-
intensity: "subtle" | "normal" | "strong";
|
|
2457
2549
|
} | {
|
|
2458
2550
|
type: "callout";
|
|
2459
2551
|
curve: "straight" | "curved" | "zigzag";
|
|
@@ -2512,8 +2604,8 @@ declare const StoryboardSchema: z.ZodObject<{
|
|
|
2512
2604
|
} | {
|
|
2513
2605
|
type: "pulse";
|
|
2514
2606
|
target_block: string;
|
|
2515
|
-
count?: number | undefined;
|
|
2516
2607
|
intensity?: "subtle" | "normal" | "strong" | undefined;
|
|
2608
|
+
count?: number | undefined;
|
|
2517
2609
|
} | {
|
|
2518
2610
|
type: "callout";
|
|
2519
2611
|
from_block: string;
|