Skip to content

Commit bc9114c

Browse files
netchampfarisclaude
andcommitted
refactor(tokens): migrate main's editor rewrite to espresso v2 names
Post-rebase pass for main's beta.4 changes (editor starter-kit rewrite + FrappeUI plugin). Ran the codemod on the 52 main-only files (4 changed) and the 3 conflict-resolved editor files taken from main's version (MediaToolbar, ImageGroupGridCell, ImageGroupNodeView): ink-white→base, surface-gray-7→10, and text-{xs,sm} font-medium merged to the combined style utilities — 18 renames + 2 weight merges across 7 files. Skipped IframeNodeView's `text-xl` (L206): the auto-merge kept this branch's already-migrated value (main's text-lg → v2 text-xl), so the codemod's text-xl→text-3xl would double-shift it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b409d34 commit bc9114c

7 files changed

Lines changed: 19 additions & 19 deletions

File tree

src/molecules/editor/components/MediaNodeView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ function setVideoOptions(options: {
296296
aria-live="assertive"
297297
class="absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 bg-black/65 p-3 text-center"
298298
>
299-
<div class="text-p-sm text-ink-white">{{ node.attrs.error }}</div>
299+
<div class="text-p-sm text-ink-base">{{ node.attrs.error }}</div>
300300
<div v-if="isEditable" class="flex flex-wrap justify-center gap-2">
301301
<Button size="xs" variant="subtle" @click.stop="retryUpload">
302302
Try again

src/molecules/editor/components/MediaToolbar.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ onUnmounted(() => {
8787
>
8888
<span
8989
class="lucide-captions size-4"
90-
:class="[showCaption ? 'text-ink-white' : 'text-ink-gray-4']"
90+
:class="[showCaption ? 'text-ink-base' : 'text-ink-gray-4']"
9191
/>
9292
</button>
9393
</Tooltip>
@@ -99,7 +99,7 @@ onUnmounted(() => {
9999
@click.stop="emit('replace')"
100100
>
101101
<span
102-
class="size-4 text-ink-gray-4 hover:text-ink-white"
102+
class="size-4 text-ink-gray-4 hover:text-ink-base"
103103
:class="mediaType === 'embed' ? 'lucide-link' : 'lucide-refresh-cw'"
104104
/>
105105
</button>
@@ -113,9 +113,9 @@ onUnmounted(() => {
113113
>
114114
<button
115115
type="button"
116-
class="hover:text-ink-white"
116+
class="hover:text-ink-base"
117117
:class="
118-
node.attrs.align === align.value ? 'text-ink-white' : 'text-ink-gray-4'
118+
node.attrs.align === align.value ? 'text-ink-base' : 'text-ink-gray-4'
119119
"
120120
:aria-label="align.label"
121121
:aria-pressed="node.attrs.align === align.value"
@@ -128,8 +128,8 @@ onUnmounted(() => {
128128
<button
129129
v-if="isVideo"
130130
type="button"
131-
class="hover:text-ink-white"
132-
:class="showVideoOptions ? 'text-ink-white' : 'text-ink-gray-4'"
131+
class="hover:text-ink-base"
132+
:class="showVideoOptions ? 'text-ink-base' : 'text-ink-gray-4'"
133133
aria-label="Video options"
134134
@click.stop="toggleVideoOptions"
135135
>
@@ -145,7 +145,7 @@ onUnmounted(() => {
145145
v-for="option in videoOptionKeys"
146146
:key="option"
147147
type="button"
148-
class="flex w-full items-center justify-between rounded px-2 py-1 text-left text-xs text-ink-gray-2 hover:bg-white/10 hover:text-ink-white"
148+
class="flex w-full items-center justify-between rounded px-2 py-1 text-left text-xs text-ink-gray-2 hover:bg-white/10 hover:text-ink-base"
149149
:aria-pressed="Boolean(node.attrs[option])"
150150
@click.stop="toggleVideoOption(option)"
151151
>

src/molecules/editor/components/VideoControls.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ function onTrackPointerUp() {
148148
<Tooltip :text="playing ? 'Pause' : 'Play'" class="h-5">
149149
<button
150150
type="button"
151-
class="text-ink-gray-2 hover:text-ink-white"
151+
class="text-ink-gray-2 hover:text-ink-base"
152152
:aria-label="playing ? 'Pause' : 'Play'"
153153
@click="togglePlay"
154154
>
@@ -184,7 +184,7 @@ function onTrackPointerUp() {
184184
<Tooltip :text="muted ? 'Unmute' : 'Mute'" class="h-5">
185185
<button
186186
type="button"
187-
class="text-ink-gray-2 hover:text-ink-white"
187+
class="text-ink-gray-2 hover:text-ink-base"
188188
:aria-label="muted ? 'Unmute' : 'Mute'"
189189
@click="toggleMute"
190190
>
@@ -197,7 +197,7 @@ function onTrackPointerUp() {
197197
<Tooltip text="Fullscreen" class="h-5">
198198
<button
199199
type="button"
200-
class="text-ink-gray-2 hover:text-ink-white"
200+
class="text-ink-gray-2 hover:text-ink-base"
201201
aria-label="Fullscreen"
202202
@click="toggleFullscreen"
203203
>

src/molecules/editor/extensions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function pushConfigured<O>(
128128
*/
129129
export const EditorDropcursor = Dropcursor.configure({
130130
width: 3,
131-
color: 'var(--surface-gray-7, #383838)',
131+
color: 'var(--surface-gray-10, #383838)',
132132
class: 'editor-drop-cursor',
133133
})
134134

src/molecules/editor/extensions/image-group/ImageGroupGridCell.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
aria-label="Remove image"
1010
@click.stop="$emit('remove')"
1111
>
12-
<span class="lucide-x size-4 text-ink-gray-4 hover:text-ink-white" />
12+
<span class="lucide-x size-4 text-ink-gray-4 hover:text-ink-base" />
1313
</button>
1414

1515
<!-- Unsupported preview (HEIC/HEIF): filename placeholder -->
@@ -86,7 +86,7 @@
8686
class="absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 bg-black/65 p-2 text-center"
8787
aria-live="assertive"
8888
>
89-
<div class="text-p-xs text-ink-white">
89+
<div class="text-p-xs text-ink-base">
9090
{{ item.error || 'Upload failed' }}
9191
</div>
9292
<div class="flex gap-2">

src/molecules/editor/extensions/image-group/ImageGroupNodeView.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<Tooltip text="Edit gallery" class="h-5">
1919
<button type="button" aria-label="Edit gallery" @click.stop="edit">
2020
<span
21-
class="lucide-pencil size-4 text-ink-gray-4 hover:text-ink-white"
21+
class="lucide-pencil size-4 text-ink-gray-4 hover:text-ink-base"
2222
/>
2323
</button>
2424
</Tooltip>
@@ -31,8 +31,8 @@
3131
>
3232
<button
3333
type="button"
34-
class="px-0.5 text-xs font-medium tabular-nums hover:text-ink-white"
35-
:class="columns === n ? 'text-ink-white' : 'text-ink-gray-4'"
34+
class="px-0.5 text-xs-medium tabular-nums hover:text-ink-base"
35+
:class="columns === n ? 'text-ink-base' : 'text-ink-gray-4'"
3636
:aria-label="`${n} columns`"
3737
:aria-pressed="columns === n"
3838
@click.stop="setColumns(n)"
@@ -56,7 +56,7 @@
5656
@click.stop="removeImage(idx)"
5757
>
5858
<span
59-
class="lucide-x size-4 text-ink-gray-4 hover:text-ink-white"
59+
class="lucide-x size-4 text-ink-gray-4 hover:text-ink-base"
6060
/>
6161
</button>
6262
<img

src/molecules/editor/extensions/suggestion/SuggestionList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<!-- Same idiom as the Dropdown group label (`dropdownClasses.groupLabel`). -->
1919
<div
2020
v-if="group.label"
21-
class="flex h-7 items-center px-2 text-sm font-medium text-ink-gray-4"
21+
class="flex h-7 items-center px-2 text-sm-medium text-ink-gray-4"
2222
>
2323
{{ group.label }}
2424
</div>

0 commit comments

Comments
 (0)