@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.
- package/LICENSE +201 -0
- package/README.md +22 -0
- package/package.json +47 -0
- package/src/index.d.ts +21 -0
- package/src/index.js +22 -0
- package/src/index.js.map +1 -0
- package/src/lib/components/accordion.d.ts +96 -0
- package/src/lib/components/accordion.js +392 -0
- package/src/lib/components/accordion.js.map +1 -0
- package/src/lib/components/app-bar.d.ts +32 -0
- package/src/lib/components/app-bar.js +86 -0
- package/src/lib/components/app-bar.js.map +1 -0
- package/src/lib/components/blocks.d.ts +46 -0
- package/src/lib/components/blocks.js +1007 -0
- package/src/lib/components/blocks.js.map +1 -0
- package/src/lib/components/box.d.ts +47 -0
- package/src/lib/components/box.js +125 -0
- package/src/lib/components/box.js.map +1 -0
- package/src/lib/components/breadcrumbs.d.ts +44 -0
- package/src/lib/components/breadcrumbs.js +172 -0
- package/src/lib/components/breadcrumbs.js.map +1 -0
- package/src/lib/components/button.d.ts +89 -0
- package/src/lib/components/button.js +272 -0
- package/src/lib/components/button.js.map +1 -0
- package/src/lib/components/card.d.ts +61 -0
- package/src/lib/components/card.js +336 -0
- package/src/lib/components/card.js.map +1 -0
- package/src/lib/components/collection.d.ts +514 -0
- package/src/lib/components/collection.js +2999 -0
- package/src/lib/components/collection.js.map +1 -0
- package/src/lib/components/container.d.ts +42 -0
- package/src/lib/components/container.js +169 -0
- package/src/lib/components/container.js.map +1 -0
- package/src/lib/components/custom-html.d.ts +78 -0
- package/src/lib/components/custom-html.js +219 -0
- package/src/lib/components/custom-html.js.map +1 -0
- package/src/lib/components/data-table.d.ts +57 -0
- package/src/lib/components/data-table.js +216 -0
- package/src/lib/components/data-table.js.map +1 -0
- package/src/lib/components/document-root.d.ts +77 -0
- package/src/lib/components/document-root.js +118 -0
- package/src/lib/components/document-root.js.map +1 -0
- package/src/lib/components/drawer.d.ts +93 -0
- package/src/lib/components/drawer.js +566 -0
- package/src/lib/components/drawer.js.map +1 -0
- package/src/lib/components/function-controls.d.ts +66 -0
- package/src/lib/components/function-controls.js +207 -0
- package/src/lib/components/function-controls.js.map +1 -0
- package/src/lib/components/function-scope.d.ts +110 -0
- package/src/lib/components/function-scope.js +478 -0
- package/src/lib/components/function-scope.js.map +1 -0
- package/src/lib/components/function-widget.d.ts +75 -0
- package/src/lib/components/function-widget.js +307 -0
- package/src/lib/components/function-widget.js.map +1 -0
- package/src/lib/components/grid.d.ts +91 -0
- package/src/lib/components/grid.js +322 -0
- package/src/lib/components/grid.js.map +1 -0
- package/src/lib/components/icon.d.ts +54 -0
- package/src/lib/components/icon.js +163 -0
- package/src/lib/components/icon.js.map +1 -0
- package/src/lib/components/image-list.d.ts +58 -0
- package/src/lib/components/image-list.js +336 -0
- package/src/lib/components/image-list.js.map +1 -0
- package/src/lib/components/image.d.ts +154 -0
- package/src/lib/components/image.js +451 -0
- package/src/lib/components/image.js.map +1 -0
- package/src/lib/components/inline-text.d.ts +74 -0
- package/src/lib/components/inline-text.js +407 -0
- package/src/lib/components/inline-text.js.map +1 -0
- package/src/lib/components/language-switcher.d.ts +35 -0
- package/src/lib/components/language-switcher.js +179 -0
- package/src/lib/components/language-switcher.js.map +1 -0
- package/src/lib/components/layout-slot.d.ts +68 -0
- package/src/lib/components/layout-slot.js +192 -0
- package/src/lib/components/layout-slot.js.map +1 -0
- package/src/lib/components/link-box-accessible-name.d.ts +79 -0
- package/src/lib/components/link-box-accessible-name.js +158 -0
- package/src/lib/components/link-box-accessible-name.js.map +1 -0
- package/src/lib/components/link-box.d.ts +66 -0
- package/src/lib/components/link-box.js +212 -0
- package/src/lib/components/link-box.js.map +1 -0
- package/src/lib/components/list-item-text.d.ts +22 -0
- package/src/lib/components/list-item-text.js +86 -0
- package/src/lib/components/list-item-text.js.map +1 -0
- package/src/lib/components/list-item.d.ts +32 -0
- package/src/lib/components/list-item.js +127 -0
- package/src/lib/components/list-item.js.map +1 -0
- package/src/lib/components/list.d.ts +34 -0
- package/src/lib/components/list.js +108 -0
- package/src/lib/components/list.js.map +1 -0
- package/src/lib/components/markdown.d.ts +129 -0
- package/src/lib/components/markdown.js +853 -0
- package/src/lib/components/markdown.js.map +1 -0
- package/src/lib/components/nav-menu.d.ts +68 -0
- package/src/lib/components/nav-menu.js +683 -0
- package/src/lib/components/nav-menu.js.map +1 -0
- package/src/lib/components/pagination.d.ts +59 -0
- package/src/lib/components/pagination.js +243 -0
- package/src/lib/components/pagination.js.map +1 -0
- package/src/lib/components/paper.d.ts +47 -0
- package/src/lib/components/paper.js +202 -0
- package/src/lib/components/paper.js.map +1 -0
- package/src/lib/components/plugin-frame.d.ts +64 -0
- package/src/lib/components/plugin-frame.js +335 -0
- package/src/lib/components/plugin-frame.js.map +1 -0
- package/src/lib/components/plugin.d.ts +95 -0
- package/src/lib/components/plugin.js +304 -0
- package/src/lib/components/plugin.js.map +1 -0
- package/src/lib/components/product.d.ts +40 -0
- package/src/lib/components/product.js +287 -0
- package/src/lib/components/product.js.map +1 -0
- package/src/lib/components/reusable-instance.d.ts +57 -0
- package/src/lib/components/reusable-instance.js +126 -0
- package/src/lib/components/reusable-instance.js.map +1 -0
- package/src/lib/components/screen-link.d.ts +85 -0
- package/src/lib/components/screen-link.js +324 -0
- package/src/lib/components/screen-link.js.map +1 -0
- package/src/lib/components/search-box.d.ts +41 -0
- package/src/lib/components/search-box.js +125 -0
- package/src/lib/components/search-box.js.map +1 -0
- package/src/lib/components/section.d.ts +56 -0
- package/src/lib/components/section.js +132 -0
- package/src/lib/components/section.js.map +1 -0
- package/src/lib/components/stack.d.ts +55 -0
- package/src/lib/components/stack.js +309 -0
- package/src/lib/components/stack.js.map +1 -0
- package/src/lib/components/tabs.d.ts +288 -0
- package/src/lib/components/tabs.js +788 -0
- package/src/lib/components/tabs.js.map +1 -0
- package/src/lib/components/theme-mode-switcher.d.ts +38 -0
- package/src/lib/components/theme-mode-switcher.js +168 -0
- package/src/lib/components/theme-mode-switcher.js.map +1 -0
- package/src/lib/components/toolbar.d.ts +37 -0
- package/src/lib/components/toolbar.js +117 -0
- package/src/lib/components/toolbar.js.map +1 -0
- package/src/lib/components/typography.d.ts +33 -0
- package/src/lib/components/typography.js +433 -0
- package/src/lib/components/typography.js.map +1 -0
- package/src/lib/components/video-lightbox-controls.d.ts +131 -0
- package/src/lib/components/video-lightbox-controls.js +536 -0
- package/src/lib/components/video-lightbox-controls.js.map +1 -0
- package/src/lib/components/video-lightbox.d.ts +60 -0
- package/src/lib/components/video-lightbox.js +247 -0
- package/src/lib/components/video-lightbox.js.map +1 -0
- package/src/lib/components/video-playback-beacon.d.ts +80 -0
- package/src/lib/components/video-playback-beacon.js +128 -0
- package/src/lib/components/video-playback-beacon.js.map +1 -0
- package/src/lib/components/video-player-frame.d.ts +58 -0
- package/src/lib/components/video-player-frame.js +51 -0
- package/src/lib/components/video-player-frame.js.map +1 -0
- package/src/lib/components/video.d.ts +220 -0
- package/src/lib/components/video.js +874 -0
- package/src/lib/components/video.js.map +1 -0
- package/src/lib/constants/bundle-common.d.ts +17 -0
- package/src/lib/constants/bundle-common.js +18 -0
- package/src/lib/constants/bundle-common.js.map +1 -0
- package/src/lib/constants/field-presets.d.ts +93 -0
- package/src/lib/constants/field-presets.js +248 -0
- package/src/lib/constants/field-presets.js.map +1 -0
- package/src/lib/plugin.d.ts +80 -0
- package/src/lib/plugin.js +599 -0
- package/src/lib/plugin.js.map +1 -0
- package/src/lib/utils/author-html-label.d.ts +73 -0
- package/src/lib/utils/author-html-label.js +89 -0
- package/src/lib/utils/author-html-label.js.map +1 -0
- package/src/lib/utils/drop-cleared-props.d.ts +18 -0
- package/src/lib/utils/drop-cleared-props.js +74 -0
- package/src/lib/utils/drop-cleared-props.js.map +1 -0
- package/src/lib/utils/element-picker.d.ts +99 -0
- package/src/lib/utils/element-picker.js +140 -0
- package/src/lib/utils/element-picker.js.map +1 -0
- package/src/lib/utils/generate-preset-id.d.ts +19 -0
- package/src/lib/utils/generate-preset-id.js +25 -0
- package/src/lib/utils/generate-preset-id.js.map +1 -0
- package/src/lib/utils/link-target-props.d.ts +53 -0
- package/src/lib/utils/link-target-props.js +53 -0
- package/src/lib/utils/link-target-props.js.map +1 -0
|
@@ -0,0 +1,599 @@
|
|
|
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 { registerPluginInstallPresetMapper, registerPluginInstallPresetsMapper } from "@aglyn/aglyn";
|
|
18
|
+
import { muiPluginInstallToPreset, muiPluginInstallToPresets } from "./components/plugin.js";
|
|
19
|
+
import * as Aglyn from "@aglyn/aglyn";
|
|
20
|
+
import { runInAction } from "mobx";
|
|
21
|
+
import { BUNDLE_ID } from "./constants/bundle-common.js";
|
|
22
|
+
/**
|
|
23
|
+
* One thunk per component module, named here because several ids share one:
|
|
24
|
+
* `collection.tsx` alone exports eight elements, and a module is imported
|
|
25
|
+
* once however many of its components a surface asks for.
|
|
26
|
+
*/ const appBar = ()=>import("./components/app-bar.js");
|
|
27
|
+
const toolbar = ()=>import("./components/toolbar.js");
|
|
28
|
+
const typography = ()=>import("./components/typography.js");
|
|
29
|
+
const inlineText = ()=>import("./components/inline-text.js");
|
|
30
|
+
const button = ()=>import("./components/button.js");
|
|
31
|
+
const container = ()=>import("./components/container.js");
|
|
32
|
+
const layoutSlot = ()=>import("./components/layout-slot.js");
|
|
33
|
+
const list = ()=>import("./components/list.js");
|
|
34
|
+
const listItem = ()=>import("./components/list-item.js");
|
|
35
|
+
const listItemText = ()=>import("./components/list-item-text.js");
|
|
36
|
+
const blocks = ()=>import("./components/blocks.js");
|
|
37
|
+
const dataTable = ()=>import("./components/data-table.js");
|
|
38
|
+
const collection = ()=>import("./components/collection.js");
|
|
39
|
+
const image = ()=>import("./components/image.js");
|
|
40
|
+
const video = ()=>import("./components/video.js");
|
|
41
|
+
const icon = ()=>import("./components/icon.js");
|
|
42
|
+
const languageSwitcher = ()=>import("./components/language-switcher.js");
|
|
43
|
+
const reusableInstance = ()=>import("./components/reusable-instance.js");
|
|
44
|
+
const screenLink = ()=>import("./components/screen-link.js");
|
|
45
|
+
const linkBox = ()=>import("./components/link-box.js");
|
|
46
|
+
const navMenu = ()=>import("./components/nav-menu.js");
|
|
47
|
+
const drawer = ()=>import("./components/drawer.js");
|
|
48
|
+
const functionWidget = ()=>import("./components/function-widget.js");
|
|
49
|
+
const functionScope = ()=>import("./components/function-scope.js");
|
|
50
|
+
const product = ()=>import("./components/product.js");
|
|
51
|
+
const plugin = ()=>import("./components/plugin.js");
|
|
52
|
+
const customHtml = ()=>import("./components/custom-html.js");
|
|
53
|
+
const searchBox = ()=>import("./components/search-box.js");
|
|
54
|
+
const markdown = ()=>import("./components/markdown.js");
|
|
55
|
+
const section = ()=>import("./components/section.js");
|
|
56
|
+
const stack = ()=>import("./components/stack.js");
|
|
57
|
+
const box = ()=>import("./components/box.js");
|
|
58
|
+
const documentRoot = ()=>import("./components/document-root.js");
|
|
59
|
+
const grid = ()=>import("./components/grid.js");
|
|
60
|
+
const paper = ()=>import("./components/paper.js");
|
|
61
|
+
const card = ()=>import("./components/card.js");
|
|
62
|
+
const accordion = ()=>import("./components/accordion.js");
|
|
63
|
+
const tabs = ()=>import("./components/tabs.js");
|
|
64
|
+
const imageList = ()=>import("./components/image-list.js");
|
|
65
|
+
const pagination = ()=>import("./components/pagination.js");
|
|
66
|
+
const breadcrumbs = ()=>import("./components/breadcrumbs.js");
|
|
67
|
+
const themeModeSwitcher = ()=>import("./components/theme-mode-switcher.js");
|
|
68
|
+
/**
|
|
69
|
+
* Every component this bundle can register (AGL-140, AGL-3141).
|
|
70
|
+
*
|
|
71
|
+
* One entry per component keeps register/unregister symmetric — the old
|
|
72
|
+
* hand-maintained lists had drifted, and several components were never
|
|
73
|
+
* unregistered on destroy. It replaces a single array built from sixty static
|
|
74
|
+
* imports, which put every element on every published page while the page
|
|
75
|
+
* rendered about nineteen of them.
|
|
76
|
+
*
|
|
77
|
+
* Exported so the bundle is assertable (AGL-1201): duplicate component or
|
|
78
|
+
* preset ids collapse silently inside the registry's keyed records, so they
|
|
79
|
+
* can only be caught before registration.
|
|
80
|
+
*/ export const MUI_COMPONENT_SOURCES = {
|
|
81
|
+
muiAppBar: {
|
|
82
|
+
module: appBar,
|
|
83
|
+
component: 'default',
|
|
84
|
+
schema: 'schema',
|
|
85
|
+
presets: 'presets'
|
|
86
|
+
},
|
|
87
|
+
muiToolbar: {
|
|
88
|
+
module: toolbar,
|
|
89
|
+
component: 'default',
|
|
90
|
+
schema: 'schema',
|
|
91
|
+
presets: 'presets'
|
|
92
|
+
},
|
|
93
|
+
muiTypography: {
|
|
94
|
+
module: typography,
|
|
95
|
+
component: 'default',
|
|
96
|
+
schema: 'schema',
|
|
97
|
+
presets: 'presets'
|
|
98
|
+
},
|
|
99
|
+
// The inline text run (AGL-1235): Typography is `textEditable` and so a
|
|
100
|
+
// leaf, which left no way to emphasize a phrase inside a sentence — every
|
|
101
|
+
// statement rendered as one flat color.
|
|
102
|
+
muiInlineText: {
|
|
103
|
+
module: inlineText,
|
|
104
|
+
component: 'default',
|
|
105
|
+
schema: 'schema',
|
|
106
|
+
presets: 'presets'
|
|
107
|
+
},
|
|
108
|
+
muiButton: {
|
|
109
|
+
module: button,
|
|
110
|
+
component: 'default',
|
|
111
|
+
schema: 'schema',
|
|
112
|
+
presets: 'presets'
|
|
113
|
+
},
|
|
114
|
+
muiContainer: {
|
|
115
|
+
module: container,
|
|
116
|
+
component: 'default',
|
|
117
|
+
schema: 'schema',
|
|
118
|
+
presets: 'presets'
|
|
119
|
+
},
|
|
120
|
+
layoutSlot: {
|
|
121
|
+
module: layoutSlot,
|
|
122
|
+
component: 'default',
|
|
123
|
+
schema: 'schema',
|
|
124
|
+
presets: 'presets'
|
|
125
|
+
},
|
|
126
|
+
muiList: {
|
|
127
|
+
module: list,
|
|
128
|
+
component: 'default',
|
|
129
|
+
schema: 'schema',
|
|
130
|
+
presets: 'presets'
|
|
131
|
+
},
|
|
132
|
+
muiListItem: {
|
|
133
|
+
module: listItem,
|
|
134
|
+
component: 'default',
|
|
135
|
+
schema: 'schema',
|
|
136
|
+
presets: 'presets'
|
|
137
|
+
},
|
|
138
|
+
muiListItemText: {
|
|
139
|
+
module: listItemText,
|
|
140
|
+
component: 'default',
|
|
141
|
+
schema: 'schema',
|
|
142
|
+
presets: 'presets'
|
|
143
|
+
},
|
|
144
|
+
// form, formField moved to @aglyn/plugins-forms (AGL-395).
|
|
145
|
+
videoEmbed: {
|
|
146
|
+
module: blocks,
|
|
147
|
+
component: 'VideoEmbed',
|
|
148
|
+
schema: 'videoEmbedSchema',
|
|
149
|
+
presets: 'blockPresets'
|
|
150
|
+
},
|
|
151
|
+
socialLinks: {
|
|
152
|
+
module: blocks,
|
|
153
|
+
component: 'SocialLinks',
|
|
154
|
+
schema: 'socialLinksSchema'
|
|
155
|
+
},
|
|
156
|
+
// A real data grid (AGL-2543): the feature matrix a comparison page is
|
|
157
|
+
// built around, which the palette had no element for at all.
|
|
158
|
+
dataTable: {
|
|
159
|
+
module: dataTable,
|
|
160
|
+
component: 'default',
|
|
161
|
+
schema: 'dataTableSchema',
|
|
162
|
+
presets: 'dataTablePresets'
|
|
163
|
+
},
|
|
164
|
+
// Content collections (AGL-551/582): entries repeater, markdown entry
|
|
165
|
+
// body, related posts, share bar, entry meta.
|
|
166
|
+
collectionEntries: {
|
|
167
|
+
module: collection,
|
|
168
|
+
component: 'CollectionEntries',
|
|
169
|
+
schema: 'collectionEntriesSchema',
|
|
170
|
+
presets: 'collectionPresets'
|
|
171
|
+
},
|
|
172
|
+
collectionEntryBody: {
|
|
173
|
+
module: collection,
|
|
174
|
+
component: 'CollectionEntryBody',
|
|
175
|
+
schema: 'collectionEntryBodySchema'
|
|
176
|
+
},
|
|
177
|
+
collectionRelated: {
|
|
178
|
+
module: collection,
|
|
179
|
+
component: 'CollectionRelated',
|
|
180
|
+
schema: 'collectionRelatedSchema'
|
|
181
|
+
},
|
|
182
|
+
collectionShare: {
|
|
183
|
+
module: collection,
|
|
184
|
+
component: 'CollectionShare',
|
|
185
|
+
schema: 'collectionShareSchema'
|
|
186
|
+
},
|
|
187
|
+
collectionEntryMeta: {
|
|
188
|
+
module: collection,
|
|
189
|
+
component: 'CollectionEntryMeta',
|
|
190
|
+
schema: 'collectionEntryMetaSchema'
|
|
191
|
+
},
|
|
192
|
+
// The author card that closes an article (AGL-2486): the byline block
|
|
193
|
+
// prints a name, and the record behind it also has a portrait and a bio.
|
|
194
|
+
collectionEntryAuthor: {
|
|
195
|
+
module: collection,
|
|
196
|
+
component: 'CollectionEntryAuthor',
|
|
197
|
+
schema: 'collectionEntryAuthorSchema'
|
|
198
|
+
},
|
|
199
|
+
// The subject of an author's own page (AGL-2518): the same person the
|
|
200
|
+
// card above draws as a footnote, with the role fields it has no room for.
|
|
201
|
+
contentAuthorProfile: {
|
|
202
|
+
module: collection,
|
|
203
|
+
component: 'ContentAuthorProfile',
|
|
204
|
+
schema: 'contentAuthorProfileSchema'
|
|
205
|
+
},
|
|
206
|
+
// Category pills (AGL-1321): real anchors to /{collection}/category/{slug}.
|
|
207
|
+
collectionCategories: {
|
|
208
|
+
module: collection,
|
|
209
|
+
component: 'CollectionCategories',
|
|
210
|
+
schema: 'collectionCategoriesSchema'
|
|
211
|
+
},
|
|
212
|
+
// The toolbar search box (AGL-1516): the entries block's own field cannot
|
|
213
|
+
// leave it, so the frame's pills-left / search-right row needs a block.
|
|
214
|
+
collectionSearch: {
|
|
215
|
+
module: collection,
|
|
216
|
+
component: 'CollectionSearch',
|
|
217
|
+
schema: 'collectionSearchSchema'
|
|
218
|
+
},
|
|
219
|
+
image: {
|
|
220
|
+
module: image,
|
|
221
|
+
component: 'default',
|
|
222
|
+
schema: 'schema',
|
|
223
|
+
presets: 'presets'
|
|
224
|
+
},
|
|
225
|
+
video: {
|
|
226
|
+
module: video,
|
|
227
|
+
component: 'default',
|
|
228
|
+
schema: 'schema',
|
|
229
|
+
presets: 'presets'
|
|
230
|
+
},
|
|
231
|
+
icon: {
|
|
232
|
+
module: icon,
|
|
233
|
+
component: 'default',
|
|
234
|
+
schema: 'schema',
|
|
235
|
+
presets: 'presets'
|
|
236
|
+
},
|
|
237
|
+
// booking moved to @aglyn/plugins-bookings (AGL-395).
|
|
238
|
+
// eventList moved to @aglyn/plugins-events-calendar (AGL-313).
|
|
239
|
+
languageSwitcher: {
|
|
240
|
+
module: languageSwitcher,
|
|
241
|
+
component: 'default',
|
|
242
|
+
schema: 'schema',
|
|
243
|
+
presets: 'presets'
|
|
244
|
+
},
|
|
245
|
+
reusableInstance: {
|
|
246
|
+
module: reusableInstance,
|
|
247
|
+
component: 'default',
|
|
248
|
+
schema: 'schema',
|
|
249
|
+
presets: 'presets'
|
|
250
|
+
},
|
|
251
|
+
muiScreenLink: {
|
|
252
|
+
module: screenLink,
|
|
253
|
+
component: 'default',
|
|
254
|
+
schema: 'schema',
|
|
255
|
+
presets: 'presets'
|
|
256
|
+
},
|
|
257
|
+
// The linking container (AGL-1231): every other link element is a leaf,
|
|
258
|
+
// so a tile whose icon and description also belong to the target had no
|
|
259
|
+
// way to be authored.
|
|
260
|
+
muiLinkBox: {
|
|
261
|
+
module: linkBox,
|
|
262
|
+
component: 'default',
|
|
263
|
+
schema: 'schema',
|
|
264
|
+
presets: 'presets'
|
|
265
|
+
},
|
|
266
|
+
// Nav menu system (AGL-562): dropdown, mega menu, drawer + menu button.
|
|
267
|
+
muiNavMenu: {
|
|
268
|
+
module: navMenu,
|
|
269
|
+
component: 'default',
|
|
270
|
+
schema: 'navMenuSchema',
|
|
271
|
+
presets: 'navMenuPresets'
|
|
272
|
+
},
|
|
273
|
+
muiMegaMenu: {
|
|
274
|
+
module: navMenu,
|
|
275
|
+
component: 'MegaMenu',
|
|
276
|
+
schema: 'megaMenuSchema'
|
|
277
|
+
},
|
|
278
|
+
muiDrawer: {
|
|
279
|
+
module: drawer,
|
|
280
|
+
component: 'default',
|
|
281
|
+
schema: 'drawerSchema',
|
|
282
|
+
presets: 'drawerPresets'
|
|
283
|
+
},
|
|
284
|
+
muiDrawerToggle: {
|
|
285
|
+
module: drawer,
|
|
286
|
+
component: 'DrawerToggle',
|
|
287
|
+
schema: 'drawerToggleSchema'
|
|
288
|
+
},
|
|
289
|
+
functionWidget: {
|
|
290
|
+
module: functionWidget,
|
|
291
|
+
component: 'default',
|
|
292
|
+
schema: 'schema',
|
|
293
|
+
presets: 'presets'
|
|
294
|
+
},
|
|
295
|
+
functionScope: {
|
|
296
|
+
module: functionScope,
|
|
297
|
+
component: 'default',
|
|
298
|
+
schema: 'schema',
|
|
299
|
+
presets: 'presets'
|
|
300
|
+
},
|
|
301
|
+
functionInput: {
|
|
302
|
+
module: functionScope,
|
|
303
|
+
component: 'FunctionInput',
|
|
304
|
+
schema: 'functionInputSchema',
|
|
305
|
+
presets: 'functionInputPresets'
|
|
306
|
+
},
|
|
307
|
+
functionOutput: {
|
|
308
|
+
module: functionScope,
|
|
309
|
+
component: 'FunctionOutput',
|
|
310
|
+
schema: 'functionOutputSchema',
|
|
311
|
+
presets: 'functionOutputPresets'
|
|
312
|
+
},
|
|
313
|
+
functionShow: {
|
|
314
|
+
module: functionScope,
|
|
315
|
+
component: 'FunctionShow',
|
|
316
|
+
schema: 'functionShowSchema',
|
|
317
|
+
presets: 'functionShowPresets'
|
|
318
|
+
},
|
|
319
|
+
product: {
|
|
320
|
+
module: product,
|
|
321
|
+
component: 'default',
|
|
322
|
+
schema: 'schema',
|
|
323
|
+
presets: 'presets'
|
|
324
|
+
},
|
|
325
|
+
marketplacePlugin: {
|
|
326
|
+
module: plugin,
|
|
327
|
+
component: 'default',
|
|
328
|
+
schema: 'schema',
|
|
329
|
+
presets: 'presets'
|
|
330
|
+
},
|
|
331
|
+
'custom-html': {
|
|
332
|
+
module: customHtml,
|
|
333
|
+
component: 'default',
|
|
334
|
+
schema: 'schema',
|
|
335
|
+
presets: 'presets'
|
|
336
|
+
},
|
|
337
|
+
searchBox: {
|
|
338
|
+
module: searchBox,
|
|
339
|
+
component: 'default',
|
|
340
|
+
schema: 'schema',
|
|
341
|
+
presets: 'presets'
|
|
342
|
+
},
|
|
343
|
+
// Long-form documents (AGL-1162): one markdown element carrying the whole
|
|
344
|
+
// page, and an "On this page" aside derived from its headings.
|
|
345
|
+
markdown: {
|
|
346
|
+
module: markdown,
|
|
347
|
+
component: 'Markdown',
|
|
348
|
+
schema: 'markdownSchema',
|
|
349
|
+
presets: 'markdownPresets'
|
|
350
|
+
},
|
|
351
|
+
tableOfContents: {
|
|
352
|
+
module: markdown,
|
|
353
|
+
component: 'TableOfContents',
|
|
354
|
+
schema: 'tableOfContentsSchema'
|
|
355
|
+
},
|
|
356
|
+
section: {
|
|
357
|
+
module: section,
|
|
358
|
+
component: 'default',
|
|
359
|
+
schema: 'schema',
|
|
360
|
+
presets: 'presets'
|
|
361
|
+
},
|
|
362
|
+
muiStack: {
|
|
363
|
+
module: stack,
|
|
364
|
+
component: 'default',
|
|
365
|
+
schema: 'schema',
|
|
366
|
+
presets: 'presets'
|
|
367
|
+
},
|
|
368
|
+
// Layout & surface primitives (AGL-1201).
|
|
369
|
+
muiBox: {
|
|
370
|
+
module: box,
|
|
371
|
+
component: 'default',
|
|
372
|
+
schema: 'schema',
|
|
373
|
+
presets: 'presets'
|
|
374
|
+
},
|
|
375
|
+
// The canvas ROOT (AGL-2486): registered so the Document layer has a
|
|
376
|
+
// schema — an element picker — instead of falling through to the
|
|
377
|
+
// renderer's unstyled div. No preset: it is not an element anybody drops.
|
|
378
|
+
div: {
|
|
379
|
+
module: documentRoot,
|
|
380
|
+
component: 'default',
|
|
381
|
+
schema: 'schema'
|
|
382
|
+
},
|
|
383
|
+
muiGrid: {
|
|
384
|
+
module: grid,
|
|
385
|
+
component: 'default',
|
|
386
|
+
schema: 'schema',
|
|
387
|
+
presets: 'presets'
|
|
388
|
+
},
|
|
389
|
+
muiPaper: {
|
|
390
|
+
module: paper,
|
|
391
|
+
component: 'default',
|
|
392
|
+
schema: 'schema',
|
|
393
|
+
presets: 'presets'
|
|
394
|
+
},
|
|
395
|
+
muiCard: {
|
|
396
|
+
module: card,
|
|
397
|
+
component: 'default',
|
|
398
|
+
schema: 'cardSchema',
|
|
399
|
+
presets: 'cardPresets'
|
|
400
|
+
},
|
|
401
|
+
muiCardHeader: {
|
|
402
|
+
module: card,
|
|
403
|
+
component: 'CardHeaderElement',
|
|
404
|
+
schema: 'cardHeaderSchema'
|
|
405
|
+
},
|
|
406
|
+
muiCardContent: {
|
|
407
|
+
module: card,
|
|
408
|
+
component: 'CardContentElement',
|
|
409
|
+
schema: 'cardContentSchema'
|
|
410
|
+
},
|
|
411
|
+
muiCardActions: {
|
|
412
|
+
module: card,
|
|
413
|
+
component: 'CardActionsElement',
|
|
414
|
+
schema: 'cardActionsSchema'
|
|
415
|
+
},
|
|
416
|
+
muiAccordion: {
|
|
417
|
+
module: accordion,
|
|
418
|
+
component: 'default',
|
|
419
|
+
schema: 'accordionSchema',
|
|
420
|
+
presets: 'accordionPresets'
|
|
421
|
+
},
|
|
422
|
+
muiAccordionSummary: {
|
|
423
|
+
module: accordion,
|
|
424
|
+
component: 'AccordionSummaryElement',
|
|
425
|
+
schema: 'accordionSummarySchema'
|
|
426
|
+
},
|
|
427
|
+
muiAccordionDetails: {
|
|
428
|
+
module: accordion,
|
|
429
|
+
component: 'AccordionDetailsElement',
|
|
430
|
+
schema: 'accordionDetailsSchema'
|
|
431
|
+
},
|
|
432
|
+
muiTabs: {
|
|
433
|
+
module: tabs,
|
|
434
|
+
component: 'default',
|
|
435
|
+
schema: 'tabsSchema',
|
|
436
|
+
presets: 'tabsPresets'
|
|
437
|
+
},
|
|
438
|
+
muiTabPanel: {
|
|
439
|
+
module: tabs,
|
|
440
|
+
component: 'TabPanelElement',
|
|
441
|
+
schema: 'tabPanelSchema'
|
|
442
|
+
},
|
|
443
|
+
muiImageList: {
|
|
444
|
+
module: imageList,
|
|
445
|
+
component: 'default',
|
|
446
|
+
schema: 'imageListSchema',
|
|
447
|
+
presets: 'imageListPresets'
|
|
448
|
+
},
|
|
449
|
+
muiImageListItem: {
|
|
450
|
+
module: imageList,
|
|
451
|
+
component: 'ImageListItemElement',
|
|
452
|
+
schema: 'imageListItemSchema'
|
|
453
|
+
},
|
|
454
|
+
muiPagination: {
|
|
455
|
+
module: pagination,
|
|
456
|
+
component: 'default',
|
|
457
|
+
schema: 'schema',
|
|
458
|
+
presets: 'presets'
|
|
459
|
+
},
|
|
460
|
+
muiBreadcrumbs: {
|
|
461
|
+
module: breadcrumbs,
|
|
462
|
+
component: 'default',
|
|
463
|
+
schema: 'schema',
|
|
464
|
+
presets: 'presets'
|
|
465
|
+
},
|
|
466
|
+
themeModeSwitcher: {
|
|
467
|
+
module: themeModeSwitcher,
|
|
468
|
+
component: 'default',
|
|
469
|
+
schema: 'schema',
|
|
470
|
+
presets: 'presets'
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
/**
|
|
474
|
+
* The bundle entries for `componentIds` — every component when none are
|
|
475
|
+
* named, which is what the console and the besigner ask for because their
|
|
476
|
+
* palette shows every element.
|
|
477
|
+
*
|
|
478
|
+
* Both paths go through the same map, so there is one statement of where a
|
|
479
|
+
* component comes from. An id the map does not know is dropped rather than
|
|
480
|
+
* resolved to an undefined component: a page whose document carries an
|
|
481
|
+
* element this bundle does not own is a document for another plugin's
|
|
482
|
+
* element, not a reason to register a blank.
|
|
483
|
+
*/ export async function loadMuiBundle(componentIds) {
|
|
484
|
+
const ids = (componentIds != null ? componentIds : Object.keys(MUI_COMPONENT_SOURCES)).filter((id)=>id in MUI_COMPONENT_SOURCES);
|
|
485
|
+
// Keyed on the THUNK, so `collection.tsx` is imported once for the eight
|
|
486
|
+
// ids that name it rather than eight times.
|
|
487
|
+
const pending = new Map();
|
|
488
|
+
const modules = await Promise.all(ids.map((id)=>{
|
|
489
|
+
const source = MUI_COMPONENT_SOURCES[id];
|
|
490
|
+
let load = pending.get(source.module);
|
|
491
|
+
if (!load) {
|
|
492
|
+
load = source.module();
|
|
493
|
+
pending.set(source.module, load);
|
|
494
|
+
}
|
|
495
|
+
return load;
|
|
496
|
+
}));
|
|
497
|
+
return ids.map((id, index)=>{
|
|
498
|
+
const source = MUI_COMPONENT_SOURCES[id];
|
|
499
|
+
const mod = modules[index];
|
|
500
|
+
return _extends({
|
|
501
|
+
component: mod[source.component],
|
|
502
|
+
schema: mod[source.schema]
|
|
503
|
+
}, source.presets ? {
|
|
504
|
+
presets: mod[source.presets]
|
|
505
|
+
} : {});
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* Every component registered so far, by id.
|
|
510
|
+
*
|
|
511
|
+
* A second page places elements the first did not, and reaches this bundle
|
|
512
|
+
* again with them; the map is what tells the two apart, and what `load` and
|
|
513
|
+
* `destroy` read so a reload registers everything asked for so far and
|
|
514
|
+
* unregistration stays symmetric with registration.
|
|
515
|
+
*/ const registeredById = new Map();
|
|
516
|
+
function registerEntries(entries) {
|
|
517
|
+
// One mobx transaction (AGL-371): a single observer notification
|
|
518
|
+
// for the whole batch instead of one per component/preset.
|
|
519
|
+
runInAction(()=>{
|
|
520
|
+
for (const entry of entries){
|
|
521
|
+
Aglyn.components.registerComponent(entry.component, entry.schema);
|
|
522
|
+
}
|
|
523
|
+
for (const entry of entries){
|
|
524
|
+
var _entry_presets;
|
|
525
|
+
if ((_entry_presets = entry.presets) == null ? void 0 : _entry_presets.length) {
|
|
526
|
+
Aglyn.components.registerPreset(entry.presets);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Registers the core MUI component library with the `@aglyn/aglyn` global
|
|
533
|
+
* plugin registry (`AglynNodeRenderer`, `Aglyn.canvas`, ...). This is the
|
|
534
|
+
* platform's core component bundle; feature bundles (commerce,
|
|
535
|
+
* events-calendar, email) declare a dependency on it.
|
|
536
|
+
*
|
|
537
|
+
* `use.componentIds` narrows it to the elements the surface places
|
|
538
|
+
* (AGL-3116/AGL-3141), so a published page fetches those modules and no
|
|
539
|
+
* others. A caller that names nothing gets the whole library, which is what
|
|
540
|
+
* the console and the besigner need and what any surface that cannot say
|
|
541
|
+
* what it places must be given: an element whose component never registered
|
|
542
|
+
* renders NOTHING, silently (AGL-52).
|
|
543
|
+
*/ export async function registerMuiPlugin(use) {
|
|
544
|
+
var _ref;
|
|
545
|
+
// Install→preset mapper (AGL-419): the console's drawer registration
|
|
546
|
+
// consumes it through core, never importing this plugin.
|
|
547
|
+
registerPluginInstallPresetMapper(muiPluginInstallToPreset);
|
|
548
|
+
// Declared canvas elements become their own palette entries (AGL-1031).
|
|
549
|
+
registerPluginInstallPresetsMapper(muiPluginInstallToPresets);
|
|
550
|
+
const wanted = ((_ref = use == null ? void 0 : use.componentIds) != null ? _ref : Object.keys(MUI_COMPONENT_SOURCES)).filter((id)=>id in MUI_COMPONENT_SOURCES).filter((id)=>!registeredById.has(id));
|
|
551
|
+
const existing = Aglyn.plugins.getDependency(BUNDLE_ID);
|
|
552
|
+
if (existing && !wanted.length) return;
|
|
553
|
+
const entries = wanted.length ? await loadMuiBundle(wanted) : [];
|
|
554
|
+
for (const entry of entries){
|
|
555
|
+
registeredById.set(entry.schema.$id, entry);
|
|
556
|
+
}
|
|
557
|
+
// The dependency is added even when this page places nothing of it: a
|
|
558
|
+
// feature bundle declares mui as a dependency and stays WAITING — its own
|
|
559
|
+
// components never registering — until mui is in the manager.
|
|
560
|
+
//
|
|
561
|
+
// Re-read after the imports rather than trusting the check above: the
|
|
562
|
+
// manager runs `load()` from `addDependency` synchronously, so the first
|
|
563
|
+
// caller to get here creates the dependency and every later one takes the
|
|
564
|
+
// branch that registers what it added into a bundle already LOADED.
|
|
565
|
+
if (Aglyn.plugins.getDependency(BUNDLE_ID)) {
|
|
566
|
+
if (entries.length) registerEntries(entries);
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
Aglyn.plugins.addDependency({
|
|
570
|
+
$id: BUNDLE_ID,
|
|
571
|
+
displayName: 'Material UI',
|
|
572
|
+
description: 'Material UI elements',
|
|
573
|
+
title: 'Material UI',
|
|
574
|
+
dependencies: {},
|
|
575
|
+
load () {
|
|
576
|
+
registerEntries([
|
|
577
|
+
...registeredById.values()
|
|
578
|
+
]);
|
|
579
|
+
},
|
|
580
|
+
destroy () {
|
|
581
|
+
const entries = [
|
|
582
|
+
...registeredById.values()
|
|
583
|
+
];
|
|
584
|
+
runInAction(()=>{
|
|
585
|
+
for (const entry of entries){
|
|
586
|
+
var _entry_presets;
|
|
587
|
+
if ((_entry_presets = entry.presets) == null ? void 0 : _entry_presets.length) {
|
|
588
|
+
Aglyn.components.unregisterPreset(entry.presets.map((preset)=>preset.$id));
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
for (const entry of entries){
|
|
592
|
+
Aglyn.components.unregisterComponent(entry.schema.$id);
|
|
593
|
+
}
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +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'\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 */\nconst appBar = () => import('./components/app-bar')\nconst toolbar = () => import('./components/toolbar')\nconst typography = () => import('./components/typography')\nconst inlineText = () => import('./components/inline-text')\nconst button = () => import('./components/button')\nconst container = () => import('./components/container')\nconst layoutSlot = () => import('./components/layout-slot')\nconst list = () => import('./components/list')\nconst listItem = () => import('./components/list-item')\nconst listItemText = () => import('./components/list-item-text')\nconst blocks = () => import('./components/blocks')\nconst dataTable = () => import('./components/data-table')\nconst collection = () => import('./components/collection')\nconst image = () => import('./components/image')\nconst video = () => import('./components/video')\nconst icon = () => import('./components/icon')\nconst languageSwitcher = () => import('./components/language-switcher')\nconst reusableInstance = () => import('./components/reusable-instance')\nconst screenLink = () => import('./components/screen-link')\nconst linkBox = () => import('./components/link-box')\nconst navMenu = () => import('./components/nav-menu')\nconst drawer = () => import('./components/drawer')\nconst functionWidget = () => import('./components/function-widget')\nconst functionScope = () => import('./components/function-scope')\nconst product = () => import('./components/product')\nconst plugin = () => import('./components/plugin')\nconst customHtml = () => import('./components/custom-html')\nconst searchBox = () => import('./components/search-box')\nconst markdown = () => import('./components/markdown')\nconst section = () => import('./components/section')\nconst stack = () => import('./components/stack')\nconst box = () => import('./components/box')\nconst documentRoot = () => import('./components/document-root')\nconst grid = () => import('./components/grid')\nconst paper = () => import('./components/paper')\nconst card = () => import('./components/card')\nconst accordion = () => import('./components/accordion')\nconst tabs = () => import('./components/tabs')\nconst imageList = () => import('./components/image-list')\nconst pagination = () => import('./components/pagination')\nconst breadcrumbs = () => import('./components/breadcrumbs')\nconst themeModeSwitcher = () => import('./components/theme-mode-switcher')\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","appBar","toolbar","typography","inlineText","button","container","layoutSlot","list","listItem","listItemText","blocks","dataTable","collection","image","video","icon","languageSwitcher","reusableInstance","screenLink","linkBox","navMenu","drawer","functionWidget","functionScope","product","plugin","customHtml","searchBox","markdown","section","stack","box","documentRoot","grid","paper","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,yBAAqB;AAC5B,YAAYC,WAAW,eAAc;AACrC,SAASC,WAAW,QAAQ,OAAM;AAClC,SAASC,SAAS,QAAQ,+BAA2B;AAErD;;;;CAIC,GACD,MAAMC,SAAS,IAAM,MAAM,CAAC;AAC5B,MAAMC,UAAU,IAAM,MAAM,CAAC;AAC7B,MAAMC,aAAa,IAAM,MAAM,CAAC;AAChC,MAAMC,aAAa,IAAM,MAAM,CAAC;AAChC,MAAMC,SAAS,IAAM,MAAM,CAAC;AAC5B,MAAMC,YAAY,IAAM,MAAM,CAAC;AAC/B,MAAMC,aAAa,IAAM,MAAM,CAAC;AAChC,MAAMC,OAAO,IAAM,MAAM,CAAC;AAC1B,MAAMC,WA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