@dosgato/templating 0.0.45 → 0.0.48
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/component.d.ts +1 -2
- package/dist/links.d.ts +11 -0
- package/dist/render.d.ts +1 -1
- package/package.json +1 -1
package/dist/component.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export declare abstract class Component<DataType extends ComponentData = any, Fe
|
|
|
69
69
|
* The inherited components will be added to the appropriate area's array in the renderedAreas
|
|
70
70
|
* parameter of your render function.
|
|
71
71
|
*/
|
|
72
|
-
registerInherited: (area: string, components: ComponentData[], top?: true) => void;
|
|
72
|
+
registerInherited: (area: string, components: ComponentData[], fromPageId: string, top?: true) => void;
|
|
73
73
|
/**
|
|
74
74
|
* The second phase of rendering a component is the context phase. This step is TOP-DOWN and
|
|
75
75
|
* NON-MUTATING. Each component will receive the parent component's context and then pass a
|
|
@@ -168,7 +168,6 @@ export declare abstract class Component<DataType extends ComponentData = any, Fe
|
|
|
168
168
|
*/
|
|
169
169
|
static editBar: (path: string, opts: EditBarOpts) => string;
|
|
170
170
|
static newBar: (path: string, opts: EditBarOpts) => string;
|
|
171
|
-
static repairHTML: (html: string) => string;
|
|
172
171
|
constructor(data: DataType, path: string, parent: Component | undefined, editMode: boolean);
|
|
173
172
|
areas: Map<string, Component<any, any, any>[]>;
|
|
174
173
|
data: Omit<DataType, 'areas'>;
|
package/dist/links.d.ts
CHANGED
|
@@ -26,9 +26,20 @@ export interface AssetFolderLink {
|
|
|
26
26
|
*/
|
|
27
27
|
export interface PageLink {
|
|
28
28
|
type: 'page';
|
|
29
|
+
siteId: string;
|
|
29
30
|
linkId: string;
|
|
30
31
|
path: string;
|
|
31
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* When looking up a page by linkId, the context matters. For instance, if I'm
|
|
35
|
+
* gathering data to helps render a page that's in the same site as the target
|
|
36
|
+
* page, I want to be sure to get the version of the page from the same pagetree.
|
|
37
|
+
*/
|
|
38
|
+
export interface PageLinkWithContext extends PageLink {
|
|
39
|
+
context?: {
|
|
40
|
+
pagetreeId: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
32
43
|
/**
|
|
33
44
|
* The link format for external webpages. This format seems a little extra since
|
|
34
45
|
* it's just a URL string. Why does it need to be an object with a type? However,
|
package/dist/render.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export interface APIClient {
|
|
|
73
73
|
id?: string;
|
|
74
74
|
path?: string;
|
|
75
75
|
link?: string | PageLink;
|
|
76
|
-
}) => Promise<PageRecord<PageData
|
|
76
|
+
}) => Promise<PageRecord<PageData> | undefined>;
|
|
77
77
|
/** Get all ancestor pages of a specific page. First array element will be the pagetree root page. */
|
|
78
78
|
getAncestors: ({ id, path }: {
|
|
79
79
|
id?: string;
|