@fedify/vocab 2.3.0-dev.1274 → 2.3.0-dev.1280

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/mod.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { Decimal, DocumentLoader, DocumentLoader as DocumentLoader$1, GetUserAgentOptions, GetUserAgentOptions as GetUserAgentOptions$1, LanguageString, LanguageString as LanguageString$1, RemoteDocument } from "@fedify/vocab-runtime";
2
+ import { Decimal, DocumentLoader, DocumentLoader as DocumentLoader$1, GetUserAgentOptions, GetUserAgentOptions as GetUserAgentOptions$1, LanguageString, LanguageString as LanguageString$1, PropertyPreprocessor, RemoteDocument } from "@fedify/vocab-runtime";
3
3
  import { MeterProvider, Span, TracerProvider } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/vocab.d.ts
@@ -22,6 +22,7 @@ declare class Object$1 {
22
22
  } | undefined;
23
23
  protected get _cachedJsonLd(): unknown | undefined;
24
24
  protected set _cachedJsonLd(value: unknown | undefined);
25
+ protected get _baseUrl(): URL | undefined;
25
26
  /**
26
27
  * The type URI of {@link Object}: `https://www.w3.org/ns/activitystreams#Object`.
27
28
  */
@@ -1918,6 +1919,7 @@ declare class PropertyValue {
1918
1919
  } | undefined;
1919
1920
  protected get _cachedJsonLd(): unknown | undefined;
1920
1921
  protected set _cachedJsonLd(value: unknown | undefined);
1922
+ protected get _baseUrl(): URL | undefined;
1921
1923
  /**
1922
1924
  * The type URI of {@link PropertyValue}: `http://schema.org#PropertyValue`.
1923
1925
  */
@@ -2012,6 +2014,7 @@ declare class Measure {
2012
2014
  } | undefined;
2013
2015
  protected get _cachedJsonLd(): unknown | undefined;
2014
2016
  protected set _cachedJsonLd(value: unknown | undefined);
2017
+ protected get _baseUrl(): URL | undefined;
2015
2018
  /**
2016
2019
  * The type URI of {@link Measure}: `http://www.ontology-of-units-of-measure.org/resource/om-2/Measure`.
2017
2020
  */
@@ -2548,6 +2551,7 @@ declare class InteractionPolicy {
2548
2551
  } | undefined;
2549
2552
  protected get _cachedJsonLd(): unknown | undefined;
2550
2553
  protected set _cachedJsonLd(value: unknown | undefined);
2554
+ protected get _baseUrl(): URL | undefined;
2551
2555
  /**
2552
2556
  * The type URI of {@link InteractionPolicy}: `https://gotosocial.org/ns#InteractionPolicy`.
2553
2557
  */
@@ -2681,6 +2685,7 @@ declare class InteractionRule {
2681
2685
  } | undefined;
2682
2686
  protected get _cachedJsonLd(): unknown | undefined;
2683
2687
  protected set _cachedJsonLd(value: unknown | undefined);
2688
+ protected get _baseUrl(): URL | undefined;
2684
2689
  /**
2685
2690
  * The type URI of {@link InteractionRule}: `https://gotosocial.org/ns#InteractionRule`.
2686
2691
  */
@@ -4089,6 +4094,7 @@ declare class DidService {
4089
4094
  } | undefined;
4090
4095
  protected get _cachedJsonLd(): unknown | undefined;
4091
4096
  protected set _cachedJsonLd(value: unknown | undefined);
4097
+ protected get _baseUrl(): URL | undefined;
4092
4098
  /**
4093
4099
  * The type URI of {@link DidService}: `https://www.w3.org/ns/did#Service`.
4094
4100
  */
@@ -4262,6 +4268,7 @@ declare class DataIntegrityProof {
4262
4268
  } | undefined;
4263
4269
  protected get _cachedJsonLd(): unknown | undefined;
4264
4270
  protected set _cachedJsonLd(value: unknown | undefined);
4271
+ protected get _baseUrl(): URL | undefined;
4265
4272
  /**
4266
4273
  * The type URI of {@link DataIntegrityProof}: `https://w3id.org/security#DataIntegrityProof`.
4267
4274
  */
@@ -4392,6 +4399,7 @@ declare class CryptographicKey {
4392
4399
  } | undefined;
