@aglyn/plugins-mui 1.0.0-beta.143

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 (177) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +22 -0
  3. package/package.json +47 -0
  4. package/src/index.d.ts +21 -0
  5. package/src/index.js +22 -0
  6. package/src/index.js.map +1 -0
  7. package/src/lib/components/accordion.d.ts +96 -0
  8. package/src/lib/components/accordion.js +392 -0
  9. package/src/lib/components/accordion.js.map +1 -0
  10. package/src/lib/components/app-bar.d.ts +32 -0
  11. package/src/lib/components/app-bar.js +86 -0
  12. package/src/lib/components/app-bar.js.map +1 -0
  13. package/src/lib/components/blocks.d.ts +46 -0
  14. package/src/lib/components/blocks.js +1007 -0
  15. package/src/lib/components/blocks.js.map +1 -0
  16. package/src/lib/components/box.d.ts +47 -0
  17. package/src/lib/components/box.js +125 -0
  18. package/src/lib/components/box.js.map +1 -0
  19. package/src/lib/components/breadcrumbs.d.ts +44 -0
  20. package/src/lib/components/breadcrumbs.js +172 -0
  21. package/src/lib/components/breadcrumbs.js.map +1 -0
  22. package/src/lib/components/button.d.ts +89 -0
  23. package/src/lib/components/button.js +272 -0
  24. package/src/lib/components/button.js.map +1 -0
  25. package/src/lib/components/card.d.ts +61 -0
  26. package/src/lib/components/card.js +336 -0
  27. package/src/lib/components/card.js.map +1 -0
  28. package/src/lib/components/collection.d.ts +514 -0
  29. package/src/lib/components/collection.js +2999 -0
  30. package/src/lib/components/collection.js.map +1 -0
  31. package/src/lib/components/container.d.ts +42 -0
  32. package/src/lib/components/container.js +169 -0
  33. package/src/lib/components/container.js.map +1 -0
  34. package/src/lib/components/custom-html.d.ts +78 -0
  35. package/src/lib/components/custom-html.js +219 -0
  36. package/src/lib/components/custom-html.js.map +1 -0
  37. package/src/lib/components/data-table.d.ts +57 -0
  38. package/src/lib/components/data-table.js +216 -0
  39. package/src/lib/components/data-table.js.map +1 -0
  40. package/src/lib/components/document-root.d.ts +77 -0
  41. package/src/lib/components/document-root.js +118 -0
  42. package/src/lib/components/document-root.js.map +1 -0
  43. package/src/lib/components/drawer.d.ts +93 -0
  44. package/src/lib/components/drawer.js +566 -0
  45. package/src/lib/components/drawer.js.map +1 -0
  46. package/src/lib/components/function-controls.d.ts +66 -0
  47. package/src/lib/components/function-controls.js +207 -0
  48. package/src/lib/components/function-controls.js.map +1 -0
  49. package/src/lib/components/function-scope.d.ts +110 -0
  50. package/src/lib/components/function-scope.js +478 -0
  51. package/src/lib/components/function-scope.js.map +1 -0
  52. package/src/lib/components/function-widget.d.ts +75 -0
  53. package/src/lib/components/function-widget.js +307 -0
  54. package/src/lib/components/function-widget.js.map +1 -0
  55. package/src/lib/components/grid.d.ts +91 -0
  56. package/src/lib/components/grid.js +322 -0
  57. package/src/lib/components/grid.js.map +1 -0
  58. package/src/lib/components/icon.d.ts +54 -0
  59. package/src/lib/components/icon.js +163 -0
  60. package/src/lib/components/icon.js.map +1 -0
  61. package/src/lib/components/image-list.d.ts +58 -0
  62. package/src/lib/components/image-list.js +336 -0
  63. package/src/lib/components/image-list.js.map +1 -0
  64. package/src/lib/components/image.d.ts +154 -0
  65. package/src/lib/components/image.js +451 -0
  66. package/src/lib/components/image.js.map +1 -0
  67. package/src/lib/components/inline-text.d.ts +74 -0
  68. package/src/lib/components/inline-text.js +407 -0
  69. package/src/lib/components/inline-text.js.map +1 -0
  70. package/src/lib/components/language-switcher.d.ts +35 -0
  71. package/src/lib/components/language-switcher.js +179 -0
  72. package/src/lib/components/language-switcher.js.map +1 -0
  73. package/src/lib/components/layout-slot.d.ts +68 -0
  74. package/src/lib/components/layout-slot.js +192 -0
  75. package/src/lib/components/layout-slot.js.map +1 -0
  76. package/src/lib/components/link-box-accessible-name.d.ts +79 -0
  77. package/src/lib/components/link-box-accessible-name.js +158 -0
  78. package/src/lib/components/link-box-accessible-name.js.map +1 -0
  79. package/src/lib/components/link-box.d.ts +66 -0
  80. package/src/lib/components/link-box.js +212 -0
  81. package/src/lib/components/link-box.js.map +1 -0
  82. package/src/lib/components/list-item-text.d.ts +22 -0
  83. package/src/lib/components/list-item-text.js +86 -0
  84. package/src/lib/components/list-item-text.js.map +1 -0
  85. package/src/lib/components/list-item.d.ts +32 -0
  86. package/src/lib/components/list-item.js +127 -0
  87. package/src/lib/components/list-item.js.map +1 -0
  88. package/src/lib/components/list.d.ts +34 -0
  89. package/src/lib/components/list.js +108 -0
  90. package/src/lib/components/list.js.map +1 -0
  91. package/src/lib/components/markdown.d.ts +129 -0
  92. package/src/lib/components/markdown.js +853 -0
  93. package/src/lib/components/markdown.js.map +1 -0
  94. package/src/lib/components/nav-menu.d.ts +68 -0
  95. package/src/lib/components/nav-menu.js +683 -0
  96. package/src/lib/components/nav-menu.js.map +1 -0
  97. package/src/lib/components/pagination.d.ts +59 -0
  98. package/src/lib/components/pagination.js +243 -0
  99. package/src/lib/components/pagination.js.map +1 -0
  100. package/src/lib/components/paper.d.ts +47 -0
  101. package/src/lib/components/paper.js +202 -0
  102. package/src/lib/components/paper.js.map +1 -0
  103. package/src/lib/components/plugin-frame.d.ts +64 -0
  104. package/src/lib/components/plugin-frame.js +335 -0
  105. package/src/lib/components/plugin-frame.js.map +1 -0
  106. package/src/lib/components/plugin.d.ts +95 -0
  107. package/src/lib/components/plugin.js +304 -0
  108. package/src/lib/components/plugin.js.map +1 -0
  109. package/src/lib/components/product.d.ts +40 -0
  110. package/src/lib/components/product.js +287 -0
  111. package/src/lib/components/product.js.map +1 -0
  112. package/src/lib/components/reusable-instance.d.ts +57 -0
  113. package/src/lib/components/reusable-instance.js +126 -0
  114. package/src/lib/components/reusable-instance.js.map +1 -0
  115. package/src/lib/components/screen-link.d.ts +85 -0
  116. package/src/lib/components/screen-link.js +324 -0
  117. package/src/lib/components/screen-link.js.map +1 -0
  118. package/src/lib/components/search-box.d.ts +41 -0
  119. package/src/lib/components/search-box.js +125 -0
  120. package/src/lib/components/search-box.js.map +1 -0
  121. package/src/lib/components/section.d.ts +56 -0
  122. package/src/lib/components/section.js +132 -0
  123. package/src/lib/components/section.js.map +1 -0
  124. package/src/lib/components/stack.d.ts +55 -0
  125. package/src/lib/components/stack.js +309 -0
  126. package/src/lib/components/stack.js.map +1 -0
  127. package/src/lib/components/tabs.d.ts +288 -0
  128. package/src/lib/components/tabs.js +788 -0
  129. package/src/lib/components/tabs.js.map +1 -0
  130. package/src/lib/components/theme-mode-switcher.d.ts +38 -0
  131. package/src/lib/components/theme-mode-switcher.js +168 -0
  132. package/src/lib/components/theme-mode-switcher.js.map +1 -0
  133. package/src/lib/components/toolbar.d.ts +37 -0
  134. package/src/lib/components/toolbar.js +117 -0
  135. package/src/lib/components/toolbar.js.map +1 -0
  136. package/src/lib/components/typography.d.ts +33 -0
  137. package/src/lib/components/typography.js +433 -0
  138. package/src/lib/components/typography.js.map +1 -0
  139. package/src/lib/components/video-lightbox-controls.d.ts +131 -0
  140. package/src/lib/components/video-lightbox-controls.js +536 -0
  141. package/src/lib/components/video-lightbox-controls.js.map +1 -0
  142. package/src/lib/components/video-lightbox.d.ts +60 -0
  143. package/src/lib/components/video-lightbox.js +247 -0
  144. package/src/lib/components/video-lightbox.js.map +1 -0
  145. package/src/lib/components/video-playback-beacon.d.ts +80 -0
  146. package/src/lib/components/video-playback-beacon.js +128 -0
  147. package/src/lib/components/video-playback-beacon.js.map +1 -0
  148. package/src/lib/components/video-player-frame.d.ts +58 -0
  149. package/src/lib/components/video-player-frame.js +51 -0
  150. package/src/lib/components/video-player-frame.js.map +1 -0
  151. package/src/lib/components/video.d.ts +220 -0
  152. package/src/lib/components/video.js +874 -0
  153. package/src/lib/components/video.js.map +1 -0
  154. package/src/lib/constants/bundle-common.d.ts +17 -0
  155. package/src/lib/constants/bundle-common.js +18 -0
  156. package/src/lib/constants/bundle-common.js.map +1 -0
  157. package/src/lib/constants/field-presets.d.ts +93 -0
  158. package/src/lib/constants/field-presets.js +248 -0
  159. package/src/lib/constants/field-presets.js.map +1 -0
  160. package/src/lib/plugin.d.ts +80 -0
  161. package/src/lib/plugin.js +599 -0
  162. package/src/lib/plugin.js.map +1 -0
  163. package/src/lib/utils/author-html-label.d.ts +73 -0
  164. package/src/lib/utils/author-html-label.js +89 -0
  165. package/src/lib/utils/author-html-label.js.map +1 -0
  166. package/src/lib/utils/drop-cleared-props.d.ts +18 -0
  167. package/src/lib/utils/drop-cleared-props.js +74 -0
  168. package/src/lib/utils/drop-cleared-props.js.map +1 -0
  169. package/src/lib/utils/element-picker.d.ts +99 -0
  170. package/src/lib/utils/element-picker.js +140 -0
  171. package/src/lib/utils/element-picker.js.map +1 -0
  172. package/src/lib/utils/generate-preset-id.d.ts +19 -0
  173. package/src/lib/utils/generate-preset-id.js +25 -0
  174. package/src/lib/utils/generate-preset-id.js.map +1 -0
  175. package/src/lib/utils/link-target-props.d.ts +53 -0
  176. package/src/lib/utils/link-target-props.js +53 -0
  177. package/src/lib/utils/link-target-props.js.map +1 -0
