diff --git a/app/typings/styled-components.d.ts b/app/typings/styled-components.d.ts index 0450ab042..c8e571d58 100644 --- a/app/typings/styled-components.d.ts +++ b/app/typings/styled-components.d.ts @@ -4,6 +4,7 @@ import "styled-components"; // and extend them! declare module "styled-components" { interface EditorTheme { + isDark: boolean; background: string; text: string; cursor: string; diff --git a/public/images/gliffy.png b/public/images/gliffy.png new file mode 100644 index 000000000..e0a9e0390 Binary files /dev/null and b/public/images/gliffy.png differ diff --git a/public/images/jsfiddle.png b/public/images/jsfiddle.png new file mode 100644 index 000000000..92816f233 Binary files /dev/null and b/public/images/jsfiddle.png differ diff --git a/public/images/otter.png b/public/images/otter.png new file mode 100644 index 000000000..286e66f19 Binary files /dev/null and b/public/images/otter.png differ diff --git a/shared/editor/embeds/Gliffy.tsx b/shared/editor/embeds/Gliffy.tsx new file mode 100644 index 000000000..e0330ffe5 --- /dev/null +++ b/shared/editor/embeds/Gliffy.tsx @@ -0,0 +1,13 @@ +import * as React from "react"; +import Frame from "../components/Frame"; +import { EmbedProps as Props } from "."; + +function Gliffy(props: Props) { + return ( + + ); +} + +Gliffy.ENABLED = [new RegExp("https?://go.gliffy.com/go/share/(.*)$")]; + +export default Gliffy; diff --git a/shared/editor/embeds/JSFiddle.tsx b/shared/editor/embeds/JSFiddle.tsx new file mode 100644 index 000000000..49249ef7c --- /dev/null +++ b/shared/editor/embeds/JSFiddle.tsx @@ -0,0 +1,25 @@ +import * as React from "react"; +import { useTheme } from "styled-components"; +import Frame from "../components/Frame"; +import { EmbedProps as Props } from "."; + +function JSFiddle(props: Props) { + const normalizedUrl = props.attrs.href.replace(/(\/embedded)?\/$/, ""); + const theme = useTheme(); + + return ( + + ); +} + +JSFiddle.ENABLED = [new RegExp("https?://jsfiddle.net/(.*)/(.*)$")]; + +export default JSFiddle; diff --git a/shared/editor/embeds/Otter.tsx b/shared/editor/embeds/Otter.tsx new file mode 100644 index 000000000..51055e60c --- /dev/null +++ b/shared/editor/embeds/Otter.tsx @@ -0,0 +1,19 @@ +import * as React from "react"; +import Frame from "../components/Frame"; +import { EmbedProps as Props } from "."; + +function Otter(props: Props) { + return ( + + ); +} + +Otter.ENABLED = [new RegExp("https?://otter.ai/[su]/(.*)$")]; + +export default Otter; diff --git a/shared/editor/embeds/index.tsx b/shared/editor/embeds/index.tsx index e6317f105..8c415f970 100644 --- a/shared/editor/embeds/index.tsx +++ b/shared/editor/embeds/index.tsx @@ -15,6 +15,7 @@ import Diagrams from "./Diagrams"; import Figma from "./Figma"; import Framer from "./Framer"; import Gist from "./Gist"; +import Gliffy from "./Gliffy"; import GoogleCalendar from "./GoogleCalendar"; import GoogleDataStudio from "./GoogleDataStudio"; import GoogleDocs from "./GoogleDocs"; @@ -23,12 +24,14 @@ import GoogleDrive from "./GoogleDrive"; import GoogleSheets from "./GoogleSheets"; import GoogleSlides from "./GoogleSlides"; import InVision from "./InVision"; +import JSFiddle from "./JSFiddle"; import Loom from "./Loom"; import Lucidchart from "./Lucidchart"; import Marvel from "./Marvel"; import Mindmeister from "./Mindmeister"; import Miro from "./Miro"; import ModeAnalytics from "./ModeAnalytics"; +import Otter from "./Otter"; import Pitch from "./Pitch"; import Prezi from "./Prezi"; import Spotify from "./Spotify"; @@ -160,6 +163,13 @@ const embeds: EmbedDescriptor[] = [ component: Gist, matcher: matcher(Gist), }, + { + title: "Gliffy", + keywords: "diagram", + icon: () => Gliffy, + component: Gliffy, + matcher: matcher(Gliffy), + }, { title: "Diagrams.net", keywords: "diagrams drawio", @@ -226,6 +236,14 @@ const embeds: EmbedDescriptor[] = [ component: InVision, matcher: matcher(InVision), }, + { + title: "JSFiddle", + keywords: "code", + defaultHidden: true, + icon: () => JSFiddle, + component: JSFiddle, + matcher: matcher(JSFiddle), + }, { title: "Loom", keywords: "video screencast", @@ -269,6 +287,14 @@ const embeds: EmbedDescriptor[] = [ component: ModeAnalytics, matcher: matcher(ModeAnalytics), }, + { + title: "Otter.ai", + keywords: "audio transcription meeting notes", + defaultHidden: true, + icon: () => Otter.ai, + component: Otter, + matcher: matcher(Otter), + }, { title: "Pitch", keywords: "presentation", diff --git a/shared/styles/theme.ts b/shared/styles/theme.ts index 60ab07633..c936dd95a 100644 --- a/shared/styles/theme.ts +++ b/shared/styles/theme.ts @@ -92,6 +92,7 @@ export const base = { export const light = { ...base, + isDark: false, background: colors.white, secondaryBackground: colors.warmGrey, link: colors.primary, @@ -149,6 +150,7 @@ export const light = { export const dark = { ...base, + isDark: true, background: colors.almostBlack, secondaryBackground: colors.black50, link: "#137FFB",