@aglyn/plugins-mui 1.0.0-beta.215 → 1.0.0-beta.217

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 (57) 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/element-tier.d.ts +9 -1
  51. package/src/lib/element-tier.js +12 -1
  52. package/src/lib/element-tier.js.map +1 -1
  53. package/src/lib/plugin.js +20 -12
  54. package/src/lib/plugin.js.map +1 -1
  55. package/src/lib/utils/to-count.d.ts +25 -0
  56. package/src/lib/utils/to-count.js +30 -0
  57. package/src/lib/utils/to-count.js.map +1 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../libs/plugins/mui/src/lib/components/image-list.tsx"],"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 { mdiImageMultiple, mdiImageMultipleOutline } from '@aglyn/shared-data-mdi'\nimport MuiImageList from '@mui/material/ImageList'\nimport MuiImageListItem from '@mui/material/ImageListItem'\nimport MuiImageListItemBar from '@mui/material/ImageListItemBar'\nimport { forwardRef, type ReactNode } from 'react'\nimport { BUNDLE_ID } from '../constants/bundle-common'\nimport { dropClearedProps } from '../utils/drop-cleared-props'\nimport { generatePresetId } from '../utils/generate-preset-id'\n\n// Component ids are persisted in screen documents; never rename.\nexport const IMAGE_LIST_ID: Aglyn.ComponentId = 'muiImageList'\nexport const IMAGE_LIST_ITEM_ID: Aglyn.ComponentId = 'muiImageListItem'\n\nexport type ImageListVariant = 'standard' | 'quilted' | 'masonry' | 'woven'\n\nexport interface ImageListElementProps {\n cols?: number | string\n gap?: number | string\n /** Row height in px, or blank for `auto`. */\n rowHeight?: number | string\n variant?: ImageListVariant\n children?: ReactNode\n}\n\nexport interface ImageListItemElementProps {\n /** Columns this tile spans (quilted lists). */\n cols?: number | string\n /** Rows this tile spans (quilted lists). */\n rows?: number | string\n /** Caption bar text; the bar is omitted entirely when both are blank. */\n title?: string\n subtitle?: string\n barPosition?: 'below' | 'top' | 'bottom'\n children?: ReactNode\n}\n\n/** Number fields round-trip as strings; MUI's grid math needs numbers. */\nexport function toCount(value: unknown, fallback?: number): number | undefined {\n if (value == null || value === '') return fallback\n const parsed = Number(value)\n if (!Number.isFinite(parsed) || parsed < 0) return fallback\n return Math.round(parsed)\n}\n\n/**\n * Image list (https://mui.com/material-ui/react-image-list/): a masonry\n * or quilted grid of images, denser than a Grid of cards.\n */\nconst ImageListElement = forwardRef<HTMLUListElement, ImageListElementProps>(\n (rawProps, ref) => {\n // Cleared props dropped before the resolvers below read them\n // (AGL-1451); `rest` also spreads straight into MUI.\n const props = dropClearedProps(rawProps)\n const { cols, gap, rowHeight, variant, children, ...rest } = props\n const resolvedVariant: ImageListVariant = (\n ['standard', 'quilted', 'masonry', 'woven'] as const\n ).includes(variant as ImageListVariant)\n ? (variant as ImageListVariant)\n : 'standard'\n const height = toCount(rowHeight)\n return (\n <MuiImageList\n ref={ref}\n variant={resolvedVariant}\n cols={toCount(cols, 3)}\n gap={toCount(gap, 4)}\n // A masonry list sizes rows from the images themselves; a fixed\n // rowHeight silently defeats the whole variant.\n rowHeight={resolvedVariant === 'masonry' ? 'auto' : height ?? 'auto'}\n {...rest}\n // MUI types ImageList's children as NonNullable; the renderer\n // always supplies the tile subtree.\n children={children as NonNullable<ReactNode>}\n />\n )\n },\n)\nImageListElement.displayName = 'AglynImageList'\n\n/**\n * One tile. The image itself is an ordinary Image element dropped\n * inside, so tiles keep the media-CDN srcSet, lazy loading and\n * empty-source placeholder (AGL-74/175) rather than a second, worse\n * image implementation living here.\n */\nexport const ImageListItemElement = forwardRef<\n HTMLLIElement,\n ImageListItemElementProps\n>((rawProps, ref) => {\n const props = dropClearedProps(rawProps)\n const { cols, rows, title, subtitle, barPosition, children, ...rest } = props\n return (\n <MuiImageListItem\n ref={ref}\n cols={toCount(cols, 1)}\n rows={toCount(rows, 1)}\n {...rest}\n >\n {children}\n {title || subtitle ? (\n <MuiImageListItemBar\n title={title || undefined}\n subtitle={subtitle || undefined}\n position={barPosition || 'bottom'}\n />\n ) : null}\n </MuiImageListItem>\n )\n})\nImageListItemElement.displayName = 'AglynImageListItem'\n\n/** Row height is meaningless on masonry — MUI forces `auto` there. */\nconst NOT_MASONRY = { when: 'variant', is: 'masonry', notMatch: true }\n\nexport const imageListSchema: Aglyn.ComponentSchema<ImageListElementProps> = {\n $id: IMAGE_LIST_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Image List',\n description: 'Dense grid of images — standard, quilted, masonry or woven.',\n category: Aglyn.ComponentCategory.MEDIA,\n icon: { path: mdiImageMultiple.path, sx: { color: '#7b1fa2' } },\n restrictChildren: [\n Aglyn.LinealDirectiveFlag.LIMIT_TO,\n { components: [IMAGE_LIST_ITEM_ID] },\n ],\n attributes: [\n {\n name: 'variant',\n label: 'Variant',\n description:\n 'Standard is a plain grid; quilted lets tiles span columns and ' +\n 'rows; masonry keeps each image’s own aspect ratio; woven ' +\n 'alternates tile sizes.',\n component: Aglyn.FieldComponentType.SELECT,\n // A real sentinel, not a deletion (AGL-1451): `standard` is one of\n // MUI's four named variants and the resolver above already accepts\n // it by name, so the option is a genuine choice — and the one an\n // author needs in order to move a list BACK off quilted or masonry.\n // Spelled `''` it could not persist (AGL-1191), so that move\n // silently reverted.\n options: [\n { value: 'standard', label: 'Standard (default)' },\n { value: 'quilted', label: 'Quilted' },\n { value: 'masonry', label: 'Masonry' },\n { value: 'woven', label: 'Woven' },\n ],\n },\n {\n name: 'cols',\n label: 'Columns',\n description: 'Number of columns. Default 3.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n type: 'number',\n },\n {\n name: 'gap',\n label: 'Gap',\n description: 'Space between tiles, in px. Default 4.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n type: 'number',\n },\n {\n name: 'rowHeight',\n label: 'Row height',\n description:\n 'Row height in px. Leave blank to size rows from the images.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n type: 'number',\n condition: NOT_MASONRY,\n },\n ],\n}\n\nexport const imageListItemSchema: Aglyn.ComponentSchema<ImageListItemElementProps> =\n {\n $id: IMAGE_LIST_ITEM_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Image List Item',\n description: 'One tile of an image list, with an optional caption bar.',\n category: Aglyn.ComponentCategory.MEDIA,\n icon: { path: mdiImageMultipleOutline.path, sx: { color: '#7b1fa2' } },\n attributes: [\n {\n name: 'title',\n label: 'Caption',\n description:\n 'Caption bar text. Leave both caption fields blank for no bar.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n },\n {\n name: 'subtitle',\n label: 'Caption subtitle',\n description: 'Second line of the caption bar.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n },\n {\n name: 'barPosition',\n label: 'Caption position',\n description: 'Where the caption bar sits relative to the image.',\n component: Aglyn.FieldComponentType.SELECT,\n // `bottom` is MUI's own position value and the `|| 'bottom'`\n // fallback below already resolves to it, so the sentinel is the\n // value the code was reaching for anyway (AGL-1451).\n options: [\n { value: 'bottom', label: 'Bottom (default)' },\n { value: 'top', label: 'Top' },\n { value: 'below', label: 'Below the image' },\n ],\n },\n // The spans are read only by the quilted layout, but the variant\n // that decides that lives on the PARENT list. A `condition` is\n // evaluated against this node's own attribute form and cannot see\n // it, so these stay visible and say so in their help text — a\n // condition here would hide them permanently.\n {\n name: 'cols',\n label: 'Column span',\n description:\n 'How many columns this tile spans. Only the parent list’s ' +\n 'Quilted variant reads this.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n type: 'number',\n },\n {\n name: 'rows',\n label: 'Row span',\n description:\n 'How many rows this tile spans. Only the parent list’s Quilted ' +\n 'variant reads this.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n type: 'number',\n },\n ],\n }\n\nconst tile = (caption: string) => ({\n $id: null,\n componentId: IMAGE_LIST_ITEM_ID,\n pluginId: BUNDLE_ID,\n props: { title: caption },\n nodes: [\n {\n $id: null,\n componentId: 'image',\n pluginId: BUNDLE_ID,\n props: { alt: caption, height: '160px', objectFit: 'cover' },\n },\n ],\n})\n\nexport const imageListPresets: Aglyn.PresetSchema[] = [\n {\n $id: generatePresetId(IMAGE_LIST_ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Image List',\n pluginId: BUNDLE_ID,\n description: 'Three-column gallery with captioned tiles',\n category: Aglyn.ComponentCategory.MEDIA,\n icon: imageListSchema.icon,\n data: {\n $id: null,\n componentId: IMAGE_LIST_ID,\n pluginId: BUNDLE_ID,\n props: { cols: 3, gap: 8, rowHeight: 160 },\n nodes: [tile('First image'), tile('Second image'), tile('Third image')],\n },\n },\n {\n $id: generatePresetId(IMAGE_LIST_ID, 'masonry'),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Image List Masonry',\n pluginId: BUNDLE_ID,\n description: 'Gallery that keeps each image’s own aspect ratio',\n category: Aglyn.ComponentCategory.MEDIA,\n icon: imageListSchema.icon,\n data: {\n $id: null,\n componentId: IMAGE_LIST_ID,\n pluginId: BUNDLE_ID,\n props: { variant: 'masonry', cols: 3, gap: 8 },\n nodes: [tile(''), tile(''), tile(''), tile('')],\n },\n },\n {\n $id: generatePresetId(IMAGE_LIST_ITEM_ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Image List Item',\n pluginId: BUNDLE_ID,\n description: 'One more tile to add to an existing image list',\n category: Aglyn.ComponentCategory.MEDIA,\n icon: imageListItemSchema.icon,\n data: tile(''),\n },\n]\n\nexport default ImageListElement\n"],"names":["Aglyn","mdiImageMultiple","mdiImageMultipleOutline","MuiImageList","MuiImageListItem","MuiImageListItemBar","forwardRef","BUNDLE_ID","dropClearedProps","generatePresetId","IMAGE_LIST_ID","IMAGE_LIST_ITEM_ID","toCount","value","fallback","parsed","Number","isFinite","Math","round","ImageListElement","rawProps","ref","props","cols","gap","rowHeight","variant","children","rest","resolvedVariant","includes","height","displayName","ImageListItemElement","rows","title","subtitle","barPosition","undefined","position","NOT_MASONRY","when","is","notMatch","imageListSchema","$id","pluginId","description","category","ComponentCategory","MEDIA","icon","path","sx","color","restrictChildren","LinealDirectiveFlag","LIMIT_TO","components","attributes","name","label","component","FieldComponentType","SELECT","options","TEXT_FIELD","type","condition","imageListItemSchema","tile","caption","componentId","nodes","alt","objectFit","imageListPresets","NodeType","PRESET","data"],"mappings":";;;AAAA;;;;;;;;;;;;;;;CAeC,GAED,YAAYA,WAAW,eAAc;AACrC,SAASC,gBAAgB,EAAEC,uBAAuB,QAAQ,yBAAwB;AAClF,OAAOC,kBAAkB,0BAAyB;AAClD,OAAOC,sBAAsB,8BAA6B;AAC1D,OAAOC,yBAAyB,iCAAgC;AAChE,SAASC,UAAU,QAAwB,QAAO;AAClD,SAASC,SAAS,QAAQ,gCAA4B;AACtD,SAASC,gBAAgB,QAAQ,iCAA6B;AAC9D,SAASC,gBAAgB,QAAQ,iCAA6B;AAE9D,iEAAiE;AACjE,OAAO,MAAMC,gBAAmC,eAAc;AAC9D,OAAO,MAAMC,qBAAwC,mBAAkB;AAyBvE,wEAAwE,GACxE,OAAO,SAASC,QAAQC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SACD;IACH,CAAA;AAEA,OAAO,MAAMC,mBAAyC;IACpD;QACE/B,KAAKrC,iBAAiBC;QACtB0D,MAAMpE,MAAM8E,QAAQ,CAACC,MAAM;QAC3B9C,aAAa;QACbc,UAAUxC;QACVyC,aAAa;QACbC,UAAUjD,MAAMkD,iBAAiB,CAACC,KAAK;QACvCC,MAAMP,gBAAgBO,IAAI;QAC1B4B,MAAM;YACJlC,KAAK;YACL2B,aAAa/D;YACbqC,UAAUxC;YACVgB,OAAO;gBAAEC,MAAM;gBAAGC,KAAK;gBAAGC,WAAW;YAAI;YACzCgD,OAAO;gBAACH,KAAK;gBAAgBA,KAAK;gBAAiBA,KAAK;aAAe;QACzE;IACF;IACA;QACEzB,KAAKrC,iBAAiBC,eAAe;QACrC0D,MAAMpE,MAAM8E,QAAQ,CAACC,MAAM;QAC3B9C,aAAa;QACbc,UAAUxC;QACVyC,aAAa;QACbC,UAAUjD,MAAMkD,iBAAiB,CAACC,KAAK;QACvCC,MAAMP,gBAAgBO,IAAI;QAC1B4B,MAAM;YACJlC,KAAK;YACL2B,aAAa/D;YACbqC,UAAUxC;YACVgB,OAAO;gBAAEI,SAAS;gBAAWH,MAAM;gBAAGC,KAAK;YAAE;YAC7CiD,OAAO;gBAACH,KAAK;gBAAKA,KAAK;gBAAKA,KAAK;gBAAKA,KAAK;aAAI;QACjD;IACF;IACA;QACEzB,KAAKrC,iBAAiBE;QACtByD,MAAMpE,MAAM8E,QAAQ,CAACC,MAAM;QAC3B9C,aAAa;QACbc,UAAUxC;QACVyC,aAAa;QACbC,UAAUjD,MAAMkD,iBAAiB,CAACC,KAAK;QACvCC,MAAMkB,oBAAoBlB,IAAI;QAC9B4B,MAAMT,KAAK;IACb;CACD,CAAA;AAED,eAAenD,iBAAgB"}
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/mui/src/lib/components/image-list.tsx"],"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 { mdiImageMultiple, mdiImageMultipleOutline } from '@aglyn/shared-data-mdi'\nimport MuiImageList from '@mui/material/ImageList'\nimport MuiImageListItem from '@mui/material/ImageListItem'\nimport MuiImageListItemBar from '@mui/material/ImageListItemBar'\nimport { forwardRef, type ReactNode } from 'react'\nimport { BUNDLE_ID } from '../constants/bundle-common'\nimport { dropClearedProps } from '../utils/drop-cleared-props'\nimport { generatePresetId } from '../utils/generate-preset-id'\nimport { toCount } from '../utils/to-count'\n\n// Component ids are persisted in screen documents; never rename.\nexport const IMAGE_LIST_ID: Aglyn.ComponentId = 'muiImageList'\nexport const IMAGE_LIST_ITEM_ID: Aglyn.ComponentId = 'muiImageListItem'\n\nexport type ImageListVariant = 'standard' | 'quilted' | 'masonry' | 'woven'\n\nexport interface ImageListElementProps {\n cols?: number | string\n gap?: number | string\n /** Row height in px, or blank for `auto`. */\n rowHeight?: number | string\n variant?: ImageListVariant\n children?: ReactNode\n}\n\nexport interface ImageListItemElementProps {\n /** Columns this tile spans (quilted lists). */\n cols?: number | string\n /** Rows this tile spans (quilted lists). */\n rows?: number | string\n /** Caption bar text; the bar is omitted entirely when both are blank. */\n title?: string\n subtitle?: string\n barPosition?: 'below' | 'top' | 'bottom'\n children?: ReactNode\n}\n\n// Still exported here, where it was first written: the package's\n// `components/image-list` subpath has always offered it.\nexport { toCount }\n\n/**\n * Image list (https://mui.com/material-ui/react-image-list/): a masonry\n * or quilted grid of images, denser than a Grid of cards.\n */\nconst ImageListElement = forwardRef<HTMLUListElement, ImageListElementProps>(\n (rawProps, ref) => {\n // Cleared props dropped before the resolvers below read them\n // (AGL-1451); `rest` also spreads straight into MUI.\n const props = dropClearedProps(rawProps)\n const { cols, gap, rowHeight, variant, children, ...rest } = props\n const resolvedVariant: ImageListVariant = (\n ['standard', 'quilted', 'masonry', 'woven'] as const\n ).includes(variant as ImageListVariant)\n ? (variant as ImageListVariant)\n : 'standard'\n const height = toCount(rowHeight)\n return (\n <MuiImageList\n ref={ref}\n variant={resolvedVariant}\n cols={toCount(cols, 3)}\n gap={toCount(gap, 4)}\n // A masonry list sizes rows from the images themselves; a fixed\n // rowHeight silently defeats the whole variant.\n rowHeight={resolvedVariant === 'masonry' ? 'auto' : height ?? 'auto'}\n {...rest}\n // MUI types ImageList's children as NonNullable; the renderer\n // always supplies the tile subtree.\n children={children as NonNullable<ReactNode>}\n />\n )\n },\n)\nImageListElement.displayName = 'AglynImageList'\n\n/**\n * One tile. The image itself is an ordinary Image element dropped\n * inside, so tiles keep the media-CDN srcSet, lazy loading and\n * empty-source placeholder (AGL-74/175) rather than a second, worse\n * image implementation living here.\n */\nexport const ImageListItemElement = forwardRef<\n HTMLLIElement,\n ImageListItemElementProps\n>((rawProps, ref) => {\n const props = dropClearedProps(rawProps)\n const { cols, rows, title, subtitle, barPosition, children, ...rest } = props\n return (\n <MuiImageListItem\n ref={ref}\n cols={toCount(cols, 1)}\n rows={toCount(rows, 1)}\n {...rest}\n >\n {children}\n {title || subtitle ? (\n <MuiImageListItemBar\n title={title || undefined}\n subtitle={subtitle || undefined}\n position={barPosition || 'bottom'}\n />\n ) : null}\n </MuiImageListItem>\n )\n})\nImageListItemElement.displayName = 'AglynImageListItem'\n\n/** Row height is meaningless on masonry — MUI forces `auto` there. */\nconst NOT_MASONRY = { when: 'variant', is: 'masonry', notMatch: true }\n\nexport const imageListSchema: Aglyn.ComponentSchema<ImageListElementProps> = {\n $id: IMAGE_LIST_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Image List',\n description: 'Dense grid of images — standard, quilted, masonry or woven.',\n category: Aglyn.ComponentCategory.MEDIA,\n icon: { path: mdiImageMultiple.path, sx: { color: '#7b1fa2' } },\n restrictChildren: [\n Aglyn.LinealDirectiveFlag.LIMIT_TO,\n { components: [IMAGE_LIST_ITEM_ID] },\n ],\n attributes: [\n {\n name: 'variant',\n label: 'Variant',\n description:\n 'Standard is a plain grid; quilted lets tiles span columns and ' +\n 'rows; masonry keeps each image’s own aspect ratio; woven ' +\n 'alternates tile sizes.',\n component: Aglyn.FieldComponentType.SELECT,\n // A real sentinel, not a deletion (AGL-1451): `standard` is one of\n // MUI's four named variants and the resolver above already accepts\n // it by name, so the option is a genuine choice — and the one an\n // author needs in order to move a list BACK off quilted or masonry.\n // Spelled `''` it could not persist (AGL-1191), so that move\n // silently reverted.\n options: [\n { value: 'standard', label: 'Standard (default)' },\n { value: 'quilted', label: 'Quilted' },\n { value: 'masonry', label: 'Masonry' },\n { value: 'woven', label: 'Woven' },\n ],\n },\n {\n name: 'cols',\n label: 'Columns',\n description: 'Number of columns. Default 3.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n type: 'number',\n },\n {\n name: 'gap',\n label: 'Gap',\n description: 'Space between tiles, in px. Default 4.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n type: 'number',\n },\n {\n name: 'rowHeight',\n label: 'Row height',\n description:\n 'Row height in px. Leave blank to size rows from the images.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n type: 'number',\n condition: NOT_MASONRY,\n },\n ],\n}\n\nexport const imageListItemSchema: Aglyn.ComponentSchema<ImageListItemElementProps> =\n {\n $id: IMAGE_LIST_ITEM_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Image List Item',\n description: 'One tile of an image list, with an optional caption bar.',\n category: Aglyn.ComponentCategory.MEDIA,\n icon: { path: mdiImageMultipleOutline.path, sx: { color: '#7b1fa2' } },\n attributes: [\n {\n name: 'title',\n label: 'Caption',\n description:\n 'Caption bar text. Leave both caption fields blank for no bar.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n },\n {\n name: 'subtitle',\n label: 'Caption subtitle',\n description: 'Second line of the caption bar.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n },\n {\n name: 'barPosition',\n label: 'Caption position',\n description: 'Where the caption bar sits relative to the image.',\n component: Aglyn.FieldComponentType.SELECT,\n // `bottom` is MUI's own position value and the `|| 'bottom'`\n // fallback below already resolves to it, so the sentinel is the\n // value the code was reaching for anyway (AGL-1451).\n options: [\n { value: 'bottom', label: 'Bottom (default)' },\n { value: 'top', label: 'Top' },\n { value: 'below', label: 'Below the image' },\n ],\n },\n // The spans are read only by the quilted layout, but the variant\n // that decides that lives on the PARENT list. A `condition` is\n // evaluated against this node's own attribute form and cannot see\n // it, so these stay visible and say so in their help text — a\n // condition here would hide them permanently.\n {\n name: 'cols',\n label: 'Column span',\n description:\n 'How many columns this tile spans. Only the parent list’s ' +\n 'Quilted variant reads this.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n type: 'number',\n },\n {\n name: 'rows',\n label: 'Row span',\n description:\n 'How many rows this tile spans. Only the parent list’s Quilted ' +\n 'variant reads this.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n type: 'number',\n },\n ],\n }\n\nconst tile = (caption: string) => ({\n $id: null,\n componentId: IMAGE_LIST_ITEM_ID,\n pluginId: BUNDLE_ID,\n props: { title: caption },\n nodes: [\n {\n $id: null,\n componentId: 'image',\n pluginId: BUNDLE_ID,\n props: { alt: caption, height: '160px', objectFit: 'cover' },\n },\n ],\n})\n\nexport const imageListPresets: Aglyn.PresetSchema[] = [\n {\n $id: generatePresetId(IMAGE_LIST_ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Image List',\n pluginId: BUNDLE_ID,\n description: 'Three-column gallery with captioned tiles',\n category: Aglyn.ComponentCategory.MEDIA,\n icon: imageListSchema.icon,\n data: {\n $id: null,\n componentId: IMAGE_LIST_ID,\n pluginId: BUNDLE_ID,\n props: { cols: 3, gap: 8, rowHeight: 160 },\n nodes: [tile('First image'), tile('Second image'), tile('Third image')],\n },\n },\n {\n $id: generatePresetId(IMAGE_LIST_ID, 'masonry'),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Image List Masonry',\n pluginId: BUNDLE_ID,\n description: 'Gallery that keeps each image’s own aspect ratio',\n category: Aglyn.ComponentCategory.MEDIA,\n icon: imageListSchema.icon,\n data: {\n $id: null,\n componentId: IMAGE_LIST_ID,\n pluginId: BUNDLE_ID,\n props: { variant: 'masonry', cols: 3, gap: 8 },\n nodes: [tile(''), tile(''), tile(''), tile('')],\n },\n },\n {\n $id: generatePresetId(IMAGE_LIST_ITEM_ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Image List Item',\n pluginId: BUNDLE_ID,\n description: 'One more tile to add to an existing image list',\n category: Aglyn.ComponentCategory.MEDIA,\n icon: imageListItemSchema.icon,\n data: tile(''),\n },\n]\n\nexport default ImageListElement\n"],"names":["Aglyn","mdiImageMultiple","mdiImageMultipleOutline","MuiImageList","MuiImageListItem","MuiImageListItemBar","forwardRef","BUNDLE_ID","dropClearedProps","generatePresetId","toCount","IMAGE_LIST_ID","IMAGE_LIST_ITEM_ID","ImageListElement","rawProps","ref","props","cols","gap","rowHeight","variant","children","rest","resolvedVariant","includes","height","displayName","ImageListItemElement","rows","title","subtitle","barPosition","undefined","position","NOT_MASONRY","when","is","notMatch","imageListSchema","$id","pluginId","description","category","ComponentCategory","MEDIA","icon","path","sx","color","restrictChildren","LinealDirectiveFlag","LIMIT_TO","components","attributes","name","label","component","FieldComponentType","SELECT","options","value","TEXT_FIELD","type","condition","imageListItemSchema","tile","caption","componentId","nodes","alt","objectFit","imageListPresets","NodeType","PRESET","data"],"mappings":";;;AAAA;;;;;;;;;;;;;;;CAeC,GAED,YAAYA,WAAW,eAAc;AACrC,SAASC,gBAAgB,EAAEC,uBAAuB,QAAQ,yBAAwB;AAClF,OAAOC,kBAAkB,0BAAyB;AAClD,OAAOC,sBAAsB,8BAA6B;AAC1D,OAAOC,yBAAyB,iCAAgC;A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./components/list-it
96
96
  export declare const listItemText: () => Promise<typeof import("./components/list-item-text")>;
