|
|
"content": "\"use client\"\n\nimport { chakra } from \"@chakra-ui/react\"\n\nexport const Prose = chakra(\"div\", {\n base: {\n color: \"fg.muted\",\n maxWidth: \"65ch\",\n fontSize: \"sm\",\n lineHeight: \"1.7em\",\n \"& p\": {\n marginTop: \"1em\",\n marginBottom: \"1em\",\n },\n \"& blockquote\": {\n marginTop: \"1.285em\",\n marginBottom: \"1.285em\",\n paddingInline: \"1.285em\",\n borderInlineStartWidth: \"0.25em\",\n },\n \"& a\": {\n color: \"fg\",\n textDecoration: \"underline\",\n textUnderlineOffset: \"3px\",\n textDecorationThickness: \"2px\",\n textDecorationColor: \"border.muted\",\n fontWeight: \"500\",\n },\n \"& strong\": {\n fontWeight: \"600\",\n },\n \"& a strong\": {\n color: \"inherit\",\n },\n \"& h1\": {\n fontSize: \"2.15em\",\n letterSpacing: \"-0.02em\",\n marginTop: \"0\",\n marginBottom: \"0.8em\",\n lineHeight: \"1.2em\",\n },\n \"& h2\": {\n fontSize: \"1.4em\",\n letterSpacing: \"-0.02em\",\n marginTop: \"1.6em\",\n marginBottom: \"0.8em\",\n lineHeight: \"1.4em\",\n },\n \"& h3\": {\n fontSize: \"1.285em\",\n letterSpacing: \"-0.01em\",\n marginTop: \"1.5em\",\n marginBottom: \"0.4em\",\n lineHeight: \"1.5em\",\n },\n \"& h4\": {\n marginTop: \"1.4em\",\n marginBottom: \"0.5em\",\n letterSpacing: \"-0.01em\",\n lineHeight: \"1.5em\",\n },\n \"& img\": {\n marginTop: \"1.7em\",\n marginBottom: \"1.7em\",\n borderRadius: \"lg\",\n boxShadow: \"inset\",\n },\n \"& picture\": {\n marginTop: \"1.7em\",\n marginBottom: \"1.7em\",\n },\n \"& picture > img\": {\n marginTop: \"0\",\n marginBottom: \"0\",\n },\n \"& video\": {\n marginTop: \"1.7em\",\n marginBottom: \"1.7em\",\n },\n \"& kbd\": {\n fontSize: \"0.85em\",\n borderRadius: \"xs\",\n paddingTop: \"0.15em\",\n paddingBottom: \"0.15em\",\n paddingInlineEnd: \"0.35em\",\n paddingInlineStart: \"0.35em\",\n fontFamily: \"inherit\",\n color: \"fg.muted\",\n \"--shadow\": \"colors.border\",\n boxShadow: \"0 0 0 1px var(--shadow),0 1px 0 1px var(--shadow)\",\n },\n \"& code\": {\n fontSize: \"0.925em\",\n letterSpacing: \"-0.01em\",\n borderRadius: \"md\",\n borderWidth: \"1px\",\n padding: \"0.25em\",\n },\n \"& pre code\": {\n fontSize: \"inherit\",\n letterSpacing: \"inherit\",\n borderWidth: \"inherit\",\n padding: \"0\",\n },\n \"& h2 code\": {\n fontSize: \"0.9em\",\n },\n \"& h3 code\": {\n fontSize: \"0.8em\",\n },\n \"& pre\": {\n backgroundColor: \"bg.subtle\",\n marginTop: \"1.6em\",\n marginBottom: \"1.6em\",\n borderRadius: \"md\",\n fontSize: \"0.9em\",\n paddingTop: \"0.65em\",\n paddingBottom: \"0.65em\",\n paddingInlineEnd: \"1em\",\n paddingInlineStart: \"1em\",\n overflowX: \"auto\",\n fontWeight: \"400\",\n },\n \"& ol\": {\n marginTop: \"1em\",\n marginBottom: \"1em\",\n paddingInlineStart: \"1.5em\",\n },\n \"& ul\": {\n marginTop: \"1em\",\n marginBottom: \"1em\",\n paddingInlineStart: \"1.5em\",\n },\n \"& li\": {\n marginTop: \"0.285em\",\n marginBottom: \"0.285em\",\n },\n \"& ol > li\": {\n paddingInlineStart: \"0.4em\",\n listStyleType: \"decimal\",\n \"&::marker\": {\n color: \"fg.muted\",\n },\n },\n \"& ul > li\": {\n paddingInlineStart: \"0.4em\",\n listStyleType: \"disc\",\n \"&::marker\": {\n color: \"fg.muted\",\n },\n },\n \"& > ul > li p\": {\n marginTop: \"0.5em\",\n marginBottom: \"0.5em\",\n },\n \"& > ul > li > p:first-of-type\": {\n marginTop: \"1em\",\n },\n \"& > ul > li > p:last-of-type\": {\n marginBottom: \"1em\",\n },\n \"& > ol > li > p:first-of-type\": {\n marginTop: \"1em\",\n },\n \"& > ol > li > p:last-of-type\": {\n marginBottom: \"1em\",\n },\n \"& ul ul, ul ol, ol ul, ol ol\": {\n marginTop: \"0.5em\",\n marginBottom: \"0.5em\",\n },\n \"& dl\": {\n marginTop: \"1em\",\n marginBottom: \"1em\",\n },\n \"& dt\": {\n fontWeight: \"600\",\n marginTop: \"1em\",\n },\n \"& dd\": {\n marginTop: \"0.285em\",\n paddingInlineStart: \"1.5em\",\n },\n \"& hr\": {\n marginTop: \"2.25em\",\n marginBottom: \"2.25em\",\n },\n \"& :is(h1,h2,h3,h4,h5,hr) + *\": {\n marginTop: \"0\",\n },\n \"& table\": {\n width: \"100%\",\n tableLayout: \"auto\",\n textAlign: \"start\",\n lineHeight: \"1.5em\",\n marginTop: \"2em\",\n marginBottom: \"2em\",\n },\n \"& thead\": {\n borderBottomWidth: \"1px\",\n color: \"fg\",\n },\n \"& tbody tr\": {\n borderBottomWidth: \"1px\",\n borderBottomColor: \"border\",\n },\n \"& thead th\": {\n paddingInlineEnd: \"1em\",\n paddingBottom: \"0.65em\",\n paddingInlineStart: \"1em\",\n fontWeight: \"medium\",\n textAlign: \"start\",\n },\n \"& thead th:first-of-type\": {\n paddingInlineStart: \"0\",\n },\n \"& thead th:last-of-type\": {\n paddingInlineEnd: \"0\",\n },\n \"& tbody td, tfoot td\": {\n paddingTop: \"0.65em\",\n paddingInlineEnd: \"1em\",\n paddingBottom: \"0.65em\",\n paddingInlineStart: \"1em\",\n },\n \"& tbody td:first-of-type, tfoot td:first-of-type\": {\n paddingInlineStart: \"0\",\n },\n \"& tbody td:last-of-type, tfoot td:last-of-type\": {\n paddingInlineEnd: \"0\",\n },\n \"& figure\": {\n marginTop: \"1.625em\",\n marginBottom: \"1.625em\",\n },\n \"& figure > *\": {\n marginTop: \"0\",\n marginBottom: \"0\",\n },\n \"& figcaption\": {\n fontSize: \"0.85em\",\n lineHeight: \"1.25em\",\n marginTop: \"0.85em\",\n color: \"fg.muted\",\n },\n \"& h1, h2, h3, h4\": {\n color: \"fg\",\n fontWeight: \"600\",\n },\n },\n variants: {\n size: {\n md: {\n fontSize: \"sm\",\n },\n lg: {\n fontSize: \"md\",\n },\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n})\n" |