@enyxs/wikex-components 0.11.17 → 0.11.19

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
@@ -111,10 +111,11 @@ type CmsTextLayout = {
111
111
  fontFamily?: string;
112
112
  fontSize?: number;
113
113
  richText?: CmsRichText;
114
+ blockType?: "p" | "h1" | "h2" | "h3" | "ul" | "ol";
114
115
  };
115
116
  declare const CMS_TEXT_LAYOUT_SUFFIX = "TextLayout";
116
117
  declare function parseCmsTextLayout(value: unknown): CmsTextLayout;
117
- declare function cmsTextLayoutStyle(value: unknown): CSSProperties;
118
+ declare function cmsTextLayoutStyle(value: unknown, templateBlock?: boolean): CSSProperties;
118
119
  declare function applyCmsTextLayout(element: HTMLElement, value: unknown): () => void;
119
120
  declare function readCmsEditableText(element: HTMLElement): string;
120
121
  declare function rebaseCmsTextLayouts<T extends Record<string, unknown>>(content: T, depth?: number): T;
@@ -124,11 +125,34 @@ type CmsTextToolbarProps = {
124
125
  color: string;
125
126
  colorPicker: ReactNode;
126
127
  inlineControls?: ReactNode;
128
+ structureControls?: ReactNode;
129
+ computedFontSize?: number;
127
130
  onLayoutChange: (change: Pick<CmsTextLayout, "fontFamily" | "fontSize">) => void;
128
131
  onColorChange: (color: string) => void;
129
132
  onReset: () => void;
130
133
  };
131
- declare function CmsTextToolbar({ layout, color, colorPicker, inlineControls, onLayoutChange, onColorChange, onReset }: CmsTextToolbarProps): react.JSX.Element;
134
+ declare function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureControls, computedFontSize, onLayoutChange, onColorChange, onReset }: CmsTextToolbarProps): react.JSX.Element;
135
+
136
+ declare const CMS_ELEMENTS_FIELD = "__cmsElements";
137
+ type CmsElementState = {
138
+ hidden: string[];
139
+ insertions: Array<{
140
+ anchor: string;
141
+ field: string;
142
+ kind?: "image";
143
+ }>;
144
+ lists: Record<string, {
145
+ order: string[];
146
+ fields?: Record<string, string[]>;
147
+ type?: "ul" | "ol";
148
+ marker?: string;
149
+ added: Record<string, {
150
+ template: number;
151
+ field: string;
152
+ }>;
153
+ }>;
154
+ };
155
+ declare function parseCmsElements(value: unknown): CmsElementState;
132
156
 
133
157
  declare const minimalUiComponents: CmsBlock[];
134
158
  declare const wikexComponents: CmsBlock[];
@@ -144,4 +168,4 @@ declare const wikexCmsBlocks: {
144
168
  definition: CmsComponentDefinition;
145
169
  }[];
146
170
 
147
- export { CMS_TEXT_FONTS, CMS_TEXT_LAYOUT_SUFFIX, type CmsBlock, type CmsComponentCategory, type CmsComponentDefinition, type CmsComponentPlacement, type CmsFieldDefinition, type CmsFieldType, type CmsListItemField, type CmsRendererProps, type CmsRichText, type CmsTextLayout, type CmsTextMark, type CmsTextTarget, CmsTextToolbar, type CmsTextToolbarProps, ConsultationSubmission, applyCmsTextLayout, cmsTextLayoutStyle, minimalMarketingBlocks, minimalUiBlocks, minimalUiComponents, parseCmsRichText, parseCmsTextLayout, patchCmsRichText, readCmsEditableText, rebaseCmsRichText, rebaseCmsTextLayouts, renderCmsRichText, safeCmsTextHref, siteChromeBlocks, wikexCmsBlocks, wikexCommodityBlocks, wikexComponents };
171
+ export { CMS_ELEMENTS_FIELD, CMS_TEXT_FONTS, CMS_TEXT_LAYOUT_SUFFIX, type CmsBlock, type CmsComponentCategory, type CmsComponentDefinition, type CmsComponentPlacement, type CmsElementState, type CmsFieldDefinition, type CmsFieldType, type CmsListItemField, type CmsRendererProps, type CmsRichText, type CmsTextLayout, type CmsTextMark, type CmsTextTarget, CmsTextToolbar, type CmsTextToolbarProps, ConsultationSubmission, applyCmsTextLayout, cmsTextLayoutStyle, minimalMarketingBlocks, minimalUiBlocks, minimalUiComponents, parseCmsElements, parseCmsRichText, parseCmsTextLayout, patchCmsRichText, readCmsEditableText, rebaseCmsRichText, rebaseCmsTextLayouts, renderCmsRichText, safeCmsTextHref, siteChromeBlocks, wikexCmsBlocks, wikexCommodityBlocks, wikexComponents };
package/dist/index.d.ts CHANGED
@@ -111,10 +111,11 @@ type CmsTextLayout = {
111
111
  fontFamily?: string;
112
112
  fontSize?: number;
113
113
  richText?: CmsRichText;
114
+ blockType?: "p" | "h1" | "h2" | "h3" | "ul" | "ol";
114
115
  };
