Vendor opencode source for docker build

This commit is contained in:
southseact-3d
2026-02-07 20:54:46 +00:00
parent b30ff1cfa4
commit efda260214
3195 changed files with 387717 additions and 1 deletions

View File

@@ -0,0 +1,72 @@
// @ts-nocheck
import React from "react"
import { Font, Text as JEText, type TextProps } from "@jsx-email/all"
import { baseText } from "./styles"
export function Text(props: TextProps) {
return <JEText {...props} style={{ ...baseText, ...props.style }} />
}
export function Title({ children }: TitleProps) {
return React.createElement("title", null, children)
}
export function A({ children, ...props }: AProps) {
return React.createElement("a", props, children)
}
export function Span({ children, ...props }: SpanProps) {
return React.createElement("span", props, children)
}
export function Wbr({ children, ...props }: WbrProps) {
return React.createElement("wbr", props, children)
}
export function Fonts({ assetsUrl }: { assetsUrl: string }) {
return (
<>
<Font
fontFamily="JetBrains Mono"
fallbackFontFamily="monospace"
webFont={{
url: `${assetsUrl}/JetBrainsMono-Regular.woff2`,
format: "woff2",
}}
fontWeight="400"
fontStyle="normal"
/>
<Font
fontFamily="JetBrains Mono"
fallbackFontFamily="monospace"
webFont={{
url: `${assetsUrl}/JetBrainsMono-Medium.woff2`,
format: "woff2",
}}
fontWeight="500"
fontStyle="normal"
/>
<Font
fontFamily="Rubik"
fallbackFontFamily={["Helvetica", "Arial", "sans-serif"]}
webFont={{
url: `${assetsUrl}/rubik-latin.woff2`,
format: "woff2",
}}
fontWeight="400 500 600 700"
fontStyle="normal"
/>
</>
)
}
export function SplitString({ text, split }: { text: string; split: number }) {
const segments: JSX.Element[] = []
for (let i = 0; i < text.length; i += split) {
segments.push(<>{text.slice(i, i + split)}</>)
if (i + split < text.length) {
segments.push(<Wbr key={`${i}wbr`} />)
}
}
return <>{segments}</>
}

View File

@@ -0,0 +1,91 @@
// @ts-nocheck
export const unit = 12
export const PRIMARY_COLOR = "#211E1E"
export const TEXT_COLOR = "#656363"
export const LINK_COLOR = "#007AFF"
export const LINK_BACKGROUND_COLOR = "#F9F8F8"
export const BACKGROUND_COLOR = "#F0F0F1"
export const SURFACE_DIVIDER_COLOR = "#D5D5D9"
export const body = {
background: BACKGROUND_COLOR,
}
export const container = {
minWidth: "600px",
padding: "64px 0px",
}
export const frame = {
padding: `${unit * 2}px`,
border: `1px solid ${SURFACE_DIVIDER_COLOR}`,
background: "#FFF",
borderRadius: "6px",
boxShadow: `0 1px 2px rgba(0,0,0,0.03),
0 2px 4px rgba(0,0,0,0.03),
0 2px 6px rgba(0,0,0,0.03)`,
}
export const baseText = {
fontFamily: "JetBrains Mono, monospace",
}
export const headingText = {
color: PRIMARY_COLOR,
fontSize: "16px",
fontStyle: "normal",
fontWeight: 500,
lineHeight: "normal",
}
export const contentText = {
color: TEXT_COLOR,
fontSize: "14px",
fontStyle: "normal",
fontWeight: 400,
lineHeight: "180%",
}
export const buttonText = {
color: "#FDFCFC",
fontSize: "16px",
fontWeight: 500,
margin: 0,
padding: 0,
display: "inline-flex",
alignItems: "center",
gap: "12px",
}
export const linkText = {
color: LINK_COLOR,
fontSize: "14px",
fontStyle: "normal",
fontWeight: 400,
lineHeight: "150%",
textDecorationLine: "underline",
textDecorationStyle: "solid" as const,
textDecorationSkipInk: "auto" as const,
textDecorationThickness: "auto",
textUnderlineOffset: "auto",
textUnderlinePosition: "from-font",
borderRadius: "4px",
background: LINK_BACKGROUND_COLOR,
padding: "8px 12px",
textAlign: "center" as const,
}
export const contentHighlightText = {
color: PRIMARY_COLOR,
}
export const button = {
display: "inline-grid",
padding: "8px 12px 8px 20px",
justifyContent: "center",
alignItems: "center",
gap: "8px",
flexShrink: "0",
borderRadius: "4px",
backgroundColor: PRIMARY_COLOR,
}

View File

@@ -0,0 +1,82 @@
// @ts-nocheck
import React from "react"
import { Img, Row, Html, Link, Body, Head, Button, Column, Preview, Section, Container } from "@jsx-email/all"
import { Text, Fonts, Title, A, Span } from "../components"
import {
unit,
body,
frame,
headingText,
container,
contentText,
button,
contentHighlightText,
linkText,
buttonText,
} from "../styles"
const CONSOLE_URL = "https://opencode.ai/"
interface InviteEmailProps {
inviter: string
workspaceID: string
workspaceName: string
assetsUrl: string
}
export const InviteEmail = ({
inviter = "test@anoma.ly",
workspaceID = "wrk_01K6XFY7V53T8XN0A7X8G9BTN3",
workspaceName = "anomaly",
assetsUrl = `${CONSOLE_URL}email`,
}: InviteEmailProps) => {
const messagePlain = `${inviter} invited you to join the ${workspaceName} workspace.`
const url = `${CONSOLE_URL}workspace/${workspaceID}`
return (
<Html lang="en">
<Head>
<Title>{`OpenCode — ${messagePlain}`}</Title>
</Head>
<Fonts assetsUrl={assetsUrl} />
<Preview>{messagePlain}</Preview>
<Body style={body} id={Math.random().toString()}>
<Container style={container}>
<Section style={frame}>
<Row>
<Column>
<A href={`${CONSOLE_URL}zen`}>
<Img height="32" alt="OpenCode Logo" src={`${assetsUrl}/logo.png`} />
</A>
</Column>
</Row>
<Section style={{ padding: `${unit * 2}px 0 0 0` }}>
<Text style={headingText}>Join your team's OpenCode workspace</Text>
<Text style={contentText}>
You have been invited by <Span style={contentHighlightText}>{inviter}</Span> to join the{" "}
<Span style={contentHighlightText}>{workspaceName}</Span> workspace on OpenCode.
</Text>
</Section>
<Section style={{ padding: `${unit}px 0 0 0` }}>
<Button style={button} href={url}>
<Text style={buttonText}>
Join workspace
<Img width="24" height="24" src={`${assetsUrl}/right-arrow.png`} alt="Arrow right" />
</Text>
</Button>
</Section>
<Section style={{ padding: `${unit}px 0 0 0` }}>
<Text style={contentText}>Button not working? Copy the following link...</Text>
<Link href={url}>
<Text style={linkText}>{url}</Text>
</Link>
</Section>
</Section>
</Container>
</Body>
</Html>
)
}
export default InviteEmail

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB