@enyxs/wikex-components 0.11.18 → 0.11.20

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/index.d.mts CHANGED
@@ -99,6 +99,7 @@ declare function patchCmsRichText(value: unknown, text: string, start: number, e
99
99
  declare function renderCmsRichText(children: ReactNode, value: unknown, allowLinks?: boolean): ReactNode;
100
100
 
101
101
  declare const CMS_TEXT_FONTS: {
102
+ readonly 'Inter, sans-serif': "Inter";
102
103
  readonly 'Arial, sans-serif': "Arial";
103
104
  readonly 'Georgia, serif': "Georgia";
104
105
  readonly '"Times New Roman", serif': "Times New Roman";
@@ -110,12 +111,15 @@ type CmsTextLayout = {
110
111
  height?: number;
111
112
  fontFamily?: string;
112
113
  fontSize?: number;
114
+ lineHeight?: number;
115
+ textAlign?: "left" | "center" | "right";
116
+ listType?: "ul" | "ol";
113
117
  richText?: CmsRichText;
114
118
  blockType?: "p" | "h1" | "h2" | "h3" | "ul" | "ol";
115
119
  };
116
120
  declare const CMS_TEXT_LAYOUT_SUFFIX = "TextLayout";
117
121
  declare function parseCmsTextLayout(value: unknown): CmsTextLayout;
118
- declare function cmsTextLayoutStyle(value: unknown): CSSProperties;
122
+ declare function cmsTextLayoutStyle(value: unknown, templateBlock?: boolean): CSSProperties;
119
123
  declare function applyCmsTextLayout(element: HTMLElement, value: unknown): () => void;
120
124
  declare function readCmsEditableText(element: HTMLElement): string;
121
125
  declare function rebaseCmsTextLayouts<T extends Record<string, unknown>>(content: T, depth?: number): T;
@@ -127,11 +131,14 @@ type CmsTextToolbarProps = {
127
131
  inlineControls?: ReactNode;
128
132
  structureControls?: ReactNode;
129
133
  computedFontSize?: number;
130
- onLayoutChange: (change: Pick<CmsTextLayout, "fontFamily" | "fontSize">) => void;
134
+ computedLineHeight?: number;
135
+ computedFontFamily?: string;
136
+ computedTextAlign?: string;
137
+ onLayoutChange: (change: Pick<CmsTextLayout, "fontFamily" | "fontSize" | "lineHeight" | "textAlign">) => void;
131
138
  onColorChange: (color: string) => void;
132
139
  onReset: () => void;
133
140
  };
134
- declare function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureControls, computedFontSize, onLayoutChange, onColorChange, onReset }: CmsTextToolbarProps): react.JSX.Element;
141
+ declare function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureControls, computedFontSize, computedLineHeight, computedFontFamily, computedTextAlign, onLayoutChange, onColorChange, onReset }: CmsTextToolbarProps): react.JSX.Element;
135
142
 
136
143
  declare const CMS_ELEMENTS_FIELD = "__cmsElements";
137
144
  type CmsElementState = {
@@ -143,6 +150,7 @@ type CmsElementState = {
143
150
  }>;
144
151
  lists: Record<string, {
145
152
  order: string[];
153
+ fields?: Record<string, string[]>;
146
154
  type?: "ul" | "ol";
147
155
  marker?: string;
148
156
  added: Record<string, {
package/dist/index.d.ts CHANGED
@@ -99,6 +99,7 @@ declare function patchCmsRichText(value: unknown, text: string, start: number, e
99
99
  declare function renderCmsRichText(children: ReactNode, value: unknown, allowLinks?: boolean): ReactNode;
100
100
 
101
101
  declare const CMS_TEXT_FONTS: {
102
+ readonly 'Inter, sans-serif': "Inter";
102
103
  readonly 'Arial, sans-serif': "Arial";
103
104
  readonly 'Georgia, serif': "Georgia";
104
105
  readonly '"Times New Roman", serif': "Times New Roman";
@@ -110,12 +111,15 @@ type CmsTextLayout = {
110
111
  height?: number;
111
112
  fontFamily?: string;
112
113
  fontSize?: number;
114
+ lineHeight?: number;
115
+ textAlign?: "left" | "center" | "right";
116
+ listType?: "ul" | "ol";
113
117
  richText?: CmsRichText;
114
118
  blockType?: "p" | "h1" | "h2" | "h3" | "ul" | "ol";
115
119
  };
116
120
  declare const CMS_TEXT_LAYOUT_SUFFIX = "TextLayout";
117
121
  declare function parseCmsTextLayout(value: unknown): CmsTextLayout;
118
- declare function cmsTextLayoutStyle(value: unknown): CSSProperties;
122
+ declare function cmsTextLayoutStyle(value: unknown, templateBlock?: boolean): CSSProperties;
119
123
  declare function applyCmsTextLayout(element: HTMLElement, value: unknown): () => void;
120
124
  declare function readCmsEditableText(element: HTMLElement): string;
121
125
  declare function rebaseCmsTextLayouts<T extends Record<string, unknown>>(content: T, depth?: number): T;
@@ -127,11 +131,14 @@ type CmsTextToolbarProps = {
127
131
  inlineControls?: ReactNode;
128
132
  structureControls?: ReactNode;
129
133
  computedFontSize?: number;
130
- onLayoutChange: (change: Pick<CmsTextLayout, "fontFamily" | "fontSize">) => void;
134
+ computedLineHeight?: number;
135
+ computedFontFamily?: string;
136
+ computedTextAlign?: string;
137
+ onLayoutChange: (change: Pick<CmsTextLayout, "fontFamily" | "fontSize" | "lineHeight" | "textAlign">) => void;
131
138
  onColorChange: (color: string) => void;
132
139
  onReset: () => void;
133
140
  };
134
- declare function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureControls, computedFontSize, onLayoutChange, onColorChange, onReset }: CmsTextToolbarProps): react.JSX.Element;
141
+ declare function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureControls, computedFontSize, computedLineHeight, computedFontFamily, computedTextAlign, onLayoutChange, onColorChange, onReset }: CmsTextToolbarProps): react.JSX.Element;
135
142
 
136
143
  declare const CMS_ELEMENTS_FIELD = "__cmsElements";
137
144
  type CmsElementState = {
@@ -143,6 +150,7 @@ type CmsElementState = {
143
150
  }>;
144
151
  lists: Record<string, {
145
152
  order: string[];
153
+ fields?: Record<string, string[]>;
146
154
  type?: "ul" | "ol";
147
155
  marker?: string;
148
156
  added: Record<string, {