@widgetic/design-system 0.5.14 → 0.5.16
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/README.md +167 -0
- package/dist/components/CopyableHeader.svelte +25 -11
- package/dist/components/CopyableHeader.svelte.d.ts +4 -0
- package/dist/components/EmptyState.svelte +1 -1
- package/dist/components/PasswordInput.svelte +2 -2
- package/dist/components/WScrollArea.svelte +2 -2
- package/dist/components/ic/browser/BrowserInputController.svelte +2 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/modals/ActionModal.svelte +7 -2
- package/dist/components/modals/ActionModal.svelte.d.ts +2 -0
- package/dist/components/modals/BaseModal.svelte +4 -2
- package/dist/components/modals/BaseModal.svelte.d.ts +1 -0
- package/dist/components/modals/NewItemDialog.svelte +48 -30
- package/dist/components/modals/NewItemDialog.svelte.d.ts +3 -0
- package/dist/components/modals/Portal.svelte +9 -1
- package/dist/components/modals/README.md +34 -1
- package/dist/components/modals/RenameDialog.svelte +29 -9
- package/dist/components/modals/RenameDialog.svelte.d.ts +3 -0
- package/dist/components/modals/messages.d.ts +39 -0
- package/dist/components/modals/messages.js +10 -0
- package/dist/components/navigation/Breadcrumbs.svelte +55 -50
- package/dist/components/navigation/Breadcrumbs.svelte.d.ts +4 -0
- package/dist/components/navigation/types.d.ts +8 -0
- package/dist/components/pdf/PDFViewer.svelte +17 -8
- package/dist/components/pdf/PDFViewer.svelte.d.ts +5 -0
- package/dist/components/search-input/SearchInput.svelte +3 -3
- package/dist/components/shad-editor/colorpicker.svelte +4 -1
- package/dist/components/shad-editor/custom/Extentions/ImageExtention.d.ts +20 -1
- package/dist/components/shad-editor/custom/Extentions/ImageExtention.js +4 -1
- package/dist/components/shad-editor/custom/code-extended.svelte +4 -2
- package/dist/components/shad-editor/custom/image-extended-component.svelte +54 -32
- package/dist/components/shad-editor/editor.css +5 -5
- package/dist/components/shad-editor/i18n/context.d.ts +6 -0
- package/dist/components/shad-editor/i18n/context.js +11 -0
- package/dist/components/shad-editor/i18n/index.d.ts +8 -0
- package/dist/components/shad-editor/i18n/index.js +11 -0
- package/dist/components/shad-editor/i18n/messages.d.ts +109 -0
- package/dist/components/shad-editor/i18n/messages.js +116 -0
- package/dist/components/shad-editor/icons/block-quote.svelte +3 -1
- package/dist/components/shad-editor/icons/bold.svelte +3 -1
- package/dist/components/shad-editor/icons/buttle-list.svelte +3 -1
- package/dist/components/shad-editor/icons/code.svelte +3 -1
- package/dist/components/shad-editor/icons/highlighter.svelte +5 -3
- package/dist/components/shad-editor/icons/image.svelte +7 -5
- package/dist/components/shad-editor/icons/italic.svelte +3 -1
- package/dist/components/shad-editor/icons/link.svelte +8 -6
- package/dist/components/shad-editor/icons/ordered-list.svelte +3 -1
- package/dist/components/shad-editor/icons/quickcolor.svelte +24 -22
- package/dist/components/shad-editor/icons/redo.svelte +3 -1
- package/dist/components/shad-editor/icons/search-replace.svelte +16 -14
- package/dist/components/shad-editor/icons/strikethrough.svelte +3 -1
- package/dist/components/shad-editor/icons/subscript.svelte +3 -1
- package/dist/components/shad-editor/icons/superscript.svelte +3 -1
- package/dist/components/shad-editor/icons/table.svelte +21 -19
- package/dist/components/shad-editor/icons/task-list.svelte +3 -1
- package/dist/components/shad-editor/icons/text.svelte +13 -11
- package/dist/components/shad-editor/icons/textalign.svelte +11 -9
- package/dist/components/shad-editor/icons/textcolor.svelte +5 -3
- package/dist/components/shad-editor/icons/underline.svelte +3 -1
- package/dist/components/shad-editor/icons/undo.svelte +3 -1
- package/dist/components/shad-editor/index.d.ts +1 -0
- package/dist/components/shad-editor/index.js +2 -0
- package/dist/components/shad-editor/shad-editor.svelte +32 -3
- package/dist/components/shad-editor/shad-editor.svelte.d.ts +12 -0
- package/dist/components/textDirection.d.ts +91 -0
- package/dist/components/textDirection.js +99 -0
- package/dist/components/toast/ToasterModal.svelte +49 -14
- package/dist/components/toast/ToasterModal.svelte.d.ts +9 -2
- package/dist/components/toast/toasterRoots.d.ts +23 -0
- package/dist/components/toast/toasterRoots.js +36 -0
- package/dist/components/ui/alert/index.d.ts +2 -2
- package/dist/components/ui/alert/index.js +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-separator.svelte +1 -1
- package/dist/components/ui/calendar/calendar-next-button.svelte +21 -4
- package/dist/components/ui/calendar/calendar-next-button.svelte.d.ts +9 -2
- package/dist/components/ui/calendar/calendar-prev-button.svelte +21 -4
- package/dist/components/ui/calendar/calendar-prev-button.svelte.d.ts +9 -2
- package/dist/components/ui/calendar/calendar.svelte +18 -6
- package/dist/components/ui/calendar/calendar.svelte.d.ts +6 -1
- package/dist/components/ui/command/command-input.svelte +1 -1
- package/dist/components/ui/command/command-shortcut.svelte +1 -1
- package/dist/components/ui/dialog/dialog-content.svelte +5 -2
- package/dist/components/ui/dialog/dialog-content.svelte.d.ts +1 -0
- package/dist/components/ui/dialog/dialog-header.svelte +1 -1
- package/dist/components/ui/drawer/drawer-header.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +2 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +6 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +2 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +7 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +2 -2
- package/dist/components/ui/hover-card/hover-card-content.svelte +6 -0
- package/dist/components/ui/input-otp/input-otp-slot.svelte +1 -1
- package/dist/components/ui/popover/popover-content.svelte +6 -0
- package/dist/components/ui/progress/progress.svelte +2 -2
- package/dist/components/ui/range-calendar/range-calendar-cell.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-next-button.svelte +21 -4
- package/dist/components/ui/range-calendar/range-calendar-next-button.svelte.d.ts +9 -2
- package/dist/components/ui/range-calendar/range-calendar-prev-button.svelte +21 -4
- package/dist/components/ui/range-calendar/range-calendar-prev-button.svelte.d.ts +9 -2
- package/dist/components/ui/range-calendar/range-calendar.svelte +18 -6
- package/dist/components/ui/range-calendar/range-calendar.svelte.d.ts +7 -2
- package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte +1 -1
- package/dist/components/ui/scroll-area/scroll-area.svelte +6 -1
- package/dist/components/ui/select/select-content.svelte +6 -0
- package/dist/components/ui/select/select-group-heading.svelte +1 -1
- package/dist/components/ui/select/select-item.svelte +2 -2
- package/dist/components/ui/slider/slider.svelte +6 -0
- package/dist/components/ui/switch/switch.svelte +1 -1
- package/dist/components/ui/table/table-cell.svelte +1 -1
- package/dist/components/ui/table/table-head.svelte +1 -1
- package/dist/components/ui/tooltip/tooltip-content.svelte +6 -0
- package/dist/i18n/audit/catalogUsage.d.ts +36 -0
- package/dist/i18n/audit/catalogUsage.js +58 -0
- package/dist/i18n/audit/designSystemWords.d.ts +47 -0
- package/dist/i18n/audit/designSystemWords.js +137 -0
- package/dist/i18n/audit/hardCodedText.d.ts +40 -0
- package/dist/i18n/audit/hardCodedText.js +27 -0
- package/dist/i18n/audit/index.d.ts +19 -0
- package/dist/i18n/audit/index.js +19 -0
- package/dist/i18n/audit/messageCalls.d.ts +34 -0
- package/dist/i18n/audit/messageCalls.js +89 -0
- package/dist/i18n/audit/syntaxTree.d.ts +33 -0
- package/dist/i18n/audit/syntaxTree.js +90 -0
- package/dist/i18n/audit/visibleText.d.ts +57 -0
- package/dist/i18n/audit/visibleText.js +252 -0
- package/dist/i18n/createI18n.d.ts +63 -0
- package/dist/i18n/createI18n.js +72 -0
- package/dist/i18n/direction.d.ts +27 -0
- package/dist/i18n/direction.js +89 -0
- package/dist/i18n/index.d.ts +17 -0
- package/dist/i18n/index.js +16 -0
- package/dist/i18n/localeDate.d.ts +34 -0
- package/dist/i18n/localeDate.js +104 -0
- package/dist/i18n/splitMessages.d.ts +21 -0
- package/dist/i18n/splitMessages.js +33 -0
- package/dist/i18n/translator.d.ts +61 -0
- package/dist/i18n/translator.js +337 -0
- package/dist/rtl/audit/auditPhysicalPlacement.d.ts +36 -0
- package/dist/rtl/audit/auditPhysicalPlacement.js +58 -0
- package/dist/rtl/audit/index.d.ts +14 -0
- package/dist/rtl/audit/index.js +14 -0
- package/dist/rtl/audit/physicalPlacement.d.ts +64 -0
- package/dist/rtl/audit/physicalPlacement.js +444 -0
- package/dist/shad-editor/index.d.ts +1 -1
- package/dist/shad-editor/index.js +1 -1
- package/dist/styles/global.css +4 -4
- package/dist/utils/fillMessage.d.ts +8 -0
- package/dist/utils/fillMessage.js +10 -0
- package/dist/utils/itemName.d.ts +17 -0
- package/dist/utils/itemName.js +41 -0
- package/package.json +19 -2
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { SvelteNodeViewRenderer } from 'svelte-tiptap';
|
|
2
2
|
import ImageExtendedComponent from '../image-extended-component.svelte';
|
|
3
|
-
import Image from '@tiptap/extension-image';
|
|
3
|
+
import Image, {} from '@tiptap/extension-image';
|
|
4
4
|
export const ImageExtension = Image.extend({
|
|
5
|
+
addOptions() {
|
|
6
|
+
return { ...this.parent?.(), translate: null, textDirection: null };
|
|
7
|
+
},
|
|
5
8
|
addAttributes() {
|
|
6
9
|
return {
|
|
7
10
|
src: {
|
|
@@ -33,8 +33,10 @@
|
|
|
33
33
|
}
|
|
34
34
|
</script>
|
|
35
35
|
|
|
36
|
+
<!-- Code is read from left to right in every language, so a code block is a left to right island: its language and its copy button stay in the corners they are drawn in. -->
|
|
36
37
|
<NodeViewWrapper
|
|
37
38
|
class="code-wrapper group relative rounded bg-muted p-6 dark:bg-muted/20"
|
|
39
|
+
dir="ltr"
|
|
38
40
|
draggable
|
|
39
41
|
>
|
|
40
42
|
<DropdownMenu.Root>
|
|
@@ -44,7 +46,7 @@
|
|
|
44
46
|
variant: 'ghost',
|
|
45
47
|
size: 'sm',
|
|
46
48
|
class:
|
|
47
|
-
'absolute
|
|
49
|
+
'absolute start-2 top-2 h-4 rounded px-1 py-2 text-xs capitalize text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100'
|
|
48
50
|
})}
|
|
49
51
|
>{defaultLanguage}
|
|
50
52
|
<ChevronDown class="!size-3" />
|
|
@@ -67,7 +69,7 @@
|
|
|
67
69
|
</DropdownMenu.Root>
|
|
68
70
|
<Button
|
|
69
71
|
variant="ghost"
|
|
70
|
-
class="absolute
|
|
72
|
+
class="absolute end-2 top-2 size-4 p-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"
|
|
71
73
|
onclick={copyCode}
|
|
72
74
|
>
|
|
73
75
|
{#if isCopying}
|
|
@@ -21,8 +21,24 @@
|
|
|
21
21
|
} from 'lucide-svelte';
|
|
22
22
|
import * as DropdownMenu from '../../ui/dropdown-menu/index.js';
|
|
23
23
|
import { duplicateContent } from './utils.js';
|
|
24
|
+
import { readable, type Readable } from 'svelte/store';
|
|
25
|
+
import type { Translate } from '../../../i18n/index.js';
|
|
26
|
+
import { translateEnglish } from '../i18n/context.js';
|
|
27
|
+
import { provideTextDirection, type TextDirection } from '../../textDirection.js';
|
|
28
|
+
import type { ShadEditorMessageKey } from '../i18n/messages.js';
|
|
24
29
|
|
|
25
|
-
const { node, editor, selected, deleteNode, updateAttributes }: ImageExtendedComponentProps = $props();
|
|
30
|
+
const { node, editor, selected, deleteNode, updateAttributes, extension }: ImageExtendedComponentProps = $props();
|
|
31
|
+
|
|
32
|
+
// The words of the image bar. A node view is mounted by TipTap outside the editor's component tree, where Svelte's
|
|
33
|
+
// context does not reach, so the editor hands its words in through the options of the image extension (`translate`).
|
|
34
|
+
// A store, so a change of language reaches an image that is already in the text. English when the extension is used alone.
|
|
35
|
+
// svelte-ignore state_referenced_locally
|
|
36
|
+
const t: Readable<Translate<ShadEditorMessageKey>> = extension.options.translate ?? readable(translateEnglish);
|
|
37
|
+
|
|
38
|
+
// The direction of the screen around the editor, for the menu of the image bar (it is drawn below this component, which
|
|
39
|
+
// TipTap mounted outside the editor's tree, so it reads the context from here). Left to right when the extension is used alone.
|
|
40
|
+
// svelte-ignore state_referenced_locally
|
|
41
|
+
provideTextDirection(extension.options.textDirection ?? readable<TextDirection>('ltr'));
|
|
26
42
|
|
|
27
43
|
const minWidth = 150;
|
|
28
44
|
|
|
@@ -118,8 +134,10 @@
|
|
|
118
134
|
class={cn(
|
|
119
135
|
'relative flex flex-col rounded-md border-2 border-transparent',
|
|
120
136
|
selected ? 'border-muted-foreground' : '',
|
|
137
|
+
// rtl-ok: the alignment of a picture is part of the document, so left stays left and right stays right in every language
|
|
121
138
|
node.attrs.align === 'left' && 'left-0 -translate-x-0',
|
|
122
139
|
node.attrs.align === 'center' && 'left-1/2 -translate-x-1/2',
|
|
140
|
+
// rtl-ok: see the note on the left alignment above
|
|
123
141
|
node.attrs.align === 'right' && 'left-full -translate-x-full'
|
|
124
142
|
)}
|
|
125
143
|
style={`width: ${node.attrs.width}px`}
|
|
@@ -149,9 +167,9 @@
|
|
|
149
167
|
<div
|
|
150
168
|
role="button"
|
|
151
169
|
tabindex="0"
|
|
152
|
-
aria-label=
|
|
170
|
+
aria-label={$t('shadEditor.imageBlock.back')}
|
|
153
171
|
class="absolute inset-y-0 z-20 flex w-[25px] cursor-col-resize items-center justify-start p-2"
|
|
154
|
-
style="left: 0px"
|
|
172
|
+
style="left: 0px; /* rtl-ok: the handle sits on the left edge of the picture, a place on the page */"
|
|
155
173
|
onmousedown={(event: MouseEvent) => {
|
|
156
174
|
handleResizingPosition(event, 'left');
|
|
157
175
|
}}
|
|
@@ -167,9 +185,9 @@
|
|
|
167
185
|
<div
|
|
168
186
|
role="button"
|
|
169
187
|
tabindex="0"
|
|
170
|
-
aria-label=
|
|
188
|
+
aria-label={$t('shadEditor.imageBlock.back')}
|
|
171
189
|
class="absolute inset-y-0 z-20 flex w-[25px] cursor-col-resize items-center justify-end p-2"
|
|
172
|
-
style="right: 0px"
|
|
190
|
+
style="right: 0px; /* rtl-ok: the handle sits on the right edge of the picture, a place on the page */"
|
|
173
191
|
onmousedown={(event: MouseEvent) => {
|
|
174
192
|
handleResizingPosition(event, 'right');
|
|
175
193
|
}}
|
|
@@ -183,32 +201,36 @@
|
|
|
183
201
|
</div>
|
|
184
202
|
<div
|
|
185
203
|
class={cn(
|
|
186
|
-
'absolute
|
|
204
|
+
'absolute end-4 top-2 flex items-center gap-1 rounded border bg-background p-1 opacity-0 transition-opacity',
|
|
187
205
|
!resizing && 'group-hover:opacity-100',
|
|
188
206
|
openedMore && 'opacity-100'
|
|
189
207
|
)}
|
|
190
208
|
>
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
209
|
+
<!-- Left, centre and right are places on the page, not the start and the end of a line: the three buttons keep
|
|
210
|
+
their order on a right to left screen, so the button that draws a block on the left stays on the left. -->
|
|
211
|
+
<div dir="ltr" class="flex items-center gap-1">
|
|
212
|
+
<Button
|
|
213
|
+
variant="ghost"
|
|
214
|
+
class={cn('size-6 p-0', node.attrs.align === 'left' && 'bg-muted')}
|
|
215
|
+
onclick={() => updateAttributes({ align: 'left' })}
|
|
216
|
+
>
|
|
217
|
+
<AlignLeft class="size-4" />
|
|
218
|
+
</Button>
|
|
219
|
+
<Button
|
|
220
|
+
variant="ghost"
|
|
221
|
+
class={cn('size-6 p-0', node.attrs.align === 'center' && 'bg-muted')}
|
|
222
|
+
onclick={() => updateAttributes({ align: 'center' })}
|
|
223
|
+
>
|
|
224
|
+
<AlignCenter class="size-4" />
|
|
225
|
+
</Button>
|
|
226
|
+
<Button
|
|
227
|
+
variant="ghost"
|
|
228
|
+
class={cn('size-6 p-0', node.attrs.align === 'right' && 'bg-muted')}
|
|
229
|
+
onclick={() => updateAttributes({ align: 'right' })}
|
|
230
|
+
>
|
|
231
|
+
<AlignRight class="size-4" />
|
|
232
|
+
</Button>
|
|
233
|
+
</div>
|
|
212
234
|
<DropdownMenu.Root bind:open={openedMore} onOpenChange={(value: boolean) => (openedMore = value)}>
|
|
213
235
|
<DropdownMenu.Trigger class={buttonVariants({ variant: 'ghost', class: 'size-6 p-0' })}>
|
|
214
236
|
<EllipsisVertical class="size-4" />
|
|
@@ -218,18 +240,18 @@
|
|
|
218
240
|
onclick={() => {
|
|
219
241
|
if (node.attrs.title === null || node.attrs.title.trim() === '')
|
|
220
242
|
updateAttributes({
|
|
221
|
-
title: '
|
|
243
|
+
title: $t('shadEditor.imageBlock.defaultCaption')
|
|
222
244
|
});
|
|
223
245
|
}}
|
|
224
246
|
>
|
|
225
|
-
<Captions class="
|
|
247
|
+
<Captions class="me-1 size-4" /> {$t('shadEditor.imageBlock.caption')}
|
|
226
248
|
</DropdownMenu.Item>
|
|
227
249
|
<DropdownMenu.Item
|
|
228
250
|
onclick={() => {
|
|
229
251
|
duplicateContent(editor);
|
|
230
252
|
}}
|
|
231
253
|
>
|
|
232
|
-
<CopyIcon class="
|
|
254
|
+
<CopyIcon class="me-1 size-4" /> {$t('shadEditor.imageBlock.duplicate')}
|
|
233
255
|
</DropdownMenu.Item>
|
|
234
256
|
<DropdownMenu.Item
|
|
235
257
|
onclick={() => {
|
|
@@ -238,7 +260,7 @@
|
|
|
238
260
|
});
|
|
239
261
|
}}
|
|
240
262
|
>
|
|
241
|
-
<Fullscreen class="
|
|
263
|
+
<Fullscreen class="me-1 size-4" /> {$t('shadEditor.imageBlock.fullScreen')}
|
|
242
264
|
</DropdownMenu.Item>
|
|
243
265
|
<DropdownMenu.Item
|
|
244
266
|
onclick={() => {
|
|
@@ -246,7 +268,7 @@
|
|
|
246
268
|
}}
|
|
247
269
|
class="text-destructive"
|
|
248
270
|
>
|
|
249
|
-
<Trash class="
|
|
271
|
+
<Trash class="me-1 size-4" /> {$t('shadEditor.imageBlock.delete')}
|
|
250
272
|
</DropdownMenu.Item>
|
|
251
273
|
</DropdownMenu.Content>
|
|
252
274
|
</DropdownMenu.Root>
|
|
@@ -38,7 +38,7 @@ ol li {
|
|
|
38
38
|
|
|
39
39
|
ul[data-type='taskList'] li label {
|
|
40
40
|
flex: 0 0 auto;
|
|
41
|
-
margin-
|
|
41
|
+
margin-inline-end: 0.5rem;
|
|
42
42
|
user-select: none;
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -71,7 +71,7 @@ ul[data-type='taskList'] ul[data-type='taskList'] {
|
|
|
71
71
|
|
|
72
72
|
.color::before {
|
|
73
73
|
/* Replace rounded with rounded-md */
|
|
74
|
-
@apply mb-[0.15rem]
|
|
74
|
+
@apply mb-[0.15rem] me-[0.1rem] inline-block size-[1rem] rounded-md border border-muted align-middle;
|
|
75
75
|
background-color: var(--color);
|
|
76
76
|
content: ' ';
|
|
77
77
|
}
|
|
@@ -101,17 +101,17 @@ ul[data-type='taskList'] ul[data-type='taskList'] {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
.tiptap table th {
|
|
104
|
-
@apply bg-muted/50 text-
|
|
104
|
+
@apply bg-muted/50 text-start font-bold;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
.tiptap table .selectedCell:after {
|
|
108
|
-
@apply pointer-events-none absolute
|
|
108
|
+
@apply pointer-events-none absolute inset-0 border-[2px] border-muted-foreground;
|
|
109
109
|
content: '';
|
|
110
110
|
z-index: 2;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
.tiptap table .column-resize-handle {
|
|
114
|
-
@apply pointer-events-none absolute -bottom-[2px] -
|
|
114
|
+
@apply pointer-events-none absolute -bottom-[2px] -end-[2px] top-0 w-1 bg-muted;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
.tiptap .tableWrapper {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The words of the rich text editor in the page's language: the editor (`shad-editor.svelte`) calls `provideI18n` once,
|
|
3
|
+
* and every part below it (the toolbar buttons, the menus, the image bar) calls `useI18n` and shows `$t('shadEditor.…')`.
|
|
4
|
+
* Outside an editor a part speaks English, so a part used alone keeps working.
|
|
5
|
+
*/
|
|
6
|
+
export declare const provideI18n: (initial: import("../../../i18n/createI18n.ts").I18nSettings) => import("../../../i18n/createI18n.ts").I18nHandle<"shadEditor.toolbar.undo" | "shadEditor.toolbar.redo" | "shadEditor.toolbar.bold" | "shadEditor.toolbar.italic" | "shadEditor.toolbar.underline" | "shadEditor.toolbar.strikethrough" | "shadEditor.toolbar.subscript" | "shadEditor.toolbar.superscript" | "shadEditor.toolbar.code" | "shadEditor.toolbar.blockQuote" | "shadEditor.toolbar.bulletList" | "shadEditor.toolbar.orderedList" | "shadEditor.toolbar.taskList" | "shadEditor.text.tooltip" | "shadEditor.text.heading1" | "shadEditor.text.heading2" | "shadEditor.text.heading3" | "shadEditor.text.paragraph" | "shadEditor.text.codeBlock" | "shadEditor.align.tooltip" | "shadEditor.align.left" | "shadEditor.align.center" | "shadEditor.align.right" | "shadEditor.align.justify" | "shadEditor.link.tooltip" | "shadEditor.link.title" | "shadEditor.link.hint" | "shadEditor.link.placeholder" | "shadEditor.link.insert" | "shadEditor.link.remove" | "shadEditor.image.tooltip" | "shadEditor.image.title" | "shadEditor.image.urlHint" | "shadEditor.image.urlPlaceholder" | "shadEditor.image.orPick" | "shadEditor.table.tooltip" | "shadEditor.table.insert" | "shadEditor.table.header" | "shadEditor.table.toggleColumn" | "shadEditor.table.toggleRow" | "shadEditor.table.toggleCell" | "shadEditor.table.cells" | "shadEditor.table.merge" | "shadEditor.table.split" | "shadEditor.table.mergeOrSplit" | "shadEditor.table.row" | "shadEditor.table.insertAbove" | "shadEditor.table.insertBelow" | "shadEditor.table.deleteRow" | "shadEditor.table.column" | "shadEditor.table.insertBefore" | "shadEditor.table.insertAfter" | "shadEditor.table.deleteColumn" | "shadEditor.table.deleteTable" | "shadEditor.textColor.tooltip" | "shadEditor.textColor.pick" | "shadEditor.textColor.remove" | "shadEditor.highlight.tooltip" | "shadEditor.highlight.pick" | "shadEditor.highlight.remove" | "shadEditor.quickColor.tooltip" | "shadEditor.quickColor.textColor" | "shadEditor.quickColor.backgroundColors" | "shadEditor.colorName.default" | "shadEditor.colorName.blue" | "shadEditor.colorName.brown" | "shadEditor.colorName.green" | "shadEditor.colorName.grey" | "shadEditor.colorName.orange" | "shadEditor.colorName.pink" | "shadEditor.colorName.purple" | "shadEditor.colorName.red" | "shadEditor.colorName.yellow" | "shadEditor.colorPicker.label" | "shadEditor.search.tooltip" | "shadEditor.search.searchPlaceholder" | "shadEditor.search.replacePlaceholder" | "shadEditor.search.caseSensitive" | "shadEditor.search.position" | "shadEditor.imageBlock.back" | "shadEditor.imageBlock.caption" | "shadEditor.imageBlock.duplicate" | "shadEditor.imageBlock.fullScreen" | "shadEditor.imageBlock.delete" | "shadEditor.imageBlock.defaultCaption">, useI18n: () => import("../../../i18n/createI18n.ts").I18nContext<"shadEditor.toolbar.undo" | "shadEditor.toolbar.redo" | "shadEditor.toolbar.bold" | "shadEditor.toolbar.italic" | "shadEditor.toolbar.underline" | "shadEditor.toolbar.strikethrough" | "shadEditor.toolbar.subscript" | "shadEditor.toolbar.superscript" | "shadEditor.toolbar.code" | "shadEditor.toolbar.blockQuote" | "shadEditor.toolbar.bulletList" | "shadEditor.toolbar.orderedList" | "shadEditor.toolbar.taskList" | "shadEditor.text.tooltip" | "shadEditor.text.heading1" | "shadEditor.text.heading2" | "shadEditor.text.heading3" | "shadEditor.text.paragraph" | "shadEditor.text.codeBlock" | "shadEditor.align.tooltip" | "shadEditor.align.left" | "shadEditor.align.center" | "shadEditor.align.right" | "shadEditor.align.justify" | "shadEditor.link.tooltip" | "shadEditor.link.title" | "shadEditor.link.hint" | "shadEditor.link.placeholder" | "shadEditor.link.insert" | "shadEditor.link.remove" | "shadEditor.image.tooltip" | "shadEditor.image.title" | "shadEditor.image.urlHint" | "shadEditor.image.urlPlaceholder" | "shadEditor.image.orPick" | "shadEditor.table.tooltip" | "shadEditor.table.insert" | "shadEditor.table.header" | "shadEditor.table.toggleColumn" | "shadEditor.table.toggleRow" | "shadEditor.table.toggleCell" | "shadEditor.table.cells" | "shadEditor.table.merge" | "shadEditor.table.split" | "shadEditor.table.mergeOrSplit" | "shadEditor.table.row" | "shadEditor.table.insertAbove" | "shadEditor.table.insertBelow" | "shadEditor.table.deleteRow" | "shadEditor.table.column" | "shadEditor.table.insertBefore" | "shadEditor.table.insertAfter" | "shadEditor.table.deleteColumn" | "shadEditor.table.deleteTable" | "shadEditor.textColor.tooltip" | "shadEditor.textColor.pick" | "shadEditor.textColor.remove" | "shadEditor.highlight.tooltip" | "shadEditor.highlight.pick" | "shadEditor.highlight.remove" | "shadEditor.quickColor.tooltip" | "shadEditor.quickColor.textColor" | "shadEditor.quickColor.backgroundColors" | "shadEditor.colorName.default" | "shadEditor.colorName.blue" | "shadEditor.colorName.brown" | "shadEditor.colorName.green" | "shadEditor.colorName.grey" | "shadEditor.colorName.orange" | "shadEditor.colorName.pink" | "shadEditor.colorName.purple" | "shadEditor.colorName.red" | "shadEditor.colorName.yellow" | "shadEditor.colorPicker.label" | "shadEditor.search.tooltip" | "shadEditor.search.searchPlaceholder" | "shadEditor.search.replacePlaceholder" | "shadEditor.search.caseSensitive" | "shadEditor.search.position" | "shadEditor.imageBlock.back" | "shadEditor.imageBlock.caption" | "shadEditor.imageBlock.duplicate" | "shadEditor.imageBlock.fullScreen" | "shadEditor.imageBlock.delete" | "shadEditor.imageBlock.defaultCaption">, translateEnglish: import("../../../i18n/createI18n.ts").Translate<"shadEditor.toolbar.undo" | "shadEditor.toolbar.redo" | "shadEditor.toolbar.bold" | "shadEditor.toolbar.italic" | "shadEditor.toolbar.underline" | "shadEditor.toolbar.strikethrough" | "shadEditor.toolbar.subscript" | "shadEditor.toolbar.superscript" | "shadEditor.toolbar.code" | "shadEditor.toolbar.blockQuote" | "shadEditor.toolbar.bulletList" | "shadEditor.toolbar.orderedList" | "shadEditor.toolbar.taskList" | "shadEditor.text.tooltip" | "shadEditor.text.heading1" | "shadEditor.text.heading2" | "shadEditor.text.heading3" | "shadEditor.text.paragraph" | "shadEditor.text.codeBlock" | "shadEditor.align.tooltip" | "shadEditor.align.left" | "shadEditor.align.center" | "shadEditor.align.right" | "shadEditor.align.justify" | "shadEditor.link.tooltip" | "shadEditor.link.title" | "shadEditor.link.hint" | "shadEditor.link.placeholder" | "shadEditor.link.insert" | "shadEditor.link.remove" | "shadEditor.image.tooltip" | "shadEditor.image.title" | "shadEditor.image.urlHint" | "shadEditor.image.urlPlaceholder" | "shadEditor.image.orPick" | "shadEditor.table.tooltip" | "shadEditor.table.insert" | "shadEditor.table.header" | "shadEditor.table.toggleColumn" | "shadEditor.table.toggleRow" | "shadEditor.table.toggleCell" | "shadEditor.table.cells" | "shadEditor.table.merge" | "shadEditor.table.split" | "shadEditor.table.mergeOrSplit" | "shadEditor.table.row" | "shadEditor.table.insertAbove" | "shadEditor.table.insertBelow" | "shadEditor.table.deleteRow" | "shadEditor.table.column" | "shadEditor.table.insertBefore" | "shadEditor.table.insertAfter" | "shadEditor.table.deleteColumn" | "shadEditor.table.deleteTable" | "shadEditor.textColor.tooltip" | "shadEditor.textColor.pick" | "shadEditor.textColor.remove" | "shadEditor.highlight.tooltip" | "shadEditor.highlight.pick" | "shadEditor.highlight.remove" | "shadEditor.quickColor.tooltip" | "shadEditor.quickColor.textColor" | "shadEditor.quickColor.backgroundColors" | "shadEditor.colorName.default" | "shadEditor.colorName.blue" | "shadEditor.colorName.brown" | "shadEditor.colorName.green" | "shadEditor.colorName.grey" | "shadEditor.colorName.orange" | "shadEditor.colorName.pink" | "shadEditor.colorName.purple" | "shadEditor.colorName.red" | "shadEditor.colorName.yellow" | "shadEditor.colorPicker.label" | "shadEditor.search.tooltip" | "shadEditor.search.searchPlaceholder" | "shadEditor.search.replacePlaceholder" | "shadEditor.search.caseSensitive" | "shadEditor.search.position" | "shadEditor.imageBlock.back" | "shadEditor.imageBlock.caption" | "shadEditor.imageBlock.duplicate" | "shadEditor.imageBlock.fullScreen" | "shadEditor.imageBlock.delete" | "shadEditor.imageBlock.defaultCaption">;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createI18n } from "../../../i18n/index.js";
|
|
2
|
+
import { SHAD_EDITOR_MESSAGES } from "./messages.js";
|
|
3
|
+
/**
|
|
4
|
+
* The words of the rich text editor in the page's language: the editor (`shad-editor.svelte`) calls `provideI18n` once,
|
|
5
|
+
* and every part below it (the toolbar buttons, the menus, the image bar) calls `useI18n` and shows `$t('shadEditor.…')`.
|
|
6
|
+
* Outside an editor a part speaks English, so a part used alone keeps working.
|
|
7
|
+
*/
|
|
8
|
+
export const { provideI18n, useI18n, translateEnglish } = createI18n({
|
|
9
|
+
catalog: SHAD_EDITOR_MESSAGES,
|
|
10
|
+
label: 'ShadEditor'
|
|
11
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type MessageOverrides, type MessageProblem } from '../../../i18n/index.ts';
|
|
2
|
+
export { SHAD_EDITOR_MESSAGES, type ShadEditorMessageKey } from './messages.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Checks a page's `messages` against the editor's catalog without showing anything: a key that does not exist (with the
|
|
5
|
+
* nearest real one), a value that is not text, a template that does not parse, or one that asks for a value the message is
|
|
6
|
+
* never given. An empty list means every message will be used. For a test or a build step of the page.
|
|
7
|
+
*/
|
|
8
|
+
export declare function checkShadEditorMessages(messages: MessageOverrides): MessageProblem[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { findMessageProblems } from "../../../i18n/index.js";
|
|
2
|
+
import { SHAD_EDITOR_MESSAGES } from "./messages.js";
|
|
3
|
+
export { SHAD_EDITOR_MESSAGES } from "./messages.js";
|
|
4
|
+
/**
|
|
5
|
+
* Checks a page's `messages` against the editor's catalog without showing anything: a key that does not exist (with the
|
|
6
|
+
* nearest real one), a value that is not text, a template that does not parse, or one that asks for a value the message is
|
|
7
|
+
* never given. An empty list means every message will be used. For a test or a build step of the page.
|
|
8
|
+
*/
|
|
9
|
+
export function checkShadEditorMessages(messages) {
|
|
10
|
+
return findMessageProblems(SHAD_EDITOR_MESSAGES, messages);
|
|
11
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every word the rich text editor (`ShadEditor`) shows, in English: the one place to read them, and the keys a page can
|
|
3
|
+
* replace with the `messages` prop of the editor.
|
|
4
|
+
*
|
|
5
|
+
* A message is plain text. `{name}` is a value the editor puts in; `{count, plural, one {# file} other {# files}}` picks
|
|
6
|
+
* the form that fits a number in the page's language. `\{`, `\}`, `\#` and `\\` write those characters themselves. See
|
|
7
|
+
* `src/lib/i18n/translator.ts` for the whole format.
|
|
8
|
+
*
|
|
9
|
+
* Keys are grouped by where the words appear. A key that is left out of a page's `messages` keeps the English text below,
|
|
10
|
+
* so a language can be added a screen at a time.
|
|
11
|
+
*
|
|
12
|
+
* The keyboard shortcuts in a tooltip ("Bold (⌘B)") are part of the message: a language that writes them differently, or
|
|
13
|
+
* a page that wants "Ctrl" for its visitors on Windows, changes them there.
|
|
14
|
+
*/
|
|
15
|
+
export declare const SHAD_EDITOR_MESSAGES: {
|
|
16
|
+
readonly 'shadEditor.toolbar.undo': "Undo (⌘Z)";
|
|
17
|
+
readonly 'shadEditor.toolbar.redo': "Redo (⌘⇧Z)";
|
|
18
|
+
readonly 'shadEditor.toolbar.bold': "Bold (⌘B)";
|
|
19
|
+
readonly 'shadEditor.toolbar.italic': "Italic (⌘I)";
|
|
20
|
+
readonly 'shadEditor.toolbar.underline': "Underline (⌘U)";
|
|
21
|
+
readonly 'shadEditor.toolbar.strikethrough': "Strike (⌘⇧S)";
|
|
22
|
+
readonly 'shadEditor.toolbar.subscript': "Subscript (⌘,)";
|
|
23
|
+
readonly 'shadEditor.toolbar.superscript': "Superscript (⌘.)";
|
|
24
|
+
readonly 'shadEditor.toolbar.code': "Code (⌘E)";
|
|
25
|
+
readonly 'shadEditor.toolbar.blockQuote': "Block Quote (⌘⇧B)";
|
|
26
|
+
readonly 'shadEditor.toolbar.bulletList': "Bullet List (⌘⇧8)";
|
|
27
|
+
readonly 'shadEditor.toolbar.orderedList': "Ordered List";
|
|
28
|
+
readonly 'shadEditor.toolbar.taskList': "Tasks List (⌘⇧9)";
|
|
29
|
+
readonly 'shadEditor.text.tooltip': "Text Formatting";
|
|
30
|
+
readonly 'shadEditor.text.heading1': "Heading 1";
|
|
31
|
+
readonly 'shadEditor.text.heading2': "Heading 2";
|
|
32
|
+
readonly 'shadEditor.text.heading3': "Heading 3";
|
|
33
|
+
readonly 'shadEditor.text.paragraph': "Paragraph";
|
|
34
|
+
readonly 'shadEditor.text.codeBlock': "Code Block";
|
|
35
|
+
readonly 'shadEditor.align.tooltip': "Text Alignment";
|
|
36
|
+
readonly 'shadEditor.align.left': "Align Left";
|
|
37
|
+
readonly 'shadEditor.align.center': "Align Center";
|
|
38
|
+
readonly 'shadEditor.align.right': "Align Right";
|
|
39
|
+
readonly 'shadEditor.align.justify': "Align Justify";
|
|
40
|
+
readonly 'shadEditor.link.tooltip': "Add Or Remove Link";
|
|
41
|
+
readonly 'shadEditor.link.title': "Link";
|
|
42
|
+
readonly 'shadEditor.link.hint': "Insert or remove link from selected text.";
|
|
43
|
+
readonly 'shadEditor.link.placeholder': "Enter link to attach..";
|
|
44
|
+
readonly 'shadEditor.link.insert': "Insert";
|
|
45
|
+
readonly 'shadEditor.link.remove': "Remove";
|
|
46
|
+
readonly 'shadEditor.image.tooltip': "Add Image";
|
|
47
|
+
readonly 'shadEditor.image.title': "Image";
|
|
48
|
+
readonly 'shadEditor.image.urlHint': "Insert image url";
|
|
49
|
+
readonly 'shadEditor.image.urlPlaceholder': "Enter image url...";
|
|
50
|
+
readonly 'shadEditor.image.orPick': "OR Pick an Image";
|
|
51
|
+
readonly 'shadEditor.table.tooltip': "Table";
|
|
52
|
+
readonly 'shadEditor.table.insert': "Insert Table";
|
|
53
|
+
readonly 'shadEditor.table.header': "Header";
|
|
54
|
+
readonly 'shadEditor.table.toggleColumn': "Toggle Column";
|
|
55
|
+
readonly 'shadEditor.table.toggleRow': "Toggle Row";
|
|
56
|
+
readonly 'shadEditor.table.toggleCell': "Toggle Cell";
|
|
57
|
+
readonly 'shadEditor.table.cells': "Cells";
|
|
58
|
+
readonly 'shadEditor.table.merge': "Merge";
|
|
59
|
+
readonly 'shadEditor.table.split': "Split";
|
|
60
|
+
readonly 'shadEditor.table.mergeOrSplit': "Merge or Split";
|
|
61
|
+
readonly 'shadEditor.table.row': "Row";
|
|
62
|
+
readonly 'shadEditor.table.insertAbove': "Insert Above";
|
|
63
|
+
readonly 'shadEditor.table.insertBelow': "Insert Below";
|
|
64
|
+
readonly 'shadEditor.table.deleteRow': "Delete Row";
|
|
65
|
+
readonly 'shadEditor.table.column': "Column";
|
|
66
|
+
readonly 'shadEditor.table.insertBefore': "Insert Before";
|
|
67
|
+
readonly 'shadEditor.table.insertAfter': "Insert After";
|
|
68
|
+
/** The item of the Column menu that deletes the column the cursor is in. */
|
|
69
|
+
readonly 'shadEditor.table.deleteColumn': "Delete";
|
|
70
|
+
/** The item of the table menu that deletes the whole table. */
|
|
71
|
+
readonly 'shadEditor.table.deleteTable': "Delete";
|
|
72
|
+
readonly 'shadEditor.textColor.tooltip': "Text Color";
|
|
73
|
+
readonly 'shadEditor.textColor.pick': "Pick a text color";
|
|
74
|
+
readonly 'shadEditor.textColor.remove': "Remove Color";
|
|
75
|
+
readonly 'shadEditor.highlight.tooltip': "Highlighter (⌘⇧H)";
|
|
76
|
+
readonly 'shadEditor.highlight.pick': "Pick a highlight color";
|
|
77
|
+
readonly 'shadEditor.highlight.remove': "Remove Highlight";
|
|
78
|
+
readonly 'shadEditor.quickColor.tooltip': "Quick Colors";
|
|
79
|
+
readonly 'shadEditor.quickColor.textColor': "Text Color";
|
|
80
|
+
readonly 'shadEditor.quickColor.backgroundColors': "Background Colors";
|
|
81
|
+
readonly 'shadEditor.colorName.default': "Default";
|
|
82
|
+
readonly 'shadEditor.colorName.blue': "Blue";
|
|
83
|
+
readonly 'shadEditor.colorName.brown': "Brown";
|
|
84
|
+
readonly 'shadEditor.colorName.green': "Green";
|
|
85
|
+
readonly 'shadEditor.colorName.grey': "Grey";
|
|
86
|
+
readonly 'shadEditor.colorName.orange': "Orange";
|
|
87
|
+
readonly 'shadEditor.colorName.pink': "Pink";
|
|
88
|
+
readonly 'shadEditor.colorName.purple': "Purple";
|
|
89
|
+
readonly 'shadEditor.colorName.red': "Red";
|
|
90
|
+
readonly 'shadEditor.colorName.yellow': "Yellow";
|
|
91
|
+
/** The name of the colour picker of the colour pop-ups, for a screen reader. */
|
|
92
|
+
readonly 'shadEditor.colorPicker.label': "Pick a color";
|
|
93
|
+
readonly 'shadEditor.search.tooltip': "Search And Replace Text";
|
|
94
|
+
readonly 'shadEditor.search.searchPlaceholder': "Enter Text to search..";
|
|
95
|
+
readonly 'shadEditor.search.replacePlaceholder': "Enter Text to Replace..";
|
|
96
|
+
readonly 'shadEditor.search.caseSensitive': "Case Sensitive";
|
|
97
|
+
/** Which result is shown, and how many there are: "2 / 5". */
|
|
98
|
+
readonly 'shadEditor.search.position': "{index} / {count}";
|
|
99
|
+
/** What a screen reader hears for the button that leaves the full screen view of an image. */
|
|
100
|
+
readonly 'shadEditor.imageBlock.back': "Back";
|
|
101
|
+
readonly 'shadEditor.imageBlock.caption': "Caption";
|
|
102
|
+
readonly 'shadEditor.imageBlock.duplicate': "Duplicate";
|
|
103
|
+
readonly 'shadEditor.imageBlock.fullScreen': "Full Screen";
|
|
104
|
+
readonly 'shadEditor.imageBlock.delete': "Delete";
|
|
105
|
+
/** The caption an image gets when the visitor picks Caption: it is written into the text, and the visitor then types over it. */
|
|
106
|
+
readonly 'shadEditor.imageBlock.defaultCaption': "Image Caption";
|
|
107
|
+
};
|
|
108
|
+
/** The name of one message. */
|
|
109
|
+
export type ShadEditorMessageKey = keyof typeof SHAD_EDITOR_MESSAGES;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every word the rich text editor (`ShadEditor`) shows, in English: the one place to read them, and the keys a page can
|
|
3
|
+
* replace with the `messages` prop of the editor.
|
|
4
|
+
*
|
|
5
|
+
* A message is plain text. `{name}` is a value the editor puts in; `{count, plural, one {# file} other {# files}}` picks
|
|
6
|
+
* the form that fits a number in the page's language. `\{`, `\}`, `\#` and `\\` write those characters themselves. See
|
|
7
|
+
* `src/lib/i18n/translator.ts` for the whole format.
|
|
8
|
+
*
|
|
9
|
+
* Keys are grouped by where the words appear. A key that is left out of a page's `messages` keeps the English text below,
|
|
10
|
+
* so a language can be added a screen at a time.
|
|
11
|
+
*
|
|
12
|
+
* The keyboard shortcuts in a tooltip ("Bold (⌘B)") are part of the message: a language that writes them differently, or
|
|
13
|
+
* a page that wants "Ctrl" for its visitors on Windows, changes them there.
|
|
14
|
+
*/
|
|
15
|
+
export const SHAD_EDITOR_MESSAGES = {
|
|
16
|
+
// ===== The buttons of the toolbar: the tooltip of each =====
|
|
17
|
+
'shadEditor.toolbar.undo': 'Undo (⌘Z)',
|
|
18
|
+
'shadEditor.toolbar.redo': 'Redo (⌘⇧Z)',
|
|
19
|
+
'shadEditor.toolbar.bold': 'Bold (⌘B)',
|
|
20
|
+
'shadEditor.toolbar.italic': 'Italic (⌘I)',
|
|
21
|
+
'shadEditor.toolbar.underline': 'Underline (⌘U)',
|
|
22
|
+
'shadEditor.toolbar.strikethrough': 'Strike (⌘⇧S)',
|
|
23
|
+
'shadEditor.toolbar.subscript': 'Subscript (⌘,)',
|
|
24
|
+
'shadEditor.toolbar.superscript': 'Superscript (⌘.)',
|
|
25
|
+
'shadEditor.toolbar.code': 'Code (⌘E)',
|
|
26
|
+
'shadEditor.toolbar.blockQuote': 'Block Quote (⌘⇧B)',
|
|
27
|
+
'shadEditor.toolbar.bulletList': 'Bullet List (⌘⇧8)',
|
|
28
|
+
'shadEditor.toolbar.orderedList': 'Ordered List',
|
|
29
|
+
'shadEditor.toolbar.taskList': 'Tasks List (⌘⇧9)',
|
|
30
|
+
// ===== The menu of text styles =====
|
|
31
|
+
'shadEditor.text.tooltip': 'Text Formatting',
|
|
32
|
+
'shadEditor.text.heading1': 'Heading 1',
|
|
33
|
+
'shadEditor.text.heading2': 'Heading 2',
|
|
34
|
+
'shadEditor.text.heading3': 'Heading 3',
|
|
35
|
+
'shadEditor.text.paragraph': 'Paragraph',
|
|
36
|
+
'shadEditor.text.codeBlock': 'Code Block',
|
|
37
|
+
// ===== The menu of alignment =====
|
|
38
|
+
'shadEditor.align.tooltip': 'Text Alignment',
|
|
39
|
+
'shadEditor.align.left': 'Align Left',
|
|
40
|
+
'shadEditor.align.center': 'Align Center',
|
|
41
|
+
'shadEditor.align.right': 'Align Right',
|
|
42
|
+
'shadEditor.align.justify': 'Align Justify',
|
|
43
|
+
// ===== The link pop-up =====
|
|
44
|
+
'shadEditor.link.tooltip': 'Add Or Remove Link',
|
|
45
|
+
'shadEditor.link.title': 'Link',
|
|
46
|
+
'shadEditor.link.hint': 'Insert or remove link from selected text.',
|
|
47
|
+
'shadEditor.link.placeholder': 'Enter link to attach..',
|
|
48
|
+
'shadEditor.link.insert': 'Insert',
|
|
49
|
+
'shadEditor.link.remove': 'Remove',
|
|
50
|
+
// ===== The image pop-up =====
|
|
51
|
+
'shadEditor.image.tooltip': 'Add Image',
|
|
52
|
+
'shadEditor.image.title': 'Image',
|
|
53
|
+
'shadEditor.image.urlHint': 'Insert image url',
|
|
54
|
+
'shadEditor.image.urlPlaceholder': 'Enter image url...',
|
|
55
|
+
'shadEditor.image.orPick': 'OR Pick an Image',
|
|
56
|
+
// ===== The table menu =====
|
|
57
|
+
'shadEditor.table.tooltip': 'Table',
|
|
58
|
+
'shadEditor.table.insert': 'Insert Table',
|
|
59
|
+
'shadEditor.table.header': 'Header',
|
|
60
|
+
'shadEditor.table.toggleColumn': 'Toggle Column',
|
|
61
|
+
'shadEditor.table.toggleRow': 'Toggle Row',
|
|
62
|
+
'shadEditor.table.toggleCell': 'Toggle Cell',
|
|
63
|
+
'shadEditor.table.cells': 'Cells',
|
|
64
|
+
'shadEditor.table.merge': 'Merge',
|
|
65
|
+
'shadEditor.table.split': 'Split',
|
|
66
|
+
'shadEditor.table.mergeOrSplit': 'Merge or Split',
|
|
67
|
+
'shadEditor.table.row': 'Row',
|
|
68
|
+
'shadEditor.table.insertAbove': 'Insert Above',
|
|
69
|
+
'shadEditor.table.insertBelow': 'Insert Below',
|
|
70
|
+
'shadEditor.table.deleteRow': 'Delete Row',
|
|
71
|
+
'shadEditor.table.column': 'Column',
|
|
72
|
+
'shadEditor.table.insertBefore': 'Insert Before',
|
|
73
|
+
'shadEditor.table.insertAfter': 'Insert After',
|
|
74
|
+
/** The item of the Column menu that deletes the column the cursor is in. */
|
|
75
|
+
'shadEditor.table.deleteColumn': 'Delete',
|
|
76
|
+
/** The item of the table menu that deletes the whole table. */
|
|
77
|
+
'shadEditor.table.deleteTable': 'Delete',
|
|
78
|
+
// ===== Colours of the text and of the background =====
|
|
79
|
+
'shadEditor.textColor.tooltip': 'Text Color',
|
|
80
|
+
'shadEditor.textColor.pick': 'Pick a text color',
|
|
81
|
+
'shadEditor.textColor.remove': 'Remove Color',
|
|
82
|
+
'shadEditor.highlight.tooltip': 'Highlighter (⌘⇧H)',
|
|
83
|
+
'shadEditor.highlight.pick': 'Pick a highlight color',
|
|
84
|
+
'shadEditor.highlight.remove': 'Remove Highlight',
|
|
85
|
+
'shadEditor.quickColor.tooltip': 'Quick Colors',
|
|
86
|
+
'shadEditor.quickColor.textColor': 'Text Color',
|
|
87
|
+
'shadEditor.quickColor.backgroundColors': 'Background Colors',
|
|
88
|
+
'shadEditor.colorName.default': 'Default',
|
|
89
|
+
'shadEditor.colorName.blue': 'Blue',
|
|
90
|
+
'shadEditor.colorName.brown': 'Brown',
|
|
91
|
+
'shadEditor.colorName.green': 'Green',
|
|
92
|
+
'shadEditor.colorName.grey': 'Grey',
|
|
93
|
+
'shadEditor.colorName.orange': 'Orange',
|
|
94
|
+
'shadEditor.colorName.pink': 'Pink',
|
|
95
|
+
'shadEditor.colorName.purple': 'Purple',
|
|
96
|
+
'shadEditor.colorName.red': 'Red',
|
|
97
|
+
'shadEditor.colorName.yellow': 'Yellow',
|
|
98
|
+
/** The name of the colour picker of the colour pop-ups, for a screen reader. */
|
|
99
|
+
'shadEditor.colorPicker.label': 'Pick a color',
|
|
100
|
+
// ===== Search and replace =====
|
|
101
|
+
'shadEditor.search.tooltip': 'Search And Replace Text',
|
|
102
|
+
'shadEditor.search.searchPlaceholder': 'Enter Text to search..',
|
|
103
|
+
'shadEditor.search.replacePlaceholder': 'Enter Text to Replace..',
|
|
104
|
+
'shadEditor.search.caseSensitive': 'Case Sensitive',
|
|
105
|
+
/** Which result is shown, and how many there are: "2 / 5". */
|
|
106
|
+
'shadEditor.search.position': '{index} / {count}',
|
|
107
|
+
// ===== An image in the text: the bar over it =====
|
|
108
|
+
/** What a screen reader hears for the button that leaves the full screen view of an image. */
|
|
109
|
+
'shadEditor.imageBlock.back': 'Back',
|
|
110
|
+
'shadEditor.imageBlock.caption': 'Caption',
|
|
111
|
+
'shadEditor.imageBlock.duplicate': 'Duplicate',
|
|
112
|
+
'shadEditor.imageBlock.fullScreen': 'Full Screen',
|
|
113
|
+
'shadEditor.imageBlock.delete': 'Delete',
|
|
114
|
+
/** The caption an image gets when the visitor picks Caption: it is written into the text, and the visitor then types over it. */
|
|
115
|
+
'shadEditor.imageBlock.defaultCaption': 'Image Caption'
|
|
116
|
+
};
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
import * as Tooltip from '../../ui/tooltip/index.js';
|
|
10
10
|
import { Button } from '../../ui/button/index.js';
|
|
11
11
|
import { cn } from '../../../utils.js';
|
|
12
|
+
import { useI18n } from '../i18n/context.js';
|
|
12
13
|
|
|
13
14
|
let { editor }: BlockQuoteProps = $props();
|
|
15
|
+
const { t } = useI18n();
|
|
14
16
|
</script>
|
|
15
17
|
|
|
16
18
|
<Tooltip.Provider>
|
|
@@ -25,7 +27,7 @@
|
|
|
25
27
|
</Button>
|
|
26
28
|
</Tooltip.Trigger>
|
|
27
29
|
<Tooltip.Content>
|
|
28
|
-
<p>
|
|
30
|
+
<p>{$t('shadEditor.toolbar.blockQuote')}</p>
|
|
29
31
|
</Tooltip.Content>
|
|
30
32
|
</Tooltip.Root>
|
|
31
33
|
</Tooltip.Provider>
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
import * as Tooltip from '../../ui/tooltip/index.js';
|
|
10
10
|
import { Button } from '../../ui/button/index.js';
|
|
11
11
|
import { cn } from '../../../utils.js';
|
|
12
|
+
import { useI18n } from '../i18n/context.js';
|
|
12
13
|
|
|
13
14
|
let { editor }: BoldProps = $props();
|
|
15
|
+
const { t } = useI18n();
|
|
14
16
|
</script>
|
|
15
17
|
|
|
16
18
|
<Tooltip.Provider>
|
|
@@ -25,7 +27,7 @@
|
|
|
25
27
|
</Button>
|
|
26
28
|
</Tooltip.Trigger>
|
|
27
29
|
<Tooltip.Content>
|
|
28
|
-
<p>
|
|
30
|
+
<p>{$t('shadEditor.toolbar.bold')}</p>
|
|
29
31
|
</Tooltip.Content>
|
|
30
32
|
</Tooltip.Root>
|
|
31
33
|
</Tooltip.Provider>
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
import * as Tooltip from '../../ui/tooltip/index.js';
|
|
10
10
|
import { Button } from '../../ui/button/index.js';
|
|
11
11
|
import { cn } from '../../../utils.js';
|
|
12
|
+
import { useI18n } from '../i18n/context.js';
|
|
12
13
|
|
|
13
14
|
let { editor }: ButtleListProps = $props();
|
|
15
|
+
const { t } = useI18n();
|
|
14
16
|
</script>
|
|
15
17
|
|
|
16
18
|
<Tooltip.Provider>
|
|
@@ -26,7 +28,7 @@
|
|
|
26
28
|
</Button>
|
|
27
29
|
</Tooltip.Trigger>
|
|
28
30
|
<Tooltip.Content>
|
|
29
|
-
<p>
|
|
31
|
+
<p>{$t('shadEditor.toolbar.bulletList')}</p>
|
|
30
32
|
</Tooltip.Content>
|
|
31
33
|
</Tooltip.Root>
|
|
32
34
|
</Tooltip.Provider>
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
import * as Tooltip from '../../ui/tooltip/index.js';
|
|
10
10
|
import { Button } from '../../ui/button/index.js';
|
|
11
11
|
import { cn } from '../../../utils.js';
|
|
12
|
+
import { useI18n } from '../i18n/context.js';
|
|
12
13
|
|
|
13
14
|
let { editor }: CodeProps = $props();
|
|
15
|
+
const { t } = useI18n();
|
|
14
16
|
</script>
|
|
15
17
|
|
|
16
18
|
<Tooltip.Provider>
|
|
@@ -26,7 +28,7 @@
|
|
|
26
28
|
</Button>
|
|
27
29
|
</Tooltip.Trigger>
|
|
28
30
|
<Tooltip.Content>
|
|
29
|
-
<p>
|
|
31
|
+
<p>{$t('shadEditor.toolbar.code')}</p>
|
|
30
32
|
</Tooltip.Content>
|
|
31
33
|
</Tooltip.Root>
|
|
32
34
|
</Tooltip.Provider>
|