@rathnasgala2/template 3.0.0 → 3.1.0
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/README.md +21 -19
- package/contracts/render-policy.jcs +1 -1
- package/package.json +4 -3
- package/src/core/index.js +74 -9
- package/src/core/internal/appearance/base-layer.js +84 -3
- package/src/core/internal/appearance/styling-contract.js +2 -2
- package/src/core/internal/components.js +8 -16
- package/src/core/internal/content-security.js +0 -0
- package/src/core/internal/eleventy-render.js +5 -3
- package/src/core/internal/icons.js +2 -0
- package/src/core/internal/interactions.js +349 -0
- package/src/core/internal/messages.js +6 -0
- package/src/core/internal/page-kinds.js +25 -2
- package/src/core/internal/render-policy-content.js +40 -5
- package/src/core/internal/robots.js +5 -13
- package/src/modules/interactions/browser/gala-interactions.js +1891 -0
- package/types/index.d.ts +32 -2
package/types/index.d.ts
CHANGED
|
@@ -130,6 +130,8 @@ export interface PublicationNormalized {
|
|
|
130
130
|
contactAuthorId?: string;
|
|
131
131
|
socialLinks: unknown[];
|
|
132
132
|
defaultImage?: ResolvedFileRef;
|
|
133
|
+
newsletter?: { url: string; title: string; text: string };
|
|
134
|
+
crawlers?: { ai: 'allow' | 'block' };
|
|
133
135
|
profile?: { route: string; body: RenderableBody };
|
|
134
136
|
footerCard?: {
|
|
135
137
|
enabled: boolean;
|
|
@@ -175,6 +177,34 @@ export interface AppearanceNormalized {
|
|
|
175
177
|
}
|
|
176
178
|
|
|
177
179
|
/** The subset of `build-input:2.0.0` this renderer reads. */
|
|
180
|
+
/** One author-defined reaction (`interactions-config:2.0.0`). */
|
|
181
|
+
export interface InteractionsReactionDefinition {
|
|
182
|
+
key: string;
|
|
183
|
+
label: string;
|
|
184
|
+
visual: { kind: 'emoji'; token: string };
|
|
185
|
+
order: number;
|
|
186
|
+
enabled: boolean;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** The repository's `gala/modules/interactions.json` (`interactions-config:2.0.0`). */
|
|
190
|
+
export interface InteractionsConfig {
|
|
191
|
+
schemaId: 'urn:gala:schema:interactions-config:2.0.0';
|
|
192
|
+
schemaVersion: '2.0.0';
|
|
193
|
+
reactions: {
|
|
194
|
+
enabled: boolean;
|
|
195
|
+
definitions: InteractionsReactionDefinition[];
|
|
196
|
+
};
|
|
197
|
+
comments: { enabled: boolean; allowReplies: boolean; maxDepth: number };
|
|
198
|
+
publicCounts: { reactions: boolean; comments: boolean };
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** `build-input.modules.interactions`: the config plus the two origins. */
|
|
202
|
+
export interface InteractionsModule {
|
|
203
|
+
config: InteractionsConfig;
|
|
204
|
+
apiOrigin: string;
|
|
205
|
+
appOrigin: string;
|
|
206
|
+
}
|
|
207
|
+
|
|
178
208
|
export interface NormalizedBuildInput {
|
|
179
209
|
schemaId: string;
|
|
180
210
|
schemaVersion: string;
|
|
@@ -198,7 +228,7 @@ export interface NormalizedBuildInput {
|
|
|
198
228
|
content: ContentBuildRecord[];
|
|
199
229
|
navigation: NavigationNormalized;
|
|
200
230
|
appearance: AppearanceNormalized;
|
|
201
|
-
modules:
|
|
231
|
+
modules: { interactions?: InteractionsModule };
|
|
202
232
|
buildEpoch: string;
|
|
203
233
|
baseUrl: string;
|
|
204
234
|
basePath: string;
|
|
@@ -219,7 +249,7 @@ export interface ManifestRouteEntry {
|
|
|
219
249
|
byteLength: string;
|
|
220
250
|
sha256: string;
|
|
221
251
|
routeClass: 'html' | 'feed' | 'sitemap' | 'asset' | 'error';
|
|
222
|
-
interactionBearing:
|
|
252
|
+
interactionBearing: boolean;
|
|
223
253
|
}
|
|
224
254
|
|
|
225
255
|
/** A `manifestAsset`-shaped entry (the media pipeline emits one per generated file). */
|