-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c32ca5
commit 8c68c52
Showing
27 changed files
with
399 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,12 @@ | ||
'use client'; | ||
|
||
import React from "react"; | ||
import { EventName, createComponent } from "@lit/react"; | ||
import { createComponent } from "@lit/react"; | ||
import { WyChat as WyChatWC } from "@weavy/uikit-web"; | ||
import { | ||
RealtimeAppEventType, | ||
RealtimeMessageEventType, | ||
RealtimeReactionEventType, | ||
} from "@weavy/uikit-web/dist/types/types/realtime.types"; | ||
|
||
// Creates a React component from a Lit component | ||
export const WyChat = createComponent({ | ||
react: React, | ||
tagName: "wy-chat", | ||
elementClass: WyChatWC, | ||
events: { | ||
onWyMessageCreated: "wy:message_created" as EventName< | ||
CustomEvent<RealtimeMessageEventType> | ||
>, | ||
onWyReactionAdded: "wy:reaction_added" as EventName< | ||
CustomEvent<RealtimeReactionEventType> | ||
>, | ||
onWyReactionRemoved: "wy:reaction_removed" as EventName< | ||
CustomEvent<RealtimeReactionEventType> | ||
>, | ||
onWyAppUpdated: "wy:app_updated" as EventName< | ||
CustomEvent<RealtimeAppEventType> | ||
>, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use client'; | ||
|
||
import React from "react"; | ||
import { createComponent } from "@lit/react"; | ||
import { WyComments as WyCommentsWC } from "@weavy/uikit-web"; | ||
|
||
// Creates a React component from a Lit component | ||
export const WyComments = createComponent({ | ||
react: React, | ||
tagName: "wy-comments", | ||
elementClass: WyCommentsWC, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,12 @@ | ||
'use client'; | ||
|
||
import React from "react"; | ||
import { EventName, createComponent } from "@lit/react"; | ||
import { createComponent } from "@lit/react"; | ||
import { WyFiles as WyFilesWC } from "@weavy/uikit-web"; | ||
import { RealtimeFileEventType } from "@weavy/uikit-web/dist/types/types/realtime.types"; | ||
|
||
// Creates a React component from a Lit component | ||
export const WyFiles = createComponent({ | ||
react: React, | ||
tagName: "wy-files", | ||
elementClass: WyFilesWC, | ||
events: { | ||
onWyFileCreated: "wy:file_created" as EventName< | ||
CustomEvent<RealtimeFileEventType> | ||
>, | ||
onWyFileUpdated: "wy:file_updated" as EventName< | ||
CustomEvent<RealtimeFileEventType> | ||
>, | ||
onWyFileTrashed: "wy:file_trashed" as EventName< | ||
CustomEvent<RealtimeFileEventType> | ||
>, | ||
onWyFileRestored: "wy:file_restored" as EventName< | ||
CustomEvent<RealtimeFileEventType> | ||
>, | ||
onWyFileDeleted: "wy:file_deleted" as EventName< | ||
CustomEvent<RealtimeFileEventType> | ||
>, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,12 @@ | ||
'use client'; | ||
|
||
import React from "react"; | ||
import { EventName, createComponent } from "@lit/react"; | ||
import { createComponent } from "@lit/react"; | ||
import { WyMessenger as WyMessengerWC } from "@weavy/uikit-web"; | ||
import { | ||
RealtimeAppEventType, | ||
RealtimeConversationDeliveredEventType, | ||
RealtimeConversationMarkedEventType, | ||
RealtimeMemberEventType, | ||
RealtimeMessageEventType, | ||
} from "@weavy/uikit-web/dist/types/types/realtime.types"; | ||
|
||
// Creates a React component from a Lit component | ||
export const WyMessenger = createComponent({ | ||
react: React, | ||
tagName: "wy-messenger", | ||
elementClass: WyMessengerWC, | ||
events: { | ||
onWyMessageCreated: "wy:message_created" as EventName< | ||
CustomEvent<RealtimeMessageEventType> | ||
>, | ||
onWyAppCreated: "wy:app_created" as EventName< | ||
CustomEvent<RealtimeAppEventType> | ||
>, | ||
onWyConversationMarked: "wy:conversation_marked" as EventName< | ||
CustomEvent<RealtimeConversationMarkedEventType> | ||
>, | ||
onWyConversationDelivered: "wy:conversation_delivered" as EventName< | ||
CustomEvent<RealtimeConversationDeliveredEventType> | ||
>, | ||
onWyMemberAdded: "wy:member_added" as EventName< | ||
CustomEvent<RealtimeMemberEventType> | ||
>, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use client'; | ||
|
||
import React from "react"; | ||
import { EventName, createComponent } from "@lit/react"; | ||
import { WyNotificationToasts as WyNotificationToastsWC } from "@weavy/uikit-web"; | ||
import { WyLinkEventType } from "@weavy/uikit-web/dist/types/types/notifications.types"; | ||
|
||
// Creates a React component from a Lit component | ||
export const WyNotificationToasts = createComponent({ | ||
react: React, | ||
tagName: "wy-notification-toasts", | ||
elementClass: WyNotificationToastsWC, | ||
events: { | ||
onWyLink: "wy:link" as EventName< | ||
WyLinkEventType | ||
>, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use client'; | ||
|
||
import React from "react"; | ||
import { EventName, createComponent } from "@lit/react"; | ||
import { WyNotifications as WyNotificationsWC } from "@weavy/uikit-web"; | ||
import { WyLinkEventType } from "@weavy/uikit-web/dist/types/types/notifications.types"; | ||
|
||
// Creates a React component from a Lit component | ||
export const WyNotifications = createComponent({ | ||
react: React, | ||
tagName: "wy-notifications", | ||
elementClass: WyNotificationsWC, | ||
events: { | ||
onWyLink: "wy:link" as EventName< | ||
WyLinkEventType | ||
>, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,12 @@ | ||
'use client'; | ||
|
||
import React from "react"; | ||
import { EventName, createComponent } from "@lit/react"; | ||
import { createComponent } from "@lit/react"; | ||
import { WyPosts as WyPostsWC } from "@weavy/uikit-web"; | ||
import { | ||
RealtimeCommentEventType, | ||
RealtimePostEventType, | ||
RealtimeReactionEventType, | ||
} from "@weavy/uikit-web/dist/types/types/realtime.types"; | ||
|
||
// Creates a React component from a Lit component | ||
export const WyPosts = createComponent({ | ||
react: React, | ||
tagName: "wy-posts", | ||
elementClass: WyPostsWC, | ||
events: { | ||
onWyPostCreated: "wy:post_created" as EventName< | ||
CustomEvent<RealtimePostEventType> | ||
>, | ||
onWyCommentCreated: "wy:comment_created" as EventName< | ||
CustomEvent<RealtimeCommentEventType> | ||
>, | ||
onWyReactionAdded: "wy:reaction_added" as EventName< | ||
CustomEvent<RealtimeReactionEventType> | ||
>, | ||
onWyReactionRemoved: "wy:reaction_removed" as EventName< | ||
CustomEvent<RealtimeReactionEventType> | ||
>, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
export * from "./WyChat"; | ||
export * from "./WyComments"; | ||
export * from "./WyContext"; | ||
export * from "./WyFiles"; | ||
export * from "./WyMessenger"; | ||
export * from "./WyNotifications"; | ||
export * from "./WyNotificationToasts"; | ||
export * from "./WyPosts"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from "react"; | ||
import { createComponent } from "@lit/react"; | ||
import { WyBlobUpload as WyBlobUploadWC } from "@weavy/uikit-web" | ||
|
||
// Creates a React component from a Lit component | ||
export const WyBlobUpload = createComponent({ | ||
react: React, | ||
tagName: "wy-blob-upload", | ||
elementClass: WyBlobUploadWC, | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
import React from "react"; | ||
import { EventName, createComponent } from "@lit/react"; | ||
import { WyImageGrid as WyImageGridWC } from "@weavy/uikit-web"; | ||
import { FileType } from "@weavy/uikit-web/dist/types/types/files.types"; | ||
import { FileOpenEventType } from "@weavy/uikit-web/dist/types/types/files.types"; | ||
|
||
// Creates a React component from a Lit component | ||
export const WyImageGrid = createComponent({ | ||
react: React, | ||
tagName: "wy-image-grid", | ||
elementClass: WyImageGridWC, | ||
events: { | ||
onFileOpen: "file-open" as EventName< | ||
CustomEvent<{ | ||
file: FileType; | ||
}> | ||
>, | ||
onFileOpen: "file-open" as EventName<FileOpenEventType>, | ||
}, | ||
}); |
Oops, something went wrong.