Skip to content

Commit

Permalink
chore(web connector): remove sugar-high
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcnk committed Aug 1, 2024
1 parent 6aead45 commit 7a9207a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 38 deletions.
1 change: 0 additions & 1 deletion packages/features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"react-twc": "1.4.1",
"recharts": "2.12.7",
"sonner": "1.5.0",
"sugar-high": "0.7.0",
"superjson": "2.2.1",
"tailwind-merge": "2.4.0",
"tailwindcss-animate": "1.0.7",
Expand Down
27 changes: 0 additions & 27 deletions packages/features/src/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,6 @@
@tailwind components;
@tailwind utilities;

/**
* Types that sugar-high have:
*
* identifier
* keyword
* string
* Class, number and null
* property
* entity
* jsx literals
* sign
* comment
* break
* space
*/
:root {
--sh-class: #9ccfd8;
--sh-identifier: #e0def4;
--sh-sign: #e0def4;
--sh-property: #908caa;
--sh-entity: #ebbcba;
--sh-jsxliterals: #9ccfd8;
--sh-string: #908caa;
--sh-keyword: #908caa;
--sh-comment: #908caa;
}

:base {
--mint: #a3dbe4;
}
Expand Down
3 changes: 1 addition & 2 deletions packages/features/src/web-connector/routes/web-connector.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useEffect, useState } from "react"
import type { SubmitHandler } from "react-hook-form"
import { MemoryRouter } from "react-router-dom"
import { highlight } from "sugar-high"
import { runtime, windows } from "webextension-polyfill"
import xss from "xss"
import yaml from "yaml"
Expand All @@ -11,7 +10,7 @@ import { WebConnectorView } from "../views/web-connector"
const sanitizePayload = async (payload: string) => {
const parsedPayload = JSON.parse(payload) as Record<string, any>
const yamlPayload = yaml.stringify(parsedPayload)
return highlight(xss(yamlPayload))
return xss(yamlPayload)
}

type ActionRequest = {
Expand Down
8 changes: 0 additions & 8 deletions pnpm-lock.yaml

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

0 comments on commit 7a9207a

Please sign in to comment.