@dosgato/templating 0.0.78 → 0.0.80

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.
@@ -73,7 +73,37 @@ export declare abstract class Component<DataType extends ComponentData = any, Fe
73
73
  * The inherited components will be added to the appropriate area's array in the renderedAreas
74
74
  * parameter of your render function.
75
75
  */
76
- registerInherited: (area: string, components: ComponentData[], fromPageId: string, top?: true) => void;
76
+ registerInherited: (
77
+ /**
78
+ * The area in which to place the inherited components. It doesn't matter where you found them.
79
+ */
80
+ area: string,
81
+ /**
82
+ * An array of components to add to the area.
83
+ */
84
+ components: ComponentData[] | undefined,
85
+ /**
86
+ * The page id of the page these components came from.
87
+ *
88
+ * If you are providing components from different pages, you may pass an array
89
+ * that corresponds index-for-index with the components array you provided.
90
+ *
91
+ * Generally you would only need to do this when you are using 'replace' mode, as with
92
+ * 'top' or 'bottom' you could just call registerInherited once per page you're
93
+ * inheriting from.
94
+ */
95
+ fromPageId: string | string[],
96
+ /**
97
+ * How to place the inherited components into the area.
98
+ *
99
+ * 'top' to place these inherited components at the top of the area.
100
+ * 'bottom' to place them at the bottom of the area.
101
+ * 'replace' to remove all existing components (inherited or not) in the area and
102
+ * use these instead.
103
+ *
104
+ * Default is 'top'.
105
+ */
106
+ mode?: 'top' | 'bottom' | 'replace') => void;
77
107
  /**
78
108
  * The second phase of rendering a component is the context phase. This step is TOP-DOWN and
79
109
  * NON-MUTATING. Each component will receive the parent component's context and then pass a
package/dist/render.d.ts CHANGED
@@ -131,7 +131,7 @@ export interface APIClient {
131
131
  *
132
132
  * Returns the root page(s). Subpages are inside the `children` property.
133
133
  */
134
- getNavigation: ({ beneath, depth, extra, absolute }: {
134
+ getNavigation: (opts?: {
135
135
  /**
136
136
  * Return pages beneath this path
137
137
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {