@muibook/components 20.0.0 → 20.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +67 -0
- package/DESIGN.md +358 -0
- package/README.md +52 -1
- package/dist/esm/agent/keywords/index.js +2 -204
- package/dist/esm/agent/prompts/index.js +6 -434
- package/dist/esm/components/mui-accordion/core/index.js +25 -17
- package/dist/esm/components/mui-avatar/index.js +99 -42
- package/dist/esm/components/mui-avatar-chip/index.js +158 -0
- package/dist/esm/components/mui-avatar-group/index.js +88 -0
- package/dist/esm/components/mui-badge/index.js +2 -2
- package/dist/esm/components/mui-body/index.js +20 -11
- package/dist/esm/components/mui-button/index.js +117 -65
- package/dist/esm/components/mui-calendar/index.js +199 -0
- package/dist/esm/components/mui-card/body/index.js +32 -17
- package/dist/esm/components/mui-card/footer/index.js +11 -9
- package/dist/esm/components/mui-carousel/controller/index.js +1 -1
- package/dist/esm/components/mui-checkbox/index.js +23 -18
- package/dist/esm/components/mui-chip/index.js +184 -68
- package/dist/esm/components/mui-chip-input/index.js +146 -137
- package/dist/esm/components/mui-chip-rail/index.js +154 -51
- package/dist/esm/components/mui-code/index.js +27 -8
- package/dist/esm/components/mui-container/index.js +68 -45
- package/dist/esm/components/mui-date-picker/index.js +169 -0
- package/dist/esm/components/mui-drawer/index.js +968 -100
- package/dist/esm/components/mui-dropdown/index.js +250 -63
- package/dist/esm/components/mui-field/index.js +1 -1
- package/dist/esm/components/mui-file-upload/index.js +13 -4
- package/dist/esm/components/mui-form-group/index.js +1 -2
- package/dist/esm/components/mui-form-message/index.js +4 -9
- package/dist/esm/components/mui-hint/index.js +178 -72
- package/dist/esm/components/mui-icons/copy/index.js +54 -0
- package/dist/esm/components/mui-icons/fullscreen/index.js +5 -0
- package/dist/esm/components/mui-icons/icon-helper/index.js +56 -0
- package/dist/esm/components/mui-icons/index.js +14 -1
- package/dist/esm/components/mui-icons/moon/index.js +3 -1
- package/dist/esm/components/mui-icons/{rectangle-bottom-panel → panel}/index.js +6 -6
- package/dist/esm/components/mui-icons/pause/index.js +5 -0
- package/dist/esm/components/mui-icons/picture-in-picture/index.js +5 -0
- package/dist/esm/components/mui-icons/play-fill/index.js +5 -0
- package/dist/esm/components/mui-icons/rectangle-right-drawer/index.js +56 -0
- package/dist/esm/components/mui-icons/reload/index.js +5 -0
- package/dist/esm/components/mui-icons/speaker-mute/index.js +5 -0
- package/dist/esm/components/mui-icons/speaker-one-wave/index.js +5 -0
- package/dist/esm/components/mui-icons/speaker-two-wave/index.js +5 -0
- package/dist/esm/components/mui-icons/spinner/index.js +7 -5
- package/dist/esm/components/mui-icons/stop-fill/index.js +5 -0
- package/dist/esm/components/mui-icons/sun/index.js +5 -5
- package/dist/esm/components/mui-icons/timer/index.js +54 -0
- package/dist/esm/components/mui-icons/toggle/index.js +16 -6
- package/dist/esm/components/mui-icons/vertical-ellipsis/index.js +5 -0
- package/dist/esm/components/mui-illustrations/trash/index.js +6 -5
- package/dist/esm/components/mui-input/index.js +87 -62
- package/dist/esm/components/mui-link/index.js +195 -83
- package/dist/esm/components/mui-media-player/index.js +1577 -83
- package/dist/esm/components/mui-model-viewer/index.js +258 -0
- package/dist/esm/components/mui-progress-ring/index.js +349 -0
- package/dist/esm/components/mui-prompt/index.js +99 -71
- package/dist/esm/components/mui-prompt-preview/index.js +11 -23
- package/dist/esm/components/mui-radio/index.js +38 -17
- package/dist/esm/components/mui-range-input/index.js +9 -4
- package/dist/esm/components/mui-responsive/index.js +60 -27
- package/dist/esm/components/mui-search-input/index.js +300 -0
- package/dist/esm/components/mui-select/index.js +231 -42
- package/dist/esm/components/mui-slat/slat/index.js +40 -12
- package/dist/esm/components/mui-spinner/index.js +11 -9
- package/dist/esm/components/mui-switch/index.js +23 -20
- package/dist/esm/components/mui-table/row/index.js +2 -6
- package/dist/esm/components/mui-table/table/index.js +157 -14
- package/dist/esm/components/mui-textarea/index.js +43 -26
- package/dist/esm/components/mui-time/index/index.js +336 -0
- package/dist/esm/components/mui-time-picker/index.js +126 -0
- package/dist/esm/components/mui-video-thumbnail/index.js +5 -5
- package/dist/esm/css/mui-brand.css +12 -8
- package/dist/esm/css/mui-tokens.css +417 -305
- package/dist/esm/css/readme.md +2 -2
- package/dist/esm/custom-elements.json +3678 -1553
- package/dist/esm/dynamic-attrs.json +263 -66
- package/dist/esm/index.js +30 -6
- package/dist/esm/knowledge/compositions/index.js +1560 -0
- package/dist/esm/knowledge/index.js +28 -0
- package/dist/esm/knowledge/keywords/index.js +306 -0
- package/dist/esm/knowledge/rules/index.js +199 -0
- package/dist/esm/tokens/js/index.js +143 -139
- package/dist/types/agent/keywords/index.d.ts +1 -1
- package/dist/types/components/mui-avatar-chip/api.d.ts +28 -0
- package/dist/types/components/mui-avatar-chip/index.d.ts +18 -0
- package/dist/types/components/mui-avatar-group/api.d.ts +28 -0
- package/dist/types/components/mui-avatar-group/doc.d.ts +2 -0
- package/dist/types/components/mui-avatar-group/index.d.ts +1 -0
- package/dist/types/components/mui-button/api.d.ts +2 -2
- package/dist/types/components/mui-calendar/api.d.ts +41 -0
- package/dist/types/components/mui-calendar/doc.d.ts +2 -0
- package/dist/types/components/mui-calendar/index.d.ts +3 -0
- package/dist/types/components/mui-checkbox/api.d.ts +4 -0
- package/dist/types/components/mui-chip-input/api.d.ts +4 -0
- package/dist/types/components/mui-chip-rail/index.d.ts +1 -0
- package/dist/types/components/mui-date-picker/api.d.ts +38 -0
- package/dist/types/components/mui-date-picker/doc.d.ts +2 -0
- package/dist/types/components/mui-date-picker/index.d.ts +6 -0
- package/dist/types/components/mui-drawer/api.d.ts +4 -0
- package/dist/types/components/mui-drawer/index.d.ts +2 -0
- package/dist/types/components/mui-file-upload/api.d.ts +4 -0
- package/dist/types/components/mui-icons/fullscreen.d.ts +1 -0
- package/dist/types/components/mui-icons/icon-helper.d.ts +1 -0
- package/dist/types/components/mui-icons/index.d.ts +14 -1
- package/dist/types/components/mui-icons/panel.d.ts +1 -0
- package/dist/types/components/mui-icons/pause.d.ts +1 -0
- package/dist/types/components/mui-icons/picture-in-picture.d.ts +1 -0
- package/dist/types/components/mui-icons/play-fill.d.ts +1 -0
- package/dist/types/components/mui-icons/rectangle-right-drawer.d.ts +1 -0
- package/dist/types/components/mui-icons/reload.d.ts +1 -0
- package/dist/types/components/mui-icons/speaker-mute.d.ts +1 -0
- package/dist/types/components/mui-icons/speaker-one-wave.d.ts +1 -0
- package/dist/types/components/mui-icons/speaker-two-wave.d.ts +1 -0
- package/dist/types/components/mui-icons/stop-fill.d.ts +1 -0
- package/dist/types/components/mui-icons/timer.d.ts +1 -0
- package/dist/types/components/mui-icons/vertical-ellipsis.d.ts +1 -0
- package/dist/types/components/mui-input/api.d.ts +12 -0
- package/dist/types/components/mui-media-player/api.d.ts +4 -0
- package/dist/types/components/mui-media-player/index.d.ts +13 -4
- package/dist/types/components/mui-model-viewer/api.d.ts +28 -0
- package/dist/types/components/mui-model-viewer/doc.d.ts +2 -0
- package/dist/types/components/mui-model-viewer/index.d.ts +17 -0
- package/dist/types/components/mui-progress-ring/api.d.ts +24 -0
- package/dist/types/components/mui-progress-ring/doc.d.ts +2 -0
- package/dist/types/components/mui-progress-ring/index.d.ts +1 -0
- package/dist/types/components/mui-radio/api.d.ts +12 -0
- package/dist/types/components/mui-range-input/api.d.ts +4 -0
- package/dist/types/components/mui-responsive/api.d.ts +10 -2
- package/dist/types/components/mui-search-input/api.d.ts +40 -0
- package/dist/types/components/mui-search-input/doc.d.ts +2 -0
- package/dist/types/components/mui-search-input/index.d.ts +3 -0
- package/dist/types/components/mui-select/api.d.ts +12 -0
- package/dist/types/components/mui-switch/api.d.ts +4 -0
- package/dist/types/components/mui-table/api.d.ts +15 -0
- package/dist/types/components/mui-textarea/api.d.ts +12 -0
- package/dist/types/components/mui-time/api.d.ts +41 -0
- package/dist/types/components/mui-time/doc.d.ts +2 -0
- package/dist/types/components/mui-time/index.d.ts +1 -0
- package/dist/types/components/mui-time-picker/api.d.ts +38 -0
- package/dist/types/components/mui-time-picker/doc.d.ts +2 -0
- package/dist/types/components/mui-time-picker/index.d.ts +4 -0
- package/dist/types/index.d.ts +24 -2
- package/dist/types/knowledge/compositions.d.ts +4644 -0
- package/dist/types/knowledge/index.d.ts +4657 -0
- package/dist/types/knowledge/keywords.d.ts +4 -0
- package/dist/types/knowledge/rules.d.ts +1 -0
- package/dist/types/tokens/js/index.d.ts +11 -7
- package/package.json +119 -12
- package/dist/esm/components/mui-form-hint/index.js +0 -1
- package/dist/types/components/mui-form-hint/index.d.ts +0 -1
- /package/dist/types/components/{mui-form-hint → mui-avatar-chip}/doc.d.ts +0 -0
- /package/dist/types/components/mui-icons/{rectangle-bottom-panel.d.ts → copy.d.ts} +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { agentCompositions as o, agentCompositionKeys as e, compositionConfig as s, compositions as i } from "./compositions/index.js";
|
|
2
|
+
import { agentKeywords as t, agentKeywordKeys as n, keywords as r } from "./keywords/index.js";
|
|
3
|
+
import { rules as m } from "./rules/index.js";
|
|
4
|
+
const a = {
|
|
5
|
+
global: {
|
|
6
|
+
rules: m,
|
|
7
|
+
keywords: r,
|
|
8
|
+
compositions: i,
|
|
9
|
+
compositionConfig: s
|
|
10
|
+
},
|
|
11
|
+
agent: {
|
|
12
|
+
compositionKeys: e,
|
|
13
|
+
compositions: o,
|
|
14
|
+
keywordKeys: n,
|
|
15
|
+
keywords: t
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
e as agentCompositionKeys,
|
|
20
|
+
o as agentCompositions,
|
|
21
|
+
n as agentKeywordKeys,
|
|
22
|
+
t as agentKeywords,
|
|
23
|
+
s as compositionConfig,
|
|
24
|
+
i as compositions,
|
|
25
|
+
r as keywords,
|
|
26
|
+
a as knowledge,
|
|
27
|
+
m as rules
|
|
28
|
+
};
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
const o = {
|
|
2
|
+
// FEEDBACK
|
|
3
|
+
alert: ["alert", "success", "info", "warning", "error", "message", "banner", "notification"],
|
|
4
|
+
message: [
|
|
5
|
+
"page message",
|
|
6
|
+
"page notice",
|
|
7
|
+
"persistent notice",
|
|
8
|
+
"persistent message",
|
|
9
|
+
"system notice",
|
|
10
|
+
"status notice",
|
|
11
|
+
"message banner"
|
|
12
|
+
],
|
|
13
|
+
loader: ["loader", "loading", "skeleton", "placeholder", "shimmer", "pulse", "fade", "spinner"],
|
|
14
|
+
spinner: ["spinner", "loading", "busy", "indicator", "progress"],
|
|
15
|
+
progress: ["progress", "bar", "loading", "completion", "percent", "syncing", "pending"],
|
|
16
|
+
// ACTIONS
|
|
17
|
+
button: ["button", "click", "action", "submit", "cta", "primary", "secondary", "tertiary", "attention"],
|
|
18
|
+
"button-group": ["button group", "buttons", "actions", "group", "right", "align"],
|
|
19
|
+
link: ["link", "anchor", "hyperlink", "navigation", "primary", "secondary", "tertiary", "attention"],
|
|
20
|
+
dropdown: ["dropdown", "menu", "popover", "context menu", "action menu"],
|
|
21
|
+
chip: ["chip", "tag", "filter", "active", "dismiss", "input chip"],
|
|
22
|
+
chipRail: ["chip rail", "filter rail", "scrolling chips", "chip navigation", "horizontal filters"],
|
|
23
|
+
// CONTENT
|
|
24
|
+
icon: [
|
|
25
|
+
"icon",
|
|
26
|
+
"glyph",
|
|
27
|
+
"symbol",
|
|
28
|
+
"add",
|
|
29
|
+
"plus",
|
|
30
|
+
"close",
|
|
31
|
+
"x",
|
|
32
|
+
"check",
|
|
33
|
+
"tick",
|
|
34
|
+
"warning",
|
|
35
|
+
"alert",
|
|
36
|
+
"chevron",
|
|
37
|
+
"arrow",
|
|
38
|
+
"accessibility",
|
|
39
|
+
"sun",
|
|
40
|
+
"moon",
|
|
41
|
+
"info",
|
|
42
|
+
"stop",
|
|
43
|
+
"globe",
|
|
44
|
+
"menu",
|
|
45
|
+
"ellipsis",
|
|
46
|
+
"grid",
|
|
47
|
+
"message",
|
|
48
|
+
"sidebar",
|
|
49
|
+
"subtract",
|
|
50
|
+
"minus"
|
|
51
|
+
],
|
|
52
|
+
heading: ["heading", "title", "h1", "h2", "h3", "size", "level"],
|
|
53
|
+
body: ["body", "text", "paragraph", "copy", "default", "optional", "success", "warning", "error"],
|
|
54
|
+
span: ["span", "inline", "text", "rich text", "inline link"],
|
|
55
|
+
code: ["code", "snippet", "monospace", "pre", "syntax"],
|
|
56
|
+
quote: ["quote", "blockquote", "citation", "pull quote"],
|
|
57
|
+
list: ["list", "items", "ul", "li", "ordered", "unordered"],
|
|
58
|
+
avatar: ["avatar", "profile", "user", "initials", "image", "icon", "person"],
|
|
59
|
+
image: ["image", "photo", "picture", "figure", "caption", "img"],
|
|
60
|
+
illustrations: ["illustration", "empty state", "graphic", "artwork", "visual"],
|
|
61
|
+
markdown: ["markdown", "md", "rich content", "formatted content", "prose"],
|
|
62
|
+
skeleton: ["skeleton", "loading", "placeholder", "shimmer", "pulse", "line", "rect", "circle"],
|
|
63
|
+
badge: [
|
|
64
|
+
"badge",
|
|
65
|
+
"count",
|
|
66
|
+
"label",
|
|
67
|
+
"tag",
|
|
68
|
+
"metadata",
|
|
69
|
+
"notification",
|
|
70
|
+
"overlay",
|
|
71
|
+
"paid",
|
|
72
|
+
"busy",
|
|
73
|
+
"offline",
|
|
74
|
+
"beta",
|
|
75
|
+
"default",
|
|
76
|
+
"shared",
|
|
77
|
+
"positive",
|
|
78
|
+
"warning",
|
|
79
|
+
"error"
|
|
80
|
+
],
|
|
81
|
+
status: [
|
|
82
|
+
"status",
|
|
83
|
+
"state",
|
|
84
|
+
"workflow state",
|
|
85
|
+
"record status",
|
|
86
|
+
"object status",
|
|
87
|
+
"active",
|
|
88
|
+
"draft",
|
|
89
|
+
"pending",
|
|
90
|
+
"review",
|
|
91
|
+
"blocked",
|
|
92
|
+
"synced",
|
|
93
|
+
"queued"
|
|
94
|
+
],
|
|
95
|
+
// ACCORDION
|
|
96
|
+
accordion: [
|
|
97
|
+
"accordion",
|
|
98
|
+
"collapse",
|
|
99
|
+
"expand",
|
|
100
|
+
"toggle",
|
|
101
|
+
"show more",
|
|
102
|
+
"disclosure",
|
|
103
|
+
"section",
|
|
104
|
+
"detail",
|
|
105
|
+
"summary",
|
|
106
|
+
"accordion block",
|
|
107
|
+
"accordion inline",
|
|
108
|
+
"accordion group"
|
|
109
|
+
],
|
|
110
|
+
// LAYOUT
|
|
111
|
+
stack: ["stack", "v-stack", "h-stack", "vertical", "horizontal", "spacing"],
|
|
112
|
+
grid: ["grid", "columns", "rows", "layout", "container"],
|
|
113
|
+
container: ["container", "wrapper", "layout", "section"],
|
|
114
|
+
responsive: ["responsive", "breakpoint", "mobile", "desktop", "showAbove", "showBelow"],
|
|
115
|
+
rule: ["rule", "divider", "separator", "line", "hr"],
|
|
116
|
+
// SURFACES
|
|
117
|
+
card: ["card", "panel", "box", "tile"],
|
|
118
|
+
dialog: ["dialog", "modal", "popup", "overlay", "lightbox", "confirm"],
|
|
119
|
+
drawer: ["drawer", "sidebar", "panel", "slide", "overlay", "push", "persistent", "left", "right"],
|
|
120
|
+
slat: [
|
|
121
|
+
"slat",
|
|
122
|
+
"row",
|
|
123
|
+
"summary",
|
|
124
|
+
"item row",
|
|
125
|
+
"preview",
|
|
126
|
+
"cell",
|
|
127
|
+
"list item",
|
|
128
|
+
"entry",
|
|
129
|
+
"stacked",
|
|
130
|
+
"slat header",
|
|
131
|
+
"slat action",
|
|
132
|
+
"slat content"
|
|
133
|
+
],
|
|
134
|
+
table: [
|
|
135
|
+
"table",
|
|
136
|
+
"data table",
|
|
137
|
+
"grid",
|
|
138
|
+
"data grid",
|
|
139
|
+
"spreadsheet",
|
|
140
|
+
"rows",
|
|
141
|
+
"columns",
|
|
142
|
+
"cells",
|
|
143
|
+
"header row",
|
|
144
|
+
"data",
|
|
145
|
+
"record",
|
|
146
|
+
"tabular"
|
|
147
|
+
],
|
|
148
|
+
mediaPlayer: [
|
|
149
|
+
"media player",
|
|
150
|
+
"video",
|
|
151
|
+
"audio",
|
|
152
|
+
"player",
|
|
153
|
+
"playback",
|
|
154
|
+
"controls",
|
|
155
|
+
"poster",
|
|
156
|
+
"artwork",
|
|
157
|
+
"waveform",
|
|
158
|
+
"picture in picture",
|
|
159
|
+
"fullscreen"
|
|
160
|
+
],
|
|
161
|
+
videoThumbnail: ["video thumbnail", "thumbnail", "video preview", "poster", "play overlay", "preview card"],
|
|
162
|
+
smartCard: [
|
|
163
|
+
"card",
|
|
164
|
+
"smart card",
|
|
165
|
+
"debit",
|
|
166
|
+
"credit",
|
|
167
|
+
"reward",
|
|
168
|
+
"payment",
|
|
169
|
+
"bank",
|
|
170
|
+
"plain",
|
|
171
|
+
"animated",
|
|
172
|
+
"inverted",
|
|
173
|
+
"frozen",
|
|
174
|
+
"logo",
|
|
175
|
+
"partner",
|
|
176
|
+
"network",
|
|
177
|
+
"diamond",
|
|
178
|
+
"premier",
|
|
179
|
+
"sapphire",
|
|
180
|
+
"crystal",
|
|
181
|
+
"visa",
|
|
182
|
+
"mastercard",
|
|
183
|
+
"amex",
|
|
184
|
+
"payment network",
|
|
185
|
+
"background image",
|
|
186
|
+
"bg-image",
|
|
187
|
+
"background color",
|
|
188
|
+
"bg-color",
|
|
189
|
+
"number",
|
|
190
|
+
"type",
|
|
191
|
+
"variant",
|
|
192
|
+
"state"
|
|
193
|
+
],
|
|
194
|
+
// FORMS AND INPUTS
|
|
195
|
+
input: ["input", "text field", "text input", "field", "entry", "form field"],
|
|
196
|
+
searchInput: [
|
|
197
|
+
"search input",
|
|
198
|
+
"search",
|
|
199
|
+
"filter",
|
|
200
|
+
"search field",
|
|
201
|
+
"search box",
|
|
202
|
+
"toolbar search",
|
|
203
|
+
"reveal search",
|
|
204
|
+
"search tabs"
|
|
205
|
+
],
|
|
206
|
+
textarea: ["textarea", "text area", "multiline", "long text", "message", "description", "rows"],
|
|
207
|
+
select: ["select", "dropdown", "picker", "options", "choose", "combobox"],
|
|
208
|
+
checkbox: ["checkbox", "check", "tick", "agree", "terms", "boolean", "toggle"],
|
|
209
|
+
radio: ["radio", "radio button", "option", "choose one", "single select"],
|
|
210
|
+
radioGroup: ["radio group", "radio options", "single choice group", "option group"],
|
|
211
|
+
switch: ["switch", "toggle", "on off", "enable", "disable", "boolean"],
|
|
212
|
+
field: ["field", "form field", "label", "input wrapper", "validation", "error", "success", "warning"],
|
|
213
|
+
"form-group": ["form group", "form", "group", "vertical", "horizontal", "fieldset"],
|
|
214
|
+
"form-section": ["form section", "section", "form heading", "grouped fields"],
|
|
215
|
+
formSectionFooter: ["form section footer", "form footer", "form actions", "section actions"],
|
|
216
|
+
"form-message": ["form message", "hint", "helper text", "validation message", "field message"],
|
|
217
|
+
formHint: ["form hint", "hint", "helper text", "field help", "supporting text"],
|
|
218
|
+
hint: ["hint", "tooltip", "help text", "assistive hint", "supporting context"],
|
|
219
|
+
rangeInput: ["range", "slider", "min", "max", "step", "range input", "scrubber"],
|
|
220
|
+
chipInput: ["chip input", "tag input", "multi select", "token input", "chips"],
|
|
221
|
+
fileUpload: ["file upload", "upload", "attach", "file", "drag and drop", "attachment"],
|
|
222
|
+
addOn: ["addon", "input after", "input before", "prefix", "suffix", "unit", "currency"],
|
|
223
|
+
// NAVIGATION
|
|
224
|
+
tab: ["tab", "tab bar", "tab controller", "tab panel", "navigation", "tabs"],
|
|
225
|
+
carousel: ["carousel", "slider", "carousel controller", "carousel panel", "carousel item", "carousel tabs"],
|
|
226
|
+
stepper: ["stepper", "steps", "wizard", "progress steps", "multi step", "step indicator"],
|
|
227
|
+
// PROMPT
|
|
228
|
+
prompt: ["prompt", "ai prompt", "chat input", "message input", "fan", "context", "preview", "submit"],
|
|
229
|
+
agentPrompt: ["agent prompt", "assistant prompt", "system prompt", "llm prompt", "agent input"],
|
|
230
|
+
agentBubble: ["agent bubble", "assistant bubble", "chat bubble", "ai response", "agent message"],
|
|
231
|
+
promptMessage: ["prompt message", "chat message", "ai message", "ghost", "compact", "density"],
|
|
232
|
+
promptPreview: ["prompt preview", "preview", "badge", "image preview", "animated preview"],
|
|
233
|
+
promptToggle: ["prompt toggle", "toggle", "icon mode", "chip mode"],
|
|
234
|
+
// PRESENTATION
|
|
235
|
+
slideFrame: ["slide", "slides", "presentation", "slide frame", "deck", "ratio", "fullscreen", "section", "notes"],
|
|
236
|
+
slideSection: ["slide section", "deck section", "presentation section", "chapter", "section divider"]
|
|
237
|
+
}, a = [
|
|
238
|
+
"alert",
|
|
239
|
+
"message",
|
|
240
|
+
"loader",
|
|
241
|
+
"spinner",
|
|
242
|
+
"progress",
|
|
243
|
+
"button",
|
|
244
|
+
"button-group",
|
|
245
|
+
"link",
|
|
246
|
+
"dropdown",
|
|
247
|
+
"chip",
|
|
248
|
+
"icon",
|
|
249
|
+
"heading",
|
|
250
|
+
"body",
|
|
251
|
+
"span",
|
|
252
|
+
"code",
|
|
253
|
+
"quote",
|
|
254
|
+
"list",
|
|
255
|
+
"avatar",
|
|
256
|
+
"image",
|
|
257
|
+
"skeleton",
|
|
258
|
+
"badge",
|
|
259
|
+
"status",
|
|
260
|
+
"accordion",
|
|
261
|
+
"stack",
|
|
262
|
+
"grid",
|
|
263
|
+
"container",
|
|
264
|
+
"responsive",
|
|
265
|
+
"rule",
|
|
266
|
+
"card",
|
|
267
|
+
"dialog",
|
|
268
|
+
"drawer",
|
|
269
|
+
"slat",
|
|
270
|
+
"table",
|
|
271
|
+
"smartCard",
|
|
272
|
+
"input",
|
|
273
|
+
"searchInput",
|
|
274
|
+
"textarea",
|
|
275
|
+
"select",
|
|
276
|
+
"checkbox",
|
|
277
|
+
"radio",
|
|
278
|
+
"switch",
|
|
279
|
+
"field",
|
|
280
|
+
"form-group",
|
|
281
|
+
"form-section",
|
|
282
|
+
"form-message",
|
|
283
|
+
"rangeInput",
|
|
284
|
+
"chipInput",
|
|
285
|
+
"fileUpload",
|
|
286
|
+
"addOn",
|
|
287
|
+
"tab",
|
|
288
|
+
"carousel",
|
|
289
|
+
"stepper",
|
|
290
|
+
"prompt",
|
|
291
|
+
"promptMessage",
|
|
292
|
+
"promptPreview",
|
|
293
|
+
"promptToggle",
|
|
294
|
+
"slideFrame"
|
|
295
|
+
], r = a.reduce(
|
|
296
|
+
(t, e) => ({
|
|
297
|
+
...t,
|
|
298
|
+
[e]: o[e]
|
|
299
|
+
}),
|
|
300
|
+
{}
|
|
301
|
+
);
|
|
302
|
+
export {
|
|
303
|
+
a as agentKeywordKeys,
|
|
304
|
+
r as agentKeywords,
|
|
305
|
+
o as keywords
|
|
306
|
+
};
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
const e = String.raw`
|
|
2
|
+
Generate MUIBOOK component trees as JSON.
|
|
3
|
+
|
|
4
|
+
Output JSON tree nodes with:
|
|
5
|
+
- type: component type
|
|
6
|
+
- id: unique descriptive id
|
|
7
|
+
- props: component props
|
|
8
|
+
- children: child nodes, or []
|
|
9
|
+
|
|
10
|
+
CRITICAL RULES:
|
|
11
|
+
1. Always return ONLY valid JSON - no markdown, no code blocks, no explanations
|
|
12
|
+
2. Every node MUST have: type, id, props, and children
|
|
13
|
+
3. IDs must be unique across the entire tree
|
|
14
|
+
4. Use descriptive IDs that reflect the component's purpose
|
|
15
|
+
5. Card content must be inside direct child CardBody.
|
|
16
|
+
6. Container components can have children.
|
|
17
|
+
7. Leaf components use children: [].
|
|
18
|
+
8. Props must match the component API.
|
|
19
|
+
9. Root additions use Container with center=true and size=medium.
|
|
20
|
+
10. Button and Link text stays on the component; do not wrap in Body.
|
|
21
|
+
11. Put visual backgrounds on layout style or SmartCard bg props.
|
|
22
|
+
12. SmartCard props use kebab-case: bg-image, bg-color, logo-height.
|
|
23
|
+
13. Normalize scanned Muibook/Figma names to Redactd component types before output.
|
|
24
|
+
14. Do not use Message as a styled paragraph, inline note, or form helper. Message is only for persistent page-level notices with a heading and slotted body content.
|
|
25
|
+
15. In Redactd JSON trees, slot placement belongs inside props, matching Muibook/MuiScan output. Example: { type: "VStack", props: { "slot": "start", ... }, children: [...] }. Do not put slot as a top-level node field.
|
|
26
|
+
16. Do not add CardBody.props.condensed just because CardBody contains SlatGroup. SlatGroup inside CardBody already triggers card-aware spacing; only use condensed when the user explicitly asks for a tight edge-to-edge condensed card layout.
|
|
27
|
+
|
|
28
|
+
MUI SCAN NORMALIZATION RULES:
|
|
29
|
+
- Normalize muiscan to Redactd types before output
|
|
30
|
+
- Final JSON cannot contain mui-*, raw span, TEXT, or text node types
|
|
31
|
+
- Core mappings:
|
|
32
|
+
- mui-v-stack -> VStack
|
|
33
|
+
- mui-h-stack -> HStack
|
|
34
|
+
- mui-button -> Button
|
|
35
|
+
- mui-link -> Link
|
|
36
|
+
- mui-input -> Input
|
|
37
|
+
- mui-select -> Select
|
|
38
|
+
- mui-avatar-chip -> AvatarChip
|
|
39
|
+
- mui-media-player -> MediaPlayer
|
|
40
|
+
- mui-video-thumbnail -> VideoThumbnail
|
|
41
|
+
- mui-model-viewer -> ModelViewer
|
|
42
|
+
- mui-table -> Table
|
|
43
|
+
- mui-row-group -> RowGroup
|
|
44
|
+
- mui-row -> Row
|
|
45
|
+
- mui-cell -> Cell
|
|
46
|
+
- span -> Span
|
|
47
|
+
- mui-icon-[name] -> _Icon with props.icon = "mui-icon-[name]"
|
|
48
|
+
- mui-illustration-[name] -> _Illustration with props.illustration = "mui-illustration-[name]"
|
|
49
|
+
- Preserve hierarchy, spacing, slots, key props, and valid style strings
|
|
50
|
+
- Preserve icon slots:
|
|
51
|
+
- slot=before -> props.slot = "before"
|
|
52
|
+
- slot=after -> props.slot = "after"
|
|
53
|
+
- if an icon is the only child of Button, Link, or Chip, keep it as the default child
|
|
54
|
+
|
|
55
|
+
TEXT NODE RULES FOR MUISCAN:
|
|
56
|
+
- TEXT is input-only; collapse into the nearest valid Redactd text model
|
|
57
|
+
- Collapse TEXT -> props.text for:
|
|
58
|
+
- mui-body -> Body.props.text
|
|
59
|
+
- mui-heading -> Heading.props.text
|
|
60
|
+
- mui-button -> Button.props.text
|
|
61
|
+
- mui-link -> Link.props.text
|
|
62
|
+
- mui-tab-item -> TabItem.props.text
|
|
63
|
+
- mui-list-item -> ListItem.props.text
|
|
64
|
+
- For span:
|
|
65
|
+
- convert to Span
|
|
66
|
+
- consume direct TEXT into Span.props.text
|
|
67
|
+
- keep inline children such as Link nested inside the same Span
|
|
68
|
+
- Exceptions:
|
|
69
|
+
- mui-badge: consume TEXT as the badge's direct rendered text; preserve before/after slot children; do not invent Body
|
|
70
|
+
- mui-status: consume TEXT as the status's direct rendered text; preserve before/after icon slot children; do not invent Body, Badge, or Message inside Status
|
|
71
|
+
- mui-chip: consume TEXT as the chip's direct rendered text; preserve before/after slot children; do not invent Body
|
|
72
|
+
- mui-alert: preserve variant/label, convert default content to Span, consume TEXT into Span.props.text, keep inline children such as Link, do not invent Body
|
|
73
|
+
- mui-message: map scanned heading directly to Message.props.heading, preserve variant/icon/size, keep remaining children as default message content; if there is no supporting body content, prefer Body or FormMessage instead of Message
|
|
74
|
+
- Do not invent wrappers when the target already supports text
|
|
75
|
+
|
|
76
|
+
Available Components:
|
|
77
|
+
|
|
78
|
+
LAYOUT:
|
|
79
|
+
- VStack: slot, space, padding, alignX, alignY, height, width, fill, viewport, style
|
|
80
|
+
- HStack: slot, space, padding, alignX, alignY, height, width, fill, viewport, style
|
|
81
|
+
- Grid: slot, col, space, padding, alignX, alignY, height, width, fill, viewport, style
|
|
82
|
+
- Container: size (small|medium|large), center, style
|
|
83
|
+
- Responsive: breakpoint, breakpoint-low, breakpoint-high; slots showBelow/showMiddle/showAbove
|
|
84
|
+
- Rule: length, weight (thin|thick|CSS size), direction (horizontal|vertical)
|
|
85
|
+
|
|
86
|
+
SURFACES:
|
|
87
|
+
- Card: use CardBody for card content
|
|
88
|
+
- CardHeader: none
|
|
89
|
+
- CardBody: condensed, style. Do not set condensed by default for SlatGroup layouts; leave props empty unless the user explicitly asks for condensed card spacing.
|
|
90
|
+
- CardFooter: none
|
|
91
|
+
- Dialog: open, width, content-max-height, style
|
|
92
|
+
- Drawer: open, variant (overlay|push|persistent|workspace), side (left|right), width, z-index, drawer-space, breakpoint, style
|
|
93
|
+
- Drawer workspace: variant=workspace, left-open, right-open, left-width, right-width, resize-rail, resize-min-drawer-width, resize-min-left-width, resize-min-right-width, resize-min-page-width, resize-close-threshold, height; slots left/page/right. Use when an editor/canvas has independent left and right panels around a central page. Keep direct slot wrappers plain in HTML exports when possible.
|
|
94
|
+
- Slat: variant, col, space; child slots accessory/start/end. Do not use header-start, header-end, row-start, row-end, action, or unslotted wrapper children. Put primary row content in a direct child with props.slot="start", trailing value/status/action content in a direct child with props.slot="end", and optional leading avatar/icon content in a direct child with props.slot="accessory".
|
|
95
|
+
- SlatGroup: usage. When SlatGroup is inside CardBody, keep CardBody uncondensed by default; CardBody detects SlatGroup and applies the correct card spacing automatically.
|
|
96
|
+
- SmartCard: state, number, variant, partner, type, logo, logo-height, bg-color, bg-image, inverted
|
|
97
|
+
|
|
98
|
+
CONTENT:
|
|
99
|
+
- Heading: text, size (1|2|3|4|5|6), level (1|2|3|4|5|6), truncate, clamp
|
|
100
|
+
- Body: text, size (xx-small|x-small|small|medium|large), weight (regular|bold), variant (default|optional|info|success|warning|error), truncate, clamp, style; use _Icon icon=mui-icon-info slot=before for lightweight inline guidance
|
|
101
|
+
- Span: text, style; supports inline children such as Link
|
|
102
|
+
- Code: size, scrollable
|
|
103
|
+
- Quote: default text
|
|
104
|
+
- Image: src, alt; slot caption
|
|
105
|
+
- Avatar: label, image, icon, size (x-small|small|medium|large), background, backgroundColor
|
|
106
|
+
- AvatarChip: primary, secondary, image, label, href, target, size (x-small|small|medium|large), usage (default|media-player); slots primary/secondary. Use for compact identity metadata with an avatar and one or two text/link lines. MediaPlayer applies usage=media-player automatically when slotted into media metadata.
|
|
107
|
+
- List: slot default
|
|
108
|
+
- ListItem: text, variant, size (x-small|small|medium|large), weight (regular|bold)
|
|
109
|
+
- _Icon: icon, size (xx-small|x-small|small|medium|large), color, slot
|
|
110
|
+
- _Illustration: illustration, size (x-small|small|medium|large|x-large), color, slot
|
|
111
|
+
- Badge: text, variant (default|neutral|positive|warning|error|overlay), color (grey|purple|violet|pink|magenta|red|orange|amber|yellow|lime|green|teal|cyan|blue|indigo|CSS background value). Use for compact non-interactive presentational metadata, counts, and lightweight state-like labels such as Offline, Online, Busy, Do not disturb, Beta, Default, IMG, or Shared when the surrounding UI already explains the object. Good inside cards, messages, chips, buttons, tabs, navigation, and hero or marketing surfaces. Use color to override the badge background only through theme-aware badge background tokens; do not use positive, warning, or attention just to get a different background colour.
|
|
112
|
+
- Status: text, variant (info|positive|warning|attention), color (grey|purple|violet|pink|magenta|red|orange|amber|yellow|lime|green|teal|cyan|blue|indigo), size (small|medium); slots before/after. Use for compact object or workflow state labels such as Active, Draft, Pending, Review, Blocked, or Synced when the value is the primary state of a record, workflow, or system, especially in tables, slats, dashboards, and data-heavy pages. Status is non-interactive by default, but can be interactive when composed as a trigger or compact state action. Omit variant for default low-emphasis grey status; use variant for semantic feedback and color for non-semantic categorical labels. Use action only when the status is a trigger. Do not use for counts, helper text, paragraph guidance, page-level notices, or decorative metadata.
|
|
113
|
+
- Skeleton: loading, shape (line|rect|circle), size, animation (shimmer|pulse|none), lines, width, height, radius, gap, duration, line-widths, max-width, style
|
|
114
|
+
- Table: slot default. Use for dense desktop data layouts.
|
|
115
|
+
- RowGroup: heading; children Row.
|
|
116
|
+
- Row: columns, size (x-small|small|medium); children Cell.
|
|
117
|
+
- Cell: action, align-y; children content or action controls.
|
|
118
|
+
|
|
119
|
+
ACCORDION:
|
|
120
|
+
- AccordionBlock: heading, level (1|2|3|4|5|6), size, detail-space
|
|
121
|
+
- AccordionInline: heading, level (1|2|3|4|5|6)
|
|
122
|
+
- AccordionGroup: slot default
|
|
123
|
+
|
|
124
|
+
FORMS AND INPUTS:
|
|
125
|
+
- FormSection: heading, hide-label, style
|
|
126
|
+
- FormSectionFooter: slot, style
|
|
127
|
+
- FormGroup: heading, variant (vertical|horizontal), hide-label, style
|
|
128
|
+
- Field: label, variant (default|success|warning|error), message, hide-label, size (x-small|small|medium|large), optional, style
|
|
129
|
+
- FormMessage: text, size (x-small|small|medium|large), weight (regular|bold), variant (default|optional|info|success|warning|error), style
|
|
130
|
+
- Input: label, type (text|email|password|number|tel|url), placeholder, value, id, name, disabled, hide-label, variant (default|error), size (x-small|small|medium|large), optional, max-length; slots before/after
|
|
131
|
+
- Textarea: label, placeholder, value, name, id, variant (default|success|warning|error), size (x-small|small|medium|large), rows, optional, hide-label, max-length, disabled, style
|
|
132
|
+
- Select: label, placeholder, options, value, id, name, disabled, variant (default|error), size (x-small|small|medium|large), appearance (native|custom), selected-content (rich|label), col, space, max-height, padding-block, padding-inline. Use options for simple data selects; use Option children only when appearance=custom needs rich composed native option content.
|
|
133
|
+
- Option: value, label; children can contain layout/content for Select appearance=custom. Keep Option inside Select only.
|
|
134
|
+
- Checkbox: text, checked, id, disabled, indeterminate, size (x-small|small|medium|large)
|
|
135
|
+
- Radio: text, checked, disabled, id, name, value, aria-label, size (x-small|small|medium|large)
|
|
136
|
+
- RadioGroup: name, value, label, size (x-small|small|medium|large), optional, hide-label, disabled
|
|
137
|
+
- Switch: label, checked, disabled, size (x-small|small|medium|large)
|
|
138
|
+
- RangeInput: min, max, value, step, bubble, bubble-format (time), disabled
|
|
139
|
+
- ChipInput: label, placeholder, size (x-small|small|medium|large), placement (before|after), breakpoint, allow-custom, mobile-stack, hide-label, disabled, options, value, id
|
|
140
|
+
- FileUpload: acceptedFileTypes, currentFileName
|
|
141
|
+
- Addon: text, size (x-small|small|medium|large), slot (before|after), style
|
|
142
|
+
|
|
143
|
+
ACTIONS:
|
|
144
|
+
- Button: text, variant (primary|secondary|tertiary|overlay|attention), size (xx-small|x-small|small|medium|large), stroke (border|ring), stroke-ring-size (100|200|300|400|500), disabled, aria-label; slots default/before/after
|
|
145
|
+
- ButtonGroup: slot default, right, style
|
|
146
|
+
- Link: text, href, variant (primary|secondary|tertiary|overlay|attention), size (xx-small|x-small|small|medium|large), stroke (border|ring), stroke-ring-size (100|200|300|400|500), target, download, weight (regular|bold), disabled; slots default/before/after
|
|
147
|
+
- Dropdown: zindex, position, persistent; slots action/default
|
|
148
|
+
- Chip: text, active, dismiss, usage; slots default/before/after. Chip labels truncate when constrained; keep text short and let icons/dismiss controls remain visible.
|
|
149
|
+
- ChipRail: size, aria-label; children Chip. Use for horizontally scrollable filters and category rails.
|
|
150
|
+
|
|
151
|
+
NAVIGATION:
|
|
152
|
+
- TabBar: speed, controlsPosition, stroke (border|none), active-inset, radius; slots default/controls
|
|
153
|
+
- TabItem: text, icon, active, id
|
|
154
|
+
- TabController: slot default
|
|
155
|
+
- TabPanel: item
|
|
156
|
+
- Stepper: direction (horizontal|vertical), activeStep
|
|
157
|
+
- Step: title
|
|
158
|
+
- CarouselController: slot default, style
|
|
159
|
+
- CarouselPanel: item, style
|
|
160
|
+
|
|
161
|
+
FEEDBACK:
|
|
162
|
+
- Message: heading, variant (neutral|positive|info|warning|attention), icon, size (small|medium|large); slot default. Use only for persistent page-level or section-level notices. Always provide a concise heading plus default slot body content, usually Body/List/Link. Do not use for inline guidance, styled text blocks, or form helper text.
|
|
163
|
+
- Alert: variant (success|info|warning|error), label; slots default/action
|
|
164
|
+
- Loader: loading, animation (pulsate|fade-in|translate), direction (up|right|down|left), duration; slot default
|
|
165
|
+
- Spinner: size (xx-small|x-small|small|medium|large|x-large|xx-large), color, duration, label, style
|
|
166
|
+
- Progress: progress, state
|
|
167
|
+
|
|
168
|
+
MEDIA:
|
|
169
|
+
- MediaPlayer: src, type (video|audio|youtube|soundcloud), controls (player|none), poster, artwork, media-title, height, waveform, center-play, loading, autoplay, muted, loop; slots meta-before/meta-after. Use meta-before for AvatarChip/title metadata and meta-after for overlay actions such as Subscribe or Buy now. Use variant=overlay on Button/Link actions when over video or artwork.
|
|
170
|
+
- VideoThumbnail: src, src-light, src-dark, src-mui-light, src-mui-dark, src-jal-light, src-jal-dark, src-ana-light, src-ana-dark, src-sensei-light, src-sensei-dark, src-paperclip-light, src-paperclip-dark, alt, play, overlay. Use inside video cards when the thumbnail needs to react to brand and light/dark theme.
|
|
171
|
+
- ModelViewer: src, ios-src, poster, alt, controls, camera-controls, auto-rotate, ar, loading; slots default/poster. Always include alt and fallback content when a model is important to understanding the page.
|
|
172
|
+
|
|
173
|
+
PROMPT COMPONENTS:
|
|
174
|
+
- Prompt: placeholder, value, rows, enter-submit, fan-open, disabled, loading, loading-label, context-mode (icon|chip), preview-dialog-width, preview-dialog-title, preview-overflow-to-preview, preview-threshold-chars, preview-auto-clickable, preview-loading, preview-loading-label, preview-scrollbar, error-message, debug, effects-off, color-top-start, color-top-mid, color-top-end, color-top-accent, color-layout, style
|
|
175
|
+
- PromptMessage: size (x-small|small|medium|large), variant (default|ghost), density (default|compact), style
|
|
176
|
+
- PromptPreview: value, badge, label, bg-image, image-tint, accent, inverted, show-text, badge-only, animated, loading, loading-label, clickable, animation-mode, style
|
|
177
|
+
- PromptToggle: mode (icon|chip), style
|
|
178
|
+
|
|
179
|
+
PRESENTATION:
|
|
180
|
+
- SlideFrame: title, footer-text, ratio (16:9|4:3|1:1|3:2|9:16), present, active-section, padding, variant (default|plain), radius, notes-open, hide-header, hide-footer, hide-counter, allow-add-section, fullscreen, scroll, style
|
|
181
|
+
|
|
182
|
+
SPACING VALUES:
|
|
183
|
+
000, 025, 050, 100, 200, 300, 400, 500, 600, 700, 800
|
|
184
|
+
Use 100-300 for tight/form spacing and 400-800 for layout.
|
|
185
|
+
|
|
186
|
+
ASSETS:
|
|
187
|
+
Use real Muibook asset paths:
|
|
188
|
+
- Base path: 'https://muibook.com/images/'
|
|
189
|
+
- Logos: 'logo.png', 'guides.svg', 'mui.svg'
|
|
190
|
+
- Backgrounds: 'placeholder.png', 'snowy-mint.png', 'buttercup.png', 'sapphire.png', 'crystal.png', 'premier.png', 'diamond.png'
|
|
191
|
+
- Partners: 'mastercard.svg', 'visa-black.svg', 'visa-white.svg', 'amex.svg', 'emerald.svg', 'ruby.svg', 'sapphire.svg'
|
|
192
|
+
|
|
193
|
+
FORMATTING:
|
|
194
|
+
- SmartCard number: last four digits only (e.g. 1234).
|
|
195
|
+
|
|
196
|
+
`;
|
|
197
|
+
export {
|
|
198
|
+
e as rules
|
|
199
|
+
};
|