diff --git a/docs/docs.ts b/docs/docs.ts index 7f1b249..3471b22 100644 --- a/docs/docs.ts +++ b/docs/docs.ts @@ -107,6 +107,7 @@ export async function writeNewDocs( gid, url: pages[gid]?.url, title: pages[gid]?.title || '', + deprecated: pages[gid]?.deprecated || undefined, description: pages[gid]?.description || '', examples: pages[gid]?.examples || [], show_in_navigation: diff --git a/docs/documentation/type._editables.*.styles.yml b/docs/documentation/type._editables.*.styles.yml index 3343cc4..164a7a2 100644 --- a/docs/documentation/type._editables.*.styles.yml +++ b/docs/documentation/type._editables.*.styles.yml @@ -7,8 +7,8 @@ description: >- examples: - description: >- In this example, we have enabled a dropdown menu in our WYSIWYG toolbar to - apply a style to selected text. The styles are defined in the `/css/styles.css` - file. + apply a style to selected text. The styles are defined in the + `/css/styles.css` file. language: yaml code: |- _editables: diff --git a/docs/documentation/type._inputs.*.(rich-text-input).options.allow_resize.yml b/docs/documentation/type._inputs.*.(rich-text-input).options.allow_resize.yml index 8fbcd9b..71d9b75 100644 --- a/docs/documentation/type._inputs.*.(rich-text-input).options.allow_resize.yml +++ b/docs/documentation/type._inputs.*.(rich-text-input).options.allow_resize.yml @@ -1,7 +1,10 @@ gid: type._inputs.*.(rich-text-input).options.allow_resize url: /configuration-file/types/_inputs/*/(rich-text-input)/options/allow_resize/ title: '' +deprecated: true description: >- + **⚠️ DEPRECATED:** This key is deprecated. Use `preview_resize` instead. + This key toggles whether CloudCannon will show the resize handler to vertically resize the input. diff --git a/docs/documentation/type._inputs.*.(rich-text-input).options.prevent_resize.yml b/docs/documentation/type._inputs.*.(rich-text-input).options.prevent_resize.yml new file mode 100644 index 0000000..efa09f3 --- /dev/null +++ b/docs/documentation/type._inputs.*.(rich-text-input).options.prevent_resize.yml @@ -0,0 +1,6 @@ +gid: type._inputs.*.(rich-text-input).options.prevent_resize +url: /configuration-file/types/_inputs/*/(rich-text-input)/options/prevent_resize/ +title: '' +description: Shows or hides the resize handler to vertically resize the input. +examples: [] +show_in_navigation: false diff --git a/docs/index.ts b/docs/index.ts index 38f4e00..bc37688 100644 --- a/docs/index.ts +++ b/docs/index.ts @@ -164,6 +164,7 @@ function docToPage( gid, title: documentation?.title, description: documentation?.description || doc.description, + deprecated: !!doc.deprecated, examples: documentation?.examples?.length ? documentation.examples : developer_documentation?.examples, diff --git a/docs/util.ts b/docs/util.ts index 30cc419..827c585 100644 --- a/docs/util.ts +++ b/docs/util.ts @@ -34,6 +34,7 @@ export interface Page { title?: DocumentationEntry['title']; description?: DocumentationEntry['description']; examples?: Example[]; + deprecated: boolean; documentation?: DocumentationEntry; developer_documentation?: DocumentationEntry; url: string; diff --git a/generate-schemas.ts b/generate-schemas.ts index e63faa0..2d48e9e 100644 --- a/generate-schemas.ts +++ b/generate-schemas.ts @@ -263,7 +263,10 @@ for (const schemaConfig of schemas) { if (schemaConfig.redocument) { const docsFolder = - 'docsFolder' in schemaConfig ? schemaConfig.docsFolder : 'docs/documentation'; + 'docsFolder' in schemaConfig && schemaConfig.docsFolder + ? schemaConfig.docsFolder + : 'docs/documentation'; + await redocumentSchema(fullSchemaPath, docsFolder, { stripId: schemaConfig.stripId, addMarkdownDescription: schemaConfig.addMarkdownDescription, diff --git a/src/inputs.ts b/src/inputs.ts index 22fad85..d66a85c 100644 --- a/src/inputs.ts +++ b/src/inputs.ts @@ -493,8 +493,12 @@ export const RichTextInputOptionsSchema = z ...TextValidationSchema.shape, ...RequiredValidationSchema.shape, empty_type: EmptyTypeTextSchema.optional(), - allow_resize: z.boolean().default(false).optional().meta({ - description: 'Shows or hides the resize handler to vertically resize the input.', + allow_resize: z.boolean().optional().meta({ + deprecated: true, + description: '**⚠️ DEPRECATED:** This key is deprecated. Use `preview_resize` instead.', + }), + prevent_resize: z.boolean().default(false).optional().meta({ + description: 'Hides the resize handler to vertically resize the input.', }), initial_height: z.number().optional().meta({ description: 'Defines the initial height of this input in pixels (px).',