55 * It contains typing information for all components that exist in this project.
66 */
77import { HTMLStencilElement , JSXBase } from "@stencil/core/internal" ;
8- import { Attachment , HttpProblem , LdpContainer , NetworkProblem , PodOS , Problem , SolidFile , Thing } from "@pod-os/core" ;
8+ import { Attachment , HttpProblem , LdpContainer , Literal , NetworkProblem , PodOS , Problem , Relation , SolidFile , Thing } from "@pod-os/core" ;
99import { ToolConfig } from "./components/pos-type-router/selectToolsForTypes" ;
1010import { ResultAsync } from "neverthrow" ;
11- export { Attachment , HttpProblem , LdpContainer , NetworkProblem , PodOS , Problem , SolidFile , Thing } from "@pod-os/core" ;
11+ export { Attachment , HttpProblem , LdpContainer , Literal , NetworkProblem , PodOS , Problem , Relation , SolidFile , Thing } from "@pod-os/core" ;
1212export { ToolConfig } from "./components/pos-type-router/selectToolsForTypes" ;
1313export { ResultAsync } from "neverthrow" ;
1414export namespace Components {
@@ -373,6 +373,10 @@ export interface PosAddLiteralValueCustomEvent<T> extends CustomEvent<T> {
373373 detail : T ;
374374 target : HTMLPosAddLiteralValueElement ;
375375}
376+ export interface PosAddRelationCustomEvent < T > extends CustomEvent < T > {
377+ detail : T ;
378+ target : HTMLPosAddRelationElement ;
379+ }
376380export interface PosAppCustomEvent < T > extends CustomEvent < T > {
377381 detail : T ;
378382 target : HTMLPosAppElement ;
@@ -517,7 +521,7 @@ declare global {
517521 interface HTMLPosAddLiteralValueElementEventMap {
518522 "pod-os:init" : any ;
519523 "pod-os:resource" : any ;
520- "pod-os:added-literal-value" : any ;
524+ "pod-os:added-literal-value" : Literal ;
521525 "pod-os:error" : any ;
522526 }
523527 interface HTMLPosAddLiteralValueElement extends Components . PosAddLiteralValue , HTMLStencilElement {
@@ -540,10 +544,22 @@ declare global {
540544 prototype : HTMLPosAddNewThingElement ;
541545 new ( ) : HTMLPosAddNewThingElement ;
542546 } ;
547+ interface HTMLPosAddRelationElementEventMap {
548+ "pod-os:added-relation" : Relation ;
549+ "pod-os:error" : any ;
550+ }
543551 /**
544552 * Add a new relation from the current resource to another one
545553 */
546554 interface HTMLPosAddRelationElement extends Components . PosAddRelation , HTMLStencilElement {
555+ addEventListener < K extends keyof HTMLPosAddRelationElementEventMap > ( type : K , listener : ( this : HTMLPosAddRelationElement , ev : PosAddRelationCustomEvent < HTMLPosAddRelationElementEventMap [ K ] > ) => any , options ?: boolean | AddEventListenerOptions ) : void ;
556+ addEventListener < K extends keyof DocumentEventMap > ( type : K , listener : ( this : Document , ev : DocumentEventMap [ K ] ) => any , options ?: boolean | AddEventListenerOptions ) : void ;
557+ addEventListener < K extends keyof HTMLElementEventMap > ( type : K , listener : ( this : HTMLElement , ev : HTMLElementEventMap [ K ] ) => any , options ?: boolean | AddEventListenerOptions ) : void ;
558+ addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options ?: boolean | AddEventListenerOptions ) : void ;
559+ removeEventListener < K extends keyof HTMLPosAddRelationElementEventMap > ( type : K , listener : ( this : HTMLPosAddRelationElement , ev : PosAddRelationCustomEvent < HTMLPosAddRelationElementEventMap [ K ] > ) => any , options ?: boolean | EventListenerOptions ) : void ;
560+ removeEventListener < K extends keyof DocumentEventMap > ( type : K , listener : ( this : Document , ev : DocumentEventMap [ K ] ) => any , options ?: boolean | EventListenerOptions ) : void ;
561+ removeEventListener < K extends keyof HTMLElementEventMap > ( type : K , listener : ( this : HTMLElement , ev : HTMLElementEventMap [ K ] ) => any , options ?: boolean | EventListenerOptions ) : void ;
562+ removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options ?: boolean | EventListenerOptions ) : void ;
547563 }
548564 var HTMLPosAddRelationElement : {
549565 prototype : HTMLPosAddRelationElement ;
@@ -1407,7 +1423,7 @@ declare namespace LocalJSX {
14071423 /**
14081424 * The entered literal value has been added to the resource and successfully stored to the Pod.
14091425 */
1410- "onPod-os:added-literal-value" ?: ( event : PosAddLiteralValueCustomEvent < any > ) => void ;
1426+ "onPod-os:added-literal-value" ?: ( event : PosAddLiteralValueCustomEvent < Literal > ) => void ;
14111427 /**
14121428 * Something went wrong while adding the literal value.
14131429 */
@@ -1422,6 +1438,14 @@ declare namespace LocalJSX {
14221438 * Add a new relation from the current resource to another one
14231439 */
14241440 interface PosAddRelation {
1441+ /**
1442+ * The relation has been added to the resource and successfully stored to the Pod.
1443+ */
1444+ "onPod-os:added-relation" ?: ( event : PosAddRelationCustomEvent < Relation > ) => void ;
1445+ /**
1446+ * Something went wrong while adding the relation.
1447+ */
1448+ "onPod-os:error" ?: ( event : PosAddRelationCustomEvent < any > ) => void ;
14251449 }
14261450 interface PosApp {
14271451 /**
0 commit comments