115
116
  declare const CMS_TEXT_LAYOUT_SUFFIX = "TextLayout";
116
117
  declare function parseCmsTextLayout(value: unknown): CmsTextLayout;
117
- declare function cmsTextLayoutStyle(value: unknown): CSSProperties;
118
+ declare function cmsTextLayoutStyle(value: unknown, templateBlock?: boolean): CSSProperties;
118
119
  declare function applyCmsTextLayout(element: HTMLElement, value: unknown): () => void;
119
120
  declare function readCmsEditableText(element: HTMLElement): string;
120
121
  declare function rebaseCmsTextLayouts<T extends Record<string, unknown>>(content: T, depth?: number): T;
@@ -124,11 +125,34 @@ type CmsTextToolbarProps = {
124
125
  color: string;
125
126
  colorPicker: ReactNode;
126
127
  inlineControls?: ReactNode;
128
+ structureControls?: ReactNode;
129
+ computedFontSize?: number;
127
130
  onLayoutChange: (change: Pick<CmsTextLayout, "fontFamily" | "fontSize">) => void;
128
131
  onColorChange: (color: string) => void;
129
132
  onReset: () => void;
130
133
  };
131
- declare function CmsTextToolbar({ layout, color, colorPicker, inlineControls, onLayoutChange, onColorChange, onReset }: CmsTextToolbarProps): react.JSX.Element;
134
+ declare function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureControls, computedFontSize, onLayoutChange, onColorChange, onReset }: CmsTextToolbarProps): react.JSX.Element;
135
+
136
+ declare const CMS_ELEMENTS_FIELD = "__cmsElements";
137
+ type CmsElementState = {
138
+ hidden: string[];
139
+ insertions: Array<{
140
+ anchor: string;
141
+ field: string;
142
+ kind?: "image";
143
+ }>;
144
+ lists: Record<string, {
145
+ order: string[];
146
+ fields?: Record<string, string[]>;
147
+ type?: "ul" | "ol";
148
+ marker?: string;
149
+ added: Record<string, {
150
+ template: number;
151
+ field: string;
152
+ }>;
153
+ }>;
154
+ };
155
+ declare function parseCmsElements(value: unknown): CmsElementState;
132
156
 
133
157
  declare const minimalUiComponents: CmsBlock[];
134
158
  declare const wikexComponents: CmsBlock[];
@@ -144,4 +168,4 @@ declare const wikexCmsBlocks: {
144
168
  definition: CmsComponentDefinition;
145
169
  }[];
146
170
 
147
- export { CMS_TEXT_FONTS, CMS_TEXT_LAYOUT_SUFFIX, type CmsBlock, type CmsComponentCategory, type CmsComponentDefinition, type CmsComponentPlacement, type CmsFieldDefinition, type CmsFieldType, type CmsListItemField, type CmsRendererProps, type CmsRichText, type CmsTextLayout, type CmsTextMark, type CmsTextTarget, CmsTextToolbar, type CmsTextToolbarProps, ConsultationSubmission, applyCmsTextLayout, cmsTextLayoutStyle, minimalMarketingBlocks, minimalUiBlocks, minimalUiComponents, parseCmsRichText, parseCmsTextLayout, patchCmsRichText, readCmsEditableText, rebaseCmsRichText, rebaseCmsTextLayouts, renderCmsRichText, safeCmsTextHref, siteChromeBlocks, wikexCmsBlocks, wikexCommodityBlocks, wikexComponents };
171
+ export { CMS_ELEMENTS_FIELD, CMS_TEXT_FONTS, CMS_TEXT_LAYOUT_SUFFIX, type CmsBlock, type CmsComponentCategory, type CmsComponentDefinition, type CmsComponentPlacement, type CmsElementState, type CmsFieldDefinition, type CmsFieldType, type CmsListItemField, type CmsRendererProps, type CmsRichText, type CmsTextLayout, type CmsTextMark, type CmsTextTarget, CmsTextToolbar, type CmsTextToolbarProps, ConsultationSubmission, applyCmsTextLayout, cmsTextLayoutStyle, minimalMarketingBlocks, minimalUiBlocks, minimalUiComponents, parseCmsElements, parseCmsRichText, parseCmsTextLayout, patchCmsRichText, readCmsEditableText, rebaseCmsRichText, rebaseCmsTextLayouts, renderCmsRichText, safeCmsTextHref, siteChromeBlocks, wikexCmsBlocks, wikexCommodityBlocks, wikexComponents };