@lexibase/rdx-ui 3.5.0 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -130,7 +130,7 @@ export function DocsSidebar({
|
|
|
130
130
|
</div>
|
|
131
131
|
<aside
|
|
132
132
|
data-rdx-sidebar
|
|
133
|
-
className="hidden md:block h-full w-40 lg:w-56 shrink-0 border-r border-border overflow-y-auto p-4"
|
|
133
|
+
className="hidden md:block h-full w-40 lg:w-56 shrink-0 border-r border-border overflow-y-auto scrollbar-none p-4"
|
|
134
134
|
>
|
|
135
135
|
{content}
|
|
136
136
|
</aside>
|
|
@@ -142,7 +142,7 @@ export function DocsSidebar({
|
|
|
142
142
|
showCloseButton={false}
|
|
143
143
|
portalProps={{ keepMounted: true }}
|
|
144
144
|
data-rdx-mobile-sidebar
|
|
145
|
-
className="md:hidden w-full! max-w-none! h-dvh border-0 bg-background text-foreground gap-0 p-4 overflow-y-auto translate-none! opacity-100! transition-none!"
|
|
145
|
+
className="md:hidden w-full! max-w-none! h-dvh border-0 bg-background text-foreground gap-0 p-4 overflow-y-auto scrollbar-none translate-none! opacity-100! transition-none!"
|
|
146
146
|
render={
|
|
147
147
|
<motion.div
|
|
148
148
|
initial="closed"
|
|
@@ -106,6 +106,7 @@ export function MdxCodeBlock({
|
|
|
106
106
|
if (lineNumbers && node === '\n') return null
|
|
107
107
|
if (!isValidElement<LineProps>(node)) return node
|
|
108
108
|
const variant = node.props['data-rdx-line-variant']
|
|
109
|
+
const hasDiffMarker = variant === 'added' || variant === 'removed'
|
|
109
110
|
if (
|
|
110
111
|
!variant &&
|
|
111
112
|
!(lineNumbers && node.props.className?.split(/\s+/).includes('line'))
|
|
@@ -124,15 +125,20 @@ export function MdxCodeBlock({
|
|
|
124
125
|
return (
|
|
125
126
|
<CodeBlockLine
|
|
126
127
|
key={node.key}
|
|
128
|
+
className={
|
|
129
|
+
hasDiffMarker
|
|
130
|
+
? '[&>[data-slot=code-block-line-content]]:ps-[1ch]'
|
|
131
|
+
: undefined
|
|
132
|
+
}
|
|
127
133
|
variant={
|
|
128
|
-
|
|
134
|
+
hasDiffMarker
|
|
129
135
|
? variant
|
|
130
136
|
: variant === 'hunk'
|
|
131
137
|
? 'highlighted'
|
|
132
138
|
: 'default'
|
|
133
139
|
}
|
|
134
140
|
>
|
|
135
|
-
{
|
|
141
|
+
{hasDiffMarker
|
|
136
142
|
? withoutMarker(node.props.children)
|
|
137
143
|
: node.props.children}
|
|
138
144
|
</CodeBlockLine>
|