includio-cms 0.7.2 → 0.13.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/CHANGELOG.md +128 -0
- package/ROADMAP.md +54 -2
- package/dist/admin/api/generate-styles.d.ts +2 -0
- package/dist/admin/api/generate-styles.js +32 -0
- package/dist/admin/api/handler.js +33 -0
- package/dist/admin/api/media-gc.js +10 -4
- package/dist/admin/api/rest/handler.js +17 -0
- package/dist/admin/api/rest/routes/collections.js +25 -13
- package/dist/admin/api/rest/routes/entries.d.ts +1 -1
- package/dist/admin/api/rest/routes/entries.js +10 -10
- package/dist/admin/api/rest/routes/media.d.ts +2 -0
- package/dist/admin/api/rest/routes/media.js +9 -0
- package/dist/admin/api/rest/routes/schema.d.ts +5 -0
- package/dist/admin/api/rest/routes/schema.js +152 -0
- package/dist/admin/api/rest/routes/singletons.d.ts +1 -1
- package/dist/admin/api/rest/routes/singletons.js +8 -7
- package/dist/admin/api/rest/routes/upload.d.ts +2 -0
- package/dist/admin/api/rest/routes/upload.js +28 -0
- package/dist/admin/api/upload.js +13 -0
- package/dist/admin/client/collection/collection-entries.svelte +35 -13
- package/dist/admin/client/entry/entry.svelte +21 -23
- package/dist/admin/client/entry/header/a11y-validator.js +2 -2
- package/dist/admin/client/entry/header/publish-panel.svelte +33 -85
- package/dist/admin/client/entry/header/status-badge.svelte +2 -2
- package/dist/admin/client/entry/header/version-history-sheet.svelte +9 -9
- package/dist/admin/client/entry/header/visibility.svelte +16 -10
- package/dist/admin/client/entry/utils.d.ts +3 -0
- package/dist/admin/client/entry/utils.js +22 -4
- package/dist/admin/client/form/form-submission/form-submission-page.svelte +4 -1
- package/dist/admin/client/form/form-submission/submission-field.svelte +10 -0
- package/dist/admin/client/index.d.ts +1 -0
- package/dist/admin/client/index.js +1 -0
- package/dist/admin/client/maintenance/maintenance-page.svelte +146 -2
- package/dist/admin/client/users/users-page.svelte +5 -6
- package/dist/admin/client/users/users-page.svelte.d.ts +1 -4
- package/dist/admin/components/fields/block-picker-modal.svelte +13 -4
- package/dist/admin/components/fields/blocks-field.svelte +40 -19
- package/dist/admin/components/fields/field-renderer.svelte +4 -8
- package/dist/admin/components/fields/object-field.svelte +7 -12
- package/dist/admin/components/fields/select-field.svelte +8 -2
- package/dist/admin/components/fields/seo-field.svelte +40 -93
- package/dist/admin/components/fields/simple-array-field.svelte +27 -16
- package/dist/admin/components/fields/text-field-wrapper.svelte +52 -197
- package/dist/admin/components/fields/text-field-wrapper.svelte.d.ts +2 -2
- package/dist/admin/components/fields/url-field-wrapper.svelte +15 -25
- package/dist/admin/components/fields/url-field.svelte +61 -72
- package/dist/admin/components/layout/layout-renderer.svelte +10 -4
- package/dist/admin/components/media/file-preview.svelte +10 -1
- package/dist/admin/components/media/file-upload.svelte +5 -1
- package/dist/admin/components/media/file-upload.svelte.d.ts +1 -0
- package/dist/admin/components/media/files-list.svelte +12 -3
- package/dist/admin/components/media/media-library.svelte +109 -37
- package/dist/admin/components/media/media-selector.svelte +90 -16
- package/dist/admin/components/media/tag-sidebar.svelte +10 -6
- package/dist/admin/components/media/tag-sidebar.svelte.d.ts +7 -2
- package/dist/admin/components/tiptap/FigureNodeView.svelte +15 -10
- package/dist/admin/components/tiptap/InlineBlockNodeView.svelte +53 -94
- package/dist/admin/components/tiptap/SlashCommandPopup.svelte +8 -3
- package/dist/admin/components/tiptap/editor-toolbar.svelte +28 -23
- package/dist/admin/components/tiptap/image-dialog.svelte +12 -7
- package/dist/admin/components/tiptap/inline-block-node.js +6 -5
- package/dist/admin/components/tiptap/lang.d.ts +77 -0
- package/dist/admin/components/tiptap/lang.js +170 -0
- package/dist/admin/components/tiptap/link-dialog.svelte +31 -28
- package/dist/admin/components/tiptap/slash-command.js +27 -23
- package/dist/admin/components/tiptap/table-dialog.svelte +9 -4
- package/dist/admin/components/tiptap/video-dialog.svelte +6 -1
- package/dist/admin/remote/email.remote.d.ts +1 -0
- package/dist/admin/remote/email.remote.js +5 -0
- package/dist/admin/remote/entry.remote.d.ts +2 -5
- package/dist/admin/remote/entry.remote.js +23 -28
- package/dist/admin/remote/index.d.ts +1 -0
- package/dist/admin/remote/index.js +1 -0
- package/dist/admin/remote/media.remote.d.ts +15 -0
- package/dist/admin/remote/media.remote.js +18 -2
- package/dist/admin/remote/preview.remote.js +3 -1
- package/dist/admin/utils/entryLabel.js +9 -6
- package/dist/admin/utils/translationStatus.js +1 -2
- package/dist/cli/scaffold/admin.js +34 -2
- package/dist/cms/runtime/api.d.ts +16 -12
- package/dist/cms/runtime/api.js +7 -6
- package/dist/cms/runtime/remote.js +2 -2
- package/dist/cms/runtime/schemas.d.ts +1 -1
- package/dist/cms/runtime/schemas.js +1 -1
- package/dist/cms/runtime/types.d.ts +118 -112
- package/dist/cms/runtime/types.js +0 -12
- package/dist/core/cms.d.ts +3 -1
- package/dist/core/cms.js +30 -0
- package/dist/core/fields/fieldSchemaToTs.js +9 -15
- package/dist/core/fields/formFieldSchemaToTs.js +7 -0
- package/dist/core/server/entries/operations/create.js +10 -4
- package/dist/core/server/entries/operations/get.d.ts +1 -0
- package/dist/core/server/entries/operations/get.js +186 -191
- package/dist/core/server/entries/operations/update.d.ts +6 -7
- package/dist/core/server/entries/operations/update.js +20 -38
- package/dist/core/server/fields/populateEntry.js +16 -52
- package/dist/core/server/fields/resolveImageFields.js +69 -120
- package/dist/core/server/fields/resolveRelationFields.js +30 -51
- package/dist/core/server/fields/resolveRichtextLinks.js +46 -100
- package/dist/core/server/fields/resolveTypographyOrphans.bench.d.ts +1 -0
- package/dist/core/server/fields/resolveTypographyOrphans.bench.js +87 -0
- package/dist/core/server/fields/resolveTypographyOrphans.d.ts +3 -0
- package/dist/core/server/fields/resolveTypographyOrphans.js +128 -0
- package/dist/core/server/fields/resolveUrlFields.js +47 -56
- package/dist/core/server/fields/utils/fixOrphans.d.ts +5 -0
- package/dist/core/server/fields/utils/fixOrphans.js +12 -0
- package/dist/core/server/fields/utils/imageStyles.d.ts +4 -2
- package/dist/core/server/fields/utils/imageStyles.js +41 -25
- package/dist/core/server/fields/utils/resolveMedia.js +1 -6
- package/dist/core/server/forms/submissions/operations/delete.js +26 -2
- package/dist/core/server/forms/submissions/utils/parseMultipart.d.ts +2 -0
- package/dist/core/server/forms/submissions/utils/parseMultipart.js +75 -0
- package/dist/core/server/generator/fields.d.ts +6 -0
- package/dist/core/server/generator/fields.js +43 -5
- package/dist/core/server/generator/formFieldSchemaToString.js +10 -0
- package/dist/core/server/generator/formFields.js +1 -0
- package/dist/core/server/generator/generator.js +98 -30
- package/dist/core/server/media/operations/getFiles.d.ts +5 -0
- package/dist/core/server/media/operations/getFiles.js +6 -0
- package/dist/core/server/media/operations/uploadPrivateFile.d.ts +4 -0
- package/dist/core/server/media/operations/uploadPrivateFile.js +8 -0
- package/dist/core/server/media/styles/operations/batchGenerateStyles.d.ts +16 -0
- package/dist/core/server/media/styles/operations/batchGenerateStyles.js +144 -0
- package/dist/db-postgres/index.js +303 -37
- package/dist/db-postgres/schema/entry.d.ts +0 -94
- package/dist/db-postgres/schema/entry.js +0 -6
- package/dist/db-postgres/schema/entryVersion.d.ts +17 -0
- package/dist/db-postgres/schema/entryVersion.js +1 -0
- package/dist/entity/index.d.ts +9 -4
- package/dist/entity/index.js +24 -24
- package/dist/files-local/index.js +43 -0
- package/dist/paraglide/messages/_index.d.ts +36 -3
- package/dist/paraglide/messages/_index.js +71 -3
- package/dist/paraglide/messages/en.d.ts +5 -0
- package/dist/paraglide/messages/en.js +14 -0
- package/dist/paraglide/messages/pl.d.ts +5 -0
- package/dist/paraglide/messages/pl.js +14 -0
- package/dist/sveltekit/components/preview.svelte +2 -326
- package/dist/sveltekit/components/preview.svelte.d.ts +5 -16
- package/dist/sveltekit/server/index.d.ts +2 -1
- package/dist/sveltekit/server/index.js +2 -1
- package/dist/sveltekit/server/preview.js +4 -7
- package/dist/types/adapters/db.d.ts +15 -1
- package/dist/types/adapters/files.d.ts +6 -0
- package/dist/types/cms.d.ts +5 -0
- package/dist/types/entries.d.ts +54 -18
- package/dist/types/fields.d.ts +14 -24
- package/dist/types/formFields.d.ts +7 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/layout.d.ts +0 -1
- package/dist/types/structured-content.d.ts +5 -0
- package/dist/updates/0.10.0/index.d.ts +2 -0
- package/dist/updates/0.10.0/index.js +15 -0
- package/dist/updates/0.11.0/index.d.ts +2 -0
- package/dist/updates/0.11.0/index.js +12 -0
- package/dist/updates/0.12.0/index.d.ts +2 -0
- package/dist/updates/0.12.0/index.js +12 -0
- package/dist/updates/0.13.0/index.d.ts +2 -0
- package/dist/updates/0.13.0/index.js +10 -0
- package/dist/updates/0.13.1/index.d.ts +2 -0
- package/dist/updates/0.13.1/index.js +20 -0
- package/dist/updates/0.7.3/index.d.ts +2 -0
- package/dist/updates/0.7.3/index.js +10 -0
- package/dist/updates/0.8.0/index.d.ts +2 -0
- package/dist/updates/0.8.0/index.js +18 -0
- package/dist/updates/0.8.0/migrate.d.ts +2 -0
- package/dist/updates/0.8.0/migrate.js +101 -0
- package/dist/updates/0.9.0/index.d.ts +2 -0
- package/dist/updates/0.9.0/index.js +38 -0
- package/dist/updates/index.js +9 -1
- package/package.json +7 -6
- package/dist/admin/components/fields/image-field.svelte +0 -198
- package/dist/admin/components/fields/image-field.svelte.d.ts +0 -8
- package/dist/admin/components/fields/richtext-field.svelte +0 -13
- package/dist/admin/components/fields/richtext-field.svelte.d.ts +0 -8
- package/dist/admin/components/tiptap.svelte +0 -11
- package/dist/admin/components/tiptap.svelte.d.ts +0 -6
- package/dist/core/server/entries/utils/getEntryTranslation.d.ts +0 -1
- package/dist/core/server/entries/utils/getEntryTranslation.js +0 -18
- package/dist/paraglide/messages/hello_world.d.ts +0 -5
- package/dist/paraglide/messages/hello_world.js +0 -33
- package/dist/paraglide/messages/login_hello.d.ts +0 -16
- package/dist/paraglide/messages/login_hello.js +0 -34
- package/dist/paraglide/messages/login_please_login.d.ts +0 -16
- package/dist/paraglide/messages/login_please_login.js +0 -34
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { InterfaceLanguage } from '../../../types/languages.js';
|
|
2
|
+
export declare const tiptapLang: Record<InterfaceLanguage, {
|
|
3
|
+
heading2: string;
|
|
4
|
+
heading3: string;
|
|
5
|
+
paragraph: string;
|
|
6
|
+
bold: string;
|
|
7
|
+
italic: string;
|
|
8
|
+
underline: string;
|
|
9
|
+
strikethrough: string;
|
|
10
|
+
highlight: string;
|
|
11
|
+
alignLeft: string;
|
|
12
|
+
alignCenter: string;
|
|
13
|
+
alignRight: string;
|
|
14
|
+
alignJustify: string;
|
|
15
|
+
bulletList: string;
|
|
16
|
+
orderedList: string;
|
|
17
|
+
blockquote: string;
|
|
18
|
+
link: string;
|
|
19
|
+
image: string;
|
|
20
|
+
video: string;
|
|
21
|
+
table: string;
|
|
22
|
+
inlineCode: string;
|
|
23
|
+
codeBlock: string;
|
|
24
|
+
insertBlock: string;
|
|
25
|
+
htmlView: string;
|
|
26
|
+
linkTitle: string;
|
|
27
|
+
untitled: string;
|
|
28
|
+
openInNewTab: string;
|
|
29
|
+
linkTextWarning: (text: string) => string;
|
|
30
|
+
accessibility: string;
|
|
31
|
+
ariaLabelPlaceholder: string;
|
|
32
|
+
ariaLabelHint: string;
|
|
33
|
+
titleTooltip: string;
|
|
34
|
+
titlePlaceholder: string;
|
|
35
|
+
titleHint: string;
|
|
36
|
+
indexing: string;
|
|
37
|
+
nofollowLabel: string;
|
|
38
|
+
nofollowHint: string;
|
|
39
|
+
sponsoredLabel: string;
|
|
40
|
+
sponsoredHint: string;
|
|
41
|
+
ugcLabel: string;
|
|
42
|
+
ugcHint: string;
|
|
43
|
+
removeLink: string;
|
|
44
|
+
save: string;
|
|
45
|
+
insertImage: string;
|
|
46
|
+
imageDescription: string;
|
|
47
|
+
addAltBanner: string;
|
|
48
|
+
altLabel: string;
|
|
49
|
+
altPlaceholder: string;
|
|
50
|
+
addAndInsert: string;
|
|
51
|
+
skip: string;
|
|
52
|
+
insertVideo: string;
|
|
53
|
+
insertTable: string;
|
|
54
|
+
rows: string;
|
|
55
|
+
columns: string;
|
|
56
|
+
insert: string;
|
|
57
|
+
commandsLabel: string;
|
|
58
|
+
noResults: string;
|
|
59
|
+
more: string;
|
|
60
|
+
alignLeftLabel: string;
|
|
61
|
+
alignCenterLabel: string;
|
|
62
|
+
alignRightLabel: string;
|
|
63
|
+
imageAltPlaceholder: string;
|
|
64
|
+
addAltMessage: string;
|
|
65
|
+
captionPlaceholder: string;
|
|
66
|
+
captionDefault: string;
|
|
67
|
+
heading2Desc: string;
|
|
68
|
+
heading3Desc: string;
|
|
69
|
+
bulletListDesc: string;
|
|
70
|
+
orderedListDesc: string;
|
|
71
|
+
blockquoteDesc: string;
|
|
72
|
+
codeBlockDesc: string;
|
|
73
|
+
horizontalRule: string;
|
|
74
|
+
horizontalRuleDesc: string;
|
|
75
|
+
formattingGroup: string;
|
|
76
|
+
blocksGroup: string;
|
|
77
|
+
}>;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
export const tiptapLang = {
|
|
2
|
+
pl: {
|
|
3
|
+
// editor-toolbar
|
|
4
|
+
heading2: 'Nagłówek 2',
|
|
5
|
+
heading3: 'Nagłówek 3',
|
|
6
|
+
paragraph: 'Paragraf',
|
|
7
|
+
bold: 'Pogrubienie',
|
|
8
|
+
italic: 'Kursywa',
|
|
9
|
+
underline: 'Podkreślenie',
|
|
10
|
+
strikethrough: 'Przekreślenie',
|
|
11
|
+
highlight: 'Wyróżnienie',
|
|
12
|
+
alignLeft: 'Do lewej',
|
|
13
|
+
alignCenter: 'Wyśrodkuj',
|
|
14
|
+
alignRight: 'Do prawej',
|
|
15
|
+
alignJustify: 'Wyjustuj',
|
|
16
|
+
bulletList: 'Lista punktowa',
|
|
17
|
+
orderedList: 'Lista numerowana',
|
|
18
|
+
blockquote: 'Cytat',
|
|
19
|
+
link: 'Link',
|
|
20
|
+
image: 'Obrazek',
|
|
21
|
+
video: 'Wideo',
|
|
22
|
+
table: 'Tabela',
|
|
23
|
+
inlineCode: 'Kod inline',
|
|
24
|
+
codeBlock: 'Blok kodu',
|
|
25
|
+
insertBlock: 'Wstaw blok',
|
|
26
|
+
htmlView: 'Widok HTML',
|
|
27
|
+
// link-dialog
|
|
28
|
+
linkTitle: 'Link',
|
|
29
|
+
untitled: 'Bez tytułu',
|
|
30
|
+
openInNewTab: 'Otwórz w nowej karcie',
|
|
31
|
+
linkTextWarning: (text) => `Tekst linku „${text}" nie opisuje celu. Dodaj`,
|
|
32
|
+
accessibility: 'Dostępność',
|
|
33
|
+
ariaLabelPlaceholder: 'Opis celu linku',
|
|
34
|
+
ariaLabelHint: 'Ustaw gdy tekst linku nie opisuje celu (np. „kliknij tutaj").',
|
|
35
|
+
titleTooltip: 'Tytuł (tooltip)',
|
|
36
|
+
titlePlaceholder: 'Tytuł linku',
|
|
37
|
+
titleHint: 'Tekst wyświetlany po najechaniu kursorem na link.',
|
|
38
|
+
indexing: 'Indeksowanie',
|
|
39
|
+
nofollowLabel: 'nofollow',
|
|
40
|
+
nofollowHint: 'Nie przekazuj autorytetu SEO. Zaznacz dla linków, którym nie chcesz ufać.',
|
|
41
|
+
sponsoredLabel: 'sponsored',
|
|
42
|
+
sponsoredHint: 'Link reklamowy lub sponsorowany.',
|
|
43
|
+
ugcLabel: 'ugc',
|
|
44
|
+
ugcHint: 'Link dodany przez użytkownika (np. w komentarzu).',
|
|
45
|
+
removeLink: 'Usuń link',
|
|
46
|
+
save: 'Zapisz',
|
|
47
|
+
// image-dialog
|
|
48
|
+
insertImage: 'Wstaw obrazek',
|
|
49
|
+
imageDescription: 'Opis zdjęcia',
|
|
50
|
+
addAltBanner: 'Dodaj opis zdjęcia, żeby każdy mógł je zrozumieć',
|
|
51
|
+
altLabel: 'Opis alternatywny (alt text)',
|
|
52
|
+
altPlaceholder: 'Np. Zdjęcie zespołu na konferencji...',
|
|
53
|
+
addAndInsert: 'Dodaj i wstaw',
|
|
54
|
+
skip: 'Pomiń',
|
|
55
|
+
// video-dialog
|
|
56
|
+
insertVideo: 'Wstaw wideo',
|
|
57
|
+
// table-dialog
|
|
58
|
+
insertTable: 'Wstaw tabelę',
|
|
59
|
+
rows: 'Wiersze',
|
|
60
|
+
columns: 'Kolumny',
|
|
61
|
+
insert: 'Wstaw',
|
|
62
|
+
// SlashCommandPopup
|
|
63
|
+
commandsLabel: 'Polecenia',
|
|
64
|
+
noResults: 'Brak wyników',
|
|
65
|
+
more: 'Więcej...',
|
|
66
|
+
// FigureNodeView
|
|
67
|
+
alignLeftLabel: 'Wyrównaj do lewej',
|
|
68
|
+
alignCenterLabel: 'Wyśrodkuj',
|
|
69
|
+
alignRightLabel: 'Wyrównaj do prawej',
|
|
70
|
+
imageAltPlaceholder: 'Opis zdjęcia...',
|
|
71
|
+
addAltMessage: 'Dodaj opis zdjęcia, żeby każdy mógł je zrozumieć',
|
|
72
|
+
captionPlaceholder: 'Dodaj podpis...',
|
|
73
|
+
captionDefault: 'Kliknij dwukrotnie, by dodać podpis',
|
|
74
|
+
// slash-command
|
|
75
|
+
heading2Desc: 'Główna sekcja',
|
|
76
|
+
heading3Desc: 'Podsekcja',
|
|
77
|
+
bulletListDesc: 'Lista bez numeracji',
|
|
78
|
+
orderedListDesc: 'Lista numerowana',
|
|
79
|
+
blockquoteDesc: 'Cytat blokowy',
|
|
80
|
+
codeBlockDesc: 'Blok kodu',
|
|
81
|
+
horizontalRule: 'Linia pozioma',
|
|
82
|
+
horizontalRuleDesc: 'Linia oddzielająca',
|
|
83
|
+
formattingGroup: 'Formatowanie',
|
|
84
|
+
blocksGroup: 'Bloki'
|
|
85
|
+
},
|
|
86
|
+
en: {
|
|
87
|
+
// editor-toolbar
|
|
88
|
+
heading2: 'Heading 2',
|
|
89
|
+
heading3: 'Heading 3',
|
|
90
|
+
paragraph: 'Paragraph',
|
|
91
|
+
bold: 'Bold',
|
|
92
|
+
italic: 'Italic',
|
|
93
|
+
underline: 'Underline',
|
|
94
|
+
strikethrough: 'Strikethrough',
|
|
95
|
+
highlight: 'Highlight',
|
|
96
|
+
alignLeft: 'Align left',
|
|
97
|
+
alignCenter: 'Center',
|
|
98
|
+
alignRight: 'Align right',
|
|
99
|
+
alignJustify: 'Justify',
|
|
100
|
+
bulletList: 'Bullet list',
|
|
101
|
+
orderedList: 'Ordered list',
|
|
102
|
+
blockquote: 'Blockquote',
|
|
103
|
+
link: 'Link',
|
|
104
|
+
image: 'Image',
|
|
105
|
+
video: 'Video',
|
|
106
|
+
table: 'Table',
|
|
107
|
+
inlineCode: 'Inline code',
|
|
108
|
+
codeBlock: 'Code block',
|
|
109
|
+
insertBlock: 'Insert block',
|
|
110
|
+
htmlView: 'HTML view',
|
|
111
|
+
// link-dialog
|
|
112
|
+
linkTitle: 'Link',
|
|
113
|
+
untitled: 'Untitled',
|
|
114
|
+
openInNewTab: 'Open in new tab',
|
|
115
|
+
linkTextWarning: (text) => `Link text "${text}" does not describe the destination. Add`,
|
|
116
|
+
accessibility: 'Accessibility',
|
|
117
|
+
ariaLabelPlaceholder: 'Describe the link destination',
|
|
118
|
+
ariaLabelHint: 'Set when link text does not describe the destination (e.g. "click here").',
|
|
119
|
+
titleTooltip: 'Title (tooltip)',
|
|
120
|
+
titlePlaceholder: 'Link title',
|
|
121
|
+
titleHint: 'Text displayed when hovering over the link.',
|
|
122
|
+
indexing: 'Indexing',
|
|
123
|
+
nofollowLabel: 'nofollow',
|
|
124
|
+
nofollowHint: 'Do not pass SEO authority. Use for untrusted links.',
|
|
125
|
+
sponsoredLabel: 'sponsored',
|
|
126
|
+
sponsoredHint: 'Advertising or sponsored link.',
|
|
127
|
+
ugcLabel: 'ugc',
|
|
128
|
+
ugcHint: 'User-generated link (e.g. in a comment).',
|
|
129
|
+
removeLink: 'Remove link',
|
|
130
|
+
save: 'Save',
|
|
131
|
+
// image-dialog
|
|
132
|
+
insertImage: 'Insert image',
|
|
133
|
+
imageDescription: 'Image description',
|
|
134
|
+
addAltBanner: 'Add an image description so everyone can understand it',
|
|
135
|
+
altLabel: 'Alternative description (alt text)',
|
|
136
|
+
altPlaceholder: 'E.g. Team photo at a conference...',
|
|
137
|
+
addAndInsert: 'Add and insert',
|
|
138
|
+
skip: 'Skip',
|
|
139
|
+
// video-dialog
|
|
140
|
+
insertVideo: 'Insert video',
|
|
141
|
+
// table-dialog
|
|
142
|
+
insertTable: 'Insert table',
|
|
143
|
+
rows: 'Rows',
|
|
144
|
+
columns: 'Columns',
|
|
145
|
+
insert: 'Insert',
|
|
146
|
+
// SlashCommandPopup
|
|
147
|
+
commandsLabel: 'Commands',
|
|
148
|
+
noResults: 'No results',
|
|
149
|
+
more: 'More...',
|
|
150
|
+
// FigureNodeView
|
|
151
|
+
alignLeftLabel: 'Align left',
|
|
152
|
+
alignCenterLabel: 'Center',
|
|
153
|
+
alignRightLabel: 'Align right',
|
|
154
|
+
imageAltPlaceholder: 'Image description...',
|
|
155
|
+
addAltMessage: 'Add an image description so everyone can understand it',
|
|
156
|
+
captionPlaceholder: 'Add caption...',
|
|
157
|
+
captionDefault: 'Double-click to add caption',
|
|
158
|
+
// slash-command
|
|
159
|
+
heading2Desc: 'Main section',
|
|
160
|
+
heading3Desc: 'Subsection',
|
|
161
|
+
bulletListDesc: 'Unordered list',
|
|
162
|
+
orderedListDesc: 'Numbered list',
|
|
163
|
+
blockquoteDesc: 'Block quote',
|
|
164
|
+
codeBlockDesc: 'Code block',
|
|
165
|
+
horizontalRule: 'Horizontal rule',
|
|
166
|
+
horizontalRuleDesc: 'Divider line',
|
|
167
|
+
formattingGroup: 'Formatting',
|
|
168
|
+
blocksGroup: 'Blocks'
|
|
169
|
+
}
|
|
170
|
+
};
|
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
import AlertTriangle from '@tabler/icons-svelte/icons/alert-triangle';
|
|
16
16
|
import LinkIcon from '@tabler/icons-svelte/icons/link';
|
|
17
17
|
import X from '@tabler/icons-svelte/icons/x';
|
|
18
|
+
import { tiptapLang } from './lang.js';
|
|
19
|
+
import { useInterfaceLanguage } from '../../state/interface-language.svelte.js';
|
|
20
|
+
|
|
21
|
+
const interfaceLanguage = useInterfaceLanguage();
|
|
22
|
+
const t = $derived(tiptapLang[interfaceLanguage.current]);
|
|
18
23
|
|
|
19
24
|
type Props = {
|
|
20
25
|
open: boolean;
|
|
@@ -22,11 +27,10 @@
|
|
|
22
27
|
onOpenChange?: (open: boolean) => void;
|
|
23
28
|
};
|
|
24
29
|
|
|
25
|
-
type EntryWithSeo =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
+
type EntryWithSeo = {
|
|
31
|
+
_id: string;
|
|
32
|
+
_slug: string;
|
|
33
|
+
seo?: SeoFieldData;
|
|
30
34
|
};
|
|
31
35
|
|
|
32
36
|
let { open = $bindable(false), editor, onOpenChange }: Props = $props();
|
|
@@ -102,16 +106,16 @@
|
|
|
102
106
|
]) as [EntryWithSeo[], EntryWithSeo[]];
|
|
103
107
|
const combined = [...slugResults, ...titleResults];
|
|
104
108
|
const deduped = combined.filter(
|
|
105
|
-
(entry, index, self) => index === self.findIndex((e) => e.
|
|
109
|
+
(entry, index, self) => index === self.findIndex((e) => e._id === entry._id)
|
|
106
110
|
);
|
|
107
111
|
suggestions = deduped.slice(0, 5);
|
|
108
112
|
}, 300);
|
|
109
113
|
}
|
|
110
114
|
|
|
111
115
|
function selectEntry(entry: EntryWithSeo) {
|
|
112
|
-
entryId = entry.
|
|
116
|
+
entryId = entry._id;
|
|
113
117
|
linkedEntry = entry;
|
|
114
|
-
url = entry.
|
|
118
|
+
url = entry.seo?.slug || url;
|
|
115
119
|
suggestions = [];
|
|
116
120
|
}
|
|
117
121
|
|
|
@@ -174,7 +178,7 @@
|
|
|
174
178
|
<Dialog.Root bind:open onOpenChange={(v) => { if (!v) close(); }}>
|
|
175
179
|
<Dialog.Content class="sm:max-w-md">
|
|
176
180
|
<Dialog.Header>
|
|
177
|
-
<Dialog.Title>
|
|
181
|
+
<Dialog.Title>{t.linkTitle}</Dialog.Title>
|
|
178
182
|
</Dialog.Header>
|
|
179
183
|
<form onsubmit={handleSubmit} class="space-y-4">
|
|
180
184
|
{#if linkedEntry}
|
|
@@ -184,8 +188,8 @@
|
|
|
184
188
|
onclick={unlinkEntry}
|
|
185
189
|
>
|
|
186
190
|
<LinkIcon class="text-muted-foreground h-4 w-4 shrink-0" />
|
|
187
|
-
<span class="truncate font-medium">{linkedEntry.
|
|
188
|
-
<span class="text-muted-foreground truncate text-xs">{linkedEntry.
|
|
191
|
+
<span class="truncate font-medium">{linkedEntry.seo?.title || linkedEntry._id}</span>
|
|
192
|
+
<span class="text-muted-foreground truncate text-xs">{linkedEntry.seo?.slug}</span>
|
|
189
193
|
<X class="ml-auto h-3.5 w-3.5 shrink-0 opacity-50" />
|
|
190
194
|
</button>
|
|
191
195
|
{/if}
|
|
@@ -210,7 +214,7 @@
|
|
|
210
214
|
>
|
|
211
215
|
<Item.Content>
|
|
212
216
|
<Item.Title>
|
|
213
|
-
{suggestion.
|
|
217
|
+
{suggestion.seo?.title || t.untitled} ({suggestion.seo?.slug})
|
|
214
218
|
</Item.Title>
|
|
215
219
|
</Item.Content>
|
|
216
220
|
</Item.Root>
|
|
@@ -222,7 +226,7 @@
|
|
|
222
226
|
|
|
223
227
|
<div class="flex items-center gap-2">
|
|
224
228
|
<Checkbox id="link-target" bind:checked={openInNewTab} />
|
|
225
|
-
<Label for="link-target" class="cursor-pointer font-normal">
|
|
229
|
+
<Label for="link-target" class="cursor-pointer font-normal">{t.openInNewTab}</Label>
|
|
226
230
|
</div>
|
|
227
231
|
|
|
228
232
|
{#if showGenericWarning}
|
|
@@ -232,7 +236,7 @@
|
|
|
232
236
|
>
|
|
233
237
|
<AlertTriangle class="mt-0.5 h-4 w-4 shrink-0" />
|
|
234
238
|
<span>
|
|
235
|
-
|
|
239
|
+
{t.linkTextWarning(selectedText.trim())}
|
|
236
240
|
<button
|
|
237
241
|
type="button"
|
|
238
242
|
class="underline"
|
|
@@ -242,8 +246,7 @@
|
|
|
242
246
|
}}
|
|
243
247
|
>
|
|
244
248
|
aria-label
|
|
245
|
-
</button
|
|
246
|
-
z opisem.
|
|
249
|
+
</button>.
|
|
247
250
|
</span>
|
|
248
251
|
</div>
|
|
249
252
|
{/if}
|
|
@@ -260,7 +263,7 @@
|
|
|
260
263
|
{:else}
|
|
261
264
|
<ChevronRight class="h-4 w-4" />
|
|
262
265
|
{/if}
|
|
263
|
-
|
|
266
|
+
{t.accessibility}
|
|
264
267
|
</button>
|
|
265
268
|
{#if a11yOpen}
|
|
266
269
|
<div class="mt-3 space-y-2">
|
|
@@ -268,16 +271,16 @@
|
|
|
268
271
|
<Input
|
|
269
272
|
id="link-aria-label"
|
|
270
273
|
type="text"
|
|
271
|
-
placeholder=
|
|
274
|
+
placeholder={t.ariaLabelPlaceholder}
|
|
272
275
|
bind:value={ariaLabel}
|
|
273
276
|
/>
|
|
274
277
|
<p class="text-muted-foreground text-xs">
|
|
275
|
-
|
|
278
|
+
{t.ariaLabelHint}
|
|
276
279
|
</p>
|
|
277
|
-
<Label for="link-title">
|
|
278
|
-
<Input id="link-title" type="text" placeholder=
|
|
280
|
+
<Label for="link-title">{t.titleTooltip}</Label>
|
|
281
|
+
<Input id="link-title" type="text" placeholder={t.titlePlaceholder} bind:value={title} />
|
|
279
282
|
<p class="text-muted-foreground text-xs">
|
|
280
|
-
|
|
283
|
+
{t.titleHint}
|
|
281
284
|
</p>
|
|
282
285
|
</div>
|
|
283
286
|
{/if}
|
|
@@ -295,7 +298,7 @@
|
|
|
295
298
|
{:else}
|
|
296
299
|
<ChevronRight class="h-4 w-4" />
|
|
297
300
|
{/if}
|
|
298
|
-
|
|
301
|
+
{t.indexing}
|
|
299
302
|
</button>
|
|
300
303
|
{#if relOpen}
|
|
301
304
|
<div class="mt-3 space-y-3">
|
|
@@ -305,7 +308,7 @@
|
|
|
305
308
|
<Label for="link-rel-nofollow" class="cursor-pointer font-normal">nofollow</Label>
|
|
306
309
|
</div>
|
|
307
310
|
<p class="text-muted-foreground mt-1 ml-6 text-xs">
|
|
308
|
-
|
|
311
|
+
{t.nofollowHint}
|
|
309
312
|
</p>
|
|
310
313
|
</div>
|
|
311
314
|
<div>
|
|
@@ -314,7 +317,7 @@
|
|
|
314
317
|
<Label for="link-rel-sponsored" class="cursor-pointer font-normal">sponsored</Label>
|
|
315
318
|
</div>
|
|
316
319
|
<p class="text-muted-foreground mt-1 ml-6 text-xs">
|
|
317
|
-
|
|
320
|
+
{t.sponsoredHint}
|
|
318
321
|
</p>
|
|
319
322
|
</div>
|
|
320
323
|
<div>
|
|
@@ -323,7 +326,7 @@
|
|
|
323
326
|
<Label for="link-rel-ugc" class="cursor-pointer font-normal">ugc</Label>
|
|
324
327
|
</div>
|
|
325
328
|
<p class="text-muted-foreground mt-1 ml-6 text-xs">
|
|
326
|
-
|
|
329
|
+
{t.ugcHint}
|
|
327
330
|
</p>
|
|
328
331
|
</div>
|
|
329
332
|
</div>
|
|
@@ -332,9 +335,9 @@
|
|
|
332
335
|
|
|
333
336
|
<Dialog.Footer class="gap-2">
|
|
334
337
|
{#if editor?.isActive('link')}
|
|
335
|
-
<Button type="button" variant="destructive" onclick={handleRemove}>
|
|
338
|
+
<Button type="button" variant="destructive" onclick={handleRemove}>{t.removeLink}</Button>
|
|
336
339
|
{/if}
|
|
337
|
-
<Button type="submit" disabled={!url}>
|
|
340
|
+
<Button type="submit" disabled={!url}>{t.save}</Button>
|
|
338
341
|
</Dialog.Footer>
|
|
339
342
|
</form>
|
|
340
343
|
</Dialog.Content>
|
|
@@ -3,71 +3,75 @@ import Suggestion, {} from '@tiptap/suggestion';
|
|
|
3
3
|
import tippy, {} from 'tippy.js';
|
|
4
4
|
import { mount, unmount } from 'svelte';
|
|
5
5
|
import SlashCommandPopup from './SlashCommandPopup.svelte';
|
|
6
|
+
import { tiptapLang } from './lang.js';
|
|
7
|
+
import { useInterfaceLanguage } from '../../state/interface-language.svelte.js';
|
|
6
8
|
function getStandardItems(editor) {
|
|
9
|
+
const t = tiptapLang[useInterfaceLanguage().current];
|
|
7
10
|
return [
|
|
8
11
|
{
|
|
9
12
|
id: 'heading2',
|
|
10
|
-
label:
|
|
11
|
-
description:
|
|
12
|
-
group:
|
|
13
|
+
label: t.heading2,
|
|
14
|
+
description: t.heading2Desc,
|
|
15
|
+
group: t.formattingGroup,
|
|
13
16
|
tier: 1,
|
|
14
17
|
action: () => editor.chain().focus().toggleHeading({ level: 2 }).run()
|
|
15
18
|
},
|
|
16
19
|
{
|
|
17
20
|
id: 'heading3',
|
|
18
|
-
label:
|
|
19
|
-
description:
|
|
20
|
-
group:
|
|
21
|
+
label: t.heading3,
|
|
22
|
+
description: t.heading3Desc,
|
|
23
|
+
group: t.formattingGroup,
|
|
21
24
|
tier: 1,
|
|
22
25
|
action: () => editor.chain().focus().toggleHeading({ level: 3 }).run()
|
|
23
26
|
},
|
|
24
27
|
{
|
|
25
28
|
id: 'bulletList',
|
|
26
|
-
label:
|
|
27
|
-
description:
|
|
28
|
-
group:
|
|
29
|
+
label: t.bulletList,
|
|
30
|
+
description: t.bulletListDesc,
|
|
31
|
+
group: t.formattingGroup,
|
|
29
32
|
tier: 1,
|
|
30
33
|
action: () => editor.chain().focus().toggleBulletList().run()
|
|
31
34
|
},
|
|
32
35
|
{
|
|
33
36
|
id: 'orderedList',
|
|
34
|
-
label:
|
|
35
|
-
description:
|
|
36
|
-
group:
|
|
37
|
+
label: t.orderedList,
|
|
38
|
+
description: t.orderedListDesc,
|
|
39
|
+
group: t.formattingGroup,
|
|
37
40
|
tier: 1,
|
|
38
41
|
action: () => editor.chain().focus().toggleOrderedList().run()
|
|
39
42
|
},
|
|
40
43
|
{
|
|
41
44
|
id: 'blockquote',
|
|
42
|
-
label:
|
|
43
|
-
description:
|
|
44
|
-
group:
|
|
45
|
+
label: t.blockquote,
|
|
46
|
+
description: t.blockquoteDesc,
|
|
47
|
+
group: t.formattingGroup,
|
|
45
48
|
tier: 2,
|
|
46
49
|
action: () => editor.chain().focus().toggleBlockquote().run()
|
|
47
50
|
},
|
|
48
51
|
{
|
|
49
52
|
id: 'codeBlock',
|
|
50
|
-
label:
|
|
51
|
-
description:
|
|
52
|
-
group:
|
|
53
|
+
label: t.codeBlock,
|
|
54
|
+
description: t.codeBlockDesc,
|
|
55
|
+
group: t.formattingGroup,
|
|
53
56
|
tier: 2,
|
|
54
57
|
action: () => editor.chain().focus().toggleCodeBlock().run()
|
|
55
58
|
},
|
|
56
59
|
{
|
|
57
60
|
id: 'horizontalRule',
|
|
58
|
-
label:
|
|
59
|
-
description:
|
|
60
|
-
group:
|
|
61
|
+
label: t.horizontalRule,
|
|
62
|
+
description: t.horizontalRuleDesc,
|
|
63
|
+
group: t.formattingGroup,
|
|
61
64
|
tier: 2,
|
|
62
65
|
action: () => editor.chain().focus().setHorizontalRule().run()
|
|
63
66
|
}
|
|
64
67
|
];
|
|
65
68
|
}
|
|
66
69
|
function getInlineBlockItems(inlineBlocks, editor) {
|
|
70
|
+
const t = tiptapLang[useInterfaceLanguage().current];
|
|
67
71
|
return inlineBlocks.map((block) => ({
|
|
68
72
|
id: `block-${block.slug}`,
|
|
69
|
-
label: block.label ? Object.values(block.label)[0] : block.slug,
|
|
70
|
-
group:
|
|
73
|
+
label: block.label ? (typeof block.label === 'string' ? block.label : Object.values(block.label)[0]) : block.slug,
|
|
74
|
+
group: t.blocksGroup,
|
|
71
75
|
action: () => {
|
|
72
76
|
editor.commands.insertInlineBlock({ blockType: block.slug });
|
|
73
77
|
}
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
import Input from '../../../components/ui/input/input.svelte';
|
|
5
5
|
import Label from '../../../components/ui/label/label.svelte';
|
|
6
6
|
import type { Editor } from '@tiptap/core';
|
|
7
|
+
import { tiptapLang } from './lang.js';
|
|
8
|
+
import { useInterfaceLanguage } from '../../state/interface-language.svelte.js';
|
|
9
|
+
|
|
10
|
+
const interfaceLanguage = useInterfaceLanguage();
|
|
11
|
+
const t = $derived(tiptapLang[interfaceLanguage.current]);
|
|
7
12
|
|
|
8
13
|
type Props = {
|
|
9
14
|
open: boolean;
|
|
@@ -34,21 +39,21 @@
|
|
|
34
39
|
<Dialog.Root bind:open {onOpenChange}>
|
|
35
40
|
<Dialog.Content class="sm:max-w-sm">
|
|
36
41
|
<Dialog.Header>
|
|
37
|
-
<Dialog.Title>
|
|
42
|
+
<Dialog.Title>{t.insertTable}</Dialog.Title>
|
|
38
43
|
</Dialog.Header>
|
|
39
44
|
<form onsubmit={handleSubmit} class="space-y-4">
|
|
40
45
|
<div class="grid grid-cols-2 gap-4">
|
|
41
46
|
<div class="space-y-2">
|
|
42
|
-
<Label for="rows">
|
|
47
|
+
<Label for="rows">{t.rows}</Label>
|
|
43
48
|
<Input id="rows" type="number" min="1" max="20" bind:value={rows} />
|
|
44
49
|
</div>
|
|
45
50
|
<div class="space-y-2">
|
|
46
|
-
<Label for="cols">
|
|
51
|
+
<Label for="cols">{t.columns}</Label>
|
|
47
52
|
<Input id="cols" type="number" min="1" max="10" bind:value={cols} />
|
|
48
53
|
</div>
|
|
49
54
|
</div>
|
|
50
55
|
<Dialog.Footer>
|
|
51
|
-
<Button type="submit">
|
|
56
|
+
<Button type="submit">{t.insert}</Button>
|
|
52
57
|
</Dialog.Footer>
|
|
53
58
|
</form>
|
|
54
59
|
</Dialog.Content>
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
import MediaSelector from '../media/media-selector.svelte';
|
|
4
4
|
import { getRemotes } from '../../context/remotes.js';
|
|
5
5
|
import type { Editor } from '@tiptap/core';
|
|
6
|
+
import { tiptapLang } from './lang.js';
|
|
7
|
+
import { useInterfaceLanguage } from '../../state/interface-language.svelte.js';
|
|
8
|
+
|
|
9
|
+
const interfaceLanguage = useInterfaceLanguage();
|
|
10
|
+
const t = $derived(tiptapLang[interfaceLanguage.current]);
|
|
6
11
|
|
|
7
12
|
type Props = {
|
|
8
13
|
open: boolean;
|
|
@@ -60,7 +65,7 @@
|
|
|
60
65
|
<Dialog.Root bind:open {onOpenChange}>
|
|
61
66
|
<Dialog.Content class="max-w-5xl! sm:max-w-5xl!">
|
|
62
67
|
<Dialog.Header>
|
|
63
|
-
<Dialog.Title>
|
|
68
|
+
<Dialog.Title>{t.insertVideo}</Dialog.Title>
|
|
64
69
|
</Dialog.Header>
|
|
65
70
|
<MediaSelector bind:selected accept="video/*" />
|
|
66
71
|
</Dialog.Content>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getEmailConfigured: import("@sveltejs/kit").RemoteQueryFunction<void, boolean>;
|
|
@@ -56,18 +56,15 @@ export declare const getRawEntry: import("@sveltejs/kit").RemoteQueryFunction<{
|
|
|
56
56
|
export declare const getEntryForEntryPage: import("@sveltejs/kit").RemoteQueryFunction<string, RawEntry>;
|
|
57
57
|
export declare const updateEntryVersionCommand: import("@sveltejs/kit").RemoteCommand<{
|
|
58
58
|
entryId: string;
|
|
59
|
+
lang: string;
|
|
59
60
|
data: Record<string, unknown>;
|
|
60
61
|
type: "draft" | "published-now" | "published-scheduled" | "cancel-published";
|
|
61
62
|
scheduledAt?: Date | undefined;
|
|
62
|
-
}, Promise<
|
|
63
|
+
}, Promise<import("../../types/entries.js").DbEntryVersion | undefined>>;
|
|
63
64
|
export declare const updateEntryCommand: import("@sveltejs/kit").RemoteCommand<{
|
|
64
65
|
id: string;
|
|
65
66
|
data: {
|
|
66
|
-
availableLocales?: string[] | undefined;
|
|
67
67
|
archivedAt?: Date | null | undefined;
|
|
68
|
-
publishedAt?: Date | null | undefined;
|
|
69
|
-
publishedVersionId?: string | null | undefined;
|
|
70
|
-
publishedBy?: string | null | undefined;
|
|
71
68
|
sortOrder?: number | null | undefined;
|
|
72
69
|
};
|
|
73
70
|
}, Promise<import("../../types/entries.js").DbEntry>>;
|