@dosgato/templating 1.0.6 → 1.0.8

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.
@@ -439,6 +439,7 @@ export interface RenderAreaEditBarOpts extends Omit<Omit<EditBarOpts, 'label'>,
439
439
  }
440
440
  export interface NewBarOpts extends BarOpts {
441
441
  disabled?: boolean;
442
+ disableAddToTop?: boolean;
442
443
  }
443
444
  export interface RenderComponentsWrapParams {
444
445
  /**
package/dist/render.d.ts CHANGED
@@ -21,6 +21,13 @@ export interface PictureAttributes {
21
21
  src: string;
22
22
  /** string appropriate for the srcset attribute of the default <img> tag, or use widths array to reconstruct */
23
23
  srcset: string;
24
+ /**
25
+ * When an image link cannot be found, we still return the src and srcset with a non-working path so that the
26
+ * user can more easily determine 1) that there was an image that is now broken and 2) where the image used
27
+ * to be.
28
+ * This attribute will be set to true in case the render needs any additional logic for broken links
29
+ */
30
+ broken: boolean;
24
31
  /** a list of available widths in case you want to filter some out and recreate the srcset */
25
32
  widths: PictureResize[];
26
33
  /** alternative text stored with the image in its asset repository, may be overridden by local alt text */
@@ -108,6 +108,28 @@ export interface UITemplate extends UITemplateBase {
108
108
  */
109
109
  shouldAppear?: (data: PageData, path: string) => boolean;
110
110
  }[];
111
+ /**
112
+ * Customize the device preview dropdown. Only applies to page templates. Default is to show
113
+ * Mobile and Desktop in preview mode only.
114
+ */
115
+ devicePreview?: {
116
+ /**
117
+ * Set this to an object to customize the sizes available on the preview device dropdown.
118
+ * Leave width undefined to use all available space. The first entry marked default will be
119
+ * active on first page load. If none are default, the largest is default.
120
+ * Example: [{ label: 'Mobile', width: 400 }, { label: 'Desktop', default: true }]
121
+ */
122
+ sizes?: {
123
+ label: string;
124
+ width?: number;
125
+ default?: boolean;
126
+ }[];
127
+ /**
128
+ * If your template is heavily mobile focused, you may want editors to have the device
129
+ * dropdown while editing, in addition to previewing. Set this true to enable that.
130
+ */
131
+ showWhileEditing?: boolean;
132
+ };
111
133
  }
112
134
  export interface ExtraDataColumn {
113
135
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {