@payloadcms/richtext-lexical 3.0.0-beta.36 → 3.0.0-beta.37
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/dist/field/features/align/feature.client.d.ts.map +1 -1
- package/dist/field/features/align/feature.client.js +12 -4
- package/dist/field/features/align/feature.client.js.map +1 -1
- package/dist/field/features/align/feature.server.d.ts.map +1 -1
- package/dist/field/features/align/feature.server.js +2 -0
- package/dist/field/features/align/feature.server.js.map +1 -1
- package/dist/field/features/align/i18n.d.ts +3 -0
- package/dist/field/features/align/i18n.d.ts.map +1 -0
- package/dist/field/features/align/i18n.js +196 -0
- package/dist/field/features/align/i18n.js.map +1 -0
- package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
- package/dist/field/features/blockquote/feature.client.js +22 -21
- package/dist/field/features/blockquote/feature.client.js.map +1 -1
- package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
- package/dist/field/features/blockquote/feature.server.js +2 -0
- package/dist/field/features/blockquote/feature.server.js.map +1 -1
- package/dist/field/features/blockquote/i18n.d.ts +3 -0
- package/dist/field/features/blockquote/i18n.d.ts.map +1 -0
- package/dist/field/features/blockquote/i18n.js +100 -0
- package/dist/field/features/blockquote/i18n.js.map +1 -0
- package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
- package/dist/field/features/blocks/feature.client.js +3 -1
- package/dist/field/features/blocks/feature.client.js.map +1 -1
- package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
- package/dist/field/features/blocks/feature.server.js +2 -0
- package/dist/field/features/blocks/feature.server.js.map +1 -1
- package/dist/field/features/blocks/i18n.d.ts +3 -0
- package/dist/field/features/blocks/i18n.d.ts.map +1 -0
- package/dist/field/features/blocks/i18n.js +100 -0
- package/dist/field/features/blocks/i18n.js.map +1 -0
- package/dist/field/features/blocks/populationPromise.js +1 -1
- package/dist/field/features/blocks/populationPromise.js.map +1 -1
- package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
- package/dist/field/features/converters/html/field/index.js +30 -2
- package/dist/field/features/converters/html/field/index.js.map +1 -1
- package/dist/field/features/heading/feature.client.d.ts.map +1 -1
- package/dist/field/features/heading/feature.client.js +26 -21
- package/dist/field/features/heading/feature.client.js.map +1 -1
- package/dist/field/features/heading/feature.server.d.ts.map +1 -1
- package/dist/field/features/heading/feature.server.js +2 -0
- package/dist/field/features/heading/feature.server.js.map +1 -1
- package/dist/field/features/heading/i18n.d.ts +3 -0
- package/dist/field/features/heading/i18n.d.ts.map +1 -0
- package/dist/field/features/heading/i18n.js +100 -0
- package/dist/field/features/heading/i18n.js.map +1 -0
- package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -1
- package/dist/field/features/horizontalRule/feature.client.js +21 -20
- package/dist/field/features/horizontalRule/feature.client.js.map +1 -1
- package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -1
- package/dist/field/features/horizontalRule/feature.server.js +2 -0
- package/dist/field/features/horizontalRule/feature.server.js.map +1 -1
- package/dist/field/features/horizontalRule/i18n.d.ts +3 -0
- package/dist/field/features/horizontalRule/i18n.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/i18n.js +100 -0
- package/dist/field/features/horizontalRule/i18n.js.map +1 -0
- package/dist/field/features/indent/feature.client.d.ts.map +1 -1
- package/dist/field/features/indent/feature.client.js +6 -2
- package/dist/field/features/indent/feature.client.js.map +1 -1
- package/dist/field/features/indent/feature.server.d.ts.map +1 -1
- package/dist/field/features/indent/feature.server.js +2 -0
- package/dist/field/features/indent/feature.server.js.map +1 -1
- package/dist/field/features/indent/i18n.d.ts +3 -0
- package/dist/field/features/indent/i18n.d.ts.map +1 -0
- package/dist/field/features/indent/i18n.js +132 -0
- package/dist/field/features/indent/i18n.js.map +1 -0
- package/dist/field/features/link/feature.client.d.ts.map +1 -1
- package/dist/field/features/link/feature.client.js +7 -1
- package/dist/field/features/link/feature.client.js.map +1 -1
- package/dist/field/features/link/feature.server.d.ts.map +1 -1
- package/dist/field/features/link/feature.server.js +10 -2
- package/dist/field/features/link/feature.server.js.map +1 -1
- package/dist/field/features/link/i18n.d.ts +3 -0
- package/dist/field/features/link/i18n.d.ts.map +1 -0
- package/dist/field/features/link/i18n.js +100 -0
- package/dist/field/features/link/i18n.js.map +1 -0
- package/dist/field/features/link/markdownTransformer.d.ts +6 -0
- package/dist/field/features/link/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/link/markdownTransformer.js +50 -0
- package/dist/field/features/link/markdownTransformer.js.map +1 -0
- package/dist/field/features/link/populationPromise.js +1 -1
- package/dist/field/features/link/populationPromise.js.map +1 -1
- package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/feature.client.js +21 -20
- package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
- package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/feature.server.js +2 -0
- package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
- package/dist/field/features/lists/checklist/i18n.d.ts +3 -0
- package/dist/field/features/lists/checklist/i18n.d.ts.map +1 -0
- package/dist/field/features/lists/checklist/i18n.js +100 -0
- package/dist/field/features/lists/checklist/i18n.js.map +1 -0
- package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -1
- package/dist/field/features/lists/orderedList/feature.client.js +19 -18
- package/dist/field/features/lists/orderedList/feature.client.js.map +1 -1
- package/dist/field/features/lists/orderedList/feature.server.d.ts.map +1 -1
- package/dist/field/features/lists/orderedList/feature.server.js +3 -1
- package/dist/field/features/lists/orderedList/feature.server.js.map +1 -1
- package/dist/field/features/lists/orderedList/i18n.d.ts +3 -0
- package/dist/field/features/lists/orderedList/i18n.d.ts.map +1 -0
- package/dist/field/features/lists/orderedList/i18n.js +100 -0
- package/dist/field/features/lists/orderedList/i18n.js.map +1 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.d.ts +3 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.d.ts.map +1 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.js +11 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.js.map +1 -0
- package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -1
- package/dist/field/features/lists/unorderedList/feature.client.js +19 -18
- package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -1
- package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +1 -1
- package/dist/field/features/lists/unorderedList/feature.server.js +2 -0
- package/dist/field/features/lists/unorderedList/feature.server.js.map +1 -1
- package/dist/field/features/lists/unorderedList/i18n.d.ts +3 -0
- package/dist/field/features/lists/unorderedList/i18n.d.ts.map +1 -0
- package/dist/field/features/lists/unorderedList/i18n.js +100 -0
- package/dist/field/features/lists/unorderedList/i18n.js.map +1 -0
- package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
- package/dist/field/features/paragraph/feature.client.js +24 -23
- package/dist/field/features/paragraph/feature.client.js.map +1 -1
- package/dist/field/features/paragraph/feature.server.d.ts.map +1 -1
- package/dist/field/features/paragraph/feature.server.js +2 -0
- package/dist/field/features/paragraph/feature.server.js.map +1 -1
- package/dist/field/features/paragraph/i18n.d.ts +3 -0
- package/dist/field/features/paragraph/i18n.d.ts.map +1 -0
- package/dist/field/features/paragraph/i18n.js +132 -0
- package/dist/field/features/paragraph/i18n.js.map +1 -0
- package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
- package/dist/field/features/relationship/feature.client.js +23 -22
- package/dist/field/features/relationship/feature.client.js.map +1 -1
- package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
- package/dist/field/features/relationship/feature.server.js +2 -0
- package/dist/field/features/relationship/feature.server.js.map +1 -1
- package/dist/field/features/relationship/i18n.d.ts +3 -0
- package/dist/field/features/relationship/i18n.d.ts.map +1 -0
- package/dist/field/features/relationship/i18n.js +100 -0
- package/dist/field/features/relationship/i18n.js.map +1 -0
- package/dist/field/features/shared/slashMenu/basicGroup.d.ts +3 -0
- package/dist/field/features/shared/slashMenu/basicGroup.d.ts.map +1 -0
- package/dist/field/features/shared/slashMenu/basicGroup.js +11 -0
- package/dist/field/features/shared/slashMenu/basicGroup.js.map +1 -0
- package/dist/field/features/toolbars/types.d.ts +1 -1
- package/dist/field/features/toolbars/types.d.ts.map +1 -1
- package/dist/field/features/toolbars/types.js.map +1 -1
- package/dist/field/features/types.d.ts +21 -2
- package/dist/field/features/types.d.ts.map +1 -1
- package/dist/field/features/types.js.map +1 -1
- package/dist/field/features/upload/feature.client.d.ts.map +1 -1
- package/dist/field/features/upload/feature.client.js +26 -25
- package/dist/field/features/upload/feature.client.js.map +1 -1
- package/dist/field/features/upload/feature.server.d.ts.map +1 -1
- package/dist/field/features/upload/feature.server.js +2 -0
- package/dist/field/features/upload/feature.server.js.map +1 -1
- package/dist/field/features/upload/i18n.d.ts +3 -0
- package/dist/field/features/upload/i18n.d.ts.map +1 -0
- package/dist/field/features/upload/i18n.js +100 -0
- package/dist/field/features/upload/i18n.js.map +1 -0
- package/dist/field/features/upload/populationPromise.js +1 -1
- package/dist/field/features/upload/populationPromise.js.map +1 -1
- package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
- package/dist/field/lexical/LexicalEditor.js +3 -1
- package/dist/field/lexical/LexicalEditor.js.map +1 -1
- package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
- package/dist/field/lexical/config/server/sanitize.js +11 -0
- package/dist/field/lexical/config/server/sanitize.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +2 -2
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/field/lexical/utils/url.d.ts.map +1 -1
- package/dist/field/lexical/utils/url.js +10 -2
- package/dist/field/lexical/utils/url.js.map +1 -1
- package/dist/i18n.d.ts +3 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +164 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/package.json +12 -11
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export const i18n = {
|
|
2
|
+
ar: {
|
|
3
|
+
label: 'العنوان {{headingLevel}}'
|
|
4
|
+
},
|
|
5
|
+
az: {
|
|
6
|
+
label: 'Başlıq {{headingLevel}}'
|
|
7
|
+
},
|
|
8
|
+
bg: {
|
|
9
|
+
label: 'Заглавие {{headingLevel}}'
|
|
10
|
+
},
|
|
11
|
+
cs: {
|
|
12
|
+
label: 'Nadpis {{headingLevel}}'
|
|
13
|
+
},
|
|
14
|
+
de: {
|
|
15
|
+
label: 'Überschrift {{headingLevel}}'
|
|
16
|
+
},
|
|
17
|
+
en: {
|
|
18
|
+
label: 'Heading {{headingLevel}}'
|
|
19
|
+
},
|
|
20
|
+
es: {
|
|
21
|
+
label: 'Encabezado {{headingLevel}}'
|
|
22
|
+
},
|
|
23
|
+
fa: {
|
|
24
|
+
label: '[SKIPPED]'
|
|
25
|
+
},
|
|
26
|
+
fr: {
|
|
27
|
+
label: 'En-tête {{headingLevel}}'
|
|
28
|
+
},
|
|
29
|
+
he: {
|
|
30
|
+
label: 'כותרת {{רמת כותרת}}'
|
|
31
|
+
},
|
|
32
|
+
hr: {
|
|
33
|
+
label: 'Naslov {{headingLevel}}'
|
|
34
|
+
},
|
|
35
|
+
hu: {
|
|
36
|
+
label: 'Címsor {{headingLevel}}'
|
|
37
|
+
},
|
|
38
|
+
it: {
|
|
39
|
+
label: 'Intestazione {{headingLevel}}'
|
|
40
|
+
},
|
|
41
|
+
ja: {
|
|
42
|
+
label: '見出し{{headingLevel}}'
|
|
43
|
+
},
|
|
44
|
+
ko: {
|
|
45
|
+
label: '제목 {{headingLevel}}'
|
|
46
|
+
},
|
|
47
|
+
my: {
|
|
48
|
+
label: '[SURAT]\n\nKepala {{headingLevel}}'
|
|
49
|
+
},
|
|
50
|
+
nb: {
|
|
51
|
+
label: 'Overskrift {{overskriftsnivå}}'
|
|
52
|
+
},
|
|
53
|
+
nl: {
|
|
54
|
+
label: 'Kop {{headingLevel}}'
|
|
55
|
+
},
|
|
56
|
+
pl: {
|
|
57
|
+
label: 'Nagłówek {{poziom nagłówka}}'
|
|
58
|
+
},
|
|
59
|
+
pt: {
|
|
60
|
+
label: 'Cabeçalho {{headingLevel}}'
|
|
61
|
+
},
|
|
62
|
+
ro: {
|
|
63
|
+
label: 'Titlu {{headingLevel}}'
|
|
64
|
+
},
|
|
65
|
+
rs: {
|
|
66
|
+
label: 'Naslov {{headingLevel}}'
|
|
67
|
+
},
|
|
68
|
+
'rs-latin': {
|
|
69
|
+
label: 'Naslov {{headingLevel}}'
|
|
70
|
+
},
|
|
71
|
+
ru: {
|
|
72
|
+
label: 'Заголовок {{headingLevel}}'
|
|
73
|
+
},
|
|
74
|
+
sk: {
|
|
75
|
+
label: 'Nadpis {{headingLevel}}'
|
|
76
|
+
},
|
|
77
|
+
sv: {
|
|
78
|
+
label: 'Rubrik {{headingLevel}}'
|
|
79
|
+
},
|
|
80
|
+
th: {
|
|
81
|
+
label: 'หัวข้อ {{headingLevel}}'
|
|
82
|
+
},
|
|
83
|
+
tr: {
|
|
84
|
+
label: 'Başlık {{headingLevel}}'
|
|
85
|
+
},
|
|
86
|
+
uk: {
|
|
87
|
+
label: 'Заголовок {{headingLevel}}'
|
|
88
|
+
},
|
|
89
|
+
vi: {
|
|
90
|
+
label: 'Tiêu đề {{headingLevel}}'
|
|
91
|
+
},
|
|
92
|
+
zh: {
|
|
93
|
+
label: '标题 {{headingLevel}}'
|
|
94
|
+
},
|
|
95
|
+
'zh-TW': {
|
|
96
|
+
label: '標題 {{headingLevel}}'
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
//# sourceMappingURL=i18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/features/heading/i18n.ts"],"sourcesContent":["import type { GenericLanguages } from '@payloadcms/translations'\n\nexport const i18n: Partial<GenericLanguages> = {\n ar: {\n label: 'العنوان {{headingLevel}}',\n },\n az: {\n label: 'Başlıq {{headingLevel}}',\n },\n bg: {\n label: 'Заглавие {{headingLevel}}',\n },\n cs: {\n label: 'Nadpis {{headingLevel}}',\n },\n de: {\n label: 'Überschrift {{headingLevel}}',\n },\n en: {\n label: 'Heading {{headingLevel}}',\n },\n es: {\n label: 'Encabezado {{headingLevel}}',\n },\n fa: {\n label: '[SKIPPED]',\n },\n fr: {\n label: 'En-tête {{headingLevel}}',\n },\n he: {\n label: 'כותרת {{רמת כותרת}}',\n },\n hr: {\n label: 'Naslov {{headingLevel}}',\n },\n hu: {\n label: 'Címsor {{headingLevel}}',\n },\n it: {\n label: 'Intestazione {{headingLevel}}',\n },\n ja: {\n label: '見出し{{headingLevel}}',\n },\n ko: {\n label: '제목 {{headingLevel}}',\n },\n my: {\n label: '[SURAT]\\n\\nKepala {{headingLevel}}',\n },\n nb: {\n label: 'Overskrift {{overskriftsnivå}}',\n },\n nl: {\n label: 'Kop {{headingLevel}}',\n },\n pl: {\n label: 'Nagłówek {{poziom nagłówka}}',\n },\n pt: {\n label: 'Cabeçalho {{headingLevel}}',\n },\n ro: {\n label: 'Titlu {{headingLevel}}',\n },\n rs: {\n label: 'Naslov {{headingLevel}}',\n },\n 'rs-latin': {\n label: 'Naslov {{headingLevel}}',\n },\n ru: {\n label: 'Заголовок {{headingLevel}}',\n },\n sk: {\n label: 'Nadpis {{headingLevel}}',\n },\n sv: {\n label: 'Rubrik {{headingLevel}}',\n },\n th: {\n label: 'หัวข้อ {{headingLevel}}',\n },\n tr: {\n label: 'Başlık {{headingLevel}}',\n },\n uk: {\n label: 'Заголовок {{headingLevel}}',\n },\n vi: {\n label: 'Tiêu đề {{headingLevel}}',\n },\n zh: {\n label: '标题 {{headingLevel}}',\n },\n 'zh-TW': {\n label: '標題 {{headingLevel}}',\n },\n}\n"],"names":["i18n","ar","label","az","bg","cs","de","en","es","fa","fr","he","hr","hu","it","ja","ko","my","nb","nl","pl","pt","ro","rs","ru","sk","sv","th","tr","uk","vi","zh"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,MAAMA,OAAkC;IAC7CC,IAAI;QACFC,OAAO;IACT;IACAC,IAAI;QACFD,OAAO;IACT;IACAE,IAAI;QACFF,OAAO;IACT;IACAG,IAAI;QACFH,OAAO;IACT;IACAI,IAAI;QACFJ,OAAO;IACT;IACAK,IAAI;QACFL,OAAO;IACT;IACAM,IAAI;QACFN,OAAO;IACT;IACAO,IAAI;QACFP,OAAO;IACT;IACAQ,IAAI;QACFR,OAAO;IACT;IACAS,IAAI;QACFT,OAAO;IACT;IACAU,IAAI;QACFV,OAAO;IACT;IACAW,IAAI;QACFX,OAAO;IACT;IACAY,IAAI;QACFZ,OAAO;IACT;IACAa,IAAI;QACFb,OAAO;IACT;IACAc,IAAI;QACFd,OAAO;IACT;IACAe,IAAI;QACFf,OAAO;IACT;IACAgB,IAAI;QACFhB,OAAO;IACT;IACAiB,IAAI;QACFjB,OAAO;IACT;IACAkB,IAAI;QACFlB,OAAO;IACT;IACAmB,IAAI;QACFnB,OAAO;IACT;IACAoB,IAAI;QACFpB,OAAO;IACT;IACAqB,IAAI;QACFrB,OAAO;IACT;IACA,YAAY;QACVA,OAAO;IACT;IACAsB,IAAI;QACFtB,OAAO;IACT;IACAuB,IAAI;QACFvB,OAAO;IACT;IACAwB,IAAI;QACFxB,OAAO;IACT;IACAyB,IAAI;QACFzB,OAAO;IACT;IACA0B,IAAI;QACF1B,OAAO;IACT;IACA2B,IAAI;QACF3B,OAAO;IACT;IACA4B,IAAI;QACF5B,OAAO;IACT;IACA6B,IAAI;QACF7B,OAAO;IACT;IACA,SAAS;QACPA,OAAO;IACT;AACF,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/horizontalRule/feature.client.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/horizontalRule/feature.client.tsx"],"names":[],"mappings":";AAgFA,eAAO,MAAM,oCAAoC;;;EAEhD,CAAA"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { $isNodeSelection } from 'lexical';
|
|
3
3
|
import { HorizontalRuleIcon } from '../../lexical/ui/icons/HorizontalRule/index.js';
|
|
4
4
|
import { createClientComponent } from '../createClientComponent.js';
|
|
5
|
+
import { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js';
|
|
5
6
|
import { toolbarAddDropdownGroupWithItems } from '../shared/toolbar/addDropdownGroup.js';
|
|
6
7
|
import { MarkdownTransformer } from './markdownTransformer.js';
|
|
7
8
|
import { $isHorizontalRuleNode, HorizontalRuleNode, INSERT_HORIZONTAL_RULE_COMMAND } from './nodes/HorizontalRuleNode.js';
|
|
@@ -25,26 +26,24 @@ const HorizontalRuleFeatureClient = (props)=>{
|
|
|
25
26
|
],
|
|
26
27
|
slashMenu: {
|
|
27
28
|
groups: [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
label
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
slashMenuBasicGroupWithItems([
|
|
30
|
+
{
|
|
31
|
+
Icon: HorizontalRuleIcon,
|
|
32
|
+
key: 'horizontalRule',
|
|
33
|
+
keywords: [
|
|
34
|
+
'hr',
|
|
35
|
+
'horizontal rule',
|
|
36
|
+
'line',
|
|
37
|
+
'separator'
|
|
38
|
+
],
|
|
39
|
+
label: ({ i18n })=>{
|
|
40
|
+
return i18n.t('lexical:horizontalRule:label');
|
|
41
|
+
},
|
|
42
|
+
onSelect: ({ editor })=>{
|
|
43
|
+
editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, undefined);
|
|
43
44
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
label: 'Basic'
|
|
47
|
-
}
|
|
45
|
+
}
|
|
46
|
+
])
|
|
48
47
|
]
|
|
49
48
|
},
|
|
50
49
|
toolbarFixed: {
|
|
@@ -60,7 +59,9 @@ const HorizontalRuleFeatureClient = (props)=>{
|
|
|
60
59
|
return $isHorizontalRuleNode(firstNode);
|
|
61
60
|
},
|
|
62
61
|
key: 'horizontalRule',
|
|
63
|
-
label:
|
|
62
|
+
label: ({ i18n })=>{
|
|
63
|
+
return i18n.t('lexical:horizontalRule:label');
|
|
64
|
+
},
|
|
64
65
|
onSelect: ({ editor })=>{
|
|
65
66
|
editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, undefined);
|
|
66
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/features/horizontalRule/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isNodeSelection } from 'lexical'\n\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { HorizontalRuleIcon } from '../../lexical/ui/icons/HorizontalRule/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { toolbarAddDropdownGroupWithItems } from '../shared/toolbar/addDropdownGroup.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\nimport {\n $isHorizontalRuleNode,\n HorizontalRuleNode,\n INSERT_HORIZONTAL_RULE_COMMAND,\n} from './nodes/HorizontalRuleNode.js'\nimport { HorizontalRulePlugin } from './plugin/index.js'\n\nconst HorizontalRuleFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n markdownTransformers: [MarkdownTransformer],\n nodes: [HorizontalRuleNode],\n plugins: [\n {\n Component: HorizontalRulePlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/features/horizontalRule/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport type { ClientTranslationKeys } from '@payloadcms/translations'\n\nimport { $isNodeSelection } from 'lexical'\n\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { HorizontalRuleIcon } from '../../lexical/ui/icons/HorizontalRule/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../shared/toolbar/addDropdownGroup.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\nimport {\n $isHorizontalRuleNode,\n HorizontalRuleNode,\n INSERT_HORIZONTAL_RULE_COMMAND,\n} from './nodes/HorizontalRuleNode.js'\nimport { HorizontalRulePlugin } from './plugin/index.js'\n\nconst HorizontalRuleFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n markdownTransformers: [MarkdownTransformer],\n nodes: [HorizontalRuleNode],\n plugins: [\n {\n Component: HorizontalRulePlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: HorizontalRuleIcon,\n key: 'horizontalRule',\n keywords: ['hr', 'horizontal rule', 'line', 'separator'],\n label: ({ i18n }) => {\n return i18n.t('lexical:horizontalRule:label')\n },\n\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: HorizontalRuleIcon,\n isActive: ({ selection }) => {\n if (!$isNodeSelection(selection) || !selection.getNodes().length) {\n return false\n }\n\n const firstNode = selection.getNodes()[0]\n return $isHorizontalRuleNode(firstNode)\n },\n key: 'horizontalRule',\n label: ({ i18n }) => {\n return i18n.t('lexical:horizontalRule:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n }),\n }\n}\n\nexport const HorizontalRuleFeatureClientComponent = createClientComponent(\n HorizontalRuleFeatureClient,\n)\n"],"names":["$isNodeSelection","HorizontalRuleIcon","createClientComponent","slashMenuBasicGroupWithItems","toolbarAddDropdownGroupWithItems","MarkdownTransformer","$isHorizontalRuleNode","HorizontalRuleNode","INSERT_HORIZONTAL_RULE_COMMAND","HorizontalRulePlugin","HorizontalRuleFeatureClient","props","clientFeatureProps","feature","markdownTransformers","nodes","plugins","Component","position","slashMenu","groups","Icon","key","keywords","label","i18n","t","onSelect","editor","dispatchCommand","undefined","toolbarFixed","ChildComponent","isActive","selection","getNodes","length","firstNode","HorizontalRuleFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAIA,SAASA,gBAAgB,QAAQ,UAAS;AAI1C,SAASC,kBAAkB,QAAQ,iDAAgD;AACnF,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,4BAA4B,QAAQ,oCAAmC;AAChF,SAASC,gCAAgC,QAAQ,wCAAuC;AACxF,SAASC,mBAAmB,QAAQ,2BAA0B;AAC9D,SACEC,qBAAqB,EACrBC,kBAAkB,EAClBC,8BAA8B,QACzB,gCAA+B;AACtC,SAASC,oBAAoB,QAAQ,oBAAmB;AAExD,MAAMC,8BAAwE,CAACC;IAC7E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,sBAAsB;oBAACT;iBAAoB;gBAC3CU,OAAO;oBAACR;iBAAmB;gBAC3BS,SAAS;oBACP;wBACEC,WAAWR;wBACXS,UAAU;oBACZ;iBACD;gBACDC,WAAW;oBACTC,QAAQ;wBACNjB,6BAA6B;4BAC3B;gCACEkB,MAAMpB;gCACNqB,KAAK;gCACLC,UAAU;oCAAC;oCAAM;oCAAmB;oCAAQ;iCAAY;gCACxDC,OAAO,CAAC,EAAEC,IAAI,EAAE;oCACd,OAAOA,KAAKC,CAAC,CAAC;gCAChB;gCAEAC,UAAU,CAAC,EAAEC,MAAM,EAAE;oCACnBA,OAAOC,eAAe,CAACrB,gCAAgCsB;gCACzD;4BACF;yBACD;qBACF;gBACH;gBAEAC,cAAc;oBACZX,QAAQ;wBACNhB,iCAAiC;4BAC/B;gCACE4B,gBAAgB/B;gCAChBgC,UAAU,CAAC,EAAEC,SAAS,EAAE;oCACtB,IAAI,CAAClC,iBAAiBkC,cAAc,CAACA,UAAUC,QAAQ,GAAGC,MAAM,EAAE;wCAChE,OAAO;oCACT;oCAEA,MAAMC,YAAYH,UAAUC,QAAQ,EAAE,CAAC,EAAE;oCACzC,OAAO7B,sBAAsB+B;gCAC/B;gCACAf,KAAK;gCACLE,OAAO,CAAC,EAAEC,IAAI,EAAE;oCACd,OAAOA,KAAKC,CAAC,CAAC;gCAChB;gCACAC,UAAU,CAAC,EAAEC,MAAM,EAAE;oCACnBA,OAAOC,eAAe,CAACrB,gCAAgCsB;gCACzD;4BACF;yBACD;qBACF;gBACH;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAMQ,uCAAuCpC,sBAClDQ,6BACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/field/features/horizontalRule/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/field/features/horizontalRule/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAQhE,eAAO,MAAM,qBAAqB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CA4BrF,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createNode } from '../typeUtilities.js';
|
|
2
2
|
import { HorizontalRuleFeatureClientComponent } from './feature.client.js';
|
|
3
|
+
import { i18n } from './i18n.js';
|
|
3
4
|
import { MarkdownTransformer } from './markdownTransformer.js';
|
|
4
5
|
import { HorizontalRuleNode } from './nodes/HorizontalRuleNode.js';
|
|
5
6
|
export const HorizontalRuleFeature = (props)=>{
|
|
@@ -7,6 +8,7 @@ export const HorizontalRuleFeature = (props)=>{
|
|
|
7
8
|
feature: ()=>{
|
|
8
9
|
return {
|
|
9
10
|
ClientComponent: HorizontalRuleFeatureClientComponent,
|
|
11
|
+
i18n,
|
|
10
12
|
markdownTransformers: [
|
|
11
13
|
MarkdownTransformer
|
|
12
14
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/features/horizontalRule/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../types.js'\n\nimport { createNode } from '../typeUtilities.js'\nimport { HorizontalRuleFeatureClientComponent } from './feature.client.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\nimport { HorizontalRuleNode } from './nodes/HorizontalRuleNode.js'\n\nexport const HorizontalRuleFeature: FeatureProviderProviderServer<undefined, undefined> = (\n props,\n) => {\n return {\n feature: () => {\n return {\n ClientComponent: HorizontalRuleFeatureClientComponent,\n markdownTransformers: [MarkdownTransformer],\n nodes: [\n createNode({\n converters: {\n html: {\n converter: () => {\n return `<hr/>`\n },\n nodeTypes: [HorizontalRuleNode.getType()],\n },\n },\n node: HorizontalRuleNode,\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'horizontalRule',\n serverFeatureProps: props,\n }\n}\n"],"names":["createNode","HorizontalRuleFeatureClientComponent","MarkdownTransformer","HorizontalRuleNode","HorizontalRuleFeature","props","feature","ClientComponent","markdownTransformers","nodes","converters","html","converter","nodeTypes","getType","node","serverFeatureProps","key"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/features/horizontalRule/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../types.js'\n\nimport { createNode } from '../typeUtilities.js'\nimport { HorizontalRuleFeatureClientComponent } from './feature.client.js'\nimport { i18n } from './i18n.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\nimport { HorizontalRuleNode } from './nodes/HorizontalRuleNode.js'\n\nexport const HorizontalRuleFeature: FeatureProviderProviderServer<undefined, undefined> = (\n props,\n) => {\n return {\n feature: () => {\n return {\n ClientComponent: HorizontalRuleFeatureClientComponent,\n i18n,\n markdownTransformers: [MarkdownTransformer],\n nodes: [\n createNode({\n converters: {\n html: {\n converter: () => {\n return `<hr/>`\n },\n nodeTypes: [HorizontalRuleNode.getType()],\n },\n },\n node: HorizontalRuleNode,\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'horizontalRule',\n serverFeatureProps: props,\n }\n}\n"],"names":["createNode","HorizontalRuleFeatureClientComponent","i18n","MarkdownTransformer","HorizontalRuleNode","HorizontalRuleFeature","props","feature","ClientComponent","markdownTransformers","nodes","converters","html","converter","nodeTypes","getType","node","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,UAAU,QAAQ,sBAAqB;AAChD,SAASC,oCAAoC,QAAQ,sBAAqB;AAC1E,SAASC,IAAI,QAAQ,YAAW;AAChC,SAASC,mBAAmB,QAAQ,2BAA0B;AAC9D,SAASC,kBAAkB,QAAQ,gCAA+B;AAElE,OAAO,MAAMC,wBAA6E,CACxFC;IAEA,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBP;gBACjBC;gBACAO,sBAAsB;oBAACN;iBAAoB;gBAC3CO,OAAO;oBACLV,WAAW;wBACTW,YAAY;4BACVC,MAAM;gCACJC,WAAW;oCACT,OAAO,CAAC,KAAK,CAAC;gCAChB;gCACAC,WAAW;oCAACV,mBAAmBW,OAAO;iCAAG;4BAC3C;wBACF;wBACAC,MAAMZ;oBACR;iBACD;gBACDa,oBAAoBX;YACtB;QACF;QACAY,KAAK;QACLD,oBAAoBX;IACtB;AACF,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../src/field/features/horizontalRule/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAEhE,eAAO,MAAM,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAiG1C,CAAA"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export const i18n = {
|
|
2
|
+
ar: {
|
|
3
|
+
label: 'القاعدة الأفقية'
|
|
4
|
+
},
|
|
5
|
+
az: {
|
|
6
|
+
label: 'Üfüqi Xətt'
|
|
7
|
+
},
|
|
8
|
+
bg: {
|
|
9
|
+
label: 'Хоризонтална линия'
|
|
10
|
+
},
|
|
11
|
+
cs: {
|
|
12
|
+
label: 'Vodorovný pravítko'
|
|
13
|
+
},
|
|
14
|
+
de: {
|
|
15
|
+
label: 'Trennlinie'
|
|
16
|
+
},
|
|
17
|
+
en: {
|
|
18
|
+
label: 'Horizontal Rule'
|
|
19
|
+
},
|
|
20
|
+
es: {
|
|
21
|
+
label: 'Regla Horizontal'
|
|
22
|
+
},
|
|
23
|
+
fa: {
|
|
24
|
+
label: 'قاعده افقی'
|
|
25
|
+
},
|
|
26
|
+
fr: {
|
|
27
|
+
label: 'Règle horizontale'
|
|
28
|
+
},
|
|
29
|
+
he: {
|
|
30
|
+
label: 'קו אופקי'
|
|
31
|
+
},
|
|
32
|
+
hr: {
|
|
33
|
+
label: 'Vodoravna linija'
|
|
34
|
+
},
|
|
35
|
+
hu: {
|
|
36
|
+
label: 'Vízszintes vonal'
|
|
37
|
+
},
|
|
38
|
+
it: {
|
|
39
|
+
label: 'Regola Orizzontale'
|
|
40
|
+
},
|
|
41
|
+
ja: {
|
|
42
|
+
label: '水平線'
|
|
43
|
+
},
|
|
44
|
+
ko: {
|
|
45
|
+
label: '수평 규칙'
|
|
46
|
+
},
|
|
47
|
+
my: {
|
|
48
|
+
label: 'Peraturan Mendatar'
|
|
49
|
+
},
|
|
50
|
+
nb: {
|
|
51
|
+
label: 'Horisontal Regel'
|
|
52
|
+
},
|
|
53
|
+
nl: {
|
|
54
|
+
label: 'Horizontale Regel'
|
|
55
|
+
},
|
|
56
|
+
pl: {
|
|
57
|
+
label: 'Pozioma Linia'
|
|
58
|
+
},
|
|
59
|
+
pt: {
|
|
60
|
+
label: 'Regra Horizontal'
|
|
61
|
+
},
|
|
62
|
+
ro: {
|
|
63
|
+
label: 'Linie orizontală'
|
|
64
|
+
},
|
|
65
|
+
rs: {
|
|
66
|
+
label: 'Horizontalna linija'
|
|
67
|
+
},
|
|
68
|
+
'rs-latin': {
|
|
69
|
+
label: 'Horizontalna linija'
|
|
70
|
+
},
|
|
71
|
+
ru: {
|
|
72
|
+
label: 'Горизонтальная линия'
|
|
73
|
+
},
|
|
74
|
+
sk: {
|
|
75
|
+
label: 'Vodorovná čiara'
|
|
76
|
+
},
|
|
77
|
+
sv: {
|
|
78
|
+
label: 'Horisontell linje'
|
|
79
|
+
},
|
|
80
|
+
th: {
|
|
81
|
+
label: 'กฎขีดตรง'
|
|
82
|
+
},
|
|
83
|
+
tr: {
|
|
84
|
+
label: 'Yatay Çizgi'
|
|
85
|
+
},
|
|
86
|
+
uk: {
|
|
87
|
+
label: 'Горизонтальна лінія'
|
|
88
|
+
},
|
|
89
|
+
vi: {
|
|
90
|
+
label: 'Quy tắc ngang'
|
|
91
|
+
},
|
|
92
|
+
zh: {
|
|
93
|
+
label: '水平线'
|
|
94
|
+
},
|
|
95
|
+
'zh-TW': {
|
|
96
|
+
label: '水平線'
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
//# sourceMappingURL=i18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/features/horizontalRule/i18n.ts"],"sourcesContent":["import type { GenericLanguages } from '@payloadcms/translations'\n\nexport const i18n: Partial<GenericLanguages> = {\n ar: {\n label: 'القاعدة الأفقية',\n },\n az: {\n label: 'Üfüqi Xətt',\n },\n bg: {\n label: 'Хоризонтална линия',\n },\n cs: {\n label: 'Vodorovný pravítko',\n },\n de: {\n label: 'Trennlinie',\n },\n en: {\n label: 'Horizontal Rule',\n },\n es: {\n label: 'Regla Horizontal',\n },\n fa: {\n label: 'قاعده افقی',\n },\n fr: {\n label: 'Règle horizontale',\n },\n he: {\n label: 'קו אופקי',\n },\n hr: {\n label: 'Vodoravna linija',\n },\n hu: {\n label: 'Vízszintes vonal',\n },\n it: {\n label: 'Regola Orizzontale',\n },\n ja: {\n label: '水平線',\n },\n ko: {\n label: '수평 규칙',\n },\n my: {\n label: 'Peraturan Mendatar',\n },\n nb: {\n label: 'Horisontal Regel',\n },\n nl: {\n label: 'Horizontale Regel',\n },\n pl: {\n label: 'Pozioma Linia',\n },\n pt: {\n label: 'Regra Horizontal',\n },\n ro: {\n label: 'Linie orizontală',\n },\n rs: {\n label: 'Horizontalna linija',\n },\n 'rs-latin': {\n label: 'Horizontalna linija',\n },\n ru: {\n label: 'Горизонтальная линия',\n },\n sk: {\n label: 'Vodorovná čiara',\n },\n sv: {\n label: 'Horisontell linje',\n },\n th: {\n label: 'กฎขีดตรง',\n },\n tr: {\n label: 'Yatay Çizgi',\n },\n uk: {\n label: 'Горизонтальна лінія',\n },\n vi: {\n label: 'Quy tắc ngang',\n },\n zh: {\n label: '水平线',\n },\n 'zh-TW': {\n label: '水平線',\n },\n}\n"],"names":["i18n","ar","label","az","bg","cs","de","en","es","fa","fr","he","hr","hu","it","ja","ko","my","nb","nl","pl","pt","ro","rs","ru","sk","sv","th","tr","uk","vi","zh"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,MAAMA,OAAkC;IAC7CC,IAAI;QACFC,OAAO;IACT;IACAC,IAAI;QACFD,OAAO;IACT;IACAE,IAAI;QACFF,OAAO;IACT;IACAG,IAAI;QACFH,OAAO;IACT;IACAI,IAAI;QACFJ,OAAO;IACT;IACAK,IAAI;QACFL,OAAO;IACT;IACAM,IAAI;QACFN,OAAO;IACT;IACAO,IAAI;QACFP,OAAO;IACT;IACAQ,IAAI;QACFR,OAAO;IACT;IACAS,IAAI;QACFT,OAAO;IACT;IACAU,IAAI;QACFV,OAAO;IACT;IACAW,IAAI;QACFX,OAAO;IACT;IACAY,IAAI;QACFZ,OAAO;IACT;IACAa,IAAI;QACFb,OAAO;IACT;IACAc,IAAI;QACFd,OAAO;IACT;IACAe,IAAI;QACFf,OAAO;IACT;IACAgB,IAAI;QACFhB,OAAO;IACT;IACAiB,IAAI;QACFjB,OAAO;IACT;IACAkB,IAAI;QACFlB,OAAO;IACT;IACAmB,IAAI;QACFnB,OAAO;IACT;IACAoB,IAAI;QACFpB,OAAO;IACT;IACAqB,IAAI;QACFrB,OAAO;IACT;IACA,YAAY;QACVA,OAAO;IACT;IACAsB,IAAI;QACFtB,OAAO;IACT;IACAuB,IAAI;QACFvB,OAAO;IACT;IACAwB,IAAI;QACFxB,OAAO;IACT;IACAyB,IAAI;QACFzB,OAAO;IACT;IACA0B,IAAI;QACF1B,OAAO;IACT;IACA2B,IAAI;QACF3B,OAAO;IACT;IACA4B,IAAI;QACF5B,OAAO;IACT;IACA6B,IAAI;QACF7B,OAAO;IACT;IACA,SAAS;QACPA,OAAO;IACT;AACF,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/indent/feature.client.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/indent/feature.client.tsx"],"names":[],"mappings":";AAuEA,eAAO,MAAM,4BAA4B;;;EAA6C,CAAA"}
|
|
@@ -22,7 +22,9 @@ const toolbarGroups = [
|
|
|
22
22
|
return false;
|
|
23
23
|
},
|
|
24
24
|
key: 'indentDecrease',
|
|
25
|
-
label:
|
|
25
|
+
label: ({ i18n })=>{
|
|
26
|
+
return i18n.t('lexical:indent:decreaseLabel');
|
|
27
|
+
},
|
|
26
28
|
onSelect: ({ editor })=>{
|
|
27
29
|
editor.dispatchCommand(OUTDENT_CONTENT_COMMAND, undefined);
|
|
28
30
|
},
|
|
@@ -32,7 +34,9 @@ const toolbarGroups = [
|
|
|
32
34
|
ChildComponent: IndentIncreaseIcon,
|
|
33
35
|
isActive: ()=>false,
|
|
34
36
|
key: 'indentIncrease',
|
|
35
|
-
label:
|
|
37
|
+
label: ({ i18n })=>{
|
|
38
|
+
return i18n.t('lexical:indent:increaseLabel');
|
|
39
|
+
},
|
|
36
40
|
onSelect: ({ editor })=>{
|
|
37
41
|
editor.dispatchCommand(INDENT_CONTENT_COMMAND, undefined);
|
|
38
42
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/features/indent/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { IndentDecreaseIcon } from '../../lexical/ui/icons/IndentDecrease/index.js'\nimport { IndentIncreaseIcon } from '../../lexical/ui/icons/IndentIncrease/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { toolbarIndentGroupWithItems } from './toolbarIndentGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarIndentGroupWithItems([\n {\n ChildComponent: IndentDecreaseIcon,\n isActive: () => false,\n isEnabled: ({ selection }) => {\n if (!selection || !selection?.getNodes()?.length) {\n return false\n }\n for (const node of selection.getNodes()) {\n // If at least one node is indented, this should be active\n if (\n ('__indent' in node && (node.__indent as number) > 0) ||\n (node.getParent() && '__indent' in node.getParent() && node.getParent().__indent > 0)\n ) {\n return true\n }\n }\n return false\n },\n key: 'indentDecrease',\n label:
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/features/indent/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { IndentDecreaseIcon } from '../../lexical/ui/icons/IndentDecrease/index.js'\nimport { IndentIncreaseIcon } from '../../lexical/ui/icons/IndentIncrease/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { toolbarIndentGroupWithItems } from './toolbarIndentGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarIndentGroupWithItems([\n {\n ChildComponent: IndentDecreaseIcon,\n isActive: () => false,\n isEnabled: ({ selection }) => {\n if (!selection || !selection?.getNodes()?.length) {\n return false\n }\n for (const node of selection.getNodes()) {\n // If at least one node is indented, this should be active\n if (\n ('__indent' in node && (node.__indent as number) > 0) ||\n (node.getParent() && '__indent' in node.getParent() && node.getParent().__indent > 0)\n ) {\n return true\n }\n }\n return false\n },\n key: 'indentDecrease',\n label: ({ i18n }) => {\n return i18n.t('lexical:indent:decreaseLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(OUTDENT_CONTENT_COMMAND, undefined)\n },\n order: 1,\n },\n {\n ChildComponent: IndentIncreaseIcon,\n isActive: () => false,\n key: 'indentIncrease',\n label: ({ i18n }) => {\n return i18n.t('lexical:indent:increaseLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INDENT_CONTENT_COMMAND, undefined)\n },\n order: 2,\n },\n ]),\n]\n\nconst IndentFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }),\n }\n}\n\nexport const IndentFeatureClientComponent = createClientComponent(IndentFeatureClient)\n"],"names":["INDENT_CONTENT_COMMAND","OUTDENT_CONTENT_COMMAND","IndentDecreaseIcon","IndentIncreaseIcon","createClientComponent","toolbarIndentGroupWithItems","toolbarGroups","ChildComponent","isActive","isEnabled","selection","getNodes","length","node","__indent","getParent","key","label","i18n","t","onSelect","editor","dispatchCommand","undefined","order","IndentFeatureClient","props","clientFeatureProps","feature","toolbarFixed","groups","toolbarInline","IndentFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,sBAAsB,EAAEC,uBAAuB,QAAQ,UAAS;AAKzE,SAASC,kBAAkB,QAAQ,iDAAgD;AACnF,SAASC,kBAAkB,QAAQ,iDAAgD;AACnF,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,2BAA2B,QAAQ,0BAAyB;AAErE,MAAMC,gBAAgC;IACpCD,4BAA4B;QAC1B;YACEE,gBAAgBL;YAChBM,UAAU,IAAM;YAChBC,WAAW,CAAC,EAAEC,SAAS,EAAE;gBACvB,IAAI,CAACA,aAAa,CAACA,WAAWC,YAAYC,QAAQ;oBAChD,OAAO;gBACT;gBACA,KAAK,MAAMC,QAAQH,UAAUC,QAAQ,GAAI;oBACvC,0DAA0D;oBAC1D,IACE,AAAC,cAAcE,QAAQ,AAACA,KAAKC,QAAQ,GAAc,KAClDD,KAAKE,SAAS,MAAM,cAAcF,KAAKE,SAAS,MAAMF,KAAKE,SAAS,GAAGD,QAAQ,GAAG,GACnF;wBACA,OAAO;oBACT;gBACF;gBACA,OAAO;YACT;YACAE,KAAK;YACLC,OAAO,CAAC,EAAEC,IAAI,EAAE;gBACd,OAAOA,KAAKC,CAAC,CAAC;YAChB;YACAC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACrB,yBAAyBsB;YAClD;YACAC,OAAO;QACT;QACA;YACEjB,gBAAgBJ;YAChBK,UAAU,IAAM;YAChBQ,KAAK;YACLC,OAAO,CAAC,EAAEC,IAAI,EAAE;gBACd,OAAOA,KAAKC,CAAC,CAAC;YAChB;YACAC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACtB,wBAAwBuB;YACjD;YACAC,OAAO;QACT;KACD;CACF;AAED,MAAMC,sBAAgE,CAACC;IACrE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,cAAc;oBACZC,QAAQxB;gBACV;gBACAyB,eAAe;oBACbD,QAAQxB;gBACV;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAM0B,+BAA+B5B,sBAAsBqB,qBAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/field/features/indent/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/field/features/indent/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAKhE,eAAO,MAAM,aAAa,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CAa7E,CAAA"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { IndentFeatureClientComponent } from './feature.client.js';
|
|
2
|
+
import { i18n } from './i18n.js';
|
|
2
3
|
export const IndentFeature = (props)=>{
|
|
3
4
|
return {
|
|
4
5
|
feature: ()=>{
|
|
5
6
|
return {
|
|
6
7
|
ClientComponent: IndentFeatureClientComponent,
|
|
7
8
|
clientFeatureProps: null,
|
|
9
|
+
i18n,
|
|
8
10
|
serverFeatureProps: props
|
|
9
11
|
};
|
|
10
12
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/features/indent/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../types.js'\n\nimport { IndentFeatureClientComponent } from './feature.client.js'\n\nexport const IndentFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: () => {\n return {\n ClientComponent: IndentFeatureClientComponent,\n clientFeatureProps: null,\n serverFeatureProps: props,\n }\n },\n key: 'indent',\n serverFeatureProps: props,\n }\n}\n"],"names":["IndentFeatureClientComponent","IndentFeature","props","feature","ClientComponent","clientFeatureProps","serverFeatureProps","key"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/features/indent/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../types.js'\n\nimport { IndentFeatureClientComponent } from './feature.client.js'\nimport { i18n } from './i18n.js'\n\nexport const IndentFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: () => {\n return {\n ClientComponent: IndentFeatureClientComponent,\n clientFeatureProps: null,\n i18n,\n serverFeatureProps: props,\n }\n },\n key: 'indent',\n serverFeatureProps: props,\n }\n}\n"],"names":["IndentFeatureClientComponent","i18n","IndentFeature","props","feature","ClientComponent","clientFeatureProps","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,4BAA4B,QAAQ,sBAAqB;AAClE,SAASC,IAAI,QAAQ,YAAW;AAEhC,OAAO,MAAMC,gBAAqE,CAACC;IACjF,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBL;gBACjBM,oBAAoB;gBACpBL;gBACAM,oBAAoBJ;YACtB;QACF;QACAK,KAAK;QACLD,oBAAoBJ;IACtB;AACF,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../src/field/features/indent/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAEhE,eAAO,MAAM,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAiI1C,CAAA"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
export const i18n = {
|
|
2
|
+
ar: {
|
|
3
|
+
decreaseLabel: 'تقليل المسافة البادئة',
|
|
4
|
+
increaseLabel: 'زيادة المسافة البادئة'
|
|
5
|
+
},
|
|
6
|
+
az: {
|
|
7
|
+
decreaseLabel: 'İntervalı Azaltın',
|
|
8
|
+
increaseLabel: 'Girintiyi Artırın'
|
|
9
|
+
},
|
|
10
|
+
bg: {
|
|
11
|
+
decreaseLabel: 'Намали отстоянието',
|
|
12
|
+
increaseLabel: 'Увеличете отстоянието'
|
|
13
|
+
},
|
|
14
|
+
cs: {
|
|
15
|
+
decreaseLabel: 'Zmenšit odsazení',
|
|
16
|
+
increaseLabel: 'Zvětšit odsazení'
|
|
17
|
+
},
|
|
18
|
+
de: {
|
|
19
|
+
decreaseLabel: 'Einzug verkleinern',
|
|
20
|
+
increaseLabel: 'Einzug erhöhen'
|
|
21
|
+
},
|
|
22
|
+
en: {
|
|
23
|
+
decreaseLabel: 'Decrease Indent',
|
|
24
|
+
increaseLabel: 'Increase Indent'
|
|
25
|
+
},
|
|
26
|
+
es: {
|
|
27
|
+
decreaseLabel: 'Disminuir Sangría',
|
|
28
|
+
increaseLabel: 'Aumentar Sangría'
|
|
29
|
+
},
|
|
30
|
+
fa: {
|
|
31
|
+
decreaseLabel: 'کاهش تورفتگی',
|
|
32
|
+
increaseLabel: 'افزایش تورفتگی'
|
|
33
|
+
},
|
|
34
|
+
fr: {
|
|
35
|
+
decreaseLabel: "Diminuer l'indentation",
|
|
36
|
+
increaseLabel: "Augmenter l'indentation"
|
|
37
|
+
},
|
|
38
|
+
he: {
|
|
39
|
+
decreaseLabel: 'הקטן הזחה',
|
|
40
|
+
increaseLabel: 'הגדל כניסה'
|
|
41
|
+
},
|
|
42
|
+
hr: {
|
|
43
|
+
decreaseLabel: 'Smanji uvlačenje',
|
|
44
|
+
increaseLabel: 'Povećaj uvlačenje'
|
|
45
|
+
},
|
|
46
|
+
hu: {
|
|
47
|
+
decreaseLabel: 'Csökkentse a behúzást',
|
|
48
|
+
increaseLabel: 'Behúzás növelése'
|
|
49
|
+
},
|
|
50
|
+
it: {
|
|
51
|
+
decreaseLabel: 'Diminuisci rientro',
|
|
52
|
+
increaseLabel: 'Aumenta Rientro'
|
|
53
|
+
},
|
|
54
|
+
ja: {
|
|
55
|
+
decreaseLabel: 'インデントを減らす',
|
|
56
|
+
increaseLabel: 'インデントを増やす'
|
|
57
|
+
},
|
|
58
|
+
ko: {
|
|
59
|
+
decreaseLabel: '들여쓰기 줄이기',
|
|
60
|
+
increaseLabel: '들여쓰기 늘리기'
|
|
61
|
+
},
|
|
62
|
+
my: {
|
|
63
|
+
decreaseLabel: 'Kurangkan Inden',
|
|
64
|
+
increaseLabel: 'Tingkatkan Inden'
|
|
65
|
+
},
|
|
66
|
+
nb: {
|
|
67
|
+
decreaseLabel: 'Reduser innrykk',
|
|
68
|
+
increaseLabel: 'Øke innrykk'
|
|
69
|
+
},
|
|
70
|
+
nl: {
|
|
71
|
+
decreaseLabel: 'Verminder Inspringing',
|
|
72
|
+
increaseLabel: 'Inspring verhogen'
|
|
73
|
+
},
|
|
74
|
+
pl: {
|
|
75
|
+
decreaseLabel: 'Zmniejsz wcięcie',
|
|
76
|
+
increaseLabel: 'Zwiększ wcięcie'
|
|
77
|
+
},
|
|
78
|
+
pt: {
|
|
79
|
+
decreaseLabel: 'Diminuir recuo',
|
|
80
|
+
increaseLabel: 'Aumentar Indentação'
|
|
81
|
+
},
|
|
82
|
+
ro: {
|
|
83
|
+
decreaseLabel: 'Reducere indentare',
|
|
84
|
+
increaseLabel: 'Crește indentarea'
|
|
85
|
+
},
|
|
86
|
+
rs: {
|
|
87
|
+
decreaseLabel: 'Smanji uvlačenje',
|
|
88
|
+
increaseLabel: 'Povećaj uvlačenje'
|
|
89
|
+
},
|
|
90
|
+
'rs-latin': {
|
|
91
|
+
decreaseLabel: 'Smanji uvlačenje',
|
|
92
|
+
increaseLabel: 'Povećaj uvlačenje'
|
|
93
|
+
},
|
|
94
|
+
ru: {
|
|
95
|
+
decreaseLabel: 'Уменьшить отступ',
|
|
96
|
+
increaseLabel: 'Увеличить отступ'
|
|
97
|
+
},
|
|
98
|
+
sk: {
|
|
99
|
+
decreaseLabel: 'Znížiť odsadenie',
|
|
100
|
+
increaseLabel: 'Zväčšiť odsadenie'
|
|
101
|
+
},
|
|
102
|
+
sv: {
|
|
103
|
+
decreaseLabel: 'Minska indrag',
|
|
104
|
+
increaseLabel: 'Öka indrag'
|
|
105
|
+
},
|
|
106
|
+
th: {
|
|
107
|
+
decreaseLabel: 'ลดการเยื้อง',
|
|
108
|
+
increaseLabel: 'เพิ่มการเยื้อง'
|
|
109
|
+
},
|
|
110
|
+
tr: {
|
|
111
|
+
decreaseLabel: 'Girintiyi Azalt',
|
|
112
|
+
increaseLabel: 'Girintiyi Artır'
|
|
113
|
+
},
|
|
114
|
+
uk: {
|
|
115
|
+
decreaseLabel: 'Зменшити відступ',
|
|
116
|
+
increaseLabel: 'Збільшити відступ'
|
|
117
|
+
},
|
|
118
|
+
vi: {
|
|
119
|
+
decreaseLabel: 'Giảm lề',
|
|
120
|
+
increaseLabel: 'Tăng lề'
|
|
121
|
+
},
|
|
122
|
+
zh: {
|
|
123
|
+
decreaseLabel: '减少缩进',
|
|
124
|
+
increaseLabel: '增加缩进'
|
|
125
|
+
},
|
|
126
|
+
'zh-TW': {
|
|
127
|
+
decreaseLabel: '減少縮排',
|
|
128
|
+
increaseLabel: '增加縮排'
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
//# sourceMappingURL=i18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/features/indent/i18n.ts"],"sourcesContent":["import type { GenericLanguages } from '@payloadcms/translations'\n\nexport const i18n: Partial<GenericLanguages> = {\n ar: {\n decreaseLabel: 'تقليل المسافة البادئة',\n increaseLabel: 'زيادة المسافة البادئة',\n },\n az: {\n decreaseLabel: 'İntervalı Azaltın',\n increaseLabel: 'Girintiyi Artırın',\n },\n bg: {\n decreaseLabel: 'Намали отстоянието',\n increaseLabel: 'Увеличете отстоянието',\n },\n cs: {\n decreaseLabel: 'Zmenšit odsazení',\n increaseLabel: 'Zvětšit odsazení',\n },\n de: {\n decreaseLabel: 'Einzug verkleinern',\n increaseLabel: 'Einzug erhöhen',\n },\n en: {\n decreaseLabel: 'Decrease Indent',\n increaseLabel: 'Increase Indent',\n },\n es: {\n decreaseLabel: 'Disminuir Sangría',\n increaseLabel: 'Aumentar Sangría',\n },\n fa: {\n decreaseLabel: 'کاهش تورفتگی',\n increaseLabel: 'افزایش تورفتگی',\n },\n fr: {\n decreaseLabel: \"Diminuer l'indentation\",\n increaseLabel: \"Augmenter l'indentation\",\n },\n he: {\n decreaseLabel: 'הקטן הזחה',\n increaseLabel: 'הגדל כניסה',\n },\n hr: {\n decreaseLabel: 'Smanji uvlačenje',\n increaseLabel: 'Povećaj uvlačenje',\n },\n hu: {\n decreaseLabel: 'Csökkentse a behúzást',\n increaseLabel: 'Behúzás növelése',\n },\n it: {\n decreaseLabel: 'Diminuisci rientro',\n increaseLabel: 'Aumenta Rientro',\n },\n ja: {\n decreaseLabel: 'インデントを減らす',\n increaseLabel: 'インデントを増やす',\n },\n ko: {\n decreaseLabel: '들여쓰기 줄이기',\n increaseLabel: '들여쓰기 늘리기',\n },\n my: {\n decreaseLabel: 'Kurangkan Inden',\n increaseLabel: 'Tingkatkan Inden',\n },\n nb: {\n decreaseLabel: 'Reduser innrykk',\n increaseLabel: 'Øke innrykk',\n },\n nl: {\n decreaseLabel: 'Verminder Inspringing',\n increaseLabel: 'Inspring verhogen',\n },\n pl: {\n decreaseLabel: 'Zmniejsz wcięcie',\n increaseLabel: 'Zwiększ wcięcie',\n },\n pt: {\n decreaseLabel: 'Diminuir recuo',\n increaseLabel: 'Aumentar Indentação',\n },\n ro: {\n decreaseLabel: 'Reducere indentare',\n increaseLabel: 'Crește indentarea',\n },\n rs: {\n decreaseLabel: 'Smanji uvlačenje',\n increaseLabel: 'Povećaj uvlačenje',\n },\n 'rs-latin': {\n decreaseLabel: 'Smanji uvlačenje',\n increaseLabel: 'Povećaj uvlačenje',\n },\n ru: {\n decreaseLabel: 'Уменьшить отступ',\n increaseLabel: 'Увеличить отступ',\n },\n sk: {\n decreaseLabel: 'Znížiť odsadenie',\n increaseLabel: 'Zväčšiť odsadenie',\n },\n sv: {\n decreaseLabel: 'Minska indrag',\n increaseLabel: 'Öka indrag',\n },\n th: {\n decreaseLabel: 'ลดการเยื้อง',\n increaseLabel: 'เพิ่มการเยื้อง',\n },\n tr: {\n decreaseLabel: 'Girintiyi Azalt',\n increaseLabel: 'Girintiyi Artır',\n },\n uk: {\n decreaseLabel: 'Зменшити відступ',\n increaseLabel: 'Збільшити відступ',\n },\n vi: {\n decreaseLabel: 'Giảm lề',\n increaseLabel: 'Tăng lề',\n },\n zh: {\n decreaseLabel: '减少缩进',\n increaseLabel: '增加缩进',\n },\n 'zh-TW': {\n decreaseLabel: '減少縮排',\n increaseLabel: '增加縮排',\n },\n}\n"],"names":["i18n","ar","decreaseLabel","increaseLabel","az","bg","cs","de","en","es","fa","fr","he","hr","hu","it","ja","ko","my","nb","nl","pl","pt","ro","rs","ru","sk","sv","th","tr","uk","vi","zh"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,MAAMA,OAAkC;IAC7CC,IAAI;QACFC,eAAe;QACfC,eAAe;IACjB;IACAC,IAAI;QACFF,eAAe;QACfC,eAAe;IACjB;IACAE,IAAI;QACFH,eAAe;QACfC,eAAe;IACjB;IACAG,IAAI;QACFJ,eAAe;QACfC,eAAe;IACjB;IACAI,IAAI;QACFL,eAAe;QACfC,eAAe;IACjB;IACAK,IAAI;QACFN,eAAe;QACfC,eAAe;IACjB;IACAM,IAAI;QACFP,eAAe;QACfC,eAAe;IACjB;IACAO,IAAI;QACFR,eAAe;QACfC,eAAe;IACjB;IACAQ,IAAI;QACFT,eAAe;QACfC,eAAe;IACjB;IACAS,IAAI;QACFV,eAAe;QACfC,eAAe;IACjB;IACAU,IAAI;QACFX,eAAe;QACfC,eAAe;IACjB;IACAW,IAAI;QACFZ,eAAe;QACfC,eAAe;IACjB;IACAY,IAAI;QACFb,eAAe;QACfC,eAAe;IACjB;IACAa,IAAI;QACFd,eAAe;QACfC,eAAe;IACjB;IACAc,IAAI;QACFf,eAAe;QACfC,eAAe;IACjB;IACAe,IAAI;QACFhB,eAAe;QACfC,eAAe;IACjB;IACAgB,IAAI;QACFjB,eAAe;QACfC,eAAe;IACjB;IACAiB,IAAI;QACFlB,eAAe;QACfC,eAAe;IACjB;IACAkB,IAAI;QACFnB,eAAe;QACfC,eAAe;IACjB;IACAmB,IAAI;QACFpB,eAAe;QACfC,eAAe;IACjB;IACAoB,IAAI;QACFrB,eAAe;QACfC,eAAe;IACjB;IACAqB,IAAI;QACFtB,eAAe;QACfC,eAAe;IACjB;IACA,YAAY;QACVD,eAAe;QACfC,eAAe;IACjB;IACAsB,IAAI;QACFvB,eAAe;QACfC,eAAe;IACjB;IACAuB,IAAI;QACFxB,eAAe;QACfC,eAAe;IACjB;IACAwB,IAAI;QACFzB,eAAe;QACfC,eAAe;IACjB;IACAyB,IAAI;QACF1B,eAAe;QACfC,eAAe;IACjB;IACA0B,IAAI;QACF3B,eAAe;QACfC,eAAe;IACjB;IACA2B,IAAI;QACF5B,eAAe;QACfC,eAAe;IACjB;IACA4B,IAAI;QACF7B,eAAe;QACfC,eAAe;IACjB;IACA6B,IAAI;QACF9B,eAAe;QACfC,eAAe;IACjB;IACA,SAAS;QACPD,eAAe;QACfC,eAAe;IACjB;AACF,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/link/feature.client.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/link/feature.client.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAA;AAgBxE,MAAM,MAAM,WAAW,GAAG,6BAA6B,CAAA;AA4FvD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;GAA2C,CAAA"}
|
|
@@ -5,6 +5,7 @@ import { LinkIcon } from '../../lexical/ui/icons/Link/index.js';
|
|
|
5
5
|
import { getSelectedNode } from '../../lexical/utils/getSelectedNode.js';
|
|
6
6
|
import { createClientComponent } from '../createClientComponent.js';
|
|
7
7
|
import { toolbarFeatureButtonsGroupWithItems } from '../shared/toolbar/featureButtonsGroup.js';
|
|
8
|
+
import { LinkMarkdownTransformer } from './markdownTransformer.js';
|
|
8
9
|
import { AutoLinkNode } from './nodes/AutoLinkNode.js';
|
|
9
10
|
import { $isLinkNode, LinkNode, TOGGLE_LINK_COMMAND } from './nodes/LinkNode.js';
|
|
10
11
|
import { AutoLinkPlugin } from './plugins/autoLink/index.js';
|
|
@@ -28,7 +29,9 @@ const toolbarGroups = [
|
|
|
28
29
|
return !!($isRangeSelection(selection) && $getSelection()?.getTextContent()?.length);
|
|
29
30
|
},
|
|
30
31
|
key: 'link',
|
|
31
|
-
label:
|
|
32
|
+
label: ({ i18n })=>{
|
|
33
|
+
return i18n.t('lexical:link:label');
|
|
34
|
+
},
|
|
32
35
|
onSelect: ({ editor, isActive })=>{
|
|
33
36
|
if (!isActive) {
|
|
34
37
|
let selectedText = null;
|
|
@@ -66,6 +69,9 @@ const LinkFeatureClient = (props)=>{
|
|
|
66
69
|
clientFeatureProps: props,
|
|
67
70
|
feature: ()=>({
|
|
68
71
|
clientFeatureProps: props,
|
|
72
|
+
markdownTransformers: [
|
|
73
|
+
LinkMarkdownTransformer
|
|
74
|
+
],
|
|
69
75
|
nodes: [
|
|
70
76
|
LinkNode,
|
|
71
77
|
AutoLinkNode
|