@aglyn/plugins-mui 1.0.0-beta.214 → 1.0.0-beta.216

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.
Files changed (59) hide show
  1. package/package.json +7 -7
  2. package/src/lib/components/collection-author-links.d.ts +41 -0
  3. package/src/lib/components/collection-author-links.js +135 -0
  4. package/src/lib/components/collection-author-links.js.map +1 -0
  5. package/src/lib/components/collection-author-profile.d.ts +67 -0
  6. package/src/lib/components/collection-author-profile.js +269 -0
  7. package/src/lib/components/collection-author-profile.js.map +1 -0
  8. package/src/lib/components/collection-categories.d.ts +52 -0
  9. package/src/lib/components/collection-categories.js +163 -0
  10. package/src/lib/components/collection-categories.js.map +1 -0
  11. package/src/lib/components/collection-common.d.ts +104 -0
  12. package/src/lib/components/collection-common.js +95 -0
  13. package/src/lib/components/collection-common.js.map +1 -0
  14. package/src/lib/components/collection-entries.d.ts +137 -0
  15. package/src/lib/components/collection-entries.js +358 -0
  16. package/src/lib/components/collection-entries.js.map +1 -0
  17. package/src/lib/components/collection-entry-author.d.ts +81 -0
  18. package/src/lib/components/collection-entry-author.js +259 -0
  19. package/src/lib/components/collection-entry-author.js.map +1 -0
  20. package/src/lib/components/collection-entry-body.d.ts +44 -0
  21. package/src/lib/components/collection-entry-body.js +328 -0
  22. package/src/lib/components/collection-entry-body.js.map +1 -0
  23. package/src/lib/components/collection-entry-meta.d.ts +88 -0
  24. package/src/lib/components/collection-entry-meta.js +331 -0
  25. package/src/lib/components/collection-entry-meta.js.map +1 -0
  26. package/src/lib/components/collection-presets.d.ts +18 -0
  27. package/src/lib/components/collection-presets.js +328 -0
  28. package/src/lib/components/collection-presets.js.map +1 -0
  29. package/src/lib/components/collection-related.d.ts +101 -0
  30. package/src/lib/components/collection-related.js +536 -0
  31. package/src/lib/components/collection-related.js.map +1 -0
  32. package/src/lib/components/collection-search-box.d.ts +92 -0
  33. package/src/lib/components/collection-search-box.js +334 -0
  34. package/src/lib/components/collection-search-box.js.map +1 -0
  35. package/src/lib/components/collection-search-fuse.d.ts +28 -0
  36. package/src/lib/components/collection-search-fuse.js +28 -0
  37. package/src/lib/components/collection-search-fuse.js.map +1 -0
  38. package/src/lib/components/collection-search.d.ts +62 -0
  39. package/src/lib/components/collection-search.js +140 -0
  40. package/src/lib/components/collection-search.js.map +1 -0
  41. package/src/lib/components/collection-share.d.ts +31 -0
  42. package/src/lib/components/collection-share.js +154 -0
  43. package/src/lib/components/collection-share.js.map +1 -0
  44. package/src/lib/components/collection.d.ts +19 -497
  45. package/src/lib/components/collection.js +19 -2982
  46. package/src/lib/components/collection.js.map +1 -1
  47. package/src/lib/components/image-list.d.ts +2 -2
  48. package/src/lib/components/image-list.js +4 -6
  49. package/src/lib/components/image-list.js.map +1 -1
  50. package/src/lib/components/theme-mode-switcher.js +19 -19
  51. package/src/lib/components/theme-mode-switcher.js.map +1 -1
  52. package/src/lib/element-tier.d.ts +9 -1
  53. package/src/lib/element-tier.js +12 -1
  54. package/src/lib/element-tier.js.map +1 -1
  55. package/src/lib/plugin.js +20 -12
  56. package/src/lib/plugin.js.map +1 -1
  57. package/src/lib/utils/to-count.d.ts +25 -0
  58. package/src/lib/utils/to-count.js +30 -0
  59. package/src/lib/utils/to-count.js.map +1 -0
