@dosgato/templating 0.0.40 → 0.0.41

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.
@@ -231,10 +231,9 @@ export interface EditBarOpts {
231
231
  editMode?: boolean;
232
232
  inheritedFrom?: string;
233
233
  }
234
- export interface RenderedComponent {
235
- inherited: boolean;
234
+ export interface RenderedComponent<C extends Component = Component> {
235
+ component: C;
236
236
  html: string;
237
- editbar: string;
238
237
  }
239
238
  export declare abstract class Page<DataType extends PageData = any, FetchedType = any, RenderContextType extends ContextBase = any> extends Component<DataType, FetchedType, RenderContextType> {
240
239
  pagePath: string;
package/dist/component.js CHANGED
@@ -94,7 +94,7 @@ export class Component extends ResourceProvider {
94
94
  // helper function to help you print an area, but you can also override this if you
95
95
  // need to do something advanced like wrap each component in a div
96
96
  renderComponents(components = [], opts) {
97
- return components.flatMap(c => c.inherited && opts?.hideInheritBars ? [c.html] : [c.editbar, c.html]).join('');
97
+ return components.flatMap(c => c.component.inheritedFrom && opts?.hideInheritBars ? [c.html] : [c.component.editBar(), c.html]).join('');
98
98
  }
99
99
  /**
100
100
  * During rendering, each component should determine the CSS blocks that it needs. This may
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {