Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions site/app/code-example.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Code } from 'codice'
import { Code } from '@sugar-high/react'

const CODE_SIMPLE_SNIPPET_HTML = `\
# Here is a simple function
Expand All @@ -10,7 +10,7 @@ hello()
`

const CODE_ULTIMATE_SNIPPET_HTML = `\
import { Code } from 'codice'
import { Code } from '@sugar-high/react'
import { highlight } from 'sugar-high'

function renderMarkup() {
Expand Down
2 changes: 1 addition & 1 deletion site/app/editor-example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { LiveEditor } from './live-editor'

const defaultCode = `\
import { useState } from 'react'
import { Editor } from 'codice'
import { Editor } from '@sugar-high/react'

const defaultText = 'console.log("hello world")'

Expand Down
2 changes: 1 addition & 1 deletion site/app/live-editor.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

import { Editor } from 'codice'
import { Editor } from '@sugar-high/react'
import React, { startTransition, useActionState, useEffect, useRef, useState } from 'react'
import { format as prettierFormat } from 'prettier/standalone'
import { toPng } from 'html-to-image'
Expand Down
2 changes: 1 addition & 1 deletion site/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EditorExample } from './editor-example'
import { CodeExamples } from './code-example'
import { Code } from 'codice'
import { Code } from '@sugar-high/react'

type SearchParams = {
c?: string // default code
Expand Down
3 changes: 1 addition & 2 deletions site/app/studio/editor-manager.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

import { Editor } from 'codice'
import { Editor } from '@sugar-high/react'
import { EditorConfig } from './page'
import './studio.css'

Expand Down Expand Up @@ -49,4 +49,3 @@ export function EditorManager({ editor, onUpdate, editorRef, onTakeScreenshot }:
</div>
)
}

15 changes: 15 additions & 0 deletions site/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { NextConfig } from 'next'

const nextConfig: NextConfig = {
async redirects() {
return [
{
source: '/:path*',
destination: 'https://sugar-high.vercel.app/react',
permanent: true,
},
]
},
}

export default nextConfig
5 changes: 3 additions & 2 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
"start": "next start"
},
"dependencies": {
"codice": "workspace:*",
"@sugar-high/react": "^1.0.0",
"html-to-image": "^1.11.13",
"prettier": "^3.6.2",
"react": "^19.2.1",
"react-dom": "^19.2.1"
"react-dom": "^19.2.1",
"sugar-high": "^2.0.0"
},
"devDependencies": {
"@types/node": "^22.10.7",
Expand Down
2 changes: 1 addition & 1 deletion site/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"incremental": true,
"module": "esnext",
"esModuleInterop": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
Expand Down
Loading