@semiont/core 0.2.35-build.99 → 0.2.36
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 +1 -1
- package/dist/index.d.ts +156 -163
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -279,7 +279,7 @@ Semiont follows a **spec-first architecture**:
|
|
|
279
279
|
- HTTP client & convenience re-exports → `@semiont/api-client`
|
|
280
280
|
- Backend internal implementation → imports from `@semiont/core`
|
|
281
281
|
|
|
282
|
-
**Type
|
|
282
|
+
**Type Yield Flow**: OpenAPI spec → `@semiont/core/src/types.ts` (via `openapi-typescript`) → re-exported by `@semiont/api-client` for convenience. This ensures no circular dependencies and clear build order.
|
|
283
283
|
|
|
284
284
|
## Development
|
|
285
285
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2002,7 +2002,7 @@ interface paths {
|
|
|
2002
2002
|
patch?: never;
|
|
2003
2003
|
trace?: never;
|
|
2004
2004
|
};
|
|
2005
|
-
"/resources/{resourceId}/annotations/{annotationId}/
|
|
2005
|
+
"/resources/{resourceId}/annotations/{annotationId}/yield-resource-stream": {
|
|
2006
2006
|
parameters: {
|
|
2007
2007
|
query?: never;
|
|
2008
2008
|
header?: never;
|
|
@@ -2029,7 +2029,7 @@ interface paths {
|
|
|
2029
2029
|
};
|
|
2030
2030
|
requestBody?: {
|
|
2031
2031
|
content: {
|
|
2032
|
-
"application/json": components["schemas"]["
|
|
2032
|
+
"application/json": components["schemas"]["YieldResourceStreamRequest"];
|
|
2033
2033
|
};
|
|
2034
2034
|
};
|
|
2035
2035
|
responses: {
|
|
@@ -2374,13 +2374,13 @@ interface components {
|
|
|
2374
2374
|
/**
|
|
2375
2375
|
* @description W3C Web Annotation JSON-LD context
|
|
2376
2376
|
* @default http://www.w3.org/ns/anno.jsonld
|
|
2377
|
-
* @
|
|
2377
|
+
* @enum {string}
|
|
2378
2378
|
*/
|
|
2379
2379
|
"@context": "http://www.w3.org/ns/anno.jsonld";
|
|
2380
2380
|
/**
|
|
2381
2381
|
* @description W3C Annotation type
|
|
2382
2382
|
* @default Annotation
|
|
2383
|
-
* @
|
|
2383
|
+
* @enum {string}
|
|
2384
2384
|
*/
|
|
2385
2385
|
type: "Annotation";
|
|
2386
2386
|
id: string;
|
|
@@ -2410,7 +2410,7 @@ interface components {
|
|
|
2410
2410
|
sourceResource: components["schemas"]["ResourceDescriptor"];
|
|
2411
2411
|
targetResource?: components["schemas"]["ResourceDescriptor"] | null;
|
|
2412
2412
|
/** @description Generation context for this annotation */
|
|
2413
|
-
context?: components["schemas"]["
|
|
2413
|
+
context?: components["schemas"]["YieldContext"];
|
|
2414
2414
|
/** @description DEPRECATED: Use 'context' instead. Legacy source context format. */
|
|
2415
2415
|
sourceContext?: {
|
|
2416
2416
|
before: string;
|
|
@@ -2457,17 +2457,17 @@ interface components {
|
|
|
2457
2457
|
isNewUser: boolean;
|
|
2458
2458
|
};
|
|
2459
2459
|
BodyOperationAdd: {
|
|
2460
|
-
/** @
|
|
2460
|
+
/** @enum {string} */
|
|
2461
2461
|
op: "add";
|
|
2462
2462
|
item: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
|
|
2463
2463
|
};
|
|
2464
2464
|
BodyOperationRemove: {
|
|
2465
|
-
/** @
|
|
2465
|
+
/** @enum {string} */
|
|
2466
2466
|
op: "remove";
|
|
2467
2467
|
item: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
|
|
2468
2468
|
};
|
|
2469
2469
|
BodyOperationReplace: {
|
|
2470
|
-
/** @
|
|
2470
|
+
/** @enum {string} */
|
|
2471
2471
|
op: "replace";
|
|
2472
2472
|
oldItem: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
|
|
2473
2473
|
newItem: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
|
|
@@ -2488,15 +2488,8 @@ interface components {
|
|
|
2488
2488
|
resource: components["schemas"]["ResourceDescriptor"];
|
|
2489
2489
|
};
|
|
2490
2490
|
/**
|
|
2491
|
-
* @description Content format as MIME type, optionally with charset parameter
|
|
2492
|
-
* @example text/plain
|
|
2491
|
+
* @description Content format as MIME type, optionally with charset parameter. Values include: text/plain, text/plain; charset=utf-8, text/plain; charset=iso-8859-1, text/markdown, text/markdown; charset=windows-1252, image/png, image/jpeg, application/pdf
|
|
2493
2492
|
* @example text/plain; charset=utf-8
|
|
2494
|
-
* @example text/plain; charset=iso-8859-1
|
|
2495
|
-
* @example text/markdown
|
|
2496
|
-
* @example text/markdown; charset=windows-1252
|
|
2497
|
-
* @example image/png
|
|
2498
|
-
* @example image/jpeg
|
|
2499
|
-
* @example application/pdf
|
|
2500
2493
|
*/
|
|
2501
2494
|
ContentFormat: string;
|
|
2502
2495
|
ContextualSummaryResponse: {
|
|
@@ -2663,7 +2656,7 @@ interface components {
|
|
|
2663
2656
|
data: string;
|
|
2664
2657
|
id?: string;
|
|
2665
2658
|
};
|
|
2666
|
-
|
|
2659
|
+
YieldResourceFromAnnotationRequest: {
|
|
2667
2660
|
/** @description Optional name for the generated resource */
|
|
2668
2661
|
name?: string;
|
|
2669
2662
|
/** @description Entity types for the generated resource */
|
|
@@ -2673,12 +2666,12 @@ interface components {
|
|
|
2673
2666
|
/** @description Language code (e.g., 'en', 'es') */
|
|
2674
2667
|
language?: string;
|
|
2675
2668
|
};
|
|
2676
|
-
|
|
2669
|
+
YieldResourceFromAnnotationResponse: {
|
|
2677
2670
|
resource: components["schemas"]["ResourceDescriptor"];
|
|
2678
2671
|
annotation: components["schemas"]["Annotation"];
|
|
2679
2672
|
generated: boolean;
|
|
2680
2673
|
};
|
|
2681
|
-
|
|
2674
|
+
YieldResourceRequest: {
|
|
2682
2675
|
/** @description Resource ID containing the annotation */
|
|
2683
2676
|
resourceId: string;
|
|
2684
2677
|
/** @description Custom title for generated resource */
|
|
@@ -2688,7 +2681,7 @@ interface components {
|
|
|
2688
2681
|
/** @description Language locale (e.g., "es", "fr", "ja") */
|
|
2689
2682
|
language?: string;
|
|
2690
2683
|
};
|
|
2691
|
-
|
|
2684
|
+
YieldResourceStreamRequest: {
|
|
2692
2685
|
/** @description Custom title for generated resource */
|
|
2693
2686
|
title?: string;
|
|
2694
2687
|
/** @description Custom prompt for content generation */
|
|
@@ -2696,7 +2689,7 @@ interface components {
|
|
|
2696
2689
|
/** @description Language locale for generated content (e.g., "es", "fr", "ja") */
|
|
2697
2690
|
language?: string;
|
|
2698
2691
|
/** @description Generation context including source document excerpts and metadata */
|
|
2699
|
-
context: components["schemas"]["
|
|
2692
|
+
context: components["schemas"]["YieldContext"];
|
|
2700
2693
|
/** @description Inference temperature (0.0 = focused, 1.0 = creative) */
|
|
2701
2694
|
temperature?: number;
|
|
2702
2695
|
/** @description Maximum tokens to generate */
|
|
@@ -2926,11 +2919,11 @@ interface components {
|
|
|
2926
2919
|
} & {
|
|
2927
2920
|
[key: string]: unknown;
|
|
2928
2921
|
};
|
|
2929
|
-
|
|
2922
|
+
BindAnnotationRequest: {
|
|
2930
2923
|
/** @description Target resource ID to resolve reference to */
|
|
2931
2924
|
resourceId: string;
|
|
2932
2925
|
};
|
|
2933
|
-
|
|
2926
|
+
BindAnnotationResponse: {
|
|
2934
2927
|
annotation: components["schemas"]["Annotation"];
|
|
2935
2928
|
targetResource?: components["schemas"]["ResourceDescriptor"] | null;
|
|
2936
2929
|
};
|
|
@@ -3033,7 +3026,7 @@ interface components {
|
|
|
3033
3026
|
};
|
|
3034
3027
|
};
|
|
3035
3028
|
SpecificResource: {
|
|
3036
|
-
/** @
|
|
3029
|
+
/** @enum {string} */
|
|
3037
3030
|
type: "SpecificResource";
|
|
3038
3031
|
/** @description IRI of the target resource */
|
|
3039
3032
|
source: string;
|
|
@@ -3067,7 +3060,7 @@ interface components {
|
|
|
3067
3060
|
suffix?: string;
|
|
3068
3061
|
};
|
|
3069
3062
|
TextualBody: {
|
|
3070
|
-
/** @
|
|
3063
|
+
/** @enum {string} */
|
|
3071
3064
|
type: "TextualBody";
|
|
3072
3065
|
/** @description The text content (e.g., entity type name) */
|
|
3073
3066
|
value: string;
|
|
@@ -3148,7 +3141,6 @@ interface components {
|
|
|
3148
3141
|
/**
|
|
3149
3142
|
* @description Media fragment identifier (e.g., 'page=1&viewrect=100,200,50,30' for PDF)
|
|
3150
3143
|
* @example page=1&viewrect=100,200,50,30
|
|
3151
|
-
* @example page=5&viewrect=250,400,100,75
|
|
3152
3144
|
*/
|
|
3153
3145
|
value: string;
|
|
3154
3146
|
/**
|
|
@@ -3158,7 +3150,7 @@ interface components {
|
|
|
3158
3150
|
conformsTo?: string;
|
|
3159
3151
|
};
|
|
3160
3152
|
/** @description Context information used for AI generation. Includes source document excerpts and metadata. */
|
|
3161
|
-
|
|
3153
|
+
YieldContext: {
|
|
3162
3154
|
/** @description Text context from the source document */
|
|
3163
3155
|
sourceContext: {
|
|
3164
3156
|
/** @description Text appearing before the selected passage */
|
|
@@ -3696,13 +3688,13 @@ declare function isResourceEvent(event: any): event is StoredEvent;
|
|
|
3696
3688
|
*/
|
|
3697
3689
|
|
|
3698
3690
|
type Selector = components['schemas']['TextPositionSelector'] | components['schemas']['TextQuoteSelector'] | components['schemas']['SvgSelector'] | components['schemas']['FragmentSelector'];
|
|
3699
|
-
type
|
|
3691
|
+
type YieldContext = components['schemas']['YieldContext'];
|
|
3700
3692
|
type Annotation$2 = components['schemas']['Annotation'];
|
|
3701
3693
|
type Motivation = components['schemas']['Motivation'];
|
|
3702
3694
|
/**
|
|
3703
|
-
* Progress state for resource
|
|
3695
|
+
* Progress state for resource yield workflow
|
|
3704
3696
|
*/
|
|
3705
|
-
interface
|
|
3697
|
+
interface YieldProgress {
|
|
3706
3698
|
status: 'started' | 'fetching' | 'generating' | 'creating' | 'complete' | 'error';
|
|
3707
3699
|
referenceId: string;
|
|
3708
3700
|
resourceName?: string;
|
|
@@ -3725,13 +3717,13 @@ interface SelectionData {
|
|
|
3725
3717
|
suffix?: string;
|
|
3726
3718
|
}
|
|
3727
3719
|
/**
|
|
3728
|
-
* Progress state for
|
|
3720
|
+
* Progress state for mark workflows (manual and assisted)
|
|
3729
3721
|
*
|
|
3730
3722
|
* Unified progress interface supporting different annotation strategies:
|
|
3731
3723
|
* - Reference annotation: entity-type steps
|
|
3732
3724
|
* - Other motivations: percentage-based progress
|
|
3733
3725
|
*/
|
|
3734
|
-
interface
|
|
3726
|
+
interface MarkProgress {
|
|
3735
3727
|
status: string;
|
|
3736
3728
|
message?: string;
|
|
3737
3729
|
/** Reference annotation: currently scanning entity type */
|
|
@@ -3757,68 +3749,76 @@ interface AnnotationProgress {
|
|
|
3757
3749
|
* Unified event map for all application events
|
|
3758
3750
|
*
|
|
3759
3751
|
* Organized by workflow ("flows"):
|
|
3760
|
-
* 1.
|
|
3761
|
-
* 2.
|
|
3762
|
-
* 3.
|
|
3763
|
-
* 4.
|
|
3764
|
-
* 5.
|
|
3752
|
+
* 1. Yield Flow - Resource generation from references
|
|
3753
|
+
* 2. Mark Flow - Manual + AI-assisted annotation (all motivations)
|
|
3754
|
+
* 3. Bind Flow - Reference linking/resolution (search modal)
|
|
3755
|
+
* 4. Gather Flow - LLM context fetching from annotations
|
|
3756
|
+
* 5. Browse Flow - Panel, sidebar, and application routing
|
|
3757
|
+
* 6. Beckon Flow - Annotation hover/focus/sparkle coordination
|
|
3765
3758
|
*
|
|
3766
|
-
* Plus infrastructure events (domain events, SSE, resource operations,
|
|
3759
|
+
* Plus infrastructure events (domain events, SSE, resource operations, settings)
|
|
3767
3760
|
*/
|
|
3768
3761
|
type EventMap = {
|
|
3769
3762
|
'make-meaning:event': ResourceEvent;
|
|
3770
|
-
'
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
annotationId: string;
|
|
3775
|
-
motivation: Motivation;
|
|
3776
|
-
};
|
|
3777
|
-
'attend:focus': {
|
|
3778
|
-
annotationId: string | null;
|
|
3779
|
-
};
|
|
3780
|
-
'attend:sparkle': {
|
|
3781
|
-
annotationId: string;
|
|
3763
|
+
'yield:modal-open': {
|
|
3764
|
+
annotationUri: string;
|
|
3765
|
+
resourceUri: string;
|
|
3766
|
+
defaultTitle: string;
|
|
3782
3767
|
};
|
|
3783
|
-
'
|
|
3784
|
-
|
|
3768
|
+
'yield:request': {
|
|
3769
|
+
annotationUri: string;
|
|
3770
|
+
resourceUri: string;
|
|
3771
|
+
options: {
|
|
3772
|
+
title: string;
|
|
3773
|
+
prompt?: string;
|
|
3774
|
+
language?: string;
|
|
3775
|
+
temperature?: number;
|
|
3776
|
+
maxTokens?: number;
|
|
3777
|
+
context: YieldContext;
|
|
3778
|
+
};
|
|
3785
3779
|
};
|
|
3786
|
-
'
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3780
|
+
'yield:progress': YieldProgress;
|
|
3781
|
+
'yield:finished': YieldProgress;
|
|
3782
|
+
'yield:failed': {
|
|
3783
|
+
error: Error;
|
|
3790
3784
|
};
|
|
3791
|
-
'
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
'
|
|
3795
|
-
|
|
3796
|
-
|
|
3785
|
+
'yield:representation-added': Extract<ResourceEvent, {
|
|
3786
|
+
type: 'representation.added';
|
|
3787
|
+
}>;
|
|
3788
|
+
'yield:representation-removed': Extract<ResourceEvent, {
|
|
3789
|
+
type: 'representation.removed';
|
|
3790
|
+
}>;
|
|
3791
|
+
'yield:clone': void;
|
|
3792
|
+
'mark:select-comment': SelectionData;
|
|
3793
|
+
'mark:select-tag': SelectionData;
|
|
3794
|
+
'mark:select-assessment': SelectionData;
|
|
3795
|
+
'mark:select-reference': SelectionData;
|
|
3796
|
+
'mark:requested': {
|
|
3797
3797
|
selector: Selector | Selector[];
|
|
3798
3798
|
motivation: Motivation;
|
|
3799
3799
|
};
|
|
3800
|
-
'
|
|
3801
|
-
'
|
|
3800
|
+
'mark:cancel-pending': void;
|
|
3801
|
+
'mark:create': {
|
|
3802
3802
|
motivation: Motivation;
|
|
3803
3803
|
selector: Selector | Selector[];
|
|
3804
3804
|
body: components['schemas']['AnnotationBody'][];
|
|
3805
3805
|
};
|
|
3806
|
-
'
|
|
3806
|
+
'mark:created': {
|
|
3807
3807
|
annotation: Annotation$2;
|
|
3808
3808
|
};
|
|
3809
|
-
'
|
|
3809
|
+
'mark:create-failed': {
|
|
3810
3810
|
error: Error;
|
|
3811
3811
|
};
|
|
3812
|
-
'
|
|
3812
|
+
'mark:delete': {
|
|
3813
3813
|
annotationId: string;
|
|
3814
3814
|
};
|
|
3815
|
-
'
|
|
3815
|
+
'mark:deleted': {
|
|
3816
3816
|
annotationId: string;
|
|
3817
3817
|
};
|
|
3818
|
-
'
|
|
3818
|
+
'mark:delete-failed': {
|
|
3819
3819
|
error: Error;
|
|
3820
3820
|
};
|
|
3821
|
-
'
|
|
3821
|
+
'mark:assist-request': {
|
|
3822
3822
|
motivation: Motivation;
|
|
3823
3823
|
options: {
|
|
3824
3824
|
instructions?: string;
|
|
@@ -3830,56 +3830,64 @@ type EventMap = {
|
|
|
3830
3830
|
categories?: string[];
|
|
3831
3831
|
};
|
|
3832
3832
|
};
|
|
3833
|
-
'
|
|
3834
|
-
'
|
|
3833
|
+
'mark:progress': MarkProgress;
|
|
3834
|
+
'mark:assist-finished': {
|
|
3835
3835
|
motivation?: Motivation;
|
|
3836
3836
|
resourceUri?: ResourceUri;
|
|
3837
|
-
progress?:
|
|
3837
|
+
progress?: MarkProgress;
|
|
3838
3838
|
};
|
|
3839
|
-
'
|
|
3839
|
+
'mark:assist-failed': Extract<ResourceEvent, {
|
|
3840
3840
|
type: 'job.failed';
|
|
3841
3841
|
}>;
|
|
3842
|
-
'
|
|
3843
|
-
'
|
|
3844
|
-
'
|
|
3845
|
-
'
|
|
3842
|
+
'mark:assist-cancelled': void;
|
|
3843
|
+
'mark:progress-dismiss': void;
|
|
3844
|
+
'mark:mode-toggled': void;
|
|
3845
|
+
'mark:selection-changed': {
|
|
3846
3846
|
motivation: string | null;
|
|
3847
3847
|
};
|
|
3848
|
-
'
|
|
3848
|
+
'mark:click-changed': {
|
|
3849
3849
|
action: string;
|
|
3850
3850
|
};
|
|
3851
|
-
'
|
|
3851
|
+
'mark:shape-changed': {
|
|
3852
3852
|
shape: string;
|
|
3853
3853
|
};
|
|
3854
|
-
'
|
|
3854
|
+
'mark:added': Extract<ResourceEvent, {
|
|
3855
3855
|
type: 'annotation.added';
|
|
3856
3856
|
}>;
|
|
3857
|
-
'
|
|
3857
|
+
'mark:removed': Extract<ResourceEvent, {
|
|
3858
3858
|
type: 'annotation.removed';
|
|
3859
3859
|
}>;
|
|
3860
|
-
'
|
|
3860
|
+
'mark:body-updated': Extract<ResourceEvent, {
|
|
3861
3861
|
type: 'annotation.body.updated';
|
|
3862
3862
|
}>;
|
|
3863
|
-
'
|
|
3863
|
+
'mark:entity-tag-added': Extract<ResourceEvent, {
|
|
3864
3864
|
type: 'entitytag.added';
|
|
3865
3865
|
}>;
|
|
3866
|
-
'
|
|
3866
|
+
'mark:entity-tag-removed': Extract<ResourceEvent, {
|
|
3867
3867
|
type: 'entitytag.removed';
|
|
3868
3868
|
}>;
|
|
3869
|
-
'
|
|
3869
|
+
'mark:archive': void;
|
|
3870
|
+
'mark:archived': Extract<ResourceEvent, {
|
|
3871
|
+
type: 'resource.archived';
|
|
3872
|
+
}>;
|
|
3873
|
+
'mark:unarchive': void;
|
|
3874
|
+
'mark:unarchived': Extract<ResourceEvent, {
|
|
3875
|
+
type: 'resource.unarchived';
|
|
3876
|
+
}>;
|
|
3877
|
+
'bind:create-manual': {
|
|
3870
3878
|
annotationUri: string;
|
|
3871
3879
|
title: string;
|
|
3872
3880
|
entityTypes: string[];
|
|
3873
3881
|
};
|
|
3874
|
-
'
|
|
3882
|
+
'bind:link': {
|
|
3875
3883
|
annotationUri: string;
|
|
3876
3884
|
searchTerm: string;
|
|
3877
3885
|
};
|
|
3878
|
-
'
|
|
3886
|
+
'bind:search-requested': {
|
|
3879
3887
|
referenceId: string;
|
|
3880
3888
|
searchTerm: string;
|
|
3881
3889
|
};
|
|
3882
|
-
'
|
|
3890
|
+
'bind:update-body': {
|
|
3883
3891
|
annotationUri: string;
|
|
3884
3892
|
resourceId: string;
|
|
3885
3893
|
operations: Array<{
|
|
@@ -3889,61 +3897,73 @@ type EventMap = {
|
|
|
3889
3897
|
newItem?: components['schemas']['AnnotationBody'];
|
|
3890
3898
|
}>;
|
|
3891
3899
|
};
|
|
3892
|
-
'
|
|
3900
|
+
'bind:body-updated': {
|
|
3893
3901
|
annotationUri: string;
|
|
3894
3902
|
};
|
|
3895
|
-
'
|
|
3903
|
+
'bind:body-update-failed': {
|
|
3896
3904
|
error: Error;
|
|
3897
3905
|
};
|
|
3898
|
-
'
|
|
3906
|
+
'gather:requested': {
|
|
3899
3907
|
annotationUri: string;
|
|
3900
3908
|
resourceUri: string;
|
|
3901
3909
|
};
|
|
3902
|
-
'
|
|
3910
|
+
'gather:complete': {
|
|
3903
3911
|
annotationUri: string;
|
|
3904
|
-
context:
|
|
3912
|
+
context: YieldContext;
|
|
3905
3913
|
};
|
|
3906
|
-
'
|
|
3914
|
+
'gather:failed': {
|
|
3907
3915
|
annotationUri: string;
|
|
3908
3916
|
error: Error;
|
|
3909
3917
|
};
|
|
3910
|
-
'
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
defaultTitle: string;
|
|
3918
|
+
'browse:click': {
|
|
3919
|
+
annotationId: string;
|
|
3920
|
+
motivation: Motivation;
|
|
3914
3921
|
};
|
|
3915
|
-
'
|
|
3916
|
-
|
|
3917
|
-
resourceUri: string;
|
|
3918
|
-
options: {
|
|
3919
|
-
title: string;
|
|
3920
|
-
prompt?: string;
|
|
3921
|
-
language?: string;
|
|
3922
|
-
temperature?: number;
|
|
3923
|
-
maxTokens?: number;
|
|
3924
|
-
context: GenerationContext;
|
|
3925
|
-
};
|
|
3922
|
+
'browse:panel-toggle': {
|
|
3923
|
+
panel: string;
|
|
3926
3924
|
};
|
|
3927
|
-
'
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3925
|
+
'browse:panel-open': {
|
|
3926
|
+
panel: string;
|
|
3927
|
+
scrollToAnnotationId?: string;
|
|
3928
|
+
motivation?: string;
|
|
3929
|
+
};
|
|
3930
|
+
'browse:panel-close': void;
|
|
3931
|
+
'browse:sidebar-toggle': void;
|
|
3932
|
+
'browse:resource-close': {
|
|
3933
|
+
resourceId: string;
|
|
3934
|
+
};
|
|
3935
|
+
'browse:resource-reorder': {
|
|
3936
|
+
oldIndex: number;
|
|
3937
|
+
newIndex: number;
|
|
3938
|
+
};
|
|
3939
|
+
'browse:link-clicked': {
|
|
3940
|
+
href: string;
|
|
3941
|
+
label?: string;
|
|
3942
|
+
};
|
|
3943
|
+
'browse:router-push': {
|
|
3944
|
+
path: string;
|
|
3945
|
+
reason?: string;
|
|
3946
|
+
};
|
|
3947
|
+
'browse:external-navigate': {
|
|
3948
|
+
url: string;
|
|
3949
|
+
resourceId?: string;
|
|
3950
|
+
cancelFallback: () => void;
|
|
3951
|
+
};
|
|
3952
|
+
'browse:reference-navigate': {
|
|
3953
|
+
documentId: string;
|
|
3954
|
+
};
|
|
3955
|
+
'browse:entity-type-clicked': {
|
|
3956
|
+
entityType: string;
|
|
3957
|
+
};
|
|
3958
|
+
'beckon:hover': {
|
|
3959
|
+
annotationId: string | null;
|
|
3960
|
+
};
|
|
3961
|
+
'beckon:focus': {
|
|
3962
|
+
annotationId: string | null;
|
|
3963
|
+
};
|
|
3964
|
+
'beckon:sparkle': {
|
|
3965
|
+
annotationId: string;
|
|
3931
3966
|
};
|
|
3932
|
-
'generate:representation-added': Extract<ResourceEvent, {
|
|
3933
|
-
type: 'representation.added';
|
|
3934
|
-
}>;
|
|
3935
|
-
'generate:representation-removed': Extract<ResourceEvent, {
|
|
3936
|
-
type: 'representation.removed';
|
|
3937
|
-
}>;
|
|
3938
|
-
'generate:clone': void;
|
|
3939
|
-
'resource:archive': void;
|
|
3940
|
-
'resource:archived': Extract<ResourceEvent, {
|
|
3941
|
-
type: 'resource.archived';
|
|
3942
|
-
}>;
|
|
3943
|
-
'resource:unarchive': void;
|
|
3944
|
-
'resource:unarchived': Extract<ResourceEvent, {
|
|
3945
|
-
type: 'resource.unarchived';
|
|
3946
|
-
}>;
|
|
3947
3967
|
'job:started': Extract<ResourceEvent, {
|
|
3948
3968
|
type: 'job.started';
|
|
3949
3969
|
}>;
|
|
@@ -3964,33 +3984,6 @@ type EventMap = {
|
|
|
3964
3984
|
'job:cancel-requested': {
|
|
3965
3985
|
jobType: 'annotation' | 'generation';
|
|
3966
3986
|
};
|
|
3967
|
-
'navigation:sidebar-toggle': void;
|
|
3968
|
-
'navigation:resource-close': {
|
|
3969
|
-
resourceId: string;
|
|
3970
|
-
};
|
|
3971
|
-
'navigation:resource-reorder': {
|
|
3972
|
-
oldIndex: number;
|
|
3973
|
-
newIndex: number;
|
|
3974
|
-
};
|
|
3975
|
-
'navigation:link-clicked': {
|
|
3976
|
-
href: string;
|
|
3977
|
-
label?: string;
|
|
3978
|
-
};
|
|
3979
|
-
'navigation:router-push': {
|
|
3980
|
-
path: string;
|
|
3981
|
-
reason?: string;
|
|
3982
|
-
};
|
|
3983
|
-
'navigation:external-navigate': {
|
|
3984
|
-
url: string;
|
|
3985
|
-
resourceId?: string;
|
|
3986
|
-
cancelFallback: () => void;
|
|
3987
|
-
};
|
|
3988
|
-
'navigation:reference-navigate': {
|
|
3989
|
-
documentId: string;
|
|
3990
|
-
};
|
|
3991
|
-
'navigation:entity-type-clicked': {
|
|
3992
|
-
entityType: string;
|
|
3993
|
-
};
|
|
3994
3987
|
'settings:theme-changed': {
|
|
3995
3988
|
theme: 'light' | 'dark' | 'system';
|
|
3996
3989
|
};
|
|
@@ -4027,16 +4020,16 @@ type EventName = keyof EventMap;
|
|
|
4027
4020
|
* const eventBus = new EventBus();
|
|
4028
4021
|
*
|
|
4029
4022
|
* // Emit events
|
|
4030
|
-
* eventBus.get('
|
|
4023
|
+
* eventBus.get('beckon:hover').next({ annotationId: 'ann-1' });
|
|
4031
4024
|
*
|
|
4032
4025
|
* // Subscribe to events
|
|
4033
|
-
* const subscription = eventBus.get('
|
|
4026
|
+
* const subscription = eventBus.get('beckon:hover').subscribe(({ annotationId }) => {
|
|
4034
4027
|
* console.log('Hover:', annotationId);
|
|
4035
4028
|
* });
|
|
4036
4029
|
*
|
|
4037
4030
|
* // Use RxJS operators
|
|
4038
4031
|
* import { debounceTime } from 'rxjs/operators';
|
|
4039
|
-
* eventBus.get('
|
|
4032
|
+
* eventBus.get('beckon:hover')
|
|
4040
4033
|
* .pipe(debounceTime(100))
|
|
4041
4034
|
* .subscribe(handleHover);
|
|
4042
4035
|
*
|
|
@@ -4061,13 +4054,13 @@ declare class EventBus {
|
|
|
4061
4054
|
* @example
|
|
4062
4055
|
* ```typescript
|
|
4063
4056
|
* // Emit
|
|
4064
|
-
* eventBus.get('
|
|
4057
|
+
* eventBus.get('beckon:hover').next({ annotationId: 'ann-1' });
|
|
4065
4058
|
*
|
|
4066
4059
|
* // Subscribe
|
|
4067
|
-
* const sub = eventBus.get('
|
|
4060
|
+
* const sub = eventBus.get('beckon:hover').subscribe(handleHover);
|
|
4068
4061
|
*
|
|
4069
4062
|
* // With operators
|
|
4070
|
-
* eventBus.get('
|
|
4063
|
+
* eventBus.get('beckon:hover')
|
|
4071
4064
|
* .pipe(debounceTime(100), distinctUntilChanged())
|
|
4072
4065
|
* .subscribe(handleHover);
|
|
4073
4066
|
* ```
|
|
@@ -5265,4 +5258,4 @@ declare class ConfigurationError extends Error {
|
|
|
5265
5258
|
declare const CORE_TYPES_VERSION = "0.1.0";
|
|
5266
5259
|
declare const SDK_VERSION = "0.1.0";
|
|
5267
5260
|
|
|
5268
|
-
export { APIError, type AWSConfig, type AccessToken, type AnnotationAddedEvent, type AnnotationBodyUpdatedEvent, type AnnotationCategory, type AnnotationId, type
|
|
5261
|
+
export { APIError, type AWSConfig, type AccessToken, type AnnotationAddedEvent, type AnnotationBodyUpdatedEvent, type AnnotationCategory, type AnnotationId, type AnnotationRemovedEvent, type AnnotationUri, type AppConfig, type AuthCode, type BackendServiceConfig, type BaseEvent, type BaseUrl, type BodyItem, type BodyOperation, type BurstBufferOptions, CORE_TYPES_VERSION, CREATION_METHODS, type CloneToken, type ConfigFileReader, ConfigurationError, ConflictError, type ContentFormat$1 as ContentFormat, type CreateAnnotationInternal, type CreationMethod, type DatabaseServiceConfig, type Email, type EntityTagAddedEvent, type EntityTagRemovedEvent, type EntityType, type EntityTypeStats, type Environment, type EnvironmentConfig, EventBus, type EventMap, type EventMetadata, type EventName, type EventQuery, type EventSignature, type FilesystemServiceConfig, type FrontendServiceConfig, type GoogleAuthRequest, type GoogleCredential, type GraphConnection, type GraphDatabaseType, type GraphPath, type GraphServiceConfig, type InferenceServiceConfig, type JobCompletedEvent, type JobFailedEvent, type JobId, type JobProgressEvent, type JobStartedEvent, type Logger, type MCPToken, type MarkProgress, type McpServiceConfig, type Motivation$2 as Motivation, NotFoundError, type PlatformType, type ProxyServiceConfig, type RefreshToken, type RepresentationAddedEvent, type RepresentationRemovedEvent, type ResourceAnnotationUri, type ResourceAnnotations, type ResourceArchivedEvent, type ResourceClonedEvent, type ResourceCreatedEvent, type ResourceEvent, type ResourceEventType, type ResourceFilter, type ResourceId, type ResourceScopedEvent, type ResourceUnarchivedEvent, type ResourceUri, SDK_VERSION, ScopedEventBus, ScriptError, type SearchQuery, type SelectionData, type Selector, type SemiontConfig, SemiontError, type ServiceConfig, type ServicePlatformConfig, type ServicesConfig, type SiteConfig, type StoredEvent, type SystemEvent, UnauthorizedError, type UpdateResourceInput, type UserDID, type UserId, ValidationError, type ValidationResult, type YieldContext, type YieldProgress, accessToken, annotationId, annotationIdToURI, annotationUri, authCode, baseUrl, burstBuffer, cloneToken, type components, createConfigLoader, deepMerge, didToAgent, displayConfiguration, email, entityType, extractResourceUriFromAnnotationUri, findBodyItem, formatErrors, getAllPlatformTypes, getAnnotationUriFromEvent, getEventType, getNodeEnvForEnvironment, googleCredential, hasAWSConfig, isAnnotationId, isArray, isBoolean, isDefined, isEventRelatedToAnnotation, isFunction, isNull, isNullish, isNumber, isObject, isResourceEvent$1 as isResourceEvent, isResourceId, isResourceScopedEvent, isResourceEvent as isStoredEvent, isString, isSystemEvent, isUndefined, isValidPlatformType, jobId, listEnvironmentNames, mcpToken, type operations, parseAndMergeConfigs, parseEnvironment, type paths, refreshToken, resolveEnvVars, resourceAnnotationUri, resourceId, resourceIdToURI, resourceUri, searchQuery, uriToAnnotationId, uriToAnnotationIdOrPassthrough, uriToResourceId, userDID, userId, userToAgent, userToDid, validateEnvironment, validateEnvironmentConfig, validateSemiontConfig, validateSiteConfig };
|
package/dist/index.js
CHANGED
|
@@ -194,13 +194,13 @@ var EventBus = class {
|
|
|
194
194
|
* @example
|
|
195
195
|
* ```typescript
|
|
196
196
|
* // Emit
|
|
197
|
-
* eventBus.get('
|
|
197
|
+
* eventBus.get('beckon:hover').next({ annotationId: 'ann-1' });
|
|
198
198
|
*
|
|
199
199
|
* // Subscribe
|
|
200
|
-
* const sub = eventBus.get('
|
|
200
|
+
* const sub = eventBus.get('beckon:hover').subscribe(handleHover);
|
|
201
201
|
*
|
|
202
202
|
* // With operators
|
|
203
|
-
* eventBus.get('
|
|
203
|
+
* eventBus.get('beckon:hover')
|
|
204
204
|
* .pipe(debounceTime(100), distinctUntilChanged())
|
|
205
205
|
* .subscribe(handleHover);
|
|
206
206
|
* ```
|