Skip to content

Commit 3761864

Browse files
committed
feat: move to /highlight, update shiki & sugar-high imports
1 parent ec32be0 commit 3761864

9 files changed

Lines changed: 10 additions & 10 deletions

File tree

apps/website/src/components/code-block/blocks/inline-code.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import type { Languages } from "@/utils/shiki";
3+
import type { Languages } from "@/utils/shiki/highlight";
44

55
import {
66
CodeBlock,

apps/website/src/components/code-block/blocks/multi-tabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Languages } from "@/utils/shiki";
1+
import type { Languages } from "@/utils/shiki/highlight";
22

33
import {
44
CodeBlock,

apps/website/src/components/code-block/client/shiki.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { useEffect, useState, type ComponentProps } from "react";
44

55
import { cn } from "@/utils/cn";
6-
import { highlight, Themes, type Languages } from "@/utils/shiki";
6+
import { highlight, Themes, type Languages } from "@/utils/shiki/highlight";
77

88
interface CodeblockClientShikiProps extends ComponentProps<"div"> {
99
code: string;

apps/website/src/components/code-block/client/sugar-high.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import type { ComponentProps } from "react";
44

55
import { cn } from "@/utils/cn";
6-
import { highlight } from "@/utils/sugar-high";
6+
import { highlight } from "@/utils/sugar-high/highlight";
77

88
interface CodeBlockSugarHighProps extends ComponentProps<"pre"> {
99
code: string;

apps/website/src/components/code-block/mdx/pre-sugar-high.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ComponentProps } from "react";
22
import type { MDXComponents } from "mdx/types";
33

4-
import { highlight } from "@/utils/sugar-high";
4+
import { highlight } from "@/utils/sugar-high/highlight";
55
import { reactToText } from "@/utils/react-to-text";
66

77
import {

apps/website/src/components/registry/data.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,27 @@ const UtilsFiles: RegistryComponent[] = [
3939
{
4040
title: "Shiki Highlighter",
4141
fileType: "ts",
42-
fileSource: `${utilsFolder}/shiki/index.ts`,
42+
fileSource: `${utilsFolder}/shiki/highlight.ts`,
4343
group: "shiki",
4444
shadcnRegistry: {
4545
name: "shiki-highlighter",
4646
type: "registry:lib",
4747
dependencies: ["shiki", "@shikijs/themes", "@shikijs/langs"],
4848
registryDependencies: ["shiki-css"],
49-
target: "src/utils/shiki/index.ts",
49+
target: "src/utils/shiki/highlight.ts",
5050
},
5151
},
5252
{
5353
title: "Sugar High Highlighter",
5454
fileType: "ts",
55-
fileSource: `${utilsFolder}/sugar-high/index.ts`,
55+
fileSource: `${utilsFolder}/sugar-high/highlight.ts`,
5656
group: "sugar-high",
5757
shadcnRegistry: {
5858
name: "sugar-high-highlighter",
5959
type: "registry:lib",
6060
dependencies: ["sugar-high"],
6161
registryDependencies: ["sugar-high-css"],
62-
target: "src/utils/sugar-high/index.ts",
62+
target: "src/utils/sugar-high/highlight.ts",
6363
},
6464
},
6565
{

apps/website/src/components/registry/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Languages } from "@/utils/shiki";
1+
import type { Languages } from "@/utils/shiki/highlight";
22
import type { ComponentType, LazyExoticComponent } from "react";
33

44
// https://ui.shadcn.com/docs/registry/registry-item-json#type
File renamed without changes.

0 commit comments

Comments
 (0)