Files
supabase/apps/www/components/CodeBlock/CodeBlock.utils.js
Steve Chavez cb66b6b635 feat: blog post postgrest 13 (#38840)
* add CodeTabs component to www
* add  to www mdx components
2025-09-30 14:37:07 -05:00

466 lines
9.1 KiB
JavaScript

const monokaiCustomTheme = {
dark: {
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: '#161616',
color: '#ddd',
},
'hljs-tag': {
color: '#569cd6',
},
'hljs-keyword': {
color: '#569cd6',
fontWeight: 'normal',
},
'hljs-selector-tag': {
color: '#569cd6',
fontWeight: 'normal',
},
'hljs-literal': {
color: '#569cd6',
fontWeight: 'normal',
},
'hljs-strong': {
color: '#569cd6',
},
'hljs-name': {
color: '#569cd6',
},
'hljs-code': {
color: '#66d9ef',
},
'hljs-class .hljs-title': {
color: 'gray',
},
'hljs-attribute': {
color: '#bf79db',
},
'hljs-symbol': {
color: '#bf79db',
},
'hljs-regexp': {
color: '#bf79db',
},
'hljs-link': {
color: '#bf79db',
},
'hljs-string': {
color: '#3ECF8E',
},
'hljs-bullet': {
color: '#3ECF8E',
},
'hljs-subst': {
color: '#3ECF8E',
},
'hljs-title': {
color: '#3ECF8E',
fontWeight: 'normal',
},
'hljs-section': {
color: '#3ECF8E',
fontWeight: 'normal',
},
'hljs-emphasis': {
color: '#3ECF8E',
},
'hljs-type': {
color: '#3ECF8E',
fontWeight: 'normal',
},
'hljs-built_in': {
color: '#3ECF8E',
},
'hljs-builtin-name': {
color: '#3ECF8E',
},
'hljs-selector-attr': {
color: '#3ECF8E',
},
'hljs-selector-pseudo': {
color: '#3ECF8E',
},
'hljs-addition': {
color: '#3ECF8E',
},
'hljs-variable': {
color: '#3ECF8E',
},
'hljs-template-tag': {
color: '#3ECF8E',
},
'hljs-template-variable': {
color: '#3ECF8E',
},
'hljs-comment': {
color: '#75715e',
},
'hljs-quote': {
color: '#75715e',
},
'hljs-deletion': {
color: '#75715e',
},
'hljs-meta': {
color: '#75715e',
},
'hljs-doctag': {
fontWeight: 'normal',
},
'hljs-selector-id': {
fontWeight: 'normal',
},
},
light: {
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: '#f9f9f9',
color: '#24292f',
},
'hljs-tag': {
color: '#0550ae',
},
'hljs-keyword': {
color: '#0550ae',
fontWeight: 'normal',
},
'hljs-selector-tag': {
color: '#0550ae',
fontWeight: 'normal',
},
'hljs-literal': {
color: '#0550ae',
fontWeight: 'normal',
},
'hljs-strong': {
color: '#0550ae',
},
'hljs-name': {
color: '#0550ae',
},
'hljs-code': {
color: '#66d9ef',
},
'hljs-class .hljs-title': {
color: 'gray',
},
'hljs-attribute': {
color: '#bf79db',
},
'hljs-symbol': {
color: '#bf79db',
},
'hljs-regexp': {
color: '#bf79db',
},
'hljs-link': {
color: '#bf79db',
},
'hljs-string': {
color: '#1B9657',
},
'hljs-bullet': {
color: '#1B9657',
},
'hljs-subst': {
color: '#1B9657',
},
'hljs-title': {
color: '#1B9657',
fontWeight: 'normal',
},
'hljs-section': {
color: '#1B9657',
fontWeight: 'normal',
},
'hljs-emphasis': {
color: '#1B9657',
},
'hljs-type': {
color: '#1B9657',
fontWeight: 'normal',
},
'hljs-built_in': {
color: '#1B9657',
},
'hljs-builtin-name': {
color: '#1B9657',
},
'hljs-selector-attr': {
color: '#1B9657',
},
'hljs-selector-pseudo': {
color: '#1B9657',
},
'hljs-addition': {
color: '#1B9657',
},
'hljs-variable': {
color: '#1B9657',
},
'hljs-template-tag': {
color: '#1B9657',
},
'hljs-template-variable': {
color: '#1B9657',
},
'hljs-comment': {
color: '#75715e',
},
'hljs-quote': {
color: '#75715e',
},
'hljs-deletion': {
color: '#75715e',
},
'hljs-meta': {
color: '#75715e',
},
'hljs-doctag': {
fontWeight: 'normal',
},
'hljs-selector-id': {
fontWeight: 'normal',
},
},
}
// CodeHike theme based on the colors from code-hike.scss
const codeHikeTheme = {
dark: {
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: '#2a2929', // --ch-16 dark
color: '#f8f8f2', // --ch-4
},
'hljs-tag': {
color: '#79c0ff', // --ch-2
},
'hljs-keyword': {
color: '#79c0ff', // --ch-2
fontWeight: 'normal',
},
'hljs-selector-tag': {
color: '#79c0ff', // --ch-2
fontWeight: 'normal',
},
'hljs-literal': {
color: '#79c0ff', // --ch-2
fontWeight: 'normal',
},
'hljs-strong': {
color: '#79c0ff', // --ch-2
},
'hljs-name': {
color: '#79c0ff', // --ch-2
},
'hljs-code': {
color: '#569cd6', // --ch-7
},
'hljs-class .hljs-title': {
color: '#8b949e', // --ch-1
},
'hljs-attribute': {
color: '#bda4ff', // --ch-5
},
'hljs-symbol': {
color: '#bda4ff', // --ch-5
},
'hljs-regexp': {
color: '#bda4ff', // --ch-5
},
'hljs-link': {
color: '#bda4ff', // --ch-5
},
'hljs-string': {
color: '#ffcda1', // --ch-3
},
'hljs-bullet': {
color: '#ffcda1', // --ch-3
},
'hljs-subst': {
color: '#ffcda1', // --ch-3
},
'hljs-title': {
color: '#ffcda1', // --ch-3
fontWeight: 'normal',
},
'hljs-section': {
color: '#ffcda1', // --ch-3
fontWeight: 'normal',
},
'hljs-emphasis': {
color: '#ffcda1', // --ch-3
},
'hljs-type': {
color: '#ffcda1', // --ch-3
fontWeight: 'normal',
},
'hljs-built_in': {
color: '#ffcda1', // --ch-3
},
'hljs-builtin-name': {
color: '#ffcda1', // --ch-3
},
'hljs-selector-attr': {
color: '#ffcda1', // --ch-3
},
'hljs-selector-pseudo': {
color: '#ffcda1', // --ch-3
},
'hljs-addition': {
color: '#ffcda1', // --ch-3
},
'hljs-variable': {
color: '#ffcda1', // --ch-3
},
'hljs-template-tag': {
color: '#ffcda1', // --ch-3
},
'hljs-template-variable': {
color: '#ffcda1', // --ch-3
},
'hljs-comment': {
color: '#8b949e', // --ch-1
},
'hljs-quote': {
color: '#8b949e', // --ch-1
},
'hljs-deletion': {
color: '#8b949e', // --ch-1
},
'hljs-meta': {
color: '#8b949e', // --ch-1
},
'hljs-doctag': {
fontWeight: 'normal',
},
'hljs-selector-id': {
fontWeight: 'normal',
},
},
light: {
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: '#eeeeee', // --ch-16 light
color: '#24292f', // --ch-4
},
'hljs-tag': {
color: '#0550ae', // --ch-2
},
'hljs-keyword': {
color: '#0550ae', // --ch-2
fontWeight: 'normal',
},
'hljs-selector-tag': {
color: '#0550ae', // --ch-2
fontWeight: 'normal',
},
'hljs-literal': {
color: '#0550ae', // --ch-2
fontWeight: 'normal',
},
'hljs-strong': {
color: '#0550ae', // --ch-2
},
'hljs-name': {
color: '#0550ae', // --ch-2
},
'hljs-code': {
color: '#cf222e', // --ch-7
},
'hljs-class .hljs-title': {
color: '#6e7781', // --ch-1
},
'hljs-attribute': {
color: '#8250df', // --ch-5
},
'hljs-symbol': {
color: '#8250df', // --ch-5
},
'hljs-regexp': {
color: '#8250df', // --ch-5
},
'hljs-link': {
color: '#8250df', // --ch-5
},
'hljs-string': {
color: '#953800', // --ch-3
},
'hljs-bullet': {
color: '#953800', // --ch-3
},
'hljs-subst': {
color: '#953800', // --ch-3
},
'hljs-title': {
color: '#953800', // --ch-3
fontWeight: 'normal',
},
'hljs-section': {
color: '#953800', // --ch-3
fontWeight: 'normal',
},
'hljs-emphasis': {
color: '#953800', // --ch-3
},
'hljs-type': {
color: '#953800', // --ch-3
fontWeight: 'normal',
},
'hljs-built_in': {
color: '#953800', // --ch-3
},
'hljs-builtin-name': {
color: '#953800', // --ch-3
},
'hljs-selector-attr': {
color: '#953800', // --ch-3
},
'hljs-selector-pseudo': {
color: '#953800', // --ch-3
},
'hljs-addition': {
color: '#953800', // --ch-3
},
'hljs-variable': {
color: '#953800', // --ch-3
},
'hljs-template-tag': {
color: '#953800', // --ch-3
},
'hljs-template-variable': {
color: '#953800', // --ch-3
},
'hljs-comment': {
color: '#6e7781', // --ch-1
},
'hljs-quote': {
color: '#6e7781', // --ch-1
},
'hljs-deletion': {
color: '#6e7781', // --ch-1
},
'hljs-meta': {
color: '#6e7781', // --ch-1
},
'hljs-doctag': {
fontWeight: 'normal',
},
'hljs-selector-id': {
fontWeight: 'normal',
},
},
}
export { codeHikeTheme }
export default monokaiCustomTheme