@@ -0,0 +1,212 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ /**
5
+ * @license
6
+ * Copyright 2026 Aglyn LLC
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */ import * as Aglyn from "@aglyn/aglyn";
20
+ import { mdiLinkBoxOutline } from "@aglyn/shared-data-mdi";
21
+ import { AppLink } from "@aglyn/shared-ui-jsx";
22
+ import MuiBox from "@mui/material/Box";
23
+ import { forwardRef } from "react";
24
+ import { BUNDLE_ID } from "../constants/bundle-common.js";
25
+ import { generatePresetId } from "../utils/generate-preset-id.js";
26
+ import { linkContainerA11yProps, linkContainerLabelFieldProps, REDUNDANT_ATTRIBUTE } from "./link-box-accessible-name.js";
27
+ // Component ids are persisted in screen documents; never rename.
28
+ export const ID = 'muiLinkBox';
29
+ /**
30
+ * A container that IS the link — icon, heading and description inside one
31
+ * anchor, instead of a tile whose only clickable part is its title.
32
+ *
33
+ * Every other linking element in the plugin is a leaf: Screen Link and
34
+ * Button both render their `children` as inline text, so `nodeAcceptsChildren`
35
+ * reports false and the canvas will not let anything be dropped inside them.
36
+ * That left no way to author a card, a mega-menu tile, or a linked logo —
37
+ * the shapes where the whole box is meant to be one target (AGL-1231).
38
+ *
39
+ * Nothing interactive may be nested inside: an `<a>` inside an `<a>` is
40
+ * invalid HTML and browsers unnest it, which silently moves half the tile
41
+ * back out of the link. Convert an inner Screen Link to plain Text when you
42
+ * wrap it in one of these.
43
+ *
44
+ * The link is named by the text inside it, so a box holding only an icon
45
+ * needs `ariaLabel` — or `redundant`, when a link beside it already goes to
46
+ * the same place (AGL-2886). Both land on the anchor in every branch below,
47
+ * so the canvas carries the same attributes the published page does.
48
+ */ const LinkBox = /*#__PURE__*/ forwardRef((props, ref)=>{
49
+ const { screenId, href: externalHref, newTab, ariaLabel, redundant, children, sx } = props, rest = _object_without_properties_loose(props, [
50
+ "screenId",
51
+ "href",
52
+ "newTab",
53
+ "ariaLabel",
54
+ "redundant",
55
+ "children",
56
+ "sx"
57
+ ]);
58
+ const a11y = linkContainerA11yProps(ariaLabel, redundant);
59
+ // Node styles ride the renderer-merged sx; recompose (stack.ts pattern).
60
+ // Spreading `rest` with `sx` still inside it would REPLACE the baseline
61
+ // below rather than merge with it, so every styled tile would quietly lose
62
+ // `textDecoration: none` and get the browser's underlined-blue anchor.
63
+ const nodeSx = Array.isArray(sx) ? sx : sx ? [
64
+ sx
65
+ ] : [];
66
+ // Shared resolution (AGL-1335): screen id first, `javascript:`/`data:`
67
+ // hrefs refused, `screen:`-prefixed prop values understood in either slot.
68
+ // "External" means it leaves the site, not merely "typed by hand": a
69
+ // site-relative `/pricing` in the href field must stay in the tab, or the
70
+ // visitor loses their history for nothing.
71
+ const { href, suppressNavigation, leavesSite: external } = Aglyn.useLinkTarget(screenId, externalHref);
72
+ // The unresolved and suppressed cases keep the same ELEMENT, not just the
73
+ // same box (AGL-1268): this used to render a `<div>` here and an `<a>` when
74
+ // the screen resolved, so the node's element type depended on the screens
75
+ // map — a screen published or unpublished between renders changed the DOM
76
+ // shape. An `<a>` without `href` is HTML's placeholder link: identical
77
+ // element, non-interactive, and the canvas stays inert exactly as before.
78
+ // The style floor matches the active branch so the two render identically.
79
+ if (!href || suppressNavigation) {
80
+ return /*#__PURE__*/ _jsx(MuiBox, _extends({
81
+ ref: ref,
82
+ component: "a"
83
+ }, rest, a11y, {
84
+ sx: [
85
+ {
86
+ display: 'block',
87
+ color: 'inherit',
88
+ textDecoration: 'none'
89
+ },
90
+ ...nodeSx
91
+ ],
92
+ children: children
93
+ }));
94
+ }
95
+ return /*#__PURE__*/ _jsx(AppLink, _extends({
96
+ ref: ref,
97
+ // NOT `componentVariant="naked"`: that branch renders a bare NextLink,
98
+ // which does not process `sx` — it lands on the DOM as a literal `sx=""`
99
+ // attribute and every style is silently dropped. The default branch is
100
+ // MUI's Link, which does. The anchor chrome it brings is neutralised by
101
+ // the baseline below.
102
+ href: href
103
+ }, newTab && external ? {
104
+ target: '_blank',
105
+ rel: 'noopener noreferrer'
106
+ } : {}, rest, a11y, {
107
+ // `display: block` so the anchor takes the tile's box, and no anchor
108
+ // chrome — authors then style it exactly as they would a Box. This is
109
+ // only the floor: node styles come after it and win.
110
+ sx: [
111
+ {
112
+ display: 'block',
113
+ color: 'inherit',
114
+ textDecoration: 'none'
115
+ },
116
+ ...nodeSx
117
+ ],
118
+ children: children
119
+ }));
120
+ });
121
+ LinkBox.displayName = 'AglynLinkBox';
122
+ /** A label is announced by nothing once the link is hidden as a duplicate. */ const NOT_REDUNDANT = {
123
+ when: REDUNDANT_ATTRIBUTE,
124
+ is: true,
125
+ notMatch: true
126
+ };
127
+ export const schema = {
128
+ $id: ID,
129
+ pluginId: BUNDLE_ID,
130
+ displayName: 'Link Container',
131
+ description: 'Container that is itself a link — put an icon, a heading and a ' + 'description inside and the whole box becomes one target.',
132
+ category: Aglyn.ComponentCategory.NAVIGATION,
133
+ icon: {
134
+ path: mdiLinkBoxOutline.path,
135
+ sx: {
136
+ color: '#2196f3'
137
+ }
138
+ },
139
+ attributes: [
140
+ {
141
+ name: 'screenId',
142
+ description: 'Screen this box navigates to. The address is generated from the ' + 'published path at render time, so it keeps working when the ' + "screen's slug or parent changes.",
143
+ component: Aglyn.FieldComponentType.SCREEN_SELECT,
144
+ label: 'Screen'
145
+ },
146
+ {
147
+ name: 'href',
148
+ description: 'Where the whole container goes when it points off this site. ' + 'Ignored while Screen names one. Everything inside the box becomes ' + 'part of this one link, so it should hold no other link.',
149
+ component: Aglyn.FieldComponentType.TEXT_FIELD,
150
+ label: 'External URL',
151
+ // A bare `#fragment` saves and goes nowhere (AGL-2867).
152
+ resolveProps: Aglyn.bareFragmentLinkFieldProps
153
+ },
154
+ {
155
+ name: 'newTab',
156
+ description: 'Open in a new tab. Applies to external URLs only — a link to one ' + 'of your own screens stays in the tab so the visitor keeps their ' + 'history.',
157
+ component: Aglyn.FieldComponentType.SWITCH,
158
+ label: 'Open in a new tab'
159
+ },
160
+ {
161
+ name: 'ariaLabel',
162
+ label: 'Accessible label',
163
+ description: 'Names this link for screen readers. Needed when the box holds only ' + 'an icon, or an image with no alt text, which is otherwise announced ' + 'as just "link". Leave it empty when there is text inside: that text ' + 'already names the link.',
164
+ // A text field, so the Attributes panel takes a binding here as it
165
+ // does in every other text attribute.
166
+ component: Aglyn.FieldComponentType.TEXT_FIELD,
167
+ condition: NOT_REDUNDANT,
168
+ // Warns while nothing names the link (AGL-2886).
169
+ resolveProps: linkContainerLabelFieldProps
170
+ },
171
+ {
172
+ name: REDUNDANT_ATTRIBUTE,
173
+ label: 'Duplicate of another link',
174
+ description: 'Turn on when another link beside this box goes to the same place, ' + 'such as the arrow on a card whose title is already a link. Screen ' + 'readers and the Tab key then skip this box, so those visitors meet ' + 'the destination once, and a click or tap still follows it. Leave it ' + 'off when this is the only link to where it goes.',
175
+ component: Aglyn.FieldComponentType.SWITCH
176
+ }
177
+ ]
178
+ };
179
+ export const presets = [
180
+ {
181
+ $id: generatePresetId(ID),
182
+ type: Aglyn.NodeType.PRESET,
183
+ displayName: 'Link Container',
184
+ pluginId: BUNDLE_ID,
185
+ description: 'A whole box that links somewhere',
186
+ category: Aglyn.ComponentCategory.NAVIGATION,
187
+ icon: schema.icon,
188
+ data: {
189
+ $id: null,
190
+ componentId: ID,
191
+ pluginId: BUNDLE_ID,
192
+ // Ships with padding and a hover tint: an empty, zero-height anchor
193
+ // dropped on the canvas looks like nothing happened.
194
+ props: {},
195
+ // Node-level sx (AGL-1346) — the record the Styles panel edits.
196
+ sx: {
197
+ display: 'block',
198
+ paddingTop: 2,
199
+ paddingRight: 2,
200
+ paddingBottom: 2,
201
+ paddingLeft: 2,
202
+ borderRadius: 1,
203
+ '&:hover': {
204
+ backgroundColor: 'action.hover'
205
+ }
206
+ }
207
+ }
208
+ }
209
+ ];
210
+ export default LinkBox;
211
+
212
+ //# sourceMappingURL=link-box.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/mui/src/lib/components/link-box.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 { mdiLinkBoxOutline } from '@aglyn/shared-data-mdi'\nimport { AppLink } from '@aglyn/shared-ui-jsx'\nimport MuiBox from '@mui/material/Box'\nimport type { SxProps } from '@mui/material/styles'\nimport { forwardRef, type ReactNode } from 'react'\nimport { BUNDLE_ID } from '../constants/bundle-common'\nimport { generatePresetId } from '../utils/generate-preset-id'\nimport {\n linkContainerA11yProps,\n linkContainerLabelFieldProps,\n REDUNDANT_ATTRIBUTE,\n} from './link-box-accessible-name'\n\n// Component ids are persisted in screen documents; never rename.\nexport const ID: Aglyn.ComponentId = 'muiLinkBox'\n\nexport interface LinkBoxProps {\n /** Target screen id, resolved from the host routing map at render time. */\n screenId?: string\n /** External URL escape hatch, used only when no `screenId` is set. */\n href?: string\n /** Opens in a new tab. External destinations only. */\n newTab?: boolean\n /** The link's name for assistive tech, when its content supplies none. */\n ariaLabel?: string\n /**\n * The box repeats a link beside it to the same destination, so it is\n * hidden from assistive tech and left out of the tab order.\n */\n redundant?: boolean\n /**\n * Authored node styles, handed over by the renderer rather than typed into\n * an attribute. Declared because the merge below reads it: undeclared, no\n * typed caller could style a tile (AGL-1323).\n */\n sx?: SxProps\n children?: ReactNode\n}\n\n/**\n * A container that IS the link — icon, heading and description inside one\n * anchor, instead of a tile whose only clickable part is its title.\n *\n * Every other linking element in the plugin is a leaf: Screen Link and\n * Button both render their `children` as inline text, so `nodeAcceptsChildren`\n * reports false and the canvas will not let anything be dropped inside them.\n * That left no way to author a card, a mega-menu tile, or a linked logo —\n * the shapes where the whole box is meant to be one target (AGL-1231).\n *\n * Nothing interactive may be nested inside: an `<a>` inside an `<a>` is\n * invalid HTML and browsers unnest it, which silently moves half the tile\n * back out of the link. Convert an inner Screen Link to plain Text when you\n * wrap it in one of these.\n *\n * The link is named by the text inside it, so a box holding only an icon\n * needs `ariaLabel` — or `redundant`, when a link beside it already goes to\n * the same place (AGL-2886). Both land on the anchor in every branch below,\n * so the canvas carries the same attributes the published page does.\n */\nconst LinkBox = forwardRef<HTMLElement, LinkBoxProps>((props, ref) => {\n const {\n screenId,\n href: externalHref,\n newTab,\n ariaLabel,\n redundant,\n children,\n sx,\n ...rest\n } = props\n const a11y = linkContainerA11yProps(ariaLabel, redundant)\n // Node styles ride the renderer-merged sx; recompose (stack.ts pattern).\n // Spreading `rest` with `sx` still inside it would REPLACE the baseline\n // below rather than merge with it, so every styled tile would quietly lose\n // `textDecoration: none` and get the browser's underlined-blue anchor.\n const nodeSx = Array.isArray(sx) ? sx : sx ? [sx] : []\n // Shared resolution (AGL-1335): screen id first, `javascript:`/`data:`\n // hrefs refused, `screen:`-prefixed prop values understood in either slot.\n // \"External\" means it leaves the site, not merely \"typed by hand\": a\n // site-relative `/pricing` in the href field must stay in the tab, or the\n // visitor loses their history for nothing.\n const {\n href,\n suppressNavigation,\n leavesSite: external,\n } = Aglyn.useLinkTarget(screenId, externalHref)\n\n // The unresolved and suppressed cases keep the same ELEMENT, not just the\n // same box (AGL-1268): this used to render a `<div>` here and an `<a>` when\n // the screen resolved, so the node's element type depended on the screens\n // map — a screen published or unpublished between renders changed the DOM\n // shape. An `<a>` without `href` is HTML's placeholder link: identical\n // element, non-interactive, and the canvas stays inert exactly as before.\n // The style floor matches the active branch so the two render identically.\n if (!href || suppressNavigation) {\n return (\n <MuiBox\n ref={ref}\n component=\"a\"\n {...rest}\n {...a11y}\n sx={[\n { display: 'block', color: 'inherit', textDecoration: 'none' },\n ...nodeSx,\n ]}\n >\n {children}\n </MuiBox>\n )\n }\n return (\n <AppLink\n ref={ref}\n // NOT `componentVariant=\"naked\"`: that branch renders a bare NextLink,\n // which does not process `sx` — it lands on the DOM as a literal `sx=\"\"`\n // attribute and every style is silently dropped. The default branch is\n // MUI's Link, which does. The anchor chrome it brings is neutralised by\n // the baseline below.\n href={href}\n {...(newTab && external\n ? { target: '_blank', rel: 'noopener noreferrer' }\n : {})}\n {...rest}\n {...a11y}\n // `display: block` so the anchor takes the tile's box, and no anchor\n // chrome — authors then style it exactly as they would a Box. This is\n // only the floor: node styles come after it and win.\n sx={[\n { display: 'block', color: 'inherit', textDecoration: 'none' },\n ...nodeSx,\n ]}\n >\n {children}\n </AppLink>\n )\n})\nLinkBox.displayName = 'AglynLinkBox'\n\n/** A label is announced by nothing once the link is hidden as a duplicate. */\nconst NOT_REDUNDANT = { when: REDUNDANT_ATTRIBUTE, is: true, notMatch: true }\n\nexport const schema: Aglyn.ComponentSchema<LinkBoxProps> = {\n $id: ID,\n pluginId: BUNDLE_ID,\n displayName: 'Link Container',\n description:\n 'Container that is itself a link — put an icon, a heading and a ' +\n 'description inside and the whole box becomes one target.',\n category: Aglyn.ComponentCategory.NAVIGATION,\n icon: { path: mdiLinkBoxOutline.path, sx: { color: '#2196f3' } },\n attributes: [\n {\n name: 'screenId',\n description:\n 'Screen this box navigates to. The address is generated from the ' +\n 'published path at render time, so it keeps working when the ' +\n \"screen's slug or parent changes.\",\n component: Aglyn.FieldComponentType.SCREEN_SELECT,\n label: 'Screen',\n },\n {\n name: 'href',\n description:\n 'Where the whole container goes when it points off this site. ' +\n 'Ignored while Screen names one. Everything inside the box becomes ' +\n 'part of this one link, so it should hold no other link.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n label: 'External URL',\n // A bare `#fragment` saves and goes nowhere (AGL-2867).\n resolveProps: Aglyn.bareFragmentLinkFieldProps,\n },\n {\n name: 'newTab',\n description:\n 'Open in a new tab. Applies to external URLs only — a link to one ' +\n 'of your own screens stays in the tab so the visitor keeps their ' +\n 'history.',\n component: Aglyn.FieldComponentType.SWITCH,\n label: 'Open in a new tab',\n },\n {\n name: 'ariaLabel',\n label: 'Accessible label',\n description:\n 'Names this link for screen readers. Needed when the box holds only ' +\n 'an icon, or an image with no alt text, which is otherwise announced ' +\n 'as just \"link\". Leave it empty when there is text inside: that text ' +\n 'already names the link.',\n // A text field, so the Attributes panel takes a binding here as it\n // does in every other text attribute.\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n condition: NOT_REDUNDANT,\n // Warns while nothing names the link (AGL-2886).\n resolveProps: linkContainerLabelFieldProps,\n },\n {\n name: REDUNDANT_ATTRIBUTE,\n label: 'Duplicate of another link',\n description:\n 'Turn on when another link beside this box goes to the same place, ' +\n 'such as the arrow on a card whose title is already a link. Screen ' +\n 'readers and the Tab key then skip this box, so those visitors meet ' +\n 'the destination once, and a click or tap still follows it. Leave it ' +\n 'off when this is the only link to where it goes.',\n component: Aglyn.FieldComponentType.SWITCH,\n },\n ],\n}\n\nexport const presets: Aglyn.PresetSchema[] = [\n {\n $id: generatePresetId(ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'Link Container',\n pluginId: BUNDLE_ID,\n description: 'A whole box that links somewhere',\n category: Aglyn.ComponentCategory.NAVIGATION,\n icon: schema.icon,\n data: {\n $id: null,\n componentId: ID,\n pluginId: BUNDLE_ID,\n // Ships with padding and a hover tint: an empty, zero-height anchor\n // dropped on the canvas looks like nothing happened.\n props: {},\n // Node-level sx (AGL-1346) — the record the Styles panel edits.\n sx: {\n display: 'block',\n paddingTop: 2,\n paddingRight: 2,\n paddingBottom: 2,\n paddingLeft: 2,\n borderRadius: 1,\n '&:hover': { backgroundColor: 'action.hover' },\n },\n },\n },\n]\n\nexport default LinkBox\n"],"names":["Aglyn","mdiLinkBoxOutline","AppLink","MuiBox","forwardRef","BUNDLE_ID","generatePresetId","linkContainerA11yProps","linkContainerLabelFieldProps","REDUNDANT_ATTRIBUTE","ID","LinkBox","props","ref","screenId","href","externalHref","newTab","ariaLabel","redundant","children","sx","rest","a11y","nodeSx","Array","isArray","suppressNavigation","leavesSite","external","useLinkTarget","component","display","color","textDecoration","target","rel","displayName","NOT_REDUNDANT","when","is","notMatch","schema","$id","pluginId","description","category","ComponentCategory","NAVIGATION","icon","path","attributes","name","FieldComponentType","SCREEN_SELECT","label","TEXT_FIELD","resolveProps","bareFragmentLinkFieldProps","SWITCH","condition","presets","type","NodeType","PRESET","data","componentId","paddingTop","paddingRight","paddingBottom","paddingLeft","borderRadius","backgroundColor"],"mappings":"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"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import * as Aglyn from '@aglyn/aglyn';
18
+ import ListItemText, { type ListItemTextProps } from '@mui/material/ListItemText';
19
+ export declare const ID: Aglyn.ComponentId;
20
+ export declare const schema: Aglyn.ComponentSchema<ListItemTextProps>;
21
+ export declare const presets: Aglyn.PresetSchema[];
22
+ export default ListItemText;
@@ -0,0 +1,86 @@
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
+ */ import * as Aglyn from "@aglyn/aglyn";
17
+ import { mdiFormatListChecks } from "@aglyn/shared-data-mdi";
18
+ import ListItemText from "@mui/material/ListItemText";
19
+ import { BUNDLE_ID } from "../constants/bundle-common.js";
20
+ import { generatePresetId } from "../utils/generate-preset-id.js";
21
+ // Component ids are persisted in screen documents; keep the legacy ids.
22
+ export const ID = 'muiListItemText';
23
+ export const schema = {
24
+ $id: ID,
25
+ pluginId: BUNDLE_ID,
26
+ displayName: 'List Item Text',
27
+ description: 'The primary and secondary text pair inside a list row.',
28
+ category: Aglyn.ComponentCategory.DATA_DISPLAY,
29
+ icon: {
30
+ path: mdiFormatListChecks.path
31
+ },
32
+ // Text lives in `primary`/`secondary` (not `children`), so this component
33
+ // exposes its own text fields instead of FIELD_TEXT_CONTENT.
34
+ flags: {
35
+ // …and MUI reads `children` ONLY as a fallback for a missing `primary`
36
+ // (`primary = primaryProp != null ? primaryProp : children`), so with a
37
+ // primary set — which every preset and every authored row has — a node
38
+ // dropped in here is discarded at render with no warning. Same shape as
39
+ // the Markdown block that swallowed three /press screenshots
40
+ // (AGL-1388): the row's text is its attributes, not its child list.
41
+ dropping: Aglyn.FEATURE_FLAG.DISABLED
42
+ },
43
+ attributes: [
44
+ {
45
+ name: 'primary',
46
+ description: 'The main content text.',
47
+ component: Aglyn.FieldComponentType.TEXTAREA,
48
+ label: 'Primary text'
49
+ },
50
+ {
51
+ name: 'secondary',
52
+ description: 'The secondary content text.',
53
+ component: Aglyn.FieldComponentType.TEXTAREA,
54
+ label: 'Secondary text'
55
+ },
56
+ {
57
+ name: 'inset',
58
+ description: 'Indents the text to line up with rows that have an icon or ' + 'avatar, so a mixed list keeps one text column.',
59
+ component: Aglyn.FieldComponentType.SWITCH,
60
+ label: 'Inset?'
61
+ }
62
+ ]
63
+ };
64
+ export const presets = [
65
+ {
66
+ $id: generatePresetId(ID),
67
+ type: Aglyn.NodeType.PRESET,
68
+ displayName: 'List Item Text',
69
+ icon: {
70
+ path: mdiFormatListChecks.path
71
+ },
72
+ category: Aglyn.ComponentCategory.DATA_DISPLAY,
73
+ data: {
74
+ $id: null,
75
+ componentId: ID,
76
+ pluginId: BUNDLE_ID,
77
+ props: {
78
+ primary: 'Item Primary',
79
+ secondary: 'This is the secondary'
80
+ }
81
+ }
82
+ }
83
+ ];
84
+ export default ListItemText;
85
+
86
+ //# sourceMappingURL=list-item-text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/mui/src/lib/components/list-item-text.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as Aglyn from '@aglyn/aglyn'\nimport {\n mdiFormatListChecks,\n} from '@aglyn/shared-data-mdi'\nimport ListItemText, {\n type ListItemTextProps,\n} from '@mui/material/ListItemText'\nimport { BUNDLE_ID } from '../constants/bundle-common'\nimport { generatePresetId } from '../utils/generate-preset-id'\n\n// Component ids are persisted in screen documents; keep the legacy ids.\nexport const ID: Aglyn.ComponentId = 'muiListItemText'\n\nexport const schema: Aglyn.ComponentSchema<ListItemTextProps> = {\n $id: ID,\n pluginId: BUNDLE_ID,\n displayName: 'List Item Text',\n description: 'The primary and secondary text pair inside a list row.',\n category: Aglyn.ComponentCategory.DATA_DISPLAY,\n icon: { path: mdiFormatListChecks.path },\n // Text lives in `primary`/`secondary` (not `children`), so this component\n // exposes its own text fields instead of FIELD_TEXT_CONTENT.\n flags: {\n // …and MUI reads `children` ONLY as a fallback for a missing `primary`\n // (`primary = primaryProp != null ? primaryProp : children`), so with a\n // primary set — which every preset and every authored row has — a node\n // dropped in here is discarded at render with no warning. Same shape as\n // the Markdown block that swallowed three /press screenshots\n // (AGL-1388): the row's text is its attributes, not its child list.\n dropping: Aglyn.FEATURE_FLAG.DISABLED,\n },\n attributes: [\n {\n name: 'primary',\n description: 'The main content text.',\n component: Aglyn.FieldComponentType.TEXTAREA,\n label: 'Primary text',\n },\n {\n name: 'secondary',\n description: 'The secondary content text.',\n component: Aglyn.FieldComponentType.TEXTAREA,\n label: 'Secondary text',\n },\n {\n name: 'inset',\n description:\n 'Indents the text to line up with rows that have an icon or ' +\n 'avatar, so a mixed list keeps one text column.',\n component: Aglyn.FieldComponentType.SWITCH,\n label: 'Inset?',\n },\n ],\n}\n\nexport const presets: Aglyn.PresetSchema[] = [\n {\n $id: generatePresetId(ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'List Item Text',\n icon: { path: mdiFormatListChecks.path },\n category: Aglyn.ComponentCategory.DATA_DISPLAY,\n data: {\n $id: null,\n componentId: ID,\n pluginId: BUNDLE_ID,\n props: {\n primary: 'Item Primary',\n secondary: 'This is the secondary',\n },\n },\n },\n]\n\nexport default ListItemText\n"],"names":["Aglyn","mdiFormatListChecks","ListItemText","BUNDLE_ID","generatePresetId","ID","schema","$id","pluginId","displayName","description","category","ComponentCategory","DATA_DISPLAY","icon","path","flags","dropping","FEATURE_FLAG","DISABLED","attributes","name","component","FieldComponentType","TEXTAREA","label","SWITCH","presets","type","NodeType","PRESET","data","componentId","props","primary","secondary"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,YAAYA,WAAW,eAAc;AACrC,SACEC,mBAAmB,QACd,yBAAwB;AAC/B,OAAOC,kBAEA,6BAA4B;AACnC,SAASC,SAAS,QAAQ,gCAA4B;AACtD,SAASC,gBAAgB,QAAQ,iCAA6B;AAE9D,wEAAwE;AACxE,OAAO,MAAMC,KAAwB,kBAAiB;AAEtD,OAAO,MAAMC,SAAmD;IAC9DC,KAAKF;IACLG,UAAUL;IACVM,aAAa;IACbC,aAAa;IACbC,UAAUX,MAAMY,iBAAiB,CAACC,YAAY;IAC9CC,MAAM;QAAEC,MAAMd,oBAAoBc,IAAI;IAAC;IACvC,0EAA0E;IAC1E,6DAA6D;IAC7DC,OAAO;QACL,uEAAuE;QACvE,wEAAwE;QACxE,uEAAuE;QACvE,wEAAwE;QACxE,6DAA6D;QAC7D,oEAAoE;QACpEC,UAAUjB,MAAMkB,YAAY,CAACC,QAAQ;IACvC;IACAC,YAAY;QACV;YACEC,MAAM;YACNX,aAAa;YACbY,WAAWtB,MAAMuB,kBAAkB,CAACC,QAAQ;YAC5CC,OAAO;QACT;QACA;YACEJ,MAAM;YACNX,aAAa;YACbY,WAAWtB,MAAMuB,kBAAkB,CAACC,QAAQ;YAC5CC,OAAO;QACT;QACA;YACEJ,MAAM;YACNX,aACE,gEACA;YACFY,WAAWtB,MAAMuB,kBAAkB,CAACG,MAAM;YAC1CD,OAAO;QACT;KACD;AACH,EAAC;AAED,OAAO,MAAME,UAAgC;IAC3C;QACEpB,KAAKH,iBAAiBC;QACtBuB,MAAM5B,MAAM6B,QAAQ,CAACC,MAAM;QAC3BrB,aAAa;QACbK,MAAM;YAAEC,MAAMd,oBAAoBc,IAAI;QAAC;QACvCJ,UAAUX,MAAMY,iBAAiB,CAACC,YAAY;QAC9CkB,MAAM;YACJxB,KAAK;YACLyB,aAAa3B;YACbG,UAAUL;YACV8B,OAAO;gBACLC,SAAS;gBACTC,WAAW;YACb;QACF;IACF;CACD,CAAA;AAED,eAAejC,aAAY"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import * as Aglyn from '@aglyn/aglyn';
18
+ import { type ListItemProps } from '@mui/material/ListItem';
19
+ /**
20
+ * MUI's ListItem behind the cleared-prop guard (AGL-1451).
21
+ *
22
+ * Exported raw, so every one of its five authorable attributes reached MUI
23
+ * as authored — including `alignItems`, whose `''` option is not `undefined`
24
+ * (so the `alignItems = 'center'` destructuring default never fires) and is
25
+ * falsy (so the `alignItems === 'flex-start'` branch is skipped), leaving a
26
+ * row that carries neither utility class.
27
+ */
28
+ declare const ListItem: import("react").ForwardRefExoticComponent<Omit<ListItemProps, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
29
+ export declare const ID: Aglyn.ComponentId;
30
+ export declare const schema: Aglyn.ComponentSchema<ListItemProps>;
31
+ export declare const presets: Aglyn.PresetSchema[];
32
+ export default ListItem;
@@ -0,0 +1,127 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ /**
3
+ * @license
4
+ * Copyright 2026 Aglyn LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */ import * as Aglyn from "@aglyn/aglyn";
18
+ import { mdiFormatListText } from "@aglyn/shared-data-mdi";
19
+ import MuiListItem from "@mui/material/ListItem";
20
+ import { createElement, forwardRef } from "react";
21
+ import { BUNDLE_ID } from "../constants/bundle-common.js";
22
+ import { dropClearedProps } from "../utils/drop-cleared-props.js";
23
+ import { generatePresetId } from "../utils/generate-preset-id.js";
24
+ import { presets as listItemTextPresets, schema as listItemTextSchema } from "./list-item-text.js";
25
+ /**
26
+ * MUI's ListItem behind the cleared-prop guard (AGL-1451).
27
+ *
28
+ * Exported raw, so every one of its five authorable attributes reached MUI
29
+ * as authored — including `alignItems`, whose `''` option is not `undefined`
30
+ * (so the `alignItems = 'center'` destructuring default never fires) and is
31
+ * falsy (so the `alignItems === 'flex-start'` branch is skipped), leaving a
32
+ * row that carries neither utility class.
33
+ */ const ListItem = forwardRef((props, ref)=>createElement(MuiListItem, _extends({}, dropClearedProps(props), {
34
+ ref
35
+ })));
36
+ ListItem.displayName = 'AglynListItem';
37
+ // Component ids are persisted in screen documents; keep the legacy ids.
38
+ export const ID = 'muiListItem';
39
+ export const schema = {
40
+ $id: ID,
41
+ pluginId: BUNDLE_ID,
42
+ displayName: 'List Item',
43
+ description: 'One row of a list.',
44
+ category: Aglyn.ComponentCategory.DATA_DISPLAY,
45
+ icon: {
46
+ path: mdiFormatListText.path
47
+ },
48
+ restrictChildren: [
49
+ Aglyn.LinealDirectiveFlag.LIMIT_TO,
50
+ {
51
+ components: [
52
+ listItemTextSchema.$id
53
+ ]
54
+ }
55
+ ],
56
+ // Like List, this had NO attributes: dividers, density and gutters are
57
+ // the first things anyone reaches for on a list row, and none of them
58
+ // were reachable from the inspector.
59
+ attributes: [
60
+ {
61
+ name: 'divider',
62
+ label: 'Divider?',
63
+ description: 'If true, a 1px line is drawn under the item.',
64
+ component: Aglyn.FieldComponentType.SWITCH
65
+ },
66
+ {
67
+ name: 'alignItems',
68
+ label: 'Align items',
69
+ description: 'Vertical alignment of the row content. Use flex-start when the ' + 'secondary text wraps to several lines.',
70
+ component: Aglyn.FieldComponentType.SELECT,
71
+ // `center` is MUI's own value and the one an author needs to move a
72
+ // row BACK off Top, so it stays in the list as a real sentinel
73
+ // rather than being deleted (AGL-1451). As `''` that move could not
74
+ // persist (AGL-1191).
75
+ options: [
76
+ {
77
+ value: 'center',
78
+ label: 'Center (default)'
79
+ },
80
+ {
81
+ value: 'flex-start',
82
+ label: 'Top'
83
+ }
84
+ ]
85
+ },
86
+ {
87
+ name: 'dense',
88
+ label: 'Dense?',
89
+ description: 'If true, this row is compacted vertically. The parent list’s ' + 'Dense setting already applies to every row.',
90
+ component: Aglyn.FieldComponentType.SWITCH
91
+ },
92
+ {
93
+ name: 'disableGutters',
94
+ label: 'Disable gutters?',
95
+ description: 'Removes this row’s side padding, so its text lines up with content ' + 'outside the list instead of being indented from it.',
96
+ component: Aglyn.FieldComponentType.SWITCH
97
+ },
98
+ {
99
+ name: 'disablePadding',
100
+ label: 'Disable padding?',
101
+ description: 'If true, all padding is removed.',
102
+ component: Aglyn.FieldComponentType.SWITCH
103
+ }
104
+ ]
105
+ };
106
+ export const presets = [
107
+ {
108
+ $id: generatePresetId(ID),
109
+ type: Aglyn.NodeType.PRESET,
110
+ displayName: 'List Item',
111
+ icon: {
112
+ path: mdiFormatListText.path
113
+ },
114
+ category: Aglyn.ComponentCategory.DATA_DISPLAY,
115
+ data: {
116
+ $id: null,
117
+ componentId: ID,
118
+ pluginId: BUNDLE_ID,
119
+ nodes: [
120
+ _extends({}, listItemTextPresets[0].data)
121
+ ]
122
+ }
123
+ }
124
+ ];
125
+ export default ListItem;
126
+
127
+ //# sourceMappingURL=list-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/mui/src/lib/components/list-item.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as Aglyn from '@aglyn/aglyn'\nimport {\n mdiFormatListText,\n} from '@aglyn/shared-data-mdi'\nimport MuiListItem, { type ListItemProps } from '@mui/material/ListItem'\nimport { createElement, forwardRef } from 'react'\nimport { BUNDLE_ID } from '../constants/bundle-common'\nimport { dropClearedProps } from '../utils/drop-cleared-props'\nimport { generatePresetId } from '../utils/generate-preset-id'\nimport {\n presets as listItemTextPresets,\n schema as listItemTextSchema,\n} from './list-item-text'\n\n/**\n * MUI's ListItem behind the cleared-prop guard (AGL-1451).\n *\n * Exported raw, so every one of its five authorable attributes reached MUI\n * as authored — including `alignItems`, whose `''` option is not `undefined`\n * (so the `alignItems = 'center'` destructuring default never fires) and is\n * falsy (so the `alignItems === 'flex-start'` branch is skipped), leaving a\n * row that carries neither utility class.\n */\nconst ListItem = forwardRef<HTMLLIElement, ListItemProps>((props, ref) =>\n createElement(MuiListItem, { ...dropClearedProps(props), ref }),\n)\nListItem.displayName = 'AglynListItem'\n\n// Component ids are persisted in screen documents; keep the legacy ids.\nexport const ID: Aglyn.ComponentId = 'muiListItem'\n\nexport const schema: Aglyn.ComponentSchema<ListItemProps> = {\n $id: ID,\n pluginId: BUNDLE_ID,\n displayName: 'List Item',\n description: 'One row of a list.',\n category: Aglyn.ComponentCategory.DATA_DISPLAY,\n icon: { path: mdiFormatListText.path },\n restrictChildren: [\n Aglyn.LinealDirectiveFlag.LIMIT_TO,\n {\n components: [listItemTextSchema.$id],\n },\n ],\n // Like List, this had NO attributes: dividers, density and gutters are\n // the first things anyone reaches for on a list row, and none of them\n // were reachable from the inspector.\n attributes: [\n {\n name: 'divider',\n label: 'Divider?',\n description: 'If true, a 1px line is drawn under the item.',\n component: Aglyn.FieldComponentType.SWITCH,\n },\n {\n name: 'alignItems',\n label: 'Align items',\n description:\n 'Vertical alignment of the row content. Use flex-start when the ' +\n 'secondary text wraps to several lines.',\n component: Aglyn.FieldComponentType.SELECT,\n // `center` is MUI's own value and the one an author needs to move a\n // row BACK off Top, so it stays in the list as a real sentinel\n // rather than being deleted (AGL-1451). As `''` that move could not\n // persist (AGL-1191).\n options: [\n { value: 'center', label: 'Center (default)' },\n { value: 'flex-start', label: 'Top' },\n ],\n },\n {\n name: 'dense',\n label: 'Dense?',\n description:\n 'If true, this row is compacted vertically. The parent list’s ' +\n 'Dense setting already applies to every row.',\n component: Aglyn.FieldComponentType.SWITCH,\n },\n {\n name: 'disableGutters',\n label: 'Disable gutters?',\n description:\n 'Removes this row’s side padding, so its text lines up with content ' +\n 'outside the list instead of being indented from it.',\n component: Aglyn.FieldComponentType.SWITCH,\n },\n {\n name: 'disablePadding',\n label: 'Disable padding?',\n description: 'If true, all padding is removed.',\n component: Aglyn.FieldComponentType.SWITCH,\n },\n ],\n}\n\nexport const presets: Aglyn.PresetSchema[] = [\n {\n $id: generatePresetId(ID),\n type: Aglyn.NodeType.PRESET,\n displayName: 'List Item',\n icon: { path: mdiFormatListText.path },\n category: Aglyn.ComponentCategory.DATA_DISPLAY,\n data: {\n $id: null,\n componentId: ID,\n pluginId: BUNDLE_ID,\n nodes: [\n {\n ...listItemTextPresets[0].data,\n },\n ],\n },\n },\n]\n\nexport default ListItem\n"],"names":["Aglyn","mdiFormatListText","MuiListItem","createElement","forwardRef","BUNDLE_ID","dropClearedProps","generatePresetId","presets","listItemTextPresets","schema","listItemTextSchema","ListItem","props","ref","displayName","ID","$id","pluginId","description","category","ComponentCategory","DATA_DISPLAY","icon","path","restrictChildren","LinealDirectiveFlag","LIMIT_TO","components","attributes","name","label","component","FieldComponentType","SWITCH","SELECT","options","value","type","NodeType","PRESET","data","componentId","nodes"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,YAAYA,WAAW,eAAc;AACrC,SACEC,iBAAiB,QACZ,yBAAwB;AAC/B,OAAOC,iBAAyC,yBAAwB;AACxE,SAASC,aAAa,EAAEC,UAAU,QAAQ,QAAO;AACjD,SAASC,SAAS,QAAQ,gCAA4B;AACtD,SAASC,gBAAgB,QAAQ,iCAA6B;AAC9D,SAASC,gBAAgB,QAAQ,iCAA6B;AAC9D,SACEC,WAAWC,mBAAmB,EAC9BC,UAAUC,kBAAkB,QACvB,sBAAkB;AAEzB;;;;;;;;CAQC,GACD,MAAMC,WAAWR,WAAyC,CAACS,OAAOC,MAChEX,cAAcD,aAAa,aAAKI,iBAAiBO;QAAQC;;AAE3DF,SAASG,WAAW,GAAG;AAEvB,wEAAwE;AACxE,OAAO,MAAMC,KAAwB,cAAa;AAElD,OAAO,MAAMN,SAA+C;IAC1DO,KAAKD;IACLE,UAAUb;IACVU,aAAa;IACbI,aAAa;IACbC,UAAUpB,MAAMqB,iBAAiB,CAACC,YAAY;IAC9CC,MAAM;QAAEC,MAAMvB,kBAAkBuB,IAAI;IAAC;IACrCC,kBAAkB;QAChBzB,MAAM0B,mBAAmB,CAACC,QAAQ;QAClC;YACEC,YAAY;gBAACjB,mBAAmBM,GAAG;aAAC;QACtC;KACD;IACD,uEAAuE;IACvE,sEAAsE;IACtE,qCAAqC;IACrCY,YAAY;QACV;YACEC,MAAM;YACNC,OAAO;YACPZ,aAAa;YACba,WAAWhC,MAAMiC,kBAAkB,CAACC,MAAM;QAC5C;QACA;YACEJ,MAAM;YACNC,OAAO;YACPZ,aACE,oEACA;YACFa,WAAWhC,MAAMiC,kBAAkB,CAACE,MAAM;YAC1C,oEAAoE;YACpE,+DAA+D;YAC/D,oEAAoE;YACpE,sBAAsB;YACtBC,SAAS;gBACP;oBAAEC,OAAO;oBAAUN,OAAO;gBAAmB;gBAC7C;oBAAEM,OAAO;oBAAcN,OAAO;gBAAM;aACrC;QACH;QACA;YACED,MAAM;YACNC,OAAO;YACPZ,aACE,kEACA;YACFa,WAAWhC,MAAMiC,kBAAkB,CAACC,MAAM;QAC5C;QACA;YACEJ,MAAM;YACNC,OAAO;YACPZ,aACE,wEACA;YACFa,WAAWhC,MAAMiC,kBAAkB,CAACC,MAAM;QAC5C;QACA;YACEJ,MAAM;YACNC,OAAO;YACPZ,aAAa;YACba,WAAWhC,MAAMiC,kBAAkB,CAACC,MAAM;QAC5C;KACD;AACH,EAAC;AAED,OAAO,MAAM1B,UAAgC;IAC3C;QACES,KAAKV,iBAAiBS;QACtBsB,MAAMtC,MAAMuC,QAAQ,CAACC,MAAM;QAC3BzB,aAAa;QACbQ,MAAM;YAAEC,MAAMvB,kBAAkBuB,IAAI;QAAC;QACrCJ,UAAUpB,MAAMqB,iBAAiB,CAACC,YAAY;QAC9CmB,MAAM;YACJxB,KAAK;YACLyB,aAAa1B;YACbE,UAAUb;YACVsC,OAAO;gBACL,aACKlC,mBAAmB,CAAC,EAAE,CAACgC,IAAI;aAEjC;QACH;IACF;CACD,CAAA;AAED,eAAe7B,SAAQ"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import * as Aglyn from '@aglyn/aglyn';
18
+ import { type ListProps } from '@mui/material/List';
19
+ export declare const ID: Aglyn.ComponentId;
20
+ export interface ListElementProps extends Omit<ListProps, 'subheader'> {
21
+ /** Sticky heading above the items; omitted entirely when blank. */
22
+ subheader?: string;
23
+ }
24
+ /**
25
+ * List (https://mui.com/material-ui/react-list/).
26
+ *
27
+ * Wraps MUI's List only to turn the authored `subheader` string into a
28
+ * real `ListSubheader`: MUI types the prop as a node, so a bare string
29
+ * renders as unstyled text outside the list's own heading treatment.
30
+ */
31
+ declare const List: import("react").ForwardRefExoticComponent<Omit<ListElementProps, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
32
+ export declare const schema: Aglyn.ComponentSchema<ListElementProps>;
33
+ export declare const presets: Aglyn.PresetSchema[];
34
+ export default List;