4393
4400
  protected get _cachedJsonLd(): unknown | undefined;
4394
4401
  protected set _cachedJsonLd(value: unknown | undefined);
4402
+ protected get _baseUrl(): URL | undefined;
4395
4403
  /**
4396
4404
  * The type URI of {@link CryptographicKey}: `https://w3id.org/security#Key`.
4397
4405
  */
@@ -4501,6 +4509,7 @@ declare class Multikey {
4501
4509
  } | undefined;
4502
4510
  protected get _cachedJsonLd(): unknown | undefined;
4503
4511
  protected set _cachedJsonLd(value: unknown | undefined);
4512
+ protected get _baseUrl(): URL | undefined;
4504
4513
  /**
4505
4514
  * The type URI of {@link Multikey}: `https://w3id.org/security#Multikey`.
4506
4515
  */
@@ -4611,6 +4620,7 @@ declare class Intent {
4611
4620
  } | undefined;
4612
4621
  protected get _cachedJsonLd(): unknown | undefined;
4613
4622
  protected set _cachedJsonLd(value: unknown | undefined);
4623
+ protected get _baseUrl(): URL | undefined;
4614
4624
  /**
4615
4625
  * The type URI of {@link Intent}: `https://w3id.org/valueflows/ont/vf#Intent`.
4616
4626
  */
@@ -8826,6 +8836,7 @@ declare class Endpoints {
8826
8836
  } | undefined;
8827
8837
  protected get _cachedJsonLd(): unknown | undefined;
8828
8838
  protected set _cachedJsonLd(value: unknown | undefined);
8839
+ protected get _baseUrl(): URL | undefined;
8829
8840
  /**
8830
8841
  * The type URI of {@link Endpoints}: `https://www.w3.org/ns/activitystreams#Endpoints`.
8831
8842
  */
@@ -10153,6 +10164,7 @@ declare class Link {
10153
10164
  } | undefined;
10154
10165
  protected get _cachedJsonLd(): unknown | undefined;
10155
10166
  protected set _cachedJsonLd(value: unknown | undefined);
10167
+ protected get _baseUrl(): URL | undefined;
10156
10168
  /**
10157
10169
  * The type URI of {@link Link}: `https://www.w3.org/ns/activitystreams#Link`.
10158
10170
  */
@@ -16381,6 +16393,7 @@ declare class Source {
16381
16393
  } | undefined;
16382
16394
  protected get _cachedJsonLd(): unknown | undefined;
16383
16395
  protected set _cachedJsonLd(value: unknown | undefined);
16396
+ protected get _baseUrl(): URL | undefined;
16384
16397
  /**
16385
16398
  * The type URI of {@link Source}: `https://www.w3.org/ns/activitystreams#Source`.
16386
16399
  */