97
97
  export declare const blocks: () => Promise<typeof import("./components/blocks")>;
98
98
  export declare const dataTable: () => Promise<typeof import("./components/data-table")>;
99
- export declare const collection: () => Promise<typeof import("./components/collection")>;
99
+ export declare const collectionEntries: () => Promise<typeof import("./components/collection-entries")>;
100
+ export declare const collectionEntryBody: () => Promise<typeof import("./components/collection-entry-body")>;
101
+ export declare const collectionRelated: () => Promise<typeof import("./components/collection-related")>;
102
+ export declare const collectionShare: () => Promise<typeof import("./components/collection-share")>;
103
+ export declare const collectionEntryMeta: () => Promise<typeof import("./components/collection-entry-meta")>;
104
+ export declare const collectionEntryAuthor: () => Promise<typeof import("./components/collection-entry-author")>;
105
+ export declare const collectionAuthorProfile: () => Promise<typeof import("./components/collection-author-profile")>;
106
+ export declare const collectionCategories: () => Promise<typeof import("./components/collection-categories")>;
107
+ export declare const collectionSearch: () => Promise<typeof import("./components/collection-search")>;
100
108
  export declare const video: () => Promise<typeof import("./components/video")>;
101
109
  export declare const languageSwitcher: () => Promise<typeof import("./components/language-switcher")>;
