@club-employes/utopia 4.236.0 → 4.237.0

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.
@@ -1,4 +1,5 @@
1
1
  import { PropType, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { EditorLabels } from './editorLabels';
2
3
  import { ToolbarConfig } from './toolbarConfig';
3
4
  declare const _default: DefineComponent<ExtractPropTypes<{
4
5
  modelValue: {
@@ -14,6 +15,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
14
15
  type: ObjectConstructor;
15
16
  default: () => ToolbarConfig;
16
17
  };
18
+ labels: {
19
+ type: PropType<Partial<EditorLabels>>;
20
+ default: () => {};
21
+ };
17
22
  output: {
18
23
  type: PropType<"html" | "json">;
19
24
  default: string;
@@ -34,6 +39,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
34
39
  type: ObjectConstructor;
35
40
  default: () => ToolbarConfig;
36
41
  };
42
+ labels: {
43
+ type: PropType<Partial<EditorLabels>>;
44
+ default: () => {};
45
+ };
37
46
  output: {
38
47
  type: PropType<"html" | "json">;
39
48
  default: string;
@@ -44,5 +53,6 @@ declare const _default: DefineComponent<ExtractPropTypes<{
44
53
  output: "html" | "json";
45
54
  modelValue: string | Record<string, unknown>;
46
55
  toolbarConfig: Record<string, any>;
56
+ labels: Partial<EditorLabels>;
47
57
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
48
58
  export default _default;
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Interface de tous les textes affichés dans MyEditor.
3
+ * Passez une prop `labels` pour surcharger n'importe quel texte.
4
+ *
5
+ * @example
6
+ * ```vue
7
+ * <MyEditor v-model="content" :labels="{ columnPlaceholder: 'Write here…' }" />
8
+ * ```
9
+ */
10
+ export interface EditorLabels {
11
+ blockParagraph: string;
12
+ blockHeading1: string;
13
+ blockHeading2: string;
14
+ blockHeading3: string;
15
+ blockHeading4: string;
16
+ blockHeading5: string;
17
+ blockHeading6: string;
18
+ blockPlaceholder: string;
19
+ tooltipLink: string;
20
+ tooltipOrderedList: string;
21
+ tooltipBulletList: string;
22
+ tooltipCodeBlock: string;
23
+ tooltipBlockquote: string;
24
+ tooltipItalic: string;
25
+ tooltipBold: string;
26
+ tooltipImage: string;
27
+ tooltipVideo: string;
28
+ tooltipTable: string;
29
+ tooltipAlignLeft: string;
30
+ tooltipAlignCenter: string;
31
+ tooltipAlignRight: string;
32
+ tooltipAlignJustify: string;
33
+ tooltipTableAddRowBefore: string;
34
+ tooltipTableAddRowAfter: string;
35
+ tooltipTableDeleteRow: string;
36
+ tooltipTableAddColBefore: string;
37
+ tooltipTableAddColAfter: string;
38
+ tooltipTableDeleteCol: string;
39
+ tooltipTableToggleHeader: string;
40
+ tooltipTableDelete: string;
41
+ columnsPlaceholder: string;
42
+ columns2: string;
43
+ columns3: string;
44
+ columns4: string;
45
+ columnPlaceholder: string;
46
+ linkPopoverEdit: string;
47
+ linkPopoverOpen: string;
48
+ linkPopoverRemove: string;
49
+ linkPopoverCopy: string;
50
+ linkModalTitle: string;
51
+ linkModalLabelText: string;
52
+ linkModalPlaceholderText: string;
53
+ linkModalLabelUrl: string;
54
+ linkModalPlaceholderUrl: string;
55
+ linkModalCancel: string;
56
+ linkModalApply: string;
57
+ imagePopoverEdit: string;
58
+ imagePopoverReplace: string;
59
+ imagePopoverCopy: string;
60
+ imagePopoverDraw: string;
61
+ imagePopoverDelete: string;
62
+ imageEditTitle: string;
63
+ imageEditClose: string;
64
+ imageEditLabel: string;
65
+ imageEditPlaceholder: string;
66
+ imageEditCancel: string;
67
+ imageEditApply: string;
68
+ imageModalTitle: string;
69
+ }
70
+ export declare const defaultEditorLabels: EditorLabels;
@@ -18,6 +18,7 @@ export interface ToolbarConfig {
18
18
  image?: boolean;
19
19
  video?: boolean;
20
20
  table?: boolean;
21
+ columns?: boolean;
21
22
  };
22
23
  colors?: boolean;
23
24
  alignment?: boolean;
@@ -0,0 +1,25 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * Composable réutilisable pour les overlays de suppression au hover
4
+ * (colonnes, vidéos, etc.).
5
+ *
6
+ * @param deleteFnKey - Clé du callback de suppression dans e.detail (ex: "deleteColumn", "deleteVideo")
7
+ */
8
+ export declare function useDeleteOverlay(deleteFnKey: string): {
9
+ visible: Ref<boolean, boolean>;
10
+ pos: Ref<{
11
+ top: number;
12
+ right: number;
13
+ }, {
14
+ top: number;
15
+ right: number;
16
+ } | {
17
+ top: number;
18
+ right: number;
19
+ }>;
20
+ onEnter: (e: CustomEvent) => void;
21
+ onLeave: () => void;
22
+ onBtnEnter: () => void;
23
+ onBtnLeave: () => void;
24
+ onClick: () => void;
25
+ };