@@ -18479,6 +18492,21 @@ interface TraverseCollectionOptions {
18479
18492
  */
18480
18493
  declare function traverseCollection(collection: Collection, options?: TraverseCollectionOptions): AsyncIterable<Object$1 | Link>;
18481
18494
  //#endregion
18495
+ //#region src/preprocessors.d.ts
18496
+ /**
18497
+ * A property preprocessor that normalizes Link values to Image objects.
18498
+ *
18499
+ * When an `icon` or `image` property on a vocabulary object contains an
18500
+ * explicit ActivityStreams `Link` rather than an `Image`, this preprocessor
18501
+ * converts it into an `Image` by mapping `href` to `url`, copying
18502
+ * `mediaType`, `name`, `width`, and `height`, and discarding the rest.
18503
+ *
18504
+ * If the value is not a Link, or the Link has no `href`, it returns
18505
+ * `undefined` so the normal range decoder continues.
18506
+ * @since 2.3.0
18507
+ */
18508
+ declare const normalizeLinkToImage: PropertyPreprocessor<Image>;
18509
+ //#endregion
18482
18510
  //#region src/type.d.ts
18483
18511
  /**
18484
18512
  * Returns the type URI of the given object.
@@ -18561,4 +18589,4 @@ declare function getTypeId(object: Object$1 | Link | null): URL | null;
18561
18589
  */
18562
18590
  declare function getTypeId(object: Object$1 | Link | null | undefined): URL | null | undefined;
18563
18591
  //#endregion
18564
- export { $EntityType, Accept, Activity, Actor, ActorDiscoveryResult, ActorTypeName, Add, Announce, AnnounceAuthorization, AnnounceRequest, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, type DocumentLoader, Emoji, EmojiReact, Endpoints, Event, Export, FediverseHandle, Flag, Follow, GetActorHandleOptions, type GetUserAgentOptions, Group, Hashtag, Ignore, Image, Intent, InteractionPolicy, InteractionRule, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, LikeAuthorization, LikeRequest, Link, Listen, LookupObjectOptions, Measure, Mention, Move, Multikey, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectLookupKind, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Proposal, Question, QuoteAuthorization, QuoteRequest, Read, Recipient, Reject, Relationship, type RemoteDocument, Remove, ReplyAuthorization, ReplyRequest, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getEntityTypeById, getTypeId, isActor, isEntityType, isFediverseHandle, lookupObject, normalizeActorHandle, parseFediverseHandle, toAcctUrl, traverseCollection };
18592
+ export { $EntityType, Accept, Activity, Actor, ActorDiscoveryResult, ActorTypeName, Add, Announce, AnnounceAuthorization, AnnounceRequest, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, type DocumentLoader, Emoji, EmojiReact, Endpoints, Event, Export, FediverseHandle, Flag, Follow, GetActorHandleOptions, type GetUserAgentOptions, Group, Hashtag, Ignore, Image, Intent, InteractionPolicy, InteractionRule, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, LikeAuthorization, LikeRequest, Link, Listen, LookupObjectOptions, Measure, Mention, Move, Multikey, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectLookupKind, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Proposal, Question, QuoteAuthorization, QuoteRequest, Read, Recipient, Reject, Relationship, type RemoteDocument, Remove, ReplyAuthorization, ReplyRequest, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getEntityTypeById, getTypeId, isActor, isEntityType, isFediverseHandle, lookupObject, normalizeActorHandle, normalizeLinkToImage, parseFediverseHandle, toAcctUrl, traverseCollection };
package/dist/mod.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { MeterProvider, Span, TracerProvider } from "@opentelemetry/api";
3
- import { Decimal, DocumentLoader, DocumentLoader as DocumentLoader$1, GetUserAgentOptions, GetUserAgentOptions as GetUserAgentOptions$1, LanguageString, LanguageString as LanguageString$1, RemoteDocument } from "@fedify/vocab-runtime";
3
+ import { Decimal, DocumentLoader, DocumentLoader as DocumentLoader$1, GetUserAgentOptions, GetUserAgentOptions as GetUserAgentOptions$1, LanguageString, LanguageString as LanguageString$1, PropertyPreprocessor, RemoteDocument } from "@fedify/vocab-runtime";
4
4
 
5
5
  //#region src/vocab.d.ts
6
6
  /** Describes an object of any kind. The Object type serves as the base type for
@@ -22,6 +22,7 @@ declare class Object$1 {
22
22
  } | undefined;
23
23
  protected get _cachedJsonLd(): unknown | undefined;
24
24
  protected set _cachedJsonLd(value: unknown | undefined);
25
+ protected get _baseUrl(): URL | undefined;
25
26
  /**
26
27
  * The type URI of {@link Object}: `https://www.w3.org/ns/activitystreams#Object`.
27
28
  */
@@ -1918,6 +1919,7 @@ declare class PropertyValue {
1918
1919
  } | undefined;
1919
1920
  protected get _cachedJsonLd(): unknown | undefined;
1920
1921
  protected set _cachedJsonLd(value: unknown | undefined);
1922
+ protected get _baseUrl(): URL | undefined;
1921
1923
  /**
1922
1924
  * The type URI of {@link PropertyValue}: `http://schema.org#PropertyValue`.
1923
1925
  */
@@ -2012,6 +2014,7 @@ declare class Measure {
2012
2014
  } | undefined;
2013
2015
  protected get _cachedJsonLd(): unknown | undefined;
2014
2016
  protected set _cachedJsonLd(value: unknown | undefined);
2017
+ protected get _baseUrl(): URL | undefined;
2015
2018
  /**
2016
2019
  * The type URI of {@link Measure}: `http://www.ontology-of-units-of-measure.org/resource/om-2/Measure`.
2017
2020
  */
@@ -2548,6 +2551,7 @@ declare class InteractionPolicy {
2548
2551
  } | undefined;
2549
2552
  protected get _cachedJsonLd(): unknown | undefined;
2550
2553
  protected set _cachedJsonLd(value: unknown | undefined);
2554
+ protected get _baseUrl(): URL | undefined;
2551
2555
  /**
2552
2556
  * The type URI of {@link InteractionPolicy}: `https://gotosocial.org/ns#InteractionPolicy`.
2553
2557
  */
@@ -2681,6 +2685,7 @@ declare class InteractionRule {
2681
2685
  } | undefined;
2682
2686
  protected get _cachedJsonLd(): unknown | undefined;
2683
2687
  protected set _cachedJsonLd(value: unknown | undefined);
2688
+ protected get _baseUrl(): URL | undefined;
2684
2689
  /**
2685
2690
  * The type URI of {@link InteractionRule}: `https://gotosocial.org/ns#InteractionRule`.
2686
2691
  */
@@ -4089,6 +4094,7 @@ declare class DidService {
4089
4094
  } | undefined;
4090
4095
  protected get _cachedJsonLd(): unknown | undefined;
4091
4096
  protected set _cachedJsonLd(value: unknown | undefined);
4097
+ protected get _baseUrl(): URL | undefined;
4092
4098
  /**
4093
4099
  * The type URI of {@link DidService}: `https://www.w3.org/ns/did#Service`.
4094
4100
  */
@@ -4262,6 +4268,7 @@ declare class DataIntegrityProof {
4262
4268
  } | undefined;
4263
4269
  protected get _cachedJsonLd(): unknown | undefined;
4264
4270
  protected set _cachedJsonLd(value: unknown | undefined);
4271
+ protected get _baseUrl(): URL | undefined;
4265
4272
  /**
4266
4273
  * The type URI of {@link DataIntegrityProof}: `https://w3id.org/security#DataIntegrityProof`.
4267
4274
  */
@@ -4392,6 +4399,7 @@ declare class CryptographicKey {
4392
4399
  } | undefined;
4393
4400
  protected get _cachedJsonLd(): unknown | undefined;
4394
4401
  protected set _cachedJsonLd(value: unknown | undefined);
4402
+ protected get _baseUrl(): URL | undefined;
4395
4403
  /**
4396
4404
  * The type URI of {@link CryptographicKey}: `https://w3id.org/security#Key`.
4397
4405
  */
@@ -4501,6 +4509,7 @@ declare class Multikey {
4501
4509
  } | undefined;
4502
4510
  protected get _cachedJsonLd(): unknown | undefined;
4503
4511
  protected set _cachedJsonLd(value: unknown | undefined);
4512
+ protected get _baseUrl(): URL | undefined;
4504
4513
  /**
4505
4514
  * The type URI of {@link Multikey}: `https://w3id.org/security#Multikey`.
4506
4515
  */
@@ -4611,6 +4620,7 @@ declare class Intent {
4611
4620
  } | undefined;
4612
4621
  protected get _cachedJsonLd(): unknown | undefined;
4613
4622
  protected set _cachedJsonLd(value: unknown | undefined);
4623
+ protected get _baseUrl(): URL | undefined;
4614
4624
  /**
4615
4625
  * The type URI of {@link Intent}: `https://w3id.org/valueflows/ont/vf#Intent`.
4616
4626
  */
@@ -8826,6 +8836,7 @@ declare class Endpoints {
8826
8836
  } | undefined;
8827
8837
  protected get _cachedJsonLd(): unknown | undefined;
8828
8838
  protected set _cachedJsonLd(value: unknown | undefined);
8839
+ protected get _baseUrl(): URL | undefined;
8829
8840
  /**
8830
8841
  * The type URI of {@link Endpoints}: `https://www.w3.org/ns/activitystreams#Endpoints`.
8831
8842
  */
@@ -10153,6 +10164,7 @@ declare class Link {
10153
10164
  } | undefined;
10154
10165
  protected get _cachedJsonLd(): unknown | undefined;
10155
10166
  protected set _cachedJsonLd(value: unknown | undefined);
10167
+ protected get _baseUrl(): URL | undefined;
10156
10168
  /**
10157
10169
  * The type URI of {@link Link}: `https://www.w3.org/ns/activitystreams#Link`.
10158
10170
  */
@@ -16381,6 +16393,7 @@ declare class Source {
16381
16393
  } | undefined;
16382
16394
  protected get _cachedJsonLd(): unknown | undefined;
16383
16395
  protected set _cachedJsonLd(value: unknown | undefined);
16396
+ protected get _baseUrl(): URL | undefined;
16384
16397
  /**
16385
16398
  * The type URI of {@link Source}: `https://www.w3.org/ns/activitystreams#Source`.
16386
16399
  */
@@ -18479,6 +18492,21 @@ interface TraverseCollectionOptions {
18479
18492
  */
18480
18493
  declare function traverseCollection(collection: Collection, options?: TraverseCollectionOptions): AsyncIterable<Object$1 | Link>;
18481
18494
  //#endregion
18495
+ //#region src/preprocessors.d.ts
18496
+ /**
18497
+ * A property preprocessor that normalizes Link values to Image objects.
18498
+ *
18499
+ * When an `icon` or `image` property on a vocabulary object contains an
18500
+ * explicit ActivityStreams `Link` rather than an `Image`, this preprocessor
18501
+ * converts it into an `Image` by mapping `href` to `url`, copying
18502
+ * `mediaType`, `name`, `width`, and `height`, and discarding the rest.
18503
+ *
18504
+ * If the value is not a Link, or the Link has no `href`, it returns
18505
+ * `undefined` so the normal range decoder continues.
18506
+ * @since 2.3.0
18507
+ */
18508
+ declare const normalizeLinkToImage: PropertyPreprocessor<Image>;
18509
+ //#endregion
18482
18510
  //#region src/type.d.ts
18483
18511
  /**
18484
18512
  * Returns the type URI of the given object.
@@ -18561,4 +18589,4 @@ declare function getTypeId(object: Object$1 | Link | null): URL | null;
18561
18589
  */
18562
18590
  declare function getTypeId(object: Object$1 | Link | null | undefined): URL | null | undefined;
18563
18591
  //#endregion
18564
- export { $EntityType, Accept, Activity, Actor, ActorDiscoveryResult, ActorTypeName, Add, Announce, AnnounceAuthorization, AnnounceRequest, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, type DocumentLoader, Emoji, EmojiReact, Endpoints, Event, Export, FediverseHandle, Flag, Follow, GetActorHandleOptions, type GetUserAgentOptions, Group, Hashtag, Ignore, Image, Intent, InteractionPolicy, InteractionRule, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, LikeAuthorization, LikeRequest, Link, Listen, LookupObjectOptions, Measure, Mention, Move, Multikey, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectLookupKind, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Proposal, Question, QuoteAuthorization, QuoteRequest, Read, Recipient, Reject, Relationship, type RemoteDocument, Remove, ReplyAuthorization, ReplyRequest, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getEntityTypeById, getTypeId, isActor, isEntityType, isFediverseHandle, lookupObject, normalizeActorHandle, parseFediverseHandle, toAcctUrl, traverseCollection };
18592
+ export { $EntityType, Accept, Activity, Actor, ActorDiscoveryResult, ActorTypeName, Add, Announce, AnnounceAuthorization, AnnounceRequest, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, type DocumentLoader, Emoji, EmojiReact, Endpoints, Event, Export, FediverseHandle, Flag, Follow, GetActorHandleOptions, type GetUserAgentOptions, Group, Hashtag, Ignore, Image, Intent, InteractionPolicy, InteractionRule, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, LikeAuthorization, LikeRequest, Link, Listen, LookupObjectOptions, Measure, Mention, Move, Multikey, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectLookupKind, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Proposal, Question, QuoteAuthorization, QuoteRequest, Read, Recipient, Reject, Relationship, type RemoteDocument, Remove, ReplyAuthorization, ReplyRequest, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getEntityTypeById, getTypeId, isActor, isEntityType, isFediverseHandle, lookupObject, normalizeActorHandle, normalizeLinkToImage, parseFediverseHandle, toAcctUrl, traverseCollection };