@@ -0,0 +1,328 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
3
+ /**
4
+ * @license
5
+ * Copyright 2026 Aglyn LLC
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */ import * as Aglyn from "@aglyn/aglyn";
19
+ import { mdiAccountCircleOutline, mdiMagnify, mdiNewspaperVariantOutline, mdiPostOutline, mdiShareVariant, mdiTagMultipleOutline, mdiTagOutline, mdiTextLong } from "@aglyn/shared-data-mdi";
20
+ import { BUNDLE_ID } from "../constants/bundle-common.js";
21
+ import { generatePresetId } from "../utils/generate-preset-id.js";
22
+ // Every collection element's id, read from @aglyn/aglyn rather than imported
23
+ // from the element modules: importing them would put all nine elements into
24
+ // the chunk of the one element these presets register with.
25
+ const ENTRIES_ID = Aglyn.COLLECTION_ENTRIES_COMPONENT_ID;
26
+ const ENTRY_BODY_ID = Aglyn.COLLECTION_ENTRY_BODY_COMPONENT_ID;
27
+ const RELATED_ID = Aglyn.COLLECTION_RELATED_COMPONENT_ID;
28
+ const SHARE_ID = Aglyn.COLLECTION_SHARE_COMPONENT_ID;
29
+ const ENTRY_META_ID = Aglyn.COLLECTION_ENTRY_META_COMPONENT_ID;
30
+ const ENTRY_AUTHOR_ID = Aglyn.COLLECTION_ENTRY_AUTHOR_COMPONENT_ID;
31
+ const CATEGORIES_ID = Aglyn.COLLECTION_CATEGORIES_COMPONENT_ID;
32
+ const SEARCH_ID = Aglyn.COLLECTION_SEARCH_COMPONENT_ID;
33
+ const AUTHOR_PROFILE_ID = Aglyn.CONTENT_AUTHOR_PROFILE_COMPONENT_ID;
34
+ /**
35
+ * The collection family's palette presets. Registered with Collection
36
+ * Entries (`presets: 'collectionPresets'` in plugin.ts), which re-exports
37
+ * them; they name every collection element by id only, so none of those
38
+ * elements' code comes with them.
39
+ */ /**
40
+ * Styling rides the node's own `sx`, never `props.sx` (AGL-1346): both
41
+ * render, but only `node.sx` is the record the Styles panel can edit or
42
+ * clear. `Leaf` composes `node.sx` last, so this is the same result.
43
+ */ const entryText = (variant, children, extra)=>{
44
+ const _ref = extra != null ? extra : {}, { sx } = _ref, props = _object_without_properties_loose(_ref, [
45
+ "sx"
46
+ ]);
47
+ return _extends({
48
+ $id: null,
49
+ componentId: 'muiTypography',
50
+ pluginId: BUNDLE_ID,
51
+ props: _extends({
52
+ variant,
53
+ children
54
+ }, props)
55
+ }, sx ? {
56
+ sx
57
+ } : {});
58
+ };
59
+ export const collectionPresets = [
60
+ {
61
+ $id: generatePresetId(ENTRIES_ID),
62
+ type: Aglyn.NodeType.PRESET,
63
+ displayName: 'Collection Entries',
64
+ pluginId: BUNDLE_ID,
65
+ description: 'Repeats a card (title, date, excerpt, Read more) per published ' + 'entry of a content collection',
66
+ category: Aglyn.ComponentCategory.BLOCKS,
67
+ icon: {
68
+ path: mdiPostOutline.path,
69
+ sx: {
70
+ color: 'secondary.main'
71
+ }
72
+ },
73
+ data: {
74
+ $id: null,
75
+ componentId: ENTRIES_ID,
76
+ pluginId: BUNDLE_ID,
77
+ props: {
78
+ spacing: 4
79
+ },
80
+ nodes: [
81
+ {
82
+ $id: null,
83
+ componentId: 'muiStack',
84
+ pluginId: BUNDLE_ID,
85
+ props: {
86
+ spacing: 0.5
87
+ },
88
+ nodes: [
89
+ entryText('h5', '{{entry.title}}', {
90
+ component: 'h2'
91
+ }),
92
+ entryText('caption', '{{entry.date}}', {
93
+ sx: {
94
+ color: 'text.secondary'
95
+ }
96
+ }),
97
+ entryText('body1', '{{entry.excerpt}}'),
98
+ {
99
+ $id: null,
100
+ componentId: 'muiScreenLink',
101
+ pluginId: BUNDLE_ID,
102
+ props: {
103
+ children: 'Read more',
104
+ href: '{{entry.url}}',
105
+ size: 'small'
106
+ },
107
+ sx: {
108
+ alignSelf: 'flex-start'
109
+ }
110
+ }
111
+ ]
112
+ }
113
+ ]
114
+ }
115
+ },
116
+ {
117
+ $id: generatePresetId(ENTRY_BODY_ID),
118
+ type: Aglyn.NodeType.PRESET,
119
+ displayName: 'Entry Body',
120
+ pluginId: BUNDLE_ID,
121
+ description: "Renders the current entry's markdown body, themed",
122
+ category: Aglyn.ComponentCategory.TEXT,
123
+ icon: {
124
+ path: mdiTextLong.path,
125
+ sx: {
126
+ color: 'secondary.main'
127
+ }
128
+ },
129
+ data: {
130
+ $id: null,
131
+ componentId: ENTRY_BODY_ID,
132
+ pluginId: BUNDLE_ID,
133
+ props: {
134
+ markdown: '{{entry.body}}'
135
+ }
136
+ }
137
+ },
138
+ {
139
+ $id: generatePresetId(RELATED_ID),
140
+ type: Aglyn.NodeType.PRESET,
141
+ displayName: 'Related Posts',
142
+ pluginId: BUNDLE_ID,
143
+ description: "Other entries sharing the current entry's category or tags",
144
+ category: Aglyn.ComponentCategory.DATA_DISPLAY,
145
+ icon: {
146
+ path: mdiNewspaperVariantOutline.path,
147
+ sx: {
148
+ color: 'secondary.main'
149
+ }
150
+ },
151
+ data: {
152
+ $id: null,
153
+ componentId: RELATED_ID,
154
+ pluginId: BUNDLE_ID,
155
+ // `layout`, the two type steps and `dateFormat` are seeded rather than
156
+ // left to the runtime fallback so each dropdown opens on the value the
157
+ // block is actually rendering, and an author who tries another has a
158
+ // named route back (AGL-1457/AGL-1459). The `show*` switches are
159
+ // deliberately absent: their unset state IS the shipped behaviour.
160
+ props: {
161
+ heading: 'Related articles',
162
+ limit: 3,
163
+ layout: 'list',
164
+ headingVariant: 'h5',
165
+ titleVariant: 'subtitle1',
166
+ dateFormat: Aglyn.COLLECTION_ENTRY_DATE_FORMAT_DEFAULT
167
+ }
168
+ }
169
+ },
170
+ {
171
+ $id: generatePresetId(SHARE_ID),
172
+ type: Aglyn.NodeType.PRESET,
173
+ displayName: 'Share Bar',
174
+ pluginId: BUNDLE_ID,
175
+ description: 'X, LinkedIn, Facebook, and copy-link buttons for the page',
176
+ category: Aglyn.ComponentCategory.NAVIGATION,
177
+ icon: {
178
+ path: mdiShareVariant.path,
179
+ sx: {
180
+ color: 'secondary.main'
181
+ }
182
+ },
183
+ data: {
184
+ $id: null,
185
+ componentId: SHARE_ID,
186
+ pluginId: BUNDLE_ID,
187
+ props: {
188
+ heading: 'Share'
189
+ }
190
+ }
191
+ },
192
+ {
193
+ $id: generatePresetId(CATEGORIES_ID),
194
+ type: Aglyn.NodeType.PRESET,
195
+ displayName: 'Category Pills',
196
+ pluginId: BUNDLE_ID,
197
+ description: "Links to each of the collection's categories, filtering the listing",
198
+ category: Aglyn.ComponentCategory.NAVIGATION,
199
+ icon: {
200
+ path: mdiTagMultipleOutline.path,
201
+ sx: {
202
+ color: 'secondary.main'
203
+ }
204
+ },
205
+ data: {
206
+ $id: null,
207
+ componentId: CATEGORIES_ID,
208
+ pluginId: BUNDLE_ID,
209
+ // Seeded, not left to the runtime default: an explicit initial value
210
+ // is what lets the attributes form substitute the cleared sentinel
211
+ // when the author empties the box (AGL-1336).
212
+ props: {
213
+ allLabel: Aglyn.COLLECTION_ALL_PILL_DEFAULT
214
+ }
215
+ }
216
+ },
217
+ {
218
+ // Every author-placeable component needs a preset: the element drawer is
219
+ // built from PRESETS alone (`ComponentManager.schemasByCategory` iterates
220
+ // `this.presets`), so a component with only a schema renders correctly
221
+ // once a node exists but can never be put on a canvas by clicking.
222
+ //
223
+ // This one earns its place in the drawer because the entries block's own
224
+ // search field cannot leave that block, and the toolbar row wants the
225
+ // search beside the category pills rather than above the entries.
226
+ $id: generatePresetId(SEARCH_ID),
227
+ type: Aglyn.NodeType.PRESET,
228
+ displayName: 'Collection Search',
229
+ pluginId: BUNDLE_ID,
230
+ description: 'Search box for a collection, with a dropdown of matching entries',
231
+ category: Aglyn.ComponentCategory.NAVIGATION,
232
+ icon: {
233
+ path: mdiMagnify.path,
234
+ sx: {
235
+ color: 'secondary.main'
236
+ }
237
+ },
238
+ data: {
239
+ $id: null,
240
+ componentId: SEARCH_ID,
241
+ pluginId: BUNDLE_ID,
242
+ // Deliberately no seeded props. Both attributes read blank as a real
243
+ // choice — `collectionSlug` blank means "take the collection from the
244
+ // URL", which is correct on the list templates this block is for, and
245
+ // `searchPlaceholder` blank means the designed "Search posts…".
246
+ props: {}
247
+ }
248
+ },
249
+ {
250
+ $id: generatePresetId(ENTRY_META_ID),
251
+ type: Aglyn.NodeType.PRESET,
252
+ displayName: 'Entry Meta',
253
+ pluginId: BUNDLE_ID,
254
+ description: 'Author · date · category line with tag chips for the entry',
255
+ category: Aglyn.ComponentCategory.TEXT,
256
+ icon: {
257
+ path: mdiTagOutline.path,
258
+ sx: {
259
+ color: 'secondary.main'
260
+ }
261
+ },
262
+ data: {
263
+ $id: null,
264
+ componentId: ENTRY_META_ID,
265
+ pluginId: BUNDLE_ID,
266
+ props: {
267
+ date: '{{entry.date}}',
268
+ // Named rather than left to the runtime fallback (AGL-1459): the
269
+ // dropdown opens on the value the block is actually rendering, and
270
+ // an author who tries a format has a named route back. `default` is
271
+ // also the fallback, so naming it is the same choice, not a second.
272
+ dateFormat: Aglyn.COLLECTION_ENTRY_DATE_FORMAT_DEFAULT,
273
+ author: '{{entry.author}}',
274
+ category: '{{entry.category}}',
275
+ tags: '{{entry.tags}}'
276
+ }
277
+ }
278
+ },
279
+ {
280
+ $id: generatePresetId(ENTRY_AUTHOR_ID),
281
+ type: Aglyn.NodeType.PRESET,
282
+ displayName: 'Entry Author',
283
+ pluginId: BUNDLE_ID,
284
+ description: 'Portrait, byline and bio card for the entry’s author',
285
+ category: Aglyn.ComponentCategory.TEXT,
286
+ icon: {
287
+ path: mdiAccountCircleOutline.path,
288
+ sx: {
289
+ color: 'secondary.main'
290
+ }
291
+ },
292
+ data: {
293
+ $id: null,
294
+ componentId: ENTRY_AUTHOR_ID,
295
+ pluginId: BUNDLE_ID,
296
+ // Seeded EMPTY, unlike Entry Meta's preset. Those bindings predate the
297
+ // server fill and stay for compatibility; here the fill is the only
298
+ // mechanism, and a seeded `{{entry.authorImage}}` would render a broken
299
+ // portrait on every surface that is not an entry template.
300
+ props: {}
301
+ }
302
+ },
303
+ {
304
+ $id: generatePresetId(AUTHOR_PROFILE_ID),
305
+ type: Aglyn.NodeType.PRESET,
306
+ displayName: 'Author Profile',
307
+ pluginId: BUNDLE_ID,
308
+ description: 'Portrait, name, role, bio and links for an author page',
309
+ category: Aglyn.ComponentCategory.TEXT,
310
+ icon: {
311
+ path: mdiAccountCircleOutline.path,
312
+ sx: {
313
+ color: 'secondary.main'
314
+ }
315
+ },
316
+ data: {
317
+ $id: null,
318
+ componentId: AUTHOR_PROFILE_ID,
319
+ pluginId: BUNDLE_ID,
320
+ // Seeded EMPTY, for the reason the card above it is: the server fill is
321
+ // the only mechanism here, and a seeded `{{author.image}}` would render
322
+ // a broken portrait on every surface that is not an author page.
323
+ props: {}
324
+ }
325
+ }
326
+ ];
327
+
328
+ //# sourceMappingURL=collection-presets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/mui/src/lib/components/collection-presets.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as Aglyn from '@aglyn/aglyn'\nimport {\n mdiAccountCircleOutline,\n mdiMagnify,\n mdiNewspaperVariantOutline,\n mdiPostOutline,\n mdiShareVariant,\n mdiTagMultipleOutline,\n mdiTagOutline,\n mdiTextLong,\n} from '@aglyn/shared-data-mdi'\nimport { BUNDLE_ID } from '../constants/bundle-common'\nimport { generatePresetId } from '../utils/generate-preset-id'\n\n// Every collection element's id, read from @aglyn/aglyn rather than imported\n// from the element modules: importing them would put all nine elements into\n// the chunk of the one element these presets register with.\nconst ENTRIES_ID = Aglyn.COLLECTION_ENTRIES_COMPONENT_ID\nconst ENTRY_BODY_ID = Aglyn.COLLECTION_ENTRY_BODY_COMPONENT_ID\nconst RELATED_ID = Aglyn.COLLECTION_RELATED_COMPONENT_ID\nconst SHARE_ID = Aglyn.COLLECTION_SHARE_COMPONENT_ID\nconst ENTRY_META_ID = Aglyn.COLLECTION_ENTRY_META_COMPONENT_ID\nconst ENTRY_AUTHOR_ID = Aglyn.COLLECTION_ENTRY_AUTHOR_COMPONENT_ID\nconst CATEGORIES_ID = Aglyn.COLLECTION_CATEGORIES_COMPONENT_ID\nconst SEARCH_ID = Aglyn.COLLECTION_SEARCH_COMPONENT_ID\nconst AUTHOR_PROFILE_ID = Aglyn.CONTENT_AUTHOR_PROFILE_COMPONENT_ID\n\n/**\n * The collection family's palette presets. Registered with Collection\n * Entries (`presets: 'collectionPresets'` in plugin.ts), which re-exports\n * them; they name every collection element by id only, so none of those\n * elements' code comes with them.\n */\n\n/**\n * Styling rides the node's own `sx`, never `props.sx` (AGL-1346): both\n * render, but only `node.sx` is the record the Styles panel can edit or\n * clear. `Leaf` composes `node.sx` last, so this is the same result.\n */\nconst entryText = (variant: string, children: string, extra?: object) => {\n const { sx, ...props } = (extra ?? {}) as Record<string, unknown>\n return {\n $id: null,\n componentId: 'muiTypography',\n pluginId: BUNDLE_ID,\n props: { variant, children, ...props },\n ...(sx ? { sx } : {}),\n }\n}\n\nexport const collectionPresets: Aglyn.PresetSchema[] = [\n {\n $id: generatePresetId(ENTRIES_ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Collection Entries',\n pluginId: BUNDLE_ID,\n description:\n 'Repeats a card (title, date, excerpt, Read more) per published ' +\n 'entry of a content collection',\n category: Aglyn.ComponentCategory.BLOCKS,\n icon: { path: mdiPostOutline.path, sx: { color: 'secondary.main' } },\n data: {\n $id: null,\n componentId: ENTRIES_ID,\n pluginId: BUNDLE_ID,\n props: { spacing: 4 },\n nodes: [\n {\n $id: null,\n componentId: 'muiStack',\n pluginId: BUNDLE_ID,\n props: { spacing: 0.5 },\n nodes: [\n entryText('h5', '{{entry.title}}', { component: 'h2' }),\n entryText('caption', '{{entry.date}}', {\n sx: { color: 'text.secondary' },\n }),\n entryText('body1', '{{entry.excerpt}}'),\n {\n $id: null,\n componentId: 'muiScreenLink',\n pluginId: BUNDLE_ID,\n props: {\n children: 'Read more',\n href: '{{entry.url}}',\n size: 'small',\n },\n sx: { alignSelf: 'flex-start' },\n },\n ],\n },\n ],\n },\n },\n {\n $id: generatePresetId(ENTRY_BODY_ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Entry Body',\n pluginId: BUNDLE_ID,\n description: \"Renders the current entry's markdown body, themed\",\n category: Aglyn.ComponentCategory.TEXT,\n icon: { path: mdiTextLong.path, sx: { color: 'secondary.main' } },\n data: {\n $id: null,\n componentId: ENTRY_BODY_ID,\n pluginId: BUNDLE_ID,\n props: { markdown: '{{entry.body}}' },\n },\n },\n {\n $id: generatePresetId(RELATED_ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Related Posts',\n pluginId: BUNDLE_ID,\n description:\n \"Other entries sharing the current entry's category or tags\",\n category: Aglyn.ComponentCategory.DATA_DISPLAY,\n icon: { path: mdiNewspaperVariantOutline.path, sx: { color: 'secondary.main' } },\n data: {\n $id: null,\n componentId: RELATED_ID,\n pluginId: BUNDLE_ID,\n // `layout`, the two type steps and `dateFormat` are seeded rather than\n // left to the runtime fallback so each dropdown opens on the value the\n // block is actually rendering, and an author who tries another has a\n // named route back (AGL-1457/AGL-1459). The `show*` switches are\n // deliberately absent: their unset state IS the shipped behaviour.\n props: {\n heading: 'Related articles',\n limit: 3,\n layout: 'list',\n headingVariant: 'h5',\n titleVariant: 'subtitle1',\n dateFormat: Aglyn.COLLECTION_ENTRY_DATE_FORMAT_DEFAULT,\n },\n },\n },\n {\n $id: generatePresetId(SHARE_ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Share Bar',\n pluginId: BUNDLE_ID,\n description: 'X, LinkedIn, Facebook, and copy-link buttons for the page',\n category: Aglyn.ComponentCategory.NAVIGATION,\n icon: { path: mdiShareVariant.path, sx: { color: 'secondary.main' } },\n data: {\n $id: null,\n componentId: SHARE_ID,\n pluginId: BUNDLE_ID,\n props: { heading: 'Share' },\n },\n },\n {\n $id: generatePresetId(CATEGORIES_ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Category Pills',\n pluginId: BUNDLE_ID,\n description:\n \"Links to each of the collection's categories, filtering the listing\",\n category: Aglyn.ComponentCategory.NAVIGATION,\n icon: { path: mdiTagMultipleOutline.path, sx: { color: 'secondary.main' } },\n data: {\n $id: null,\n componentId: CATEGORIES_ID,\n pluginId: BUNDLE_ID,\n // Seeded, not left to the runtime default: an explicit initial value\n // is what lets the attributes form substitute the cleared sentinel\n // when the author empties the box (AGL-1336).\n props: { allLabel: Aglyn.COLLECTION_ALL_PILL_DEFAULT },\n },\n },\n {\n // Every author-placeable component needs a preset: the element drawer is\n // built from PRESETS alone (`ComponentManager.schemasByCategory` iterates\n // `this.presets`), so a component with only a schema renders correctly\n // once a node exists but can never be put on a canvas by clicking.\n //\n // This one earns its place in the drawer because the entries block's own\n // search field cannot leave that block, and the toolbar row wants the\n // search beside the category pills rather than above the entries.\n $id: generatePresetId(SEARCH_ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Collection Search',\n pluginId: BUNDLE_ID,\n description:\n 'Search box for a collection, with a dropdown of matching entries',\n category: Aglyn.ComponentCategory.NAVIGATION,\n icon: { path: mdiMagnify.path, sx: { color: 'secondary.main' } },\n data: {\n $id: null,\n componentId: SEARCH_ID,\n pluginId: BUNDLE_ID,\n // Deliberately no seeded props. Both attributes read blank as a real\n // choice — `collectionSlug` blank means \"take the collection from the\n // URL\", which is correct on the list templates this block is for, and\n // `searchPlaceholder` blank means the designed \"Search posts…\".\n props: {},\n },\n },\n {\n $id: generatePresetId(ENTRY_META_ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Entry Meta',\n pluginId: BUNDLE_ID,\n description: 'Author · date · category line with tag chips for the entry',\n category: Aglyn.ComponentCategory.TEXT,\n icon: { path: mdiTagOutline.path, sx: { color: 'secondary.main' } },\n data: {\n $id: null,\n componentId: ENTRY_META_ID,\n pluginId: BUNDLE_ID,\n props: {\n date: '{{entry.date}}',\n // Named rather than left to the runtime fallback (AGL-1459): the\n // dropdown opens on the value the block is actually rendering, and\n // an author who tries a format has a named route back. `default` is\n // also the fallback, so naming it is the same choice, not a second.\n dateFormat: Aglyn.COLLECTION_ENTRY_DATE_FORMAT_DEFAULT,\n author: '{{entry.author}}',\n category: '{{entry.category}}',\n tags: '{{entry.tags}}',\n },\n },\n },\n {\n $id: generatePresetId(ENTRY_AUTHOR_ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Entry Author',\n pluginId: BUNDLE_ID,\n description: 'Portrait, byline and bio card for the entry’s author',\n category: Aglyn.ComponentCategory.TEXT,\n icon: {\n path: mdiAccountCircleOutline.path,\n sx: { color: 'secondary.main' },\n },\n data: {\n $id: null,\n componentId: ENTRY_AUTHOR_ID,\n pluginId: BUNDLE_ID,\n // Seeded EMPTY, unlike Entry Meta's preset. Those bindings predate the\n // server fill and stay for compatibility; here the fill is the only\n // mechanism, and a seeded `{{entry.authorImage}}` would render a broken\n // portrait on every surface that is not an entry template.\n props: {},\n },\n },\n {\n $id: generatePresetId(AUTHOR_PROFILE_ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Author Profile',\n pluginId: BUNDLE_ID,\n description: 'Portrait, name, role, bio and links for an author page',\n category: Aglyn.ComponentCategory.TEXT,\n icon: {\n path: mdiAccountCircleOutline.path,\n sx: { color: 'secondary.main' },\n },\n data: {\n $id: null,\n componentId: AUTHOR_PROFILE_ID,\n pluginId: BUNDLE_ID,\n // Seeded EMPTY, for the reason the card above it is: the server fill is\n // the only mechanism here, and a seeded `{{author.image}}` would render\n // a broken portrait on every surface that is not an author page.\n props: {},\n },\n },\n]\n"],"names":["Aglyn","mdiAccountCircleOutline","mdiMagnify","mdiNewspaperVariantOutline","mdiPostOutline","mdiShareVariant","mdiTagMultipleOutline","mdiTagOutline","mdiTextLong","BUNDLE_ID","generatePresetId","ENTRIES_ID","COLLECTION_ENTRIES_COMPONENT_ID","ENTRY_BODY_ID","COLLECTION_ENTRY_BODY_COMPONENT_ID","RELATED_ID","COLLECTION_RELATED_COMPONENT_ID","SHARE_ID","COLLECTION_SHARE_COMPONENT_ID","ENTRY_META_ID","COLLECTION_ENTRY_META_COMPONENT_ID","ENTRY_AUTHOR_ID","COLLECTION_ENTRY_AUTHOR_COMPONENT_ID","CATEGORIES_ID","COLLECTION_CATEGORIES_COMPONENT_ID","SEARCH_ID","COLLECTION_SEARCH_COMPONENT_ID","AUTHOR_PROFILE_ID","CONTENT_AUTHOR_PROFILE_COMPONENT_ID","entryText","variant","children","extra","sx","props","$id","componentId","pluginId","collectionPresets","type","NodeType","PRESET","displayName","description","category","ComponentCategory","BLOCKS","icon","path","color","data","spacing","nodes","component","href","size","alignSelf","TEXT","markdown","DATA_DISPLAY","heading","limit","layout","headingVariant","titleVariant","dateFormat","COLLECTION_ENTRY_DATE_FORMAT_DEFAULT","NAVIGATION","allLabel","COLLECTION_ALL_PILL_DEFAULT","date","author","tags"],"mappings":";;AAAA;;;;;;;;;;;;;;;CAeC,GAED,YAAYA,WAAW,eAAc;AACrC,SACEC,uBAAuB,EACvBC,UAAU,EACVC,0BAA0B,EAC1BC,cAAc,EACdC,eAAe,EACfC,qBAAqB,EACrBC,aAAa,EACbC,WAAW,QACN,yBAAwB;AAC/B,SAASC,SAAS,QAAQ,gCAA4B;AACtD,SAASC,gBAAgB,QAAQ,iCAA6B;AAE9D,6EAA6E;AAC7E,4EAA4E;AAC5E,4DAA4D;AAC5D,MAAMC,aAAaX,MAAMY,+BAA+B;AACxD,MAAMC,gBAAgBb,MAAMc,kCAAkC;AAC9D,MAAMC,aAAaf,MAAMgB,+BAA+B;AACxD,MAAMC,WAAWjB,MAAMkB,6BAA6B;AACpD,MAAMC,gBAAgBnB,MAAMoB,kCAAkC;AAC9D,MAAMC,kBAAkBrB,MAAMsB,oCAAoC;AAClE,MAAMC,gBAAgBvB,MAAMwB,kCAAkC;AAC9D,MAAMC,YAAYzB,MAAM0B,8BAA8B;AACtD,MAAMC,oBAAoB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QACF;IACF;IACA;QACErC,KAAKzB,iBAAiBW;QACtBkB,MAAMvC,MAAMwC,QAAQ,CAACC,MAAM;QAC3BC,aAAa;QACbL,UAAU5B;QACVkC,aAAa;QACbC,UAAU5C,MAAM6C,iBAAiB,CAACY,IAAI;QACtCV,MAAM;YACJC,MAAM/C,wBAAwB+C,IAAI;YAClCf,IAAI;gBAAEgB,OAAO;YAAiB;QAChC;QACAC,MAAM;YACJf,KAAK;YACLC,aAAaf;YACbgB,UAAU5B;YACV,uEAAuE;YACvE,oEAAoE;YACpE,wEAAwE;YACxE,2DAA2D;YAC3DyB,OAAO,CAAC;QACV;IACF;IACA;QACEC,KAAKzB,iBAAiBiB;QACtBY,MAAMvC,MAAMwC,QAAQ,CAACC,MAAM;QAC3BC,aAAa;QACbL,UAAU5B;QACVkC,aAAa;QACbC,UAAU5C,MAAM6C,iBAAiB,CAACY,IAAI;QACtCV,MAAM;YACJC,MAAM/C,wBAAwB+C,IAAI;YAClCf,IAAI;gBAAEgB,OAAO;YAAiB;QAChC;QACAC,MAAM;YACJf,KAAK;YACLC,aAAaT;YACbU,UAAU5B;YACV,wEAAwE;YACxE,wEAAwE;YACxE,iEAAiE;YACjEyB,OAAO,CAAC;QACV;IACF;CACD,CAAA"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import * as Aglyn from '@aglyn/aglyn';
18
+ import { type StackProps } from '@mui/material/Stack';
19
+ export declare const RELATED_ID: Aglyn.ComponentId;
20
+ /** How the related posts are laid out (AGL-1457). */
21
+ export type CollectionRelatedLayout = 'list' | 'cards';
22
+ /** One related post as stamped by the compose pipeline (AGL-582). */
23
+ export interface CollectionRelatedProps extends StackProps {
24
+ /** Section heading; empty string hides it. */
25
+ heading?: string;
26
+ /** Compose-time: most related posts listed (default 3). */
27
+ limit?: number | string;
28
+ /**
29
+ * Emit each entry's cover image (AGL-1457). OFF is the default and the
30
+ * shipped behaviour — the block is live on every blog entry, so turning
31
+ * covers on by default would restyle published pages nobody asked about.
32
+ */
33
+ showCover?: boolean;
34
+ /**
35
+ * `list` (default) is the plain-link list that has always shipped; `cards`
36
+ * is the article frame's grid of cover + category chip + title.
37
+ */
38
+ layout?: CollectionRelatedLayout;
39
+ /** Columns in the `cards` grid (default 3, the frame's 3-up). */
40
+ columns?: number | string;
41
+ /**
42
+ * Type step the section heading reads at (default `h5`). One of the
43
+ * theme's own rungs, shared with the Typography element — a heading sized
44
+ * by hand in the Styles panel is the pixel-typing the tokens exist to stop.
45
+ */
46
+ headingVariant?: string;
47
+ /**
48
+ * Type step each card title reads at (default `subtitle1`, what the block
49
+ * has always emitted). The title is the block's own markup, so the Styles
50
+ * panel — which edits the node's root — cannot reach it; this is the only
51
+ * handle on it.
52
+ */
53
+ titleVariant?: string;
54
+ /** Show each post's published date. On is the shipped behaviour. */
55
+ showDate?: boolean;
56
+ /**
57
+ * How each card's published date reads (AGL-1459) — a COMPOSE-TIME prop
58
+ * like {@link limit}: it is answered in `expandCollectionRelated`, where
59
+ * the timestamp still exists, and never reaches the DOM. Blank, or
60
+ * `default`, is the locale date the block has always emitted.
61
+ *
62
+ * Read here too, but only to date the SAMPLE cards: an editing surface has
63
+ * no routed entry and therefore no server fill, so the picker would
64
+ * otherwise preview nothing.
65
+ */
66
+ dateFormat?: Aglyn.CollectionEntryDateFormat;
67
+ /** Show each post's category. On is the shipped behaviour. */
68
+ showCategory?: boolean;
69
+ /**
70
+ * Show each post's excerpt. OFF is the default and the shipped behaviour:
71
+ * the excerpt has been stamped onto every related item since AGL-582 and
72
+ * rendered by nothing, so turning it on by default would add a paragraph
73
+ * to every published entry nobody asked about.
74
+ */
75
+ showExcerpt?: boolean;
76
+ /**
77
+ * Server-stamped related posts (`expandCollectionRelated`); never set by
78
+ * hand — the tenant computes it from the current entry's category/tags.
79
+ */
80
+ entries?: Aglyn.CollectionRelatedItem[];
81
+ }
82
+ /**
83
+ * Lists other entries of the same collection sharing the current entry's
84
+ * category or a tag (AGL-582). The tenant stamps `entries` at compose time
85
+ * on entry renders; without them the published site renders nothing and an
86
+ * editing surface renders sample cards (AGL-2486).
87
+ *
88
+ * Two layouts (AGL-1457). `list` is the plain-link list that has always
89
+ * shipped and stays the default — the block is live on every blog entry, so
90
+ * a new default would restyle published pages nobody asked about. `cards` is
91
+ * the article frame's grid: cover, category chip, title, at an author-set
92
+ * column count.
93
+ *
94
+ * The block owns its markup, so nothing inside a card is a node the Styles
95
+ * panel can select. Every part it renders therefore needs an attribute, or
96
+ * it is unauthorable by construction — which is what the type steps and the
97
+ * `show*` switches are (AGL-2486).
98
+ */
99
+ declare const CollectionRelated: import("react").ForwardRefExoticComponent<Omit<CollectionRelatedProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
100
+ export declare const collectionRelatedSchema: Aglyn.ComponentSchema<CollectionRelatedProps>;
101
+ export { CollectionRelated };