102
110
  export declare const reusableInstance: () => Promise<typeof import("./components/reusable-instance")>;
@@ -93,7 +93,18 @@ export const listItem = ()=>import("./components/list-item.js");
93
93
  export const listItemText = ()=>import("./components/list-item-text.js");
94
94
  export const blocks = ()=>import("./components/blocks.js");
95
95
  export const dataTable = ()=>import("./components/data-table.js");
96
- export const collection = ()=>import("./components/collection.js");
96
+ // The collection family is one module per element (AGL-3401): a page placing
97
+ // an entries list does not download the entry body's markdown renderer, the
98
+ // author cards' platform marks or the search box.
99
+ export const collectionEntries = ()=>import("./components/collection-entries.js");
100
+ export const collectionEntryBody = ()=>import("./components/collection-entry-body.js");
101
+ export const collectionRelated = ()=>import("./components/collection-related.js");
102
+ export const collectionShare = ()=>import("./components/collection-share.js");
103
+ export const collectionEntryMeta = ()=>import("./components/collection-entry-meta.js");
104
+ export const collectionEntryAuthor = ()=>import("./components/collection-entry-author.js");
105
+ export const collectionAuthorProfile = ()=>import("./components/collection-author-profile.js");
106
+ export const collectionCategories = ()=>import("./components/collection-categories.js");
107
+ export const collectionSearch = ()=>import("./components/collection-search.js");
97
108
  export const video = ()=>import("./components/video.js");
98
109
  export const languageSwitcher = ()=>import("./components/language-switcher.js");
99
110
  export const reusableInstance = ()=>import("./components/reusable-instance.js");
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../libs/plugins/mui/src/lib/element-tier.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 */\nimport * as appBar from './components/app-bar'\nimport * as toolbar from './components/toolbar'\nimport * as layoutSlot from './components/layout-slot'\nimport * as documentRoot from './components/document-root'\nimport * as section from './components/section'\nimport * as container from './components/container'\nimport * as box from './components/box'\nimport * as stack from './components/stack'\nimport * as grid from './components/grid'\nimport * as paper from './components/paper'\nimport * as typography from './components/typography'\nimport * as inlineText from './components/inline-text'\nimport * as button from './components/button'\nimport * as screenLink from './components/screen-link'\nimport * as linkBox from './components/link-box'\nimport * as image from './components/image'\nimport * as icon from './components/icon'\n\n/**\n * The element tier: how a page's mui elements reach it (AGL-3401).\n *\n * `plugin.ts` imports this module lazily, and every element module is reached\n * through it — the common ones as part of it, the rest by an `import()` written\n * HERE. Where that `import()` is written is the whole point.\n *\n * ## Why not sixty sibling imports\n *\n * Each `import()` is a chunk group, and Turbopack gives each group every\n * module it needs that its PARENT group has not already loaded. Sixty element\n * imports written side by side in `plugin.ts` were sixty siblings: none of\n * them could count on another having loaded `@mui/material/Button`, so the\n * chunker merged a copy of Button, ButtonBase and its ripple, SvgIcon, Paper,\n * Stack, the link helpers and the field presets into group after group. On a\n * production aglyn.com build 30% of the module code a page downloaded was a\n * second-or-later copy (Button eight times, SvgIcon fifteen).\n *\n * No chunking switch fixes that without trading it for requests: turning the\n * merge off removed the copies and cost a page 280 files, which compress\n * worse than the bytes they saved (measured in AGL-3401).\n *\n * ## What this module does instead\n *\n * `CORE_ELEMENTS` are the elements nearly every page places — its frame, its\n * layout, its text, its links, buttons and images. They load together as one\n * chunk, and so do the MUI modules they share. Every other element's\n * `import()` is written below, which makes its group a CHILD of this one:\n * whatever this chunk carries is available to it, so none of it is copied.\n *\n * The price is on either side of that line. A page that places none of the\n * core elements but the frame still downloads them (a six-element page paid\n * 3.7 KB more), and an element outside the core arrives one request later,\n * after this chunk. Moving an element into the core is right when most pages\n * place it; `check:tenant-wire-weight`'s duplication measure is what says\n * whether the copies are coming back.\n *\n * Each core element is held as a module namespace, because the registry reads\n * a component, its schema and its presets off it by export name.\n */\n\nexport const CORE_ELEMENTS = {\n appBar,\n toolbar,\n layoutSlot,\n documentRoot,\n section,\n container,\n box,\n stack,\n grid,\n paper,\n typography,\n inlineText,\n button,\n screenLink,\n linkBox,\n image,\n icon,\n}\n\n/** The elements a page places less often, each loaded when it is placed. */\nexport const list = () => import('./components/list')\nexport const listItem = () => import('./components/list-item')\nexport const listItemText = () => import('./components/list-item-text')\nexport const blocks = () => import('./components/blocks')\nexport const dataTable = () => import('./components/data-table')\nexport const collection = () => import('./components/collection')\nexport const video = () => import('./components/video')\nexport const languageSwitcher = () => import('./components/language-switcher')\nexport const reusableInstance = () => import('./components/reusable-instance')\nexport const navMenu = () => import('./components/nav-menu')\nexport const drawer = () => import('./components/drawer')\nexport const functionWidget = () => import('./components/function-widget')\nexport const functionScope = () => import('./components/function-scope')\nexport const product = () => import('./components/product')\nexport const plugin = () => import('./components/plugin')\nexport const customHtml = () => import('./components/custom-html')\nexport const searchBox = () => import('./components/search-box')\nexport const markdown = () => import('./components/markdown')\nexport const card = () => import('./components/card')\nexport const accordion = () => import('./components/accordion')\nexport const tabs = () => import('./components/tabs')\nexport const imageList = () => import('./components/image-list')\nexport const pagination = () => import('./components/pagination')\nexport const breadcrumbs = () => import('./components/breadcrumbs')\nexport const themeModeSwitcher = () =>\n import('./components/theme-mode-switcher')\n"],"names":["appBar","toolbar","layoutSlot","documentRoot","section","container","box","stack","grid","paper","typography","inlineText","button","screenLink","linkBox","image","icon","CORE_ELEMENTS","list","listItem","listItemText","blocks","dataTable","collection","video","languageSwitcher","reusableInstance","navMenu","drawer","functionWidget","functionScope","product","plugin","customHtml","searchBox","markdown","card","accordion","tabs","imageList","pagination","breadcrumbs","themeModeSwitcher"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD,YAAYA,YAAY,0BAAsB;AAC9C,YAAYC,aAAa,0BAAsB;AAC/C,YAAYC,gBAAgB,8BAA0B;AACtD,YAAYC,kBAAkB,gCAA4B;AAC1D,YAAYC,aAAa,0BAAsB;AAC/C,YAAYC,eAAe,4BAAwB;AACnD,YAAYC,SAAS,sBAAkB;AACvC,YAAYC,WAAW,wBAAoB;AAC3C,YAAYC,UAAU,uBAAmB;AACzC,YAAYC,WAAW,wBAAoB;AAC3C,YAAYC,gBAAgB,6BAAyB;AACrD,YAAYC,gBAAgB,8BAA0B;AACtD,YAAYC,YAAY,yBAAqB;AAC7C,YAAYC,gBAAgB,8BAA0B;AACtD,YAAYC,aAAa,2BAAuB;AAChD,YAAYC,WAAW,wBAAoB;AAC3C,YAAYC,UAAU,uBAAmB;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCC,GAED,OAAO,MAAMC,gBAAgB;IAC3BjB;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;AACF,EAAC;AAED,0EAA0E,GAC1E,OAAO,MAAME,OAAO,IAAM,MAAM,CAAC,wBAAoB;AACrD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,IAC/B,MAAM,CAAC,uCAAmC"}
1
+ {"version":3,"sources":["../../../../../../libs/plugins/mui/src/lib/element-tier.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 */\nimport * as appBar from './components/app-bar'\nimport * as toolbar from './components/toolbar'\nimport * as layoutSlot from './components/layout-slot'\nimport * as documentRoot from './components/document-root'\nimport * as section from './components/section'\nimport * as container from './components/container'\nimport * as box from './components/box'\nimport * as stack from './components/stack'\nimport * as grid from './components/grid'\nimport * as paper from './components/paper'\nimport * as typography from './components/typography'\nimport * as inlineText from './components/inline-text'\nimport * as button from './components/button'\nimport * as screenLink from './components/screen-link'\nimport * as linkBox from './components/link-box'\nimport * as image from './components/image'\nimport * as icon from './components/icon'\n\n/**\n * The element tier: how a page's mui elements reach it (AGL-3401).\n *\n * `plugin.ts` imports this module lazily, and every element module is reached\n * through it — the common ones as part of it, the rest by an `import()` written\n * HERE. Where that `import()` is written is the whole point.\n *\n * ## Why not sixty sibling imports\n *\n * Each `import()` is a chunk group, and Turbopack gives each group every\n * module it needs that its PARENT group has not already loaded. Sixty element\n * imports written side by side in `plugin.ts` were sixty siblings: none of\n * them could count on another having loaded `@mui/material/Button`, so the\n * chunker merged a copy of Button, ButtonBase and its ripple, SvgIcon, Paper,\n * Stack, the link helpers and the field presets into group after group. On a\n * production aglyn.com build 30% of the module code a page downloaded was a\n * second-or-later copy (Button eight times, SvgIcon fifteen).\n *\n * No chunking switch fixes that without trading it for requests: turning the\n * merge off removed the copies and cost a page 280 files, which compress\n * worse than the bytes they saved (measured in AGL-3401).\n *\n * ## What this module does instead\n *\n * `CORE_ELEMENTS` are the elements nearly every page places — its frame, its\n * layout, its text, its links, buttons and images. They load together as one\n * chunk, and so do the MUI modules they share. Every other element's\n * `import()` is written below, which makes its group a CHILD of this one:\n * whatever this chunk carries is available to it, so none of it is copied.\n *\n * The price is on either side of that line. A page that places none of the\n * core elements but the frame still downloads them (a six-element page paid\n * 3.7 KB more), and an element outside the core arrives one request later,\n * after this chunk. Moving an element into the core is right when most pages\n * place it; `check:tenant-wire-weight`'s duplication measure is what says\n * whether the copies are coming back.\n *\n * Each core element is held as a module namespace, because the registry reads\n * a component, its schema and its presets off it by export name.\n */\n\nexport const CORE_ELEMENTS = {\n appBar,\n toolbar,\n layoutSlot,\n documentRoot,\n section,\n container,\n box,\n stack,\n grid,\n paper,\n typography,\n inlineText,\n button,\n screenLink,\n linkBox,\n image,\n icon,\n}\n\n/** The elements a page places less often, each loaded when it is placed. */\nexport const list = () => import('./components/list')\nexport const listItem = () => import('./components/list-item')\nexport const listItemText = () => import('./components/list-item-text')\nexport const blocks = () => import('./components/blocks')\nexport const dataTable = () => import('./components/data-table')\n// The collection family is one module per element (AGL-3401): a page placing\n// an entries list does not download the entry body's markdown renderer, the\n// author cards' platform marks or the search box.\nexport const collectionEntries = () => import('./components/collection-entries')\nexport const collectionEntryBody = () =>\n import('./components/collection-entry-body')\nexport const collectionRelated = () => import('./components/collection-related')\nexport const collectionShare = () => import('./components/collection-share')\nexport const collectionEntryMeta = () =>\n import('./components/collection-entry-meta')\nexport const collectionEntryAuthor = () =>\n import('./components/collection-entry-author')\nexport const collectionAuthorProfile = () =>\n import('./components/collection-author-profile')\nexport const collectionCategories = () =>\n import('./components/collection-categories')\nexport const collectionSearch = () => import('./components/collection-search')\nexport const video = () => import('./components/video')\nexport const languageSwitcher = () => import('./components/language-switcher')\nexport const reusableInstance = () => import('./components/reusable-instance')\nexport const navMenu = () => import('./components/nav-menu')\nexport const drawer = () => import('./components/drawer')\nexport const functionWidget = () => import('./components/function-widget')\nexport const functionScope = () => import('./components/function-scope')\nexport const product = () => import('./components/product')\nexport const plugin = () => import('./components/plugin')\nexport const customHtml = () => import('./components/custom-html')\nexport const searchBox = () => import('./components/search-box')\nexport const markdown = () => import('./components/markdown')\nexport const card = () => import('./components/card')\nexport const accordion = () => import('./components/accordion')\nexport const tabs = () => import('./components/tabs')\nexport const imageList = () => import('./components/image-list')\nexport const pagination = () => import('./components/pagination')\nexport const breadcrumbs = () => import('./components/breadcrumbs')\nexport const themeModeSwitcher = () =>\n import('./components/theme-mode-switcher')\n"],"names":["appBar","toolbar","layoutSlot","documentRoot","section","container","box","stack","grid","paper","typography","inlineText","button","screenLink","linkBox","image","icon","CORE_ELEMENTS","list","listItem","listItemText","blocks","dataTable","collectionEntries","collectionEntryBody","collectionRelated","collectionShare","collectionEntryMeta","collectionEntryAuthor","collectionAuthorProfile","collectionCategories","collectionSearch","video","languageSwitcher","reusableInstance","navMenu","drawer","functionWidget","functionScope","product","plugin","customHtml","searchBox","markdown","card","accordion","tabs","imageList","pagination","breadcrumbs","themeModeSwitcher"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD,YAAYA,YAAY,0BAAsB;AAC9C,YAAYC,aAAa,0BAAsB;AAC/C,YAAYC,gBAAgB,8BAA0B;AACtD,YAAYC,kBAAkB,gCAA4B;AAC1D,YAAYC,aAAa,0BAAsB;AAC/C,YAAYC,eAAe,4BAAwB;AACnD,YAAYC,SAAS,sBAAkB;AACvC,YAAYC,WAAW,wBAAoB;AAC3C,YAAYC,UAAU,uBAAmB;AACzC,YAAYC,WAAW,wBAAoB;AAC3C,YAAYC,gBAAgB,6BAAyB;AACrD,YAAYC,gBAAgB,8BAA0B;AACtD,YAAYC,YAAY,yBAAqB;AAC7C,YAAYC,gBAAgB,8BAA0B;AACtD,YAAYC,aAAa,2BAAuB;AAChD,YAAYC,WAAW,wBAAoB;AAC3C,YAAYC,UAAU,uBAAmB;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC,0BAAsB;AACzD,OAAO,MAAMC,iBAAiB,IAAM,MAAM,CAAC,mCAA+B;AAC1E,OAAO,MAAMC,gBAAgB,IAAM,MAAM,CAAC,kCAA8B;AACxE,OAAO,MAAMC,UAAU,IAAM,MAAM,CAAC,2BAAuB;AAC3D,OAAO,MAAMC,SAAS,IAAM,MAAM,CAAC,0BAAsB;AACzD,OAAO,MAAMC,aAAa,IAAM,MAAM,CAAC,+BAA2B;AAClE,OAAO,MAAMC,YAAY,IAAM,MAAM,CAAC,8BAA0B;AAChE,OAAO,MAAMC,WAAW,IAAM,MAAM,CAAC,4BAAwB;AAC7D,OAAO,MAAMC,OAAO,IAAM,MAAM,CAAC,wBAAoB;AACrD,OAAO,MAAMC,YAAY,IAAM,MAAM,CAAC,6BAAyB;AAC/D,OAAO,MAAMC,OAAO,IAAM,MAAM,CAAC,wBAAoB;AACrD,OAAO,MAAMC,YAAY,IAAM,MAAM,CAAC,8BAA0B;AAChE,OAAO,MAAMC,aAAa,IAAM,MAAM,CAAC,8BAA0B;AACjE,OAAO,MAAMC,cAAc,IAAM,MAAM,CAAC,+BAA2B;AACnE,OAAO,MAAMC,oBAAoB,IAC/B,MAAM,CAAC,uCAAmC"}
package/src/lib/plugin.js CHANGED
@@ -52,7 +52,15 @@ const listItem = viaTier('listItem');
52
52
  const listItemText = viaTier('listItemText');
53
53
  const blocks = viaTier('blocks');
54
54
  const dataTable = viaTier('dataTable');
55
- const collection = viaTier('collection');
55
+ const collectionEntries = viaTier('collectionEntries');
56
+ const collectionEntryBody = viaTier('collectionEntryBody');
57
+ const collectionRelated = viaTier('collectionRelated');
58
+ const collectionShare = viaTier('collectionShare');
59
+ const collectionEntryMeta = viaTier('collectionEntryMeta');
60
+ const collectionEntryAuthor = viaTier('collectionEntryAuthor');
61
+ const collectionAuthorProfile = viaTier('collectionAuthorProfile');
62
+ const collectionCategories = viaTier('collectionCategories');
63
+ const collectionSearch = viaTier('collectionSearch');
56
64
  const video = viaTier('video');
57
65
  const languageSwitcher = viaTier('languageSwitcher');
58
66
  const reusableInstance = viaTier('reusableInstance');
@@ -171,55 +179,55 @@ const themeModeSwitcher = viaTier('themeModeSwitcher');
171
179
  // Content collections (AGL-551/582): entries repeater, markdown entry
172
180
  // body, related posts, share bar, entry meta.
173
181
  collectionEntries: {
174
- module: collection,
182
+ module: collectionEntries,
175
183
  component: 'CollectionEntries',
176
184
  schema: 'collectionEntriesSchema',
177
185
  presets: 'collectionPresets'
178
186
  },
179
187
  collectionEntryBody: {
180
- module: collection,
188
+ module: collectionEntryBody,
181
189
  component: 'CollectionEntryBody',
182
190
  schema: 'collectionEntryBodySchema'
183
191
  },
184
192
  collectionRelated: {
185
- module: collection,
193
+ module: collectionRelated,
186
194
  component: 'CollectionRelated',
187
195
  schema: 'collectionRelatedSchema'
188
196
  },
189
197
  collectionShare: {
190
- module: collection,
198
+ module: collectionShare,
191
199
  component: 'CollectionShare',
192
200
  schema: 'collectionShareSchema'
193
201
  },
194
202
  collectionEntryMeta: {
195
- module: collection,
203
+ module: collectionEntryMeta,
196
204
  component: 'CollectionEntryMeta',
197
205
  schema: 'collectionEntryMetaSchema'
198
206
  },
199
207
  // The author card that closes an article (AGL-2486): the byline block
200
208
  // prints a name, and the record behind it also has a portrait and a bio.
201
209
  collectionEntryAuthor: {
202
- module: collection,
210
+ module: collectionEntryAuthor,
203
211
  component: 'CollectionEntryAuthor',
204
212
  schema: 'collectionEntryAuthorSchema'
205
213
  },
206
214
  // The subject of an author's own page (AGL-2518): the same person the
207
215
  // card above draws as a footnote, with the role fields it has no room for.
208
216
  contentAuthorProfile: {
209
- module: collection,
217
+ module: collectionAuthorProfile,
210
218
  component: 'ContentAuthorProfile',
211
219
  schema: 'contentAuthorProfileSchema'
212
220
  },
213
221
  // Category pills (AGL-1321): real anchors to /{collection}/category/{slug}.
214
222
  collectionCategories: {
215
- module: collection,
223
+ module: collectionCategories,
216
224
  component: 'CollectionCategories',
217
225
  schema: 'collectionCategoriesSchema'
218
226
  },
219
227
  // The toolbar search box (AGL-1516): the entries block's own field cannot
220
228
  // leave it, so the frame's pills-left / search-right row needs a block.
221
229
  collectionSearch: {
222
- module: collection,
230
+ module: collectionSearch,
223
231
  component: 'CollectionSearch',
224
232
  schema: 'collectionSearchSchema'
225
233
  },
@@ -489,8 +497,8 @@ const themeModeSwitcher = viaTier('themeModeSwitcher');
489
497
  * element, not a reason to register a blank.
490
498
  */ export async function loadMuiBundle(componentIds) {
491
499
  const ids = (componentIds != null ? componentIds : Object.keys(MUI_COMPONENT_SOURCES)).filter((id)=>id in MUI_COMPONENT_SOURCES);
492
- // Keyed on the THUNK, so `collection.tsx` is imported once for the eight
493
- // ids that name it rather than eight times.
500
+ // Keyed on the THUNK, so a module that exports several elements is
501
+ // imported once for all the ids that name it rather than once per id.
494
502
  const pending = new Map();
495
503
  const modules = await Promise.all(ids.map((id)=>{
496
504
  const source = MUI_COMPONENT_SOURCES[id];
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../libs/plugins/mui/src/lib/plugin.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 {\n registerPluginInstallPresetMapper,\n registerPluginInstallPresetsMapper,\n} from '@aglyn/aglyn'\nimport {\n muiPluginInstallToPreset,\n muiPluginInstallToPresets,\n} from './components/plugin-install-presets'\nimport * as Aglyn from '@aglyn/aglyn'\nimport { runInAction } from 'mobx'\nimport { BUNDLE_ID } from './constants/bundle-common'\n\n/**\n * One thunk per component module, named here because several ids share one:\n * `collection.tsx` alone exports eight elements, and a module is imported\n * once however many of its components a surface asks for.\n *\n * Every thunk goes through the element tier (AGL-3401). The common elements\n * are part of it; the rest are `import()`s written inside it, so they can\n * rely on what it loaded instead of each carrying a copy. `element-tier.ts`\n * has the reasoning, and which elements are which.\n */\ntype ElementTier = typeof import('./element-tier')\ntype TierElement = keyof ElementTier['CORE_ELEMENTS']\ntype LazyElement = Exclude<keyof ElementTier, 'CORE_ELEMENTS'>\n\ntype ElementModule = Promise<Record<string, unknown>>\n\n/**\n * One load of the tier, however many thunks ask at once. The bundler shares\n * a module across concurrent imports anyway; a loader that hands out a\n * module while it is still evaluating does not — jiti, which the AI palette\n * and page-axe generators load this bundle through, resolved the second of\n * sixty concurrent imports to the tier's exports before `CORE_ELEMENTS` was\n * assigned.\n */\nlet tierLoad: Promise<ElementTier> | undefined\nconst elementTier = (): Promise<ElementTier> =>\n (tierLoad ??= import('./element-tier'))\nconst inTier =\n (name: TierElement): MuiComponentSource['module'] =>\n () =>\n elementTier().then(\n (tier): Record<string, unknown> => tier.CORE_ELEMENTS[name],\n )\nconst viaTier =\n (name: LazyElement): MuiComponentSource['module'] =>\n () =>\n elementTier().then((tier): ElementModule => tier[name]())\n\nconst appBar = inTier('appBar')\nconst toolbar = inTier('toolbar')\nconst layoutSlot = inTier('layoutSlot')\nconst documentRoot = inTier('documentRoot')\nconst section = inTier('section')\nconst container = inTier('container')\nconst box = inTier('box')\nconst stack = inTier('stack')\nconst grid = inTier('grid')\nconst paper = inTier('paper')\nconst typography = inTier('typography')\nconst inlineText = inTier('inlineText')\nconst button = inTier('button')\nconst screenLink = inTier('screenLink')\nconst linkBox = inTier('linkBox')\nconst image = inTier('image')\nconst icon = inTier('icon')\n\nconst list = viaTier('list')\nconst listItem = viaTier('listItem')\nconst listItemText = viaTier('listItemText')\nconst blocks = viaTier('blocks')\nconst dataTable = viaTier('dataTable')\nconst collection = viaTier('collection')\nconst video = viaTier('video')\nconst languageSwitcher = viaTier('languageSwitcher')\nconst reusableInstance = viaTier('reusableInstance')\nconst navMenu = viaTier('navMenu')\nconst drawer = viaTier('drawer')\nconst functionWidget = viaTier('functionWidget')\nconst functionScope = viaTier('functionScope')\nconst product = viaTier('product')\nconst plugin = viaTier('plugin')\nconst customHtml = viaTier('customHtml')\nconst searchBox = viaTier('searchBox')\nconst markdown = viaTier('markdown')\nconst card = viaTier('card')\nconst accordion = viaTier('accordion')\nconst tabs = viaTier('tabs')\nconst imageList = viaTier('imageList')\nconst pagination = viaTier('pagination')\nconst breadcrumbs = viaTier('breadcrumbs')\nconst themeModeSwitcher = viaTier('themeModeSwitcher')\n\n/** One entry of the bundle: what the registry is handed for a component. */\nexport interface MuiBundleEntry {\n component: any\n schema: Aglyn.ComponentSchema<any>\n presets?: Aglyn.PresetSchema[]\n}\n\n/**\n * Where a component id's code lives, and what it is called there (AGL-3141).\n *\n * An id names a module AND an export on it, never a module alone: several\n * modules export more than one element, and the registry needs the component,\n * its schema and — for the element that carries them — its presets by name.\n */\nexport interface MuiComponentSource {\n /** The module, as a thunk, so the bundler gives it a chunk of its own. */\n module: () => Promise<Record<string, unknown>>\n /** The component's export name on that module. */\n component: string\n /** Its schema's export name. */\n schema: string\n /** The export carrying its presets, for the element that ships them. */\n presets?: string\n}\n\n/**\n * Every component this bundle can register (AGL-140, AGL-3141).\n *\n * One entry per component keeps register/unregister symmetric — the old\n * hand-maintained lists had drifted, and several components were never\n * unregistered on destroy. It replaces a single array built from sixty static\n * imports, which put every element on every published page while the page\n * rendered about nineteen of them.\n *\n * Exported so the bundle is assertable (AGL-1201): duplicate component or\n * preset ids collapse silently inside the registry's keyed records, so they\n * can only be caught before registration.\n */\nexport const MUI_COMPONENT_SOURCES: Readonly<\n Record<string, MuiComponentSource>\n> = {\n muiAppBar: {\n module: appBar,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiToolbar: {\n module: toolbar,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiTypography: {\n module: typography,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // The inline text run (AGL-1235): Typography is `textEditable` and so a\n // leaf, which left no way to emphasize a phrase inside a sentence — every\n // statement rendered as one flat color.\n muiInlineText: {\n module: inlineText,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiButton: {\n module: button,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiContainer: {\n module: container,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n layoutSlot: {\n module: layoutSlot,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiList: {\n module: list,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiListItem: {\n module: listItem,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiListItemText: {\n module: listItemText,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // form, formField moved to @aglyn/plugins-forms (AGL-395).\n videoEmbed: {\n module: blocks,\n component: 'VideoEmbed',\n schema: 'videoEmbedSchema',\n presets: 'blockPresets',\n },\n socialLinks: {\n module: blocks,\n component: 'SocialLinks',\n schema: 'socialLinksSchema',\n },\n // A real data grid (AGL-2543): the feature matrix a comparison page is\n // built around, which the palette had no element for at all.\n dataTable: {\n module: dataTable,\n component: 'default',\n schema: 'dataTableSchema',\n presets: 'dataTablePresets',\n },\n // Content collections (AGL-551/582): entries repeater, markdown entry\n // body, related posts, share bar, entry meta.\n collectionEntries: {\n module: collection,\n component: 'CollectionEntries',\n schema: 'collectionEntriesSchema',\n presets: 'collectionPresets',\n },\n collectionEntryBody: {\n module: collection,\n component: 'CollectionEntryBody',\n schema: 'collectionEntryBodySchema',\n },\n collectionRelated: {\n module: collection,\n component: 'CollectionRelated',\n schema: 'collectionRelatedSchema',\n },\n collectionShare: {\n module: collection,\n component: 'CollectionShare',\n schema: 'collectionShareSchema',\n },\n collectionEntryMeta: {\n module: collection,\n component: 'CollectionEntryMeta',\n schema: 'collectionEntryMetaSchema',\n },\n // The author card that closes an article (AGL-2486): the byline block\n // prints a name, and the record behind it also has a portrait and a bio.\n collectionEntryAuthor: {\n module: collection,\n component: 'CollectionEntryAuthor',\n schema: 'collectionEntryAuthorSchema',\n },\n // The subject of an author's own page (AGL-2518): the same person the\n // card above draws as a footnote, with the role fields it has no room for.\n contentAuthorProfile: {\n module: collection,\n component: 'ContentAuthorProfile',\n schema: 'contentAuthorProfileSchema',\n },\n // Category pills (AGL-1321): real anchors to /{collection}/category/{slug}.\n collectionCategories: {\n module: collection,\n component: 'CollectionCategories',\n schema: 'collectionCategoriesSchema',\n },\n // The toolbar search box (AGL-1516): the entries block's own field cannot\n // leave it, so the frame's pills-left / search-right row needs a block.\n collectionSearch: {\n module: collection,\n component: 'CollectionSearch',\n schema: 'collectionSearchSchema',\n },\n image: {\n module: image,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n video: {\n module: video,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n icon: {\n module: icon,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // booking moved to @aglyn/plugins-bookings (AGL-395).\n // eventList moved to @aglyn/plugins-events-calendar (AGL-313).\n languageSwitcher: {\n module: languageSwitcher,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n reusableInstance: {\n module: reusableInstance,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiScreenLink: {\n module: screenLink,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // The linking container (AGL-1231): every other link element is a leaf,\n // so a tile whose icon and description also belong to the target had no\n // way to be authored.\n muiLinkBox: {\n module: linkBox,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // Nav menu system (AGL-562): dropdown, mega menu, drawer + menu button.\n muiNavMenu: {\n module: navMenu,\n component: 'default',\n schema: 'navMenuSchema',\n presets: 'navMenuPresets',\n },\n muiMegaMenu: {\n module: navMenu,\n component: 'MegaMenu',\n schema: 'megaMenuSchema',\n },\n muiDrawer: {\n module: drawer,\n component: 'default',\n schema: 'drawerSchema',\n presets: 'drawerPresets',\n },\n muiDrawerToggle: {\n module: drawer,\n component: 'DrawerToggle',\n schema: 'drawerToggleSchema',\n },\n functionWidget: {\n module: functionWidget,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n functionScope: {\n module: functionScope,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n functionInput: {\n module: functionScope,\n component: 'FunctionInput',\n schema: 'functionInputSchema',\n presets: 'functionInputPresets',\n },\n functionOutput: {\n module: functionScope,\n component: 'FunctionOutput',\n schema: 'functionOutputSchema',\n presets: 'functionOutputPresets',\n },\n functionShow: {\n module: functionScope,\n component: 'FunctionShow',\n schema: 'functionShowSchema',\n presets: 'functionShowPresets',\n },\n product: {\n module: product,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n marketplacePlugin: {\n module: plugin,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n 'custom-html': {\n module: customHtml,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n searchBox: {\n module: searchBox,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // Long-form documents (AGL-1162): one markdown element carrying the whole\n // page, and an \"On this page\" aside derived from its headings.\n markdown: {\n module: markdown,\n component: 'Markdown',\n schema: 'markdownSchema',\n presets: 'markdownPresets',\n },\n tableOfContents: {\n module: markdown,\n component: 'TableOfContents',\n schema: 'tableOfContentsSchema',\n },\n section: {\n module: section,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiStack: {\n module: stack,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // Layout & surface primitives (AGL-1201).\n muiBox: {\n module: box,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // The canvas ROOT (AGL-2486): registered so the Document layer has a\n // schema — an element picker — instead of falling through to the\n // renderer's unstyled div. No preset: it is not an element anybody drops.\n div: {\n module: documentRoot,\n component: 'default',\n schema: 'schema',\n },\n muiGrid: {\n module: grid,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiPaper: {\n module: paper,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiCard: {\n module: card,\n component: 'default',\n schema: 'cardSchema',\n presets: 'cardPresets',\n },\n muiCardHeader: {\n module: card,\n component: 'CardHeaderElement',\n schema: 'cardHeaderSchema',\n },\n muiCardContent: {\n module: card,\n component: 'CardContentElement',\n schema: 'cardContentSchema',\n },\n muiCardActions: {\n module: card,\n component: 'CardActionsElement',\n schema: 'cardActionsSchema',\n },\n muiAccordion: {\n module: accordion,\n component: 'default',\n schema: 'accordionSchema',\n presets: 'accordionPresets',\n },\n muiAccordionSummary: {\n module: accordion,\n component: 'AccordionSummaryElement',\n schema: 'accordionSummarySchema',\n },\n muiAccordionDetails: {\n module: accordion,\n component: 'AccordionDetailsElement',\n schema: 'accordionDetailsSchema',\n },\n muiTabs: {\n module: tabs,\n component: 'default',\n schema: 'tabsSchema',\n presets: 'tabsPresets',\n },\n muiTabPanel: {\n module: tabs,\n component: 'TabPanelElement',\n schema: 'tabPanelSchema',\n },\n muiImageList: {\n module: imageList,\n component: 'default',\n schema: 'imageListSchema',\n presets: 'imageListPresets',\n },\n muiImageListItem: {\n module: imageList,\n component: 'ImageListItemElement',\n schema: 'imageListItemSchema',\n },\n muiPagination: {\n module: pagination,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiBreadcrumbs: {\n module: breadcrumbs,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n themeModeSwitcher: {\n module: themeModeSwitcher,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n}\n\n/**\n * The bundle entries for `componentIds` — every component when none are\n * named, which is what the console and the besigner ask for because their\n * palette shows every element.\n *\n * Both paths go through the same map, so there is one statement of where a\n * component comes from. An id the map does not know is dropped rather than\n * resolved to an undefined component: a page whose document carries an\n * element this bundle does not own is a document for another plugin's\n * element, not a reason to register a blank.\n */\nexport async function loadMuiBundle(\n componentIds?: readonly string[],\n): Promise<MuiBundleEntry[]> {\n const ids = (componentIds ?? Object.keys(MUI_COMPONENT_SOURCES)).filter(\n (id) => id in MUI_COMPONENT_SOURCES,\n )\n // Keyed on the THUNK, so `collection.tsx` is imported once for the eight\n // ids that name it rather than eight times.\n const pending = new Map<\n MuiComponentSource['module'],\n Promise<Record<string, unknown>>\n >()\n const modules = await Promise.all(\n ids.map((id) => {\n const source = MUI_COMPONENT_SOURCES[id] as MuiComponentSource\n let load = pending.get(source.module)\n if (!load) {\n load = source.module()\n pending.set(source.module, load)\n }\n return load\n }),\n )\n return ids.map((id, index) => {\n const source = MUI_COMPONENT_SOURCES[id] as MuiComponentSource\n const mod = modules[index] as Record<string, unknown>\n return {\n component: mod[source.component],\n schema: mod[source.schema] as Aglyn.ComponentSchema<any>,\n ...(source.presets\n ? { presets: mod[source.presets] as Aglyn.PresetSchema[] }\n : {}),\n }\n })\n}\n\n/**\n * Every component registered so far, by id.\n *\n * A second page places elements the first did not, and reaches this bundle\n * again with them; the map is what tells the two apart, and what `load` and\n * `destroy` read so a reload registers everything asked for so far and\n * unregistration stays symmetric with registration.\n */\nconst registeredById = new Map<string, MuiBundleEntry>()\n\nfunction registerEntries(entries: readonly MuiBundleEntry[]): void {\n // One mobx transaction (AGL-371): a single observer notification\n // for the whole batch instead of one per component/preset.\n runInAction(() => {\n for (const entry of entries) {\n Aglyn.components.registerComponent(entry.component, entry.schema)\n }\n for (const entry of entries) {\n if (entry.presets?.length) {\n Aglyn.components.registerPreset(entry.presets)\n }\n }\n })\n}\n\n/**\n * Registers the core MUI component library with the `@aglyn/aglyn` global\n * plugin registry (`AglynNodeRenderer`, `Aglyn.canvas`, ...). This is the\n * platform's core component bundle; feature bundles (commerce,\n * events-calendar, email) declare a dependency on it.\n *\n * `use.componentIds` narrows it to the elements the surface places\n * (AGL-3116/AGL-3141), so a published page fetches those modules and no\n * others. A caller that names nothing gets the whole library, which is what\n * the console and the besigner need and what any surface that cannot say\n * what it places must be given: an element whose component never registered\n * renders NOTHING, silently (AGL-52).\n */\nexport async function registerMuiPlugin(use?: Aglyn.PluginUse): Promise<void> {\n // Install→preset mapper (AGL-419): the console's drawer registration\n // consumes it through core, never importing this plugin.\n registerPluginInstallPresetMapper(muiPluginInstallToPreset)\n // Declared canvas elements become their own palette entries (AGL-1031).\n registerPluginInstallPresetsMapper(muiPluginInstallToPresets)\n\n const wanted = (use?.componentIds ?? Object.keys(MUI_COMPONENT_SOURCES))\n .filter((id) => id in MUI_COMPONENT_SOURCES)\n .filter((id) => !registeredById.has(id))\n const existing = Aglyn.plugins.getDependency(BUNDLE_ID)\n if (existing && !wanted.length) return\n\n const entries = wanted.length ? await loadMuiBundle(wanted) : []\n for (const entry of entries) {\n registeredById.set(entry.schema.$id as string, entry)\n }\n\n // The dependency is added even when this page places nothing of it: a\n // feature bundle declares mui as a dependency and stays WAITING — its own\n // components never registering — until mui is in the manager.\n //\n // Re-read after the imports rather than trusting the check above: the\n // manager runs `load()` from `addDependency` synchronously, so the first\n // caller to get here creates the dependency and every later one takes the\n // branch that registers what it added into a bundle already LOADED.\n if (Aglyn.plugins.getDependency(BUNDLE_ID)) {\n if (entries.length) registerEntries(entries)\n return\n }\n\n Aglyn.plugins.addDependency({\n $id: BUNDLE_ID,\n displayName: 'Material UI',\n description: 'Material UI elements',\n title: 'Material UI',\n dependencies: {},\n load(): void {\n registerEntries([...registeredById.values()])\n },\n destroy(): void {\n const entries = [...registeredById.values()]\n runInAction(() => {\n for (const entry of entries) {\n if (entry.presets?.length) {\n Aglyn.components.unregisterPreset(\n entry.presets.map((preset) => preset.$id),\n )\n }\n }\n for (const entry of entries) {\n Aglyn.components.unregisterComponent(entry.schema.$id)\n }\n })\n },\n })\n}\n"],"names":["registerPluginInstallPresetMapper","registerPluginInstallPresetsMapper","muiPluginInstallToPreset","muiPluginInstallToPresets","Aglyn","runInAction","BUNDLE_ID","tierLoad","elementTier","inTier","name","then","tier","CORE_ELEMENTS","viaTier","appBar","toolbar","layoutSlot","documentRoot","section","container","box","stack","grid","paper","typography","inlineText","button","screenLink","linkBox","image","icon","list","listItem","listItemText","blocks","dataTable","collection","video","languageSwitcher","reusableInstance","navMenu","drawer","functionWidget","functionScope","product","plugin","customHtml","searchBox","markdown","card","accordion","tabs","imageList","pagination","breadcrumbs","themeModeSwitcher","MUI_COMPONENT_SOURCES","muiAppBar","module","component","schema","presets","muiToolbar","muiTypography","muiInlineText","muiButton","muiContainer","muiList","muiListItem","muiListItemText","videoEmbed","socialLinks","collectionEntries","collectionEntryBody","collectionRelated","collectionShare","collectionEntryMeta","collectionEntryAuthor","contentAuthorProfile","collectionCategories","collectionSearch","muiScreenLink","muiLinkBox","muiNavMenu","muiMegaMenu","muiDrawer","muiDrawerToggle","functionInput","functionOutput","functionShow","marketplacePlugin","tableOfContents","muiStack","muiBox","div","muiGrid","muiPaper","muiCard","muiCardHeader","muiCardContent","muiCardActions","muiAccordion","muiAccordionSummary","muiAccordionDetails","muiTabs","muiTabPanel","muiImageList","muiImageListItem","muiPagination","muiBreadcrumbs","loadMuiBundle","componentIds","ids","Object","keys","filter","id","pending","Map","modules","Promise","all","map","source","load","get","set","index","mod","registeredById","registerEntries","entries","entry","components","registerComponent","length","registerPreset","registerMuiPlugin","use","wanted","has","existing","plugins","getDependency","$id","addDependency","displayName","description","title","dependencies","values","destroy","unregisterPreset","preset","unregisterComponent"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,iCAAiC,EACjCC,kCAAkC,QAC7B,eAAc;AACrB,SACEC,wBAAwB,EACxBC,yBAAyB,QACpB,yCAAqC;AAC5C,YAAYC,WAAW,eAAc;AACrC,SAASC,WAAW,QAAQ,OAAM;AAClC,SAASC,SAAS,QAAQ,+BAA2B;AAkBrD;;;;;;;CAOC,GACD,IAAIC;AACJ,MAAMC,cAAc,IACjBD,mBAAAA,WAAAA,WAAa,MAAM,CAAC;AACvB,MAAME,SACJ,CAACC,OACD,IACEF,cAAcG,IAAI,CAChB,CAACC,OAAkCA,KAAKC,aAAa,CAACH,KAAK;AAEjE,MAAMI,UACJ,CAACJ,OACD,IACEF,c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I,MAAMkI,UAAU,CAACmB,gBAAgB,CAC/BpB,MAAMvE,OAAO,CAAC6D,GAAG,CAAC,CAAC+B,SAAWA,OAAOT,GAAG;oBAE5C;gBACF;gBACA,KAAK,MAAMZ,SAASD,QAAS;oBAC3BhI,MAAMkI,UAAU,CAACqB,mBAAmB,CAACtB,MAAMxE,MAAM,CAACoF,GAAG;gBACvD;YACF;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["../../../../../../libs/plugins/mui/src/lib/plugin.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 {\n registerPluginInstallPresetMapper,\n registerPluginInstallPresetsMapper,\n} from '@aglyn/aglyn'\nimport {\n muiPluginInstallToPreset,\n muiPluginInstallToPresets,\n} from './components/plugin-install-presets'\nimport * as Aglyn from '@aglyn/aglyn'\nimport { runInAction } from 'mobx'\nimport { BUNDLE_ID } from './constants/bundle-common'\n\n/**\n * One thunk per component module, named here because several ids share one:\n * `card.tsx` and `accordion.tsx` each export several elements, and a module is\n * imported once however many of its components a surface asks for.\n *\n * Every thunk goes through the element tier (AGL-3401). The common elements\n * are part of it; the rest are `import()`s written inside it, so they can\n * rely on what it loaded instead of each carrying a copy. `element-tier.ts`\n * has the reasoning, and which elements are which.\n */\ntype ElementTier = typeof import('./element-tier')\ntype TierElement = keyof ElementTier['CORE_ELEMENTS']\ntype LazyElement = Exclude<keyof ElementTier, 'CORE_ELEMENTS'>\n\ntype ElementModule = Promise<Record<string, unknown>>\n\n/**\n * One load of the tier, however many thunks ask at once. The bundler shares\n * a module across concurrent imports anyway; a loader that hands out a\n * module while it is still evaluating does not — jiti, which the AI palette\n * and page-axe generators load this bundle through, resolved the second of\n * sixty concurrent imports to the tier's exports before `CORE_ELEMENTS` was\n * assigned.\n */\nlet tierLoad: Promise<ElementTier> | undefined\nconst elementTier = (): Promise<ElementTier> =>\n (tierLoad ??= import('./element-tier'))\nconst inTier =\n (name: TierElement): MuiComponentSource['module'] =>\n () =>\n elementTier().then(\n (tier): Record<string, unknown> => tier.CORE_ELEMENTS[name],\n )\nconst viaTier =\n (name: LazyElement): MuiComponentSource['module'] =>\n () =>\n elementTier().then((tier): ElementModule => tier[name]())\n\nconst appBar = inTier('appBar')\nconst toolbar = inTier('toolbar')\nconst layoutSlot = inTier('layoutSlot')\nconst documentRoot = inTier('documentRoot')\nconst section = inTier('section')\nconst container = inTier('container')\nconst box = inTier('box')\nconst stack = inTier('stack')\nconst grid = inTier('grid')\nconst paper = inTier('paper')\nconst typography = inTier('typography')\nconst inlineText = inTier('inlineText')\nconst button = inTier('button')\nconst screenLink = inTier('screenLink')\nconst linkBox = inTier('linkBox')\nconst image = inTier('image')\nconst icon = inTier('icon')\n\nconst list = viaTier('list')\nconst listItem = viaTier('listItem')\nconst listItemText = viaTier('listItemText')\nconst blocks = viaTier('blocks')\nconst dataTable = viaTier('dataTable')\nconst collectionEntries = viaTier('collectionEntries')\nconst collectionEntryBody = viaTier('collectionEntryBody')\nconst collectionRelated = viaTier('collectionRelated')\nconst collectionShare = viaTier('collectionShare')\nconst collectionEntryMeta = viaTier('collectionEntryMeta')\nconst collectionEntryAuthor = viaTier('collectionEntryAuthor')\nconst collectionAuthorProfile = viaTier('collectionAuthorProfile')\nconst collectionCategories = viaTier('collectionCategories')\nconst collectionSearch = viaTier('collectionSearch')\nconst video = viaTier('video')\nconst languageSwitcher = viaTier('languageSwitcher')\nconst reusableInstance = viaTier('reusableInstance')\nconst navMenu = viaTier('navMenu')\nconst drawer = viaTier('drawer')\nconst functionWidget = viaTier('functionWidget')\nconst functionScope = viaTier('functionScope')\nconst product = viaTier('product')\nconst plugin = viaTier('plugin')\nconst customHtml = viaTier('customHtml')\nconst searchBox = viaTier('searchBox')\nconst markdown = viaTier('markdown')\nconst card = viaTier('card')\nconst accordion = viaTier('accordion')\nconst tabs = viaTier('tabs')\nconst imageList = viaTier('imageList')\nconst pagination = viaTier('pagination')\nconst breadcrumbs = viaTier('breadcrumbs')\nconst themeModeSwitcher = viaTier('themeModeSwitcher')\n\n/** One entry of the bundle: what the registry is handed for a component. */\nexport interface MuiBundleEntry {\n component: any\n schema: Aglyn.ComponentSchema<any>\n presets?: Aglyn.PresetSchema[]\n}\n\n/**\n * Where a component id's code lives, and what it is called there (AGL-3141).\n *\n * An id names a module AND an export on it, never a module alone: several\n * modules export more than one element, and the registry needs the component,\n * its schema and — for the element that carries them — its presets by name.\n */\nexport interface MuiComponentSource {\n /** The module, as a thunk, so the bundler gives it a chunk of its own. */\n module: () => Promise<Record<string, unknown>>\n /** The component's export name on that module. */\n component: string\n /** Its schema's export name. */\n schema: string\n /** The export carrying its presets, for the element that ships them. */\n presets?: string\n}\n\n/**\n * Every component this bundle can register (AGL-140, AGL-3141).\n *\n * One entry per component keeps register/unregister symmetric — the old\n * hand-maintained lists had drifted, and several components were never\n * unregistered on destroy. It replaces a single array built from sixty static\n * imports, which put every element on every published page while the page\n * rendered about nineteen of them.\n *\n * Exported so the bundle is assertable (AGL-1201): duplicate component or\n * preset ids collapse silently inside the registry's keyed records, so they\n * can only be caught before registration.\n */\nexport const MUI_COMPONENT_SOURCES: Readonly<\n Record<string, MuiComponentSource>\n> = {\n muiAppBar: {\n module: appBar,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiToolbar: {\n module: toolbar,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiTypography: {\n module: typography,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // The inline text run (AGL-1235): Typography is `textEditable` and so a\n // leaf, which left no way to emphasize a phrase inside a sentence — every\n // statement rendered as one flat color.\n muiInlineText: {\n module: inlineText,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiButton: {\n module: button,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiContainer: {\n module: container,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n layoutSlot: {\n module: layoutSlot,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiList: {\n module: list,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiListItem: {\n module: listItem,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiListItemText: {\n module: listItemText,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // form, formField moved to @aglyn/plugins-forms (AGL-395).\n videoEmbed: {\n module: blocks,\n component: 'VideoEmbed',\n schema: 'videoEmbedSchema',\n presets: 'blockPresets',\n },\n socialLinks: {\n module: blocks,\n component: 'SocialLinks',\n schema: 'socialLinksSchema',\n },\n // A real data grid (AGL-2543): the feature matrix a comparison page is\n // built around, which the palette had no element for at all.\n dataTable: {\n module: dataTable,\n component: 'default',\n schema: 'dataTableSchema',\n presets: 'dataTablePresets',\n },\n // Content collections (AGL-551/582): entries repeater, markdown entry\n // body, related posts, share bar, entry meta.\n collectionEntries: {\n module: collectionEntries,\n component: 'CollectionEntries',\n schema: 'collectionEntriesSchema',\n presets: 'collectionPresets',\n },\n collectionEntryBody: {\n module: collectionEntryBody,\n component: 'CollectionEntryBody',\n schema: 'collectionEntryBodySchema',\n },\n collectionRelated: {\n module: collectionRelated,\n component: 'CollectionRelated',\n schema: 'collectionRelatedSchema',\n },\n collectionShare: {\n module: collectionShare,\n component: 'CollectionShare',\n schema: 'collectionShareSchema',\n },\n collectionEntryMeta: {\n module: collectionEntryMeta,\n component: 'CollectionEntryMeta',\n schema: 'collectionEntryMetaSchema',\n },\n // The author card that closes an article (AGL-2486): the byline block\n // prints a name, and the record behind it also has a portrait and a bio.\n collectionEntryAuthor: {\n module: collectionEntryAuthor,\n component: 'CollectionEntryAuthor',\n schema: 'collectionEntryAuthorSchema',\n },\n // The subject of an author's own page (AGL-2518): the same person the\n // card above draws as a footnote, with the role fields it has no room for.\n contentAuthorProfile: {\n module: collectionAuthorProfile,\n component: 'ContentAuthorProfile',\n schema: 'contentAuthorProfileSchema',\n },\n // Category pills (AGL-1321): real anchors to /{collection}/category/{slug}.\n collectionCategories: {\n module: collectionCategories,\n component: 'CollectionCategories',\n schema: 'collectionCategoriesSchema',\n },\n // The toolbar search box (AGL-1516): the entries block's own field cannot\n // leave it, so the frame's pills-left / search-right row needs a block.\n collectionSearch: {\n module: collectionSearch,\n component: 'CollectionSearch',\n schema: 'collectionSearchSchema',\n },\n image: {\n module: image,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n video: {\n module: video,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n icon: {\n module: icon,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // booking moved to @aglyn/plugins-bookings (AGL-395).\n // eventList moved to @aglyn/plugins-events-calendar (AGL-313).\n languageSwitcher: {\n module: languageSwitcher,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n reusableInstance: {\n module: reusableInstance,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiScreenLink: {\n module: screenLink,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // The linking container (AGL-1231): every other link element is a leaf,\n // so a tile whose icon and description also belong to the target had no\n // way to be authored.\n muiLinkBox: {\n module: linkBox,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // Nav menu system (AGL-562): dropdown, mega menu, drawer + menu button.\n muiNavMenu: {\n module: navMenu,\n component: 'default',\n schema: 'navMenuSchema',\n presets: 'navMenuPresets',\n },\n muiMegaMenu: {\n module: navMenu,\n component: 'MegaMenu',\n schema: 'megaMenuSchema',\n },\n muiDrawer: {\n module: drawer,\n component: 'default',\n schema: 'drawerSchema',\n presets: 'drawerPresets',\n },\n muiDrawerToggle: {\n module: drawer,\n component: 'DrawerToggle',\n schema: 'drawerToggleSchema',\n },\n functionWidget: {\n module: functionWidget,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n functionScope: {\n module: functionScope,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n functionInput: {\n module: functionScope,\n component: 'FunctionInput',\n schema: 'functionInputSchema',\n presets: 'functionInputPresets',\n },\n functionOutput: {\n module: functionScope,\n component: 'FunctionOutput',\n schema: 'functionOutputSchema',\n presets: 'functionOutputPresets',\n },\n functionShow: {\n module: functionScope,\n component: 'FunctionShow',\n schema: 'functionShowSchema',\n presets: 'functionShowPresets',\n },\n product: {\n module: product,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n marketplacePlugin: {\n module: plugin,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n 'custom-html': {\n module: customHtml,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n searchBox: {\n module: searchBox,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // Long-form documents (AGL-1162): one markdown element carrying the whole\n // page, and an \"On this page\" aside derived from its headings.\n markdown: {\n module: markdown,\n component: 'Markdown',\n schema: 'markdownSchema',\n presets: 'markdownPresets',\n },\n tableOfContents: {\n module: markdown,\n component: 'TableOfContents',\n schema: 'tableOfContentsSchema',\n },\n section: {\n module: section,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiStack: {\n module: stack,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // Layout & surface primitives (AGL-1201).\n muiBox: {\n module: box,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n // The canvas ROOT (AGL-2486): registered so the Document layer has a\n // schema — an element picker — instead of falling through to the\n // renderer's unstyled div. No preset: it is not an element anybody drops.\n div: {\n module: documentRoot,\n component: 'default',\n schema: 'schema',\n },\n muiGrid: {\n module: grid,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiPaper: {\n module: paper,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiCard: {\n module: card,\n component: 'default',\n schema: 'cardSchema',\n presets: 'cardPresets',\n },\n muiCardHeader: {\n module: card,\n component: 'CardHeaderElement',\n schema: 'cardHeaderSchema',\n },\n muiCardContent: {\n module: card,\n component: 'CardContentElement',\n schema: 'cardContentSchema',\n },\n muiCardActions: {\n module: card,\n component: 'CardActionsElement',\n schema: 'cardActionsSchema',\n },\n muiAccordion: {\n module: accordion,\n component: 'default',\n schema: 'accordionSchema',\n presets: 'accordionPresets',\n },\n muiAccordionSummary: {\n module: accordion,\n component: 'AccordionSummaryElement',\n schema: 'accordionSummarySchema',\n },\n muiAccordionDetails: {\n module: accordion,\n component: 'AccordionDetailsElement',\n schema: 'accordionDetailsSchema',\n },\n muiTabs: {\n module: tabs,\n component: 'default',\n schema: 'tabsSchema',\n presets: 'tabsPresets',\n },\n muiTabPanel: {\n module: tabs,\n component: 'TabPanelElement',\n schema: 'tabPanelSchema',\n },\n muiImageList: {\n module: imageList,\n component: 'default',\n schema: 'imageListSchema',\n presets: 'imageListPresets',\n },\n muiImageListItem: {\n module: imageList,\n component: 'ImageListItemElement',\n schema: 'imageListItemSchema',\n },\n muiPagination: {\n module: pagination,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n muiBreadcrumbs: {\n module: breadcrumbs,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n themeModeSwitcher: {\n module: themeModeSwitcher,\n component: 'default',\n schema: 'schema',\n presets: 'presets',\n },\n}\n\n/**\n * The bundle entries for `componentIds` — every component when none are\n * named, which is what the console and the besigner ask for because their\n * palette shows every element.\n *\n * Both paths go through the same map, so there is one statement of where a\n * component comes from. An id the map does not know is dropped rather than\n * resolved to an undefined component: a page whose document carries an\n * element this bundle does not own is a document for another plugin's\n * element, not a reason to register a blank.\n */\nexport async function loadMuiBundle(\n componentIds?: readonly string[],\n): Promise<MuiBundleEntry[]> {\n const ids = (componentIds ?? Object.keys(MUI_COMPONENT_SOURCES)).filter(\n (id) => id in MUI_COMPONENT_SOURCES,\n )\n // Keyed on the THUNK, so a module that exports several elements is\n // imported once for all the ids that name it rather than once per id.\n const pending = new Map<\n MuiComponentSource['module'],\n Promise<Record<string, unknown>>\n >()\n const modules = await Promise.all(\n ids.map((id) => {\n const source = MUI_COMPONENT_SOURCES[id] as MuiComponentSource\n let load = pending.get(source.module)\n if (!load) {\n load = source.module()\n pending.set(source.module, load)\n }\n return load\n }),\n )\n return ids.map((id, index) => {\n const source = MUI_COMPONENT_SOURCES[id] as MuiComponentSource\n const mod = modules[index] as Record<string, unknown>\n return {\n component: mod[source.component],\n schema: mod[source.schema] as Aglyn.ComponentSchema<any>,\n ...(source.presets\n ? { presets: mod[source.presets] as Aglyn.PresetSchema[] }\n : {}),\n }\n })\n}\n\n/**\n * Every component registered so far, by id.\n *\n * A second page places elements the first did not, and reaches this bundle\n * again with them; the map is what tells the two apart, and what `load` and\n * `destroy` read so a reload registers everything asked for so far and\n * unregistration stays symmetric with registration.\n */\nconst registeredById = new Map<string, MuiBundleEntry>()\n\nfunction registerEntries(entries: readonly MuiBundleEntry[]): void {\n // One mobx transaction (AGL-371): a single observer notification\n // for the whole batch instead of one per component/preset.\n runInAction(() => {\n for (const entry of entries) {\n Aglyn.components.registerComponent(entry.component, entry.schema)\n }\n for (const entry of entries) {\n if (entry.presets?.length) {\n Aglyn.components.registerPreset(entry.presets)\n }\n }\n })\n}\n\n/**\n * Registers the core MUI component library with the `@aglyn/aglyn` global\n * plugin registry (`AglynNodeRenderer`, `Aglyn.canvas`, ...). This is the\n * platform's core component bundle; feature bundles (commerce,\n * events-calendar, email) declare a dependency on it.\n *\n * `use.componentIds` narrows it to the elements the surface places\n * (AGL-3116/AGL-3141), so a published page fetches those modules and no\n * others. A caller that names nothing gets the whole library, which is what\n * the console and the besigner need and what any surface that cannot say\n * what it places must be given: an element whose component never registered\n * renders NOTHING, silently (AGL-52).\n */\nexport async function registerMuiPlugin(use?: Aglyn.PluginUse): Promise<void> {\n // Install→preset mapper (AGL-419): the console's drawer registration\n // consumes it through core, never importing this plugin.\n registerPluginInstallPresetMapper(muiPluginInstallToPreset)\n // Declared canvas elements become their own palette entries (AGL-1031).\n registerPluginInstallPresetsMapper(muiPluginInstallToPresets)\n\n const wanted = (use?.componentIds ?? Object.keys(MUI_COMPONENT_SOURCES))\n .filter((id) => id in MUI_COMPONENT_SOURCES)\n .filter((id) => !registeredById.has(id))\n const existing = Aglyn.plugins.getDependency(BUNDLE_ID)\n if (existing && !wanted.length) return\n\n const entries = wanted.length ? await loadMuiBundle(wanted) : []\n for (const entry of entries) {\n registeredById.set(entry.schema.$id as string, entry)\n }\n\n // The dependency is added even when this page places nothing of it: a\n // feature bundle declares mui as a dependency and stays WAITING — its own\n // components never registering — until mui is in the manager.\n //\n // Re-read after the imports rather than trusting the check above: the\n // manager runs `load()` from `addDependency` synchronously, so the first\n // caller to get here creates the dependency and every later one takes the\n // branch that registers what it added into a bundle already LOADED.\n if (Aglyn.plugins.getDependency(BUNDLE_ID)) {\n if (entries.length) registerEntries(entries)\n return\n }\n\n Aglyn.plugins.addDependency({\n $id: BUNDLE_ID,\n displayName: 'Material UI',\n description: 'Material UI elements',\n title: 'Material UI',\n dependencies: {},\n load(): void {\n registerEntries([...registeredById.values()])\n },\n destroy(): void {\n const entries = [...registeredById.values()]\n runInAction(() => {\n for (const entry of entries) {\n if (entry.presets?.length) {\n Aglyn.components.unregisterPreset(\n entry.presets.map((preset) => preset.$id),\n )\n }\n }\n for (const entry of entries) {\n Aglyn.components.unregisterComponent(entry.schema.$id)\n }\n })\n },\n })\n}\n"],"names":["registerPluginInstallPresetMapper","registerPluginInstallPresetsMapper","muiPluginInstallToPreset","muiPluginInstallToPresets","Aglyn","runInAction","BUNDLE_ID","tierLoad","elementTier","inTier","name","then","tier","CORE_ELEMENTS","viaTier","appBar","toolbar","layoutSlot","documentRoot","section","container","box","stack","grid","paper","typography","inlineText","button","screenLink","linkBox","image","icon","list","listItem","listItemText","blocks","dataTable","collectionEntries","collectionEntryBody","collectionRelated","collectionShare","collectionEntryMeta","collectionEntryAuthor","collectionAuthorProfile","collectionCategories","collectionSearch","video","languageSwitcher","reusableInstance","navMenu","drawer","functionWidget","functionScope","product","plugin","customHtml","searchBox","markdown","card","accordion","tabs","imageList","pagination","breadcrumbs","themeModeSwitcher","MUI_COMPONENT_SOURCES","muiAppBar","module","component","schema","presets","muiToolbar","muiTypography","muiInlineText","muiButton","muiContainer","muiList","muiListItem","muiListItemText","videoEmbed","socialLinks","contentAuthorProfile","muiScreenLink","muiLinkBox","muiNavMenu","muiMegaMenu","muiDrawer","muiDrawerToggle","functionInput","functionOutput","functionShow","marketplacePlugin","tableOfContents","muiStack","muiBox","div","muiGrid","muiPaper","muiCard","muiCardHeader","muiCardContent","muiCardActions","muiAccordion","muiAccordionSummary","muiAccordionDetails","muiTabs","muiTabPanel","muiImageList","muiImageListItem","muiPagination","muiBreadcrumbs","loadMuiBundle","componentIds","ids","Object","keys","filter","id","pending","Map","modules","Promise","all","map","source","load","get","set","index","mod","registeredById","registerEntries","entries","entry","components","registerComponent","length","registerPreset","registerMuiPlugin","use","wanted","has","existing","plugins","getDependency","$id","addDependency","displayName","description","title","dependencies","values","destroy","unregisterPreset","preset","unregisterComponent"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,iCAAiC,EACjCC,kCAAkC,QAC7B,eAAc;AACrB,SACEC,wBAAwB,EACxBC,yBAAyB,QACpB,yCAAqC;AAC5C,YAAYC,WAAW,eAAc;AACrC,SAASC,WAAW,QAAQ,OAAM;AAClC,SAASC,SAAS,QAAQ,+BAA2B;AAkBrD;;;;;;;CAOC,GACD,IAAIC;AACJ,MAAMC,cAAc,IACjBD,mBAAAA,WAAAA,WAAa,MAAM,CAAC;AACvB,MAAME,SACJ,CAACC,OACD,IACEF,cAAcG,IAAI,CAChB,CAACC,OAAkCA,KAAKC,aAAa,CAACH,KAAK;AAEjE,MAAMI,UACJ,CAACJ,OACD,IACEF,cA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C,cAAc,CAAC;QACfzB;YACEM,gBAAgB;mBAAID,eAAeqB,MAAM;aAAG;QAC9C;QACAC;YACE,MAAMpB,UAAU;mBAAIF,eAAeqB,MAAM;aAAG;YAC5ClJ,YAAY;gBACV,KAAK,MAAMgI,SAASD,QAAS;wBACvBC;oBAAJ,KAAIA,iBAAAA,MAAM/D,OAAO,qBAAb+D,eAAeG,MAAM,EAAE;wBACzBpI,MAAMkI,UAAU,CAACmB,gBAAgB,CAC/BpB,MAAM/D,OAAO,CAACqD,GAAG,CAAC,CAAC+B,SAAWA,OAAOT,GAAG;oBAE5C;gBACF;gBACA,KAAK,MAAMZ,SAASD,QAAS;oBAC3BhI,MAAMkI,UAAU,CAACqB,mBAAmB,CAACtB,MAAMhE,MAAM,CAAC4E,GAAG;gBACvD;YACF;QACF;IACF;AACF"}
@@ -0,0 +1,25 @@
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
+ /**
18
+ * Number fields round-trip as strings; MUI's grid math needs numbers.
19
+ *
20
+ * Its own module rather than an export of `image-list.tsx`, where it was
21
+ * written: the collection elements share it, and importing it from there put
22
+ * the whole Image List element into the chunk of every page that placed one
23
+ * of them (AGL-3401).
24
+ */
25
+ export declare function toCount(value: unknown, fallback?: number): number | undefined;
@@ -0,0 +1,30 @@
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
+ * Number fields round-trip as strings; MUI's grid math needs numbers.
18
+ *
19
+ * Its own module rather than an export of `image-list.tsx`, where it was
20
+ * written: the collection elements share it, and importing it from there put
21
+ * the whole Image List element into the chunk of every page that placed one
22
+ * of them (AGL-3401).
23
+ */ export function toCount(value, fallback) {
24
+ if (value == null || value === '') return fallback;
25
+ const parsed = Number(value);
26
+ if (!Number.isFinite(parsed) || parsed < 0) return fallback;
27
+ return Math.round(parsed);
28
+ }
29
+
30
+ //# sourceMappingURL=to-count.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/mui/src/lib/utils/to-count.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\n/**\n * Number fields round-trip as strings; MUI's grid math needs numbers.\n *\n * Its own module rather than an export of `image-list.tsx`, where it was\n * written: the collection elements share it, and importing it from there put\n * the whole Image List element into the chunk of every page that placed one\n * of them (AGL-3401).\n */\nexport function toCount(value: unknown, fallback?: number): number | undefined {\n if (value == null || value === '') return fallback\n const parsed = Number(value)\n if (!Number.isFinite(parsed) || parsed < 0) return fallback\n return Math.round(parsed)\n}\n"],"names":["toCount","value","fallback","parsed","Number","isFinite","Math","round"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;CAOC,GACD,OAAO,SAASA,QAAQC,KAAc,EAAEC,QAAiB;IACvD,IAAID,SAAS,QAAQA,UAAU,IAAI,OAAOC;IAC1C,MAAMC,SAASC,OAAOH;IACtB,IAAI,CAACG,OAAOC,QAAQ,CAACF,WAAWA,SAAS,GAAG,OAAOD;IACnD,OAAOI,KAAKC,KAAK,CAACJ;AACpB"}