@fluid-app/widget-runtime 0.1.282 → 0.1.283
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/dist/index.cjs +2 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{remote-dom-renderer-BGIZ0FRi.d.mts → remote-dom-renderer-BnqVsw6k.d.mts} +4 -8
- package/dist/remote-dom-renderer-BnqVsw6k.d.mts.map +1 -0
- package/dist/remote-dom-renderer-CMpuJrkw.cjs +471 -0
- package/dist/remote-dom-renderer-CMpuJrkw.cjs.map +1 -0
- package/dist/remote-dom-renderer-D2FspToS.mjs +466 -0
- package/dist/remote-dom-renderer-D2FspToS.mjs.map +1 -0
- package/dist/{remote-dom-renderer-BoB9jd3B.d.cts → remote-dom-renderer-D3Jz1sOH.d.cts} +4 -8
- package/dist/remote-dom-renderer-D3Jz1sOH.d.cts.map +1 -0
- package/dist/{remote-dom-renderer-m5bn0hcE.mjs → remote-dom-styles-CmHfrrKz.mjs} +261 -702
- package/dist/remote-dom-styles-CmHfrrKz.mjs.map +1 -0
- package/dist/{remote-dom-renderer-VA5axIKk.cjs → remote-dom-styles-RV40tYyt.cjs} +328 -698
- package/dist/remote-dom-styles-RV40tYyt.cjs.map +1 -0
- package/dist/{remote-dom-ui-contract-B140dMly.d.mts → remote-dom-ui-contract-Dr0q3O4E.d.cts} +75 -77
- package/dist/remote-dom-ui-contract-Dr0q3O4E.d.cts.map +1 -0
- package/dist/{remote-dom-ui-contract-BLOyWbT2.d.cts → remote-dom-ui-contract-Dr0q3O4E.d.mts} +75 -77
- package/dist/remote-dom-ui-contract-Dr0q3O4E.d.mts.map +1 -0
- package/dist/remote-dom-values-BBN5u_Mj.mjs +1358 -0
- package/dist/remote-dom-values-BBN5u_Mj.mjs.map +1 -0
- package/dist/{remote-dom-values-D4AgBNWr.d.cts → remote-dom-values-BR8Qnhg9.d.cts} +1 -3
- package/dist/remote-dom-values-BR8Qnhg9.d.cts.map +1 -0
- package/dist/remote-dom-values-D1Fi2ibn.cjs +1441 -0
- package/dist/remote-dom-values-D1Fi2ibn.cjs.map +1 -0
- package/dist/{remote-dom-values-EwoLXnSn.d.mts → remote-dom-values-D8qikv8I.d.mts} +2 -3
- package/dist/remote-dom-values-D8qikv8I.d.mts.map +1 -0
- package/dist/remote-dom.cjs +2 -2
- package/dist/remote-dom.d.cts +2 -2
- package/dist/remote-dom.d.mts +2 -2
- package/dist/remote-dom.mjs +2 -2
- package/dist/site-host.cjs +372 -0
- package/dist/site-host.cjs.map +1 -0
- package/dist/site-host.d.cts +61 -0
- package/dist/site-host.d.cts.map +1 -0
- package/dist/site-host.d.mts +61 -0
- package/dist/site-host.d.mts.map +1 -0
- package/dist/site-host.mjs +369 -0
- package/dist/site-host.mjs.map +1 -0
- package/dist/{worker-react-bootstrap-C7tCMYGA.mjs → worker-react-bootstrap-CwlNMpMT.mjs} +2 -3
- package/dist/{worker-react-bootstrap-C7tCMYGA.mjs.map → worker-react-bootstrap-CwlNMpMT.mjs.map} +1 -1
- package/dist/{worker-react-bootstrap-N8jcWZ3L.cjs → worker-react-bootstrap-Dbq9hU1k.cjs} +2 -3
- package/dist/{worker-react-bootstrap-N8jcWZ3L.cjs.map → worker-react-bootstrap-Dbq9hU1k.cjs.map} +1 -1
- package/dist/{worker-react-renderer-ByjjgyrY.cjs → worker-react-renderer-CsI-dsP5.cjs} +5 -6
- package/dist/worker-react-renderer-CsI-dsP5.cjs.map +1 -0
- package/dist/{worker-react-renderer-ggcPIDLl.mjs → worker-react-renderer-LC2Dr-gj.mjs} +5 -5
- package/dist/{worker-react-renderer-ggcPIDLl.mjs.map → worker-react-renderer-LC2Dr-gj.mjs.map} +1 -1
- package/dist/worker.cjs +12 -17
- package/dist/worker.cjs.map +1 -1
- package/dist/worker.d.cts +15 -13
- package/dist/worker.d.cts.map +1 -1
- package/dist/worker.d.mts +16 -14
- package/dist/worker.d.mts.map +1 -1
- package/dist/worker.mjs +9 -13
- package/dist/worker.mjs.map +1 -1
- package/package.json +11 -6
- package/dist/Thread-0eUyc0Hw.cjs +0 -591
- package/dist/Thread-0eUyc0Hw.cjs.map +0 -1
- package/dist/Thread-BiW7rXts.mjs +0 -574
- package/dist/Thread-BiW7rXts.mjs.map +0 -1
- package/dist/remote-dom-renderer-BGIZ0FRi.d.mts.map +0 -1
- package/dist/remote-dom-renderer-BoB9jd3B.d.cts.map +0 -1
- package/dist/remote-dom-renderer-VA5axIKk.cjs.map +0 -1
- package/dist/remote-dom-renderer-m5bn0hcE.mjs.map +0 -1
- package/dist/remote-dom-ui-contract-B140dMly.d.mts.map +0 -1
- package/dist/remote-dom-ui-contract-BLOyWbT2.d.cts.map +0 -1
- package/dist/remote-dom-values-B5UZPDRy.cjs +0 -849
- package/dist/remote-dom-values-B5UZPDRy.cjs.map +0 -1
- package/dist/remote-dom-values-D4AgBNWr.d.cts.map +0 -1
- package/dist/remote-dom-values-EwoLXnSn.d.mts.map +0 -1
- package/dist/remote-dom-values-wEbrw5iW.mjs +0 -790
- package/dist/remote-dom-values-wEbrw5iW.mjs.map +0 -1
- package/dist/worker-react-renderer-ByjjgyrY.cjs.map +0 -1
|
@@ -1,790 +0,0 @@
|
|
|
1
|
-
const REMOTE_DOM_SUPPORTED_UI_CONTRACT_VERSIONS = ["1", "2"];
|
|
2
|
-
const noProperties = {};
|
|
3
|
-
const noEvents = [];
|
|
4
|
-
const commonProperties = {
|
|
5
|
-
"aria-label": "string",
|
|
6
|
-
disabled: "boolean",
|
|
7
|
-
id: "string"
|
|
8
|
-
};
|
|
9
|
-
const disclosureProperties = {
|
|
10
|
-
defaultOpen: "boolean",
|
|
11
|
-
open: "boolean"
|
|
12
|
-
};
|
|
13
|
-
const disclosureEvents = [{
|
|
14
|
-
propName: "onOpenChange",
|
|
15
|
-
eventName: "open-change",
|
|
16
|
-
payload: "boolean"
|
|
17
|
-
}];
|
|
18
|
-
const valueProperties = {
|
|
19
|
-
defaultValue: "string",
|
|
20
|
-
value: "string"
|
|
21
|
-
};
|
|
22
|
-
const valueEvents = [{
|
|
23
|
-
propName: "onValueChange",
|
|
24
|
-
eventName: "value-change",
|
|
25
|
-
payload: "string"
|
|
26
|
-
}];
|
|
27
|
-
const singleOrMultipleValueEvents = [{
|
|
28
|
-
propName: "onValueChange",
|
|
29
|
-
eventName: "value-change",
|
|
30
|
-
payload: "string-or-string-array"
|
|
31
|
-
}];
|
|
32
|
-
function component(exportName, properties = noProperties, events = noEvents) {
|
|
33
|
-
return {
|
|
34
|
-
exportName,
|
|
35
|
-
tagName: `fluid-ui-${exportName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`,
|
|
36
|
-
properties,
|
|
37
|
-
events,
|
|
38
|
-
contractVersion: "2"
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Reviewed positive allowlist for host-rendered Fluid UI in Remote DOM widgets.
|
|
43
|
-
* This is runtime security policy; it must never be inferred from React props.
|
|
44
|
-
*/
|
|
45
|
-
const REMOTE_DOM_UI_COMPONENTS = [
|
|
46
|
-
component("Accordion", {
|
|
47
|
-
...commonProperties,
|
|
48
|
-
collapsible: "boolean",
|
|
49
|
-
defaultValue: "string-or-string-array",
|
|
50
|
-
dir: "string",
|
|
51
|
-
orientation: "string",
|
|
52
|
-
type: "string",
|
|
53
|
-
value: "string-or-string-array"
|
|
54
|
-
}, singleOrMultipleValueEvents),
|
|
55
|
-
component("AccordionItem", {
|
|
56
|
-
...commonProperties,
|
|
57
|
-
value: "string"
|
|
58
|
-
}),
|
|
59
|
-
component("AccordionTrigger", commonProperties),
|
|
60
|
-
component("AccordionContent", noProperties),
|
|
61
|
-
component("Alert", {
|
|
62
|
-
...commonProperties,
|
|
63
|
-
variant: "string"
|
|
64
|
-
}),
|
|
65
|
-
component("AlertTitle"),
|
|
66
|
-
component("AlertDescription"),
|
|
67
|
-
component("AlertDialog", disclosureProperties, disclosureEvents),
|
|
68
|
-
component("AlertDialogTrigger", commonProperties),
|
|
69
|
-
component("AlertDialogContent"),
|
|
70
|
-
component("AlertDialogHeader"),
|
|
71
|
-
component("AlertDialogFooter"),
|
|
72
|
-
component("AlertDialogTitle"),
|
|
73
|
-
component("AlertDialogDescription"),
|
|
74
|
-
component("AlertDialogMedia"),
|
|
75
|
-
component("AlertDialogAction", commonProperties),
|
|
76
|
-
component("AlertDialogCancel", commonProperties),
|
|
77
|
-
component("Avatar", { size: "string" }),
|
|
78
|
-
component("AvatarImage", {
|
|
79
|
-
alt: "string",
|
|
80
|
-
src: "url"
|
|
81
|
-
}),
|
|
82
|
-
component("AvatarFallback", { delayMs: "finite-number" }),
|
|
83
|
-
component("AvatarBadge"),
|
|
84
|
-
component("AvatarGroup"),
|
|
85
|
-
component("AvatarGroupCount"),
|
|
86
|
-
component("Badge", { variant: "string" }),
|
|
87
|
-
component("Breadcrumb"),
|
|
88
|
-
component("BreadcrumbList"),
|
|
89
|
-
component("BreadcrumbItem"),
|
|
90
|
-
component("BreadcrumbLink", { href: "navigation-url" }),
|
|
91
|
-
component("BreadcrumbPage"),
|
|
92
|
-
component("BreadcrumbSeparator"),
|
|
93
|
-
component("BreadcrumbEllipsis"),
|
|
94
|
-
component("Button", {
|
|
95
|
-
...commonProperties,
|
|
96
|
-
name: "string",
|
|
97
|
-
size: "string",
|
|
98
|
-
type: "string",
|
|
99
|
-
value: "string",
|
|
100
|
-
variant: "string"
|
|
101
|
-
}, [{
|
|
102
|
-
propName: "onPress",
|
|
103
|
-
eventName: "press",
|
|
104
|
-
payload: "void"
|
|
105
|
-
}]),
|
|
106
|
-
component("Calendar", {
|
|
107
|
-
defaultMonth: "string",
|
|
108
|
-
disabledDates: "string-array",
|
|
109
|
-
fromDate: "string",
|
|
110
|
-
month: "string",
|
|
111
|
-
selected: "string",
|
|
112
|
-
showOutsideDays: "boolean",
|
|
113
|
-
toDate: "string"
|
|
114
|
-
}, [{
|
|
115
|
-
propName: "onMonthChange",
|
|
116
|
-
eventName: "month-change",
|
|
117
|
-
payload: "string"
|
|
118
|
-
}, {
|
|
119
|
-
propName: "onSelectedChange",
|
|
120
|
-
eventName: "selected-change",
|
|
121
|
-
payload: "string"
|
|
122
|
-
}]),
|
|
123
|
-
component("Checkbox", {
|
|
124
|
-
...commonProperties,
|
|
125
|
-
checked: "boolean",
|
|
126
|
-
defaultChecked: "boolean",
|
|
127
|
-
name: "string",
|
|
128
|
-
required: "boolean",
|
|
129
|
-
value: "string"
|
|
130
|
-
}, [{
|
|
131
|
-
propName: "onCheckedChange",
|
|
132
|
-
eventName: "checked-change",
|
|
133
|
-
payload: "boolean"
|
|
134
|
-
}]),
|
|
135
|
-
component("Card"),
|
|
136
|
-
component("CardHeader"),
|
|
137
|
-
component("CardFooter"),
|
|
138
|
-
component("CardTitle"),
|
|
139
|
-
component("CardAction"),
|
|
140
|
-
component("CardDescription"),
|
|
141
|
-
component("CardContent"),
|
|
142
|
-
component("Collapsible", disclosureProperties, disclosureEvents),
|
|
143
|
-
component("CollapsibleTrigger", commonProperties),
|
|
144
|
-
component("CollapsibleContent"),
|
|
145
|
-
component("Command", {
|
|
146
|
-
loop: "boolean",
|
|
147
|
-
shouldFilter: "boolean",
|
|
148
|
-
value: "string"
|
|
149
|
-
}, valueEvents),
|
|
150
|
-
component("CommandInput", {
|
|
151
|
-
...commonProperties,
|
|
152
|
-
placeholder: "string",
|
|
153
|
-
value: "string"
|
|
154
|
-
}, valueEvents),
|
|
155
|
-
component("CommandList"),
|
|
156
|
-
component("CommandEmpty"),
|
|
157
|
-
component("CommandGroup", {
|
|
158
|
-
heading: "string",
|
|
159
|
-
value: "string"
|
|
160
|
-
}),
|
|
161
|
-
component("CommandItem", {
|
|
162
|
-
...commonProperties,
|
|
163
|
-
keywords: "string-array",
|
|
164
|
-
value: "string"
|
|
165
|
-
}, [{
|
|
166
|
-
propName: "onSelect",
|
|
167
|
-
eventName: "select",
|
|
168
|
-
payload: "string"
|
|
169
|
-
}]),
|
|
170
|
-
component("CommandShortcut"),
|
|
171
|
-
component("CommandSeparator", { alwaysRender: "boolean" }),
|
|
172
|
-
component("DatePicker", {
|
|
173
|
-
...commonProperties,
|
|
174
|
-
placeholder: "string",
|
|
175
|
-
value: "string"
|
|
176
|
-
}, [{
|
|
177
|
-
propName: "onChange",
|
|
178
|
-
eventName: "change",
|
|
179
|
-
payload: "string"
|
|
180
|
-
}]),
|
|
181
|
-
component("Dialog", disclosureProperties, disclosureEvents),
|
|
182
|
-
component("DialogTrigger", commonProperties),
|
|
183
|
-
component("DialogContent", {
|
|
184
|
-
...commonProperties,
|
|
185
|
-
showCloseButton: "boolean"
|
|
186
|
-
}),
|
|
187
|
-
component("DialogHeader"),
|
|
188
|
-
component("DialogFooter"),
|
|
189
|
-
component("DialogTitle"),
|
|
190
|
-
component("DialogDescription"),
|
|
191
|
-
component("DialogClose", commonProperties),
|
|
192
|
-
component("DropdownMenu", disclosureProperties, disclosureEvents),
|
|
193
|
-
component("DropdownMenuTrigger", commonProperties),
|
|
194
|
-
component("DropdownMenuContent", {
|
|
195
|
-
align: "string",
|
|
196
|
-
alignOffset: "finite-number",
|
|
197
|
-
side: "string",
|
|
198
|
-
sideOffset: "finite-number"
|
|
199
|
-
}),
|
|
200
|
-
component("DropdownMenuGroup"),
|
|
201
|
-
component("DropdownMenuLabel", { inset: "boolean" }),
|
|
202
|
-
component("DropdownMenuItem", {
|
|
203
|
-
...commonProperties,
|
|
204
|
-
inset: "boolean"
|
|
205
|
-
}, [{
|
|
206
|
-
propName: "onSelect",
|
|
207
|
-
eventName: "select",
|
|
208
|
-
payload: "void"
|
|
209
|
-
}]),
|
|
210
|
-
component("DropdownMenuCheckboxItem", {
|
|
211
|
-
...commonProperties,
|
|
212
|
-
checked: "boolean"
|
|
213
|
-
}, [{
|
|
214
|
-
propName: "onCheckedChange",
|
|
215
|
-
eventName: "checked-change",
|
|
216
|
-
payload: "boolean"
|
|
217
|
-
}]),
|
|
218
|
-
component("DropdownMenuRadioGroup", valueProperties, valueEvents),
|
|
219
|
-
component("DropdownMenuRadioItem", {
|
|
220
|
-
...commonProperties,
|
|
221
|
-
value: "string"
|
|
222
|
-
}),
|
|
223
|
-
component("DropdownMenuSeparator"),
|
|
224
|
-
component("DropdownMenuShortcut"),
|
|
225
|
-
component("DropdownMenuSub", disclosureProperties, disclosureEvents),
|
|
226
|
-
component("DropdownMenuSubTrigger", {
|
|
227
|
-
...commonProperties,
|
|
228
|
-
inset: "boolean"
|
|
229
|
-
}),
|
|
230
|
-
component("DropdownMenuSubContent", {
|
|
231
|
-
alignOffset: "finite-number",
|
|
232
|
-
sideOffset: "finite-number"
|
|
233
|
-
}),
|
|
234
|
-
component("Input", {
|
|
235
|
-
...commonProperties,
|
|
236
|
-
autoComplete: "string",
|
|
237
|
-
checked: "boolean",
|
|
238
|
-
max: "string",
|
|
239
|
-
maxLength: "finite-number",
|
|
240
|
-
min: "string",
|
|
241
|
-
minLength: "finite-number",
|
|
242
|
-
name: "string",
|
|
243
|
-
pattern: "string",
|
|
244
|
-
placeholder: "string",
|
|
245
|
-
readOnly: "boolean",
|
|
246
|
-
required: "boolean",
|
|
247
|
-
step: "string",
|
|
248
|
-
type: "string",
|
|
249
|
-
value: "string"
|
|
250
|
-
}, [
|
|
251
|
-
{
|
|
252
|
-
propName: "onBlur",
|
|
253
|
-
eventName: "blur",
|
|
254
|
-
payload: "void"
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
propName: "onFocus",
|
|
258
|
-
eventName: "focus",
|
|
259
|
-
payload: "void"
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
propName: "onValueChange",
|
|
263
|
-
eventName: "value-change",
|
|
264
|
-
payload: "string"
|
|
265
|
-
}
|
|
266
|
-
]),
|
|
267
|
-
component("Label", { htmlFor: "string" }),
|
|
268
|
-
component("Pagination"),
|
|
269
|
-
component("PaginationContent"),
|
|
270
|
-
component("PaginationItem"),
|
|
271
|
-
component("PaginationLink", {
|
|
272
|
-
...commonProperties,
|
|
273
|
-
href: "navigation-url",
|
|
274
|
-
isActive: "boolean",
|
|
275
|
-
size: "string"
|
|
276
|
-
}),
|
|
277
|
-
component("PaginationPrevious", { href: "navigation-url" }),
|
|
278
|
-
component("PaginationNext", { href: "navigation-url" }),
|
|
279
|
-
component("PaginationEllipsis"),
|
|
280
|
-
component("Popover", {
|
|
281
|
-
...disclosureProperties,
|
|
282
|
-
modal: "boolean"
|
|
283
|
-
}, disclosureEvents),
|
|
284
|
-
component("PopoverTrigger", commonProperties),
|
|
285
|
-
component("PopoverAnchor"),
|
|
286
|
-
component("PopoverContent", {
|
|
287
|
-
align: "string",
|
|
288
|
-
alignOffset: "finite-number",
|
|
289
|
-
side: "string",
|
|
290
|
-
sideOffset: "finite-number"
|
|
291
|
-
}),
|
|
292
|
-
component("PopoverHeader"),
|
|
293
|
-
component("PopoverTitle"),
|
|
294
|
-
component("PopoverDescription"),
|
|
295
|
-
component("Progress", {
|
|
296
|
-
max: "finite-number",
|
|
297
|
-
value: "finite-number"
|
|
298
|
-
}),
|
|
299
|
-
component("RadioGroup", {
|
|
300
|
-
...commonProperties,
|
|
301
|
-
...valueProperties,
|
|
302
|
-
orientation: "string",
|
|
303
|
-
required: "boolean"
|
|
304
|
-
}, valueEvents),
|
|
305
|
-
component("RadioGroupItem", {
|
|
306
|
-
...commonProperties,
|
|
307
|
-
value: "string"
|
|
308
|
-
}),
|
|
309
|
-
component("ScrollArea", {
|
|
310
|
-
dir: "string",
|
|
311
|
-
type: "string"
|
|
312
|
-
}),
|
|
313
|
-
component("ScrollBar", { orientation: "string" }),
|
|
314
|
-
component("Select", {
|
|
315
|
-
...commonProperties,
|
|
316
|
-
...valueProperties,
|
|
317
|
-
name: "string",
|
|
318
|
-
open: "boolean",
|
|
319
|
-
required: "boolean"
|
|
320
|
-
}, [...valueEvents, ...disclosureEvents]),
|
|
321
|
-
component("SelectGroup"),
|
|
322
|
-
component("SelectValue", { placeholder: "string" }),
|
|
323
|
-
component("SelectTrigger", {
|
|
324
|
-
...commonProperties,
|
|
325
|
-
size: "string"
|
|
326
|
-
}),
|
|
327
|
-
component("SelectContent", {
|
|
328
|
-
align: "string",
|
|
329
|
-
position: "string",
|
|
330
|
-
side: "string",
|
|
331
|
-
sideOffset: "finite-number"
|
|
332
|
-
}),
|
|
333
|
-
component("SelectLabel"),
|
|
334
|
-
component("SelectItem", {
|
|
335
|
-
...commonProperties,
|
|
336
|
-
textValue: "string",
|
|
337
|
-
value: "string"
|
|
338
|
-
}),
|
|
339
|
-
component("SelectSeparator"),
|
|
340
|
-
component("SelectScrollUpButton"),
|
|
341
|
-
component("SelectScrollDownButton"),
|
|
342
|
-
component("Separator", {
|
|
343
|
-
decorative: "boolean",
|
|
344
|
-
orientation: "string"
|
|
345
|
-
}),
|
|
346
|
-
component("Sheet", disclosureProperties, disclosureEvents),
|
|
347
|
-
component("SheetTrigger", commonProperties),
|
|
348
|
-
component("SheetContent", {
|
|
349
|
-
...commonProperties,
|
|
350
|
-
side: "string"
|
|
351
|
-
}),
|
|
352
|
-
component("SheetHeader"),
|
|
353
|
-
component("SheetFooter"),
|
|
354
|
-
component("SheetTitle"),
|
|
355
|
-
component("SheetDescription"),
|
|
356
|
-
component("SheetClose", commonProperties),
|
|
357
|
-
component("Skeleton", { "aria-label": "string" }),
|
|
358
|
-
component("Slider", {
|
|
359
|
-
...commonProperties,
|
|
360
|
-
defaultValue: "finite-number-array",
|
|
361
|
-
inverted: "boolean",
|
|
362
|
-
max: "finite-number",
|
|
363
|
-
min: "finite-number",
|
|
364
|
-
name: "string",
|
|
365
|
-
orientation: "string",
|
|
366
|
-
step: "finite-number",
|
|
367
|
-
value: "finite-number-array"
|
|
368
|
-
}, [{
|
|
369
|
-
propName: "onValueChange",
|
|
370
|
-
eventName: "value-change",
|
|
371
|
-
payload: "finite-number-array"
|
|
372
|
-
}, {
|
|
373
|
-
propName: "onValueCommit",
|
|
374
|
-
eventName: "value-commit",
|
|
375
|
-
payload: "finite-number-array"
|
|
376
|
-
}]),
|
|
377
|
-
component("Spinner", { "aria-label": "string" }),
|
|
378
|
-
component("SpinnerWithText", {
|
|
379
|
-
text: "string",
|
|
380
|
-
variant: "string"
|
|
381
|
-
}),
|
|
382
|
-
component("Switch", {
|
|
383
|
-
...commonProperties,
|
|
384
|
-
checked: "boolean",
|
|
385
|
-
defaultChecked: "boolean",
|
|
386
|
-
name: "string",
|
|
387
|
-
required: "boolean",
|
|
388
|
-
value: "string"
|
|
389
|
-
}, [{
|
|
390
|
-
propName: "onCheckedChange",
|
|
391
|
-
eventName: "checked-change",
|
|
392
|
-
payload: "boolean"
|
|
393
|
-
}]),
|
|
394
|
-
component("Table"),
|
|
395
|
-
component("TableHeader"),
|
|
396
|
-
component("TableBody"),
|
|
397
|
-
component("TableFooter"),
|
|
398
|
-
component("TableRow"),
|
|
399
|
-
component("TableHead"),
|
|
400
|
-
component("TableCell"),
|
|
401
|
-
component("TableCaption"),
|
|
402
|
-
component("Tabs", {
|
|
403
|
-
...commonProperties,
|
|
404
|
-
...valueProperties,
|
|
405
|
-
activationMode: "string",
|
|
406
|
-
orientation: "string"
|
|
407
|
-
}, valueEvents),
|
|
408
|
-
component("TabsList", { loop: "boolean" }),
|
|
409
|
-
component("TabsTrigger", {
|
|
410
|
-
...commonProperties,
|
|
411
|
-
value: "string"
|
|
412
|
-
}),
|
|
413
|
-
component("TabsContent", { value: "string" }),
|
|
414
|
-
component("Textarea", {
|
|
415
|
-
...commonProperties,
|
|
416
|
-
autoComplete: "string",
|
|
417
|
-
maxLength: "finite-number",
|
|
418
|
-
minLength: "finite-number",
|
|
419
|
-
name: "string",
|
|
420
|
-
placeholder: "string",
|
|
421
|
-
readOnly: "boolean",
|
|
422
|
-
required: "boolean",
|
|
423
|
-
rows: "finite-number",
|
|
424
|
-
value: "string"
|
|
425
|
-
}, [
|
|
426
|
-
{
|
|
427
|
-
propName: "onBlur",
|
|
428
|
-
eventName: "blur",
|
|
429
|
-
payload: "void"
|
|
430
|
-
},
|
|
431
|
-
{
|
|
432
|
-
propName: "onFocus",
|
|
433
|
-
eventName: "focus",
|
|
434
|
-
payload: "void"
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
propName: "onValueChange",
|
|
438
|
-
eventName: "value-change",
|
|
439
|
-
payload: "string"
|
|
440
|
-
}
|
|
441
|
-
]),
|
|
442
|
-
component("Toggle", {
|
|
443
|
-
...commonProperties,
|
|
444
|
-
defaultPressed: "boolean",
|
|
445
|
-
pressed: "boolean",
|
|
446
|
-
size: "string",
|
|
447
|
-
variant: "string"
|
|
448
|
-
}, [{
|
|
449
|
-
propName: "onPressedChange",
|
|
450
|
-
eventName: "pressed-change",
|
|
451
|
-
payload: "boolean"
|
|
452
|
-
}]),
|
|
453
|
-
component("ToggleGroup", {
|
|
454
|
-
...commonProperties,
|
|
455
|
-
defaultValue: "string-or-string-array",
|
|
456
|
-
orientation: "string",
|
|
457
|
-
rovingFocus: "boolean",
|
|
458
|
-
spacing: "finite-number",
|
|
459
|
-
type: "string",
|
|
460
|
-
value: "string-or-string-array"
|
|
461
|
-
}, singleOrMultipleValueEvents),
|
|
462
|
-
component("ToggleGroupItem", {
|
|
463
|
-
...commonProperties,
|
|
464
|
-
value: "string"
|
|
465
|
-
}),
|
|
466
|
-
component("Tooltip", {
|
|
467
|
-
defaultOpen: "boolean",
|
|
468
|
-
delayDuration: "finite-number",
|
|
469
|
-
open: "boolean"
|
|
470
|
-
}, disclosureEvents),
|
|
471
|
-
component("TooltipTrigger", commonProperties),
|
|
472
|
-
component("TooltipContent", {
|
|
473
|
-
align: "string",
|
|
474
|
-
side: "string",
|
|
475
|
-
sideOffset: "finite-number"
|
|
476
|
-
}),
|
|
477
|
-
component("Combobox", {
|
|
478
|
-
...commonProperties,
|
|
479
|
-
emptyText: "string",
|
|
480
|
-
options: "option-array",
|
|
481
|
-
placeholder: "string",
|
|
482
|
-
value: "string",
|
|
483
|
-
zIndex: "finite-number"
|
|
484
|
-
}, valueEvents),
|
|
485
|
-
component("InfiniteScrollSentinel", {
|
|
486
|
-
hasMore: "boolean",
|
|
487
|
-
isLoading: "boolean",
|
|
488
|
-
rootMargin: "string"
|
|
489
|
-
}, [{
|
|
490
|
-
propName: "onLoadMore",
|
|
491
|
-
eventName: "load-more",
|
|
492
|
-
payload: "void"
|
|
493
|
-
}]),
|
|
494
|
-
component("PhoneInput", {
|
|
495
|
-
...commonProperties,
|
|
496
|
-
defaultCountry: "string",
|
|
497
|
-
emptyText: "string",
|
|
498
|
-
error: "boolean",
|
|
499
|
-
searchPlaceholder: "string",
|
|
500
|
-
value: "string"
|
|
501
|
-
}, [
|
|
502
|
-
{
|
|
503
|
-
propName: "onBlur",
|
|
504
|
-
eventName: "blur",
|
|
505
|
-
payload: "void"
|
|
506
|
-
},
|
|
507
|
-
{
|
|
508
|
-
propName: "onFocus",
|
|
509
|
-
eventName: "focus",
|
|
510
|
-
payload: "void"
|
|
511
|
-
},
|
|
512
|
-
{
|
|
513
|
-
propName: "onValueChange",
|
|
514
|
-
eventName: "value-change",
|
|
515
|
-
payload: "string"
|
|
516
|
-
}
|
|
517
|
-
]),
|
|
518
|
-
{
|
|
519
|
-
exportName: "SearchSort",
|
|
520
|
-
tagName: "fluid-ui-search-sort",
|
|
521
|
-
properties: {
|
|
522
|
-
clearLabel: "string",
|
|
523
|
-
placeholder: "string",
|
|
524
|
-
searchValue: "string",
|
|
525
|
-
sortLabel: "string",
|
|
526
|
-
sortOptions: "option-array",
|
|
527
|
-
sortValue: "string"
|
|
528
|
-
},
|
|
529
|
-
events: [{
|
|
530
|
-
propName: "onSearchChange",
|
|
531
|
-
eventName: "search-change",
|
|
532
|
-
payload: "string"
|
|
533
|
-
}, {
|
|
534
|
-
propName: "onSortChange",
|
|
535
|
-
eventName: "sort-change",
|
|
536
|
-
payload: "string"
|
|
537
|
-
}],
|
|
538
|
-
contractVersion: "1"
|
|
539
|
-
},
|
|
540
|
-
{
|
|
541
|
-
exportName: "FluidSpacerWidget",
|
|
542
|
-
tagName: "fluid-spacer-widget",
|
|
543
|
-
properties: {
|
|
544
|
-
customHeight: "string",
|
|
545
|
-
previewMode: "boolean"
|
|
546
|
-
},
|
|
547
|
-
events: noEvents,
|
|
548
|
-
contractVersion: "1"
|
|
549
|
-
}
|
|
550
|
-
];
|
|
551
|
-
const REMOTE_DOM_UI_COMPONENT_BY_TAG = new Map(REMOTE_DOM_UI_COMPONENTS.map((definition) => [definition.tagName, definition]));
|
|
552
|
-
function getRemoteDomUiComponent(tagName) {
|
|
553
|
-
return REMOTE_DOM_UI_COMPONENT_BY_TAG.get(tagName);
|
|
554
|
-
}
|
|
555
|
-
//#endregion
|
|
556
|
-
//#region src/remote-dom-values.ts
|
|
557
|
-
const REMOTE_DOM_FULLSCREEN_CAPABILITY = "fullscreen";
|
|
558
|
-
/** Canonical element allowlist shared by the worker registration and host sanitizer. */
|
|
559
|
-
const REMOTE_DOM_ALLOWED_TAG_NAMES = [
|
|
560
|
-
"a",
|
|
561
|
-
"abbr",
|
|
562
|
-
"address",
|
|
563
|
-
"article",
|
|
564
|
-
"aside",
|
|
565
|
-
"audio",
|
|
566
|
-
"b",
|
|
567
|
-
"bdi",
|
|
568
|
-
"bdo",
|
|
569
|
-
"blockquote",
|
|
570
|
-
"br",
|
|
571
|
-
"button",
|
|
572
|
-
"caption",
|
|
573
|
-
"cite",
|
|
574
|
-
"code",
|
|
575
|
-
"col",
|
|
576
|
-
"colgroup",
|
|
577
|
-
"data",
|
|
578
|
-
"dd",
|
|
579
|
-
"del",
|
|
580
|
-
"details",
|
|
581
|
-
"dfn",
|
|
582
|
-
"dialog",
|
|
583
|
-
"div",
|
|
584
|
-
"dl",
|
|
585
|
-
"dt",
|
|
586
|
-
"em",
|
|
587
|
-
"fieldset",
|
|
588
|
-
"figcaption",
|
|
589
|
-
"figure",
|
|
590
|
-
"footer",
|
|
591
|
-
"form",
|
|
592
|
-
"h1",
|
|
593
|
-
"h2",
|
|
594
|
-
"h3",
|
|
595
|
-
"h4",
|
|
596
|
-
"h5",
|
|
597
|
-
"h6",
|
|
598
|
-
"header",
|
|
599
|
-
"hr",
|
|
600
|
-
"i",
|
|
601
|
-
"img",
|
|
602
|
-
"input",
|
|
603
|
-
"ins",
|
|
604
|
-
"kbd",
|
|
605
|
-
"label",
|
|
606
|
-
"legend",
|
|
607
|
-
"li",
|
|
608
|
-
"main",
|
|
609
|
-
"mark",
|
|
610
|
-
"meter",
|
|
611
|
-
"nav",
|
|
612
|
-
"ol",
|
|
613
|
-
"optgroup",
|
|
614
|
-
"option",
|
|
615
|
-
"output",
|
|
616
|
-
"p",
|
|
617
|
-
"picture",
|
|
618
|
-
"pre",
|
|
619
|
-
"progress",
|
|
620
|
-
"q",
|
|
621
|
-
"rp",
|
|
622
|
-
"rt",
|
|
623
|
-
"ruby",
|
|
624
|
-
"s",
|
|
625
|
-
"samp",
|
|
626
|
-
"section",
|
|
627
|
-
"select",
|
|
628
|
-
"small",
|
|
629
|
-
"source",
|
|
630
|
-
"span",
|
|
631
|
-
"strong",
|
|
632
|
-
"sub",
|
|
633
|
-
"summary",
|
|
634
|
-
"sup",
|
|
635
|
-
"table",
|
|
636
|
-
"tbody",
|
|
637
|
-
"td",
|
|
638
|
-
"textarea",
|
|
639
|
-
"tfoot",
|
|
640
|
-
"th",
|
|
641
|
-
"thead",
|
|
642
|
-
"time",
|
|
643
|
-
"tr",
|
|
644
|
-
"track",
|
|
645
|
-
"u",
|
|
646
|
-
"ul",
|
|
647
|
-
"var",
|
|
648
|
-
"video",
|
|
649
|
-
"wbr",
|
|
650
|
-
...REMOTE_DOM_UI_COMPONENTS.map(({ tagName }) => tagName)
|
|
651
|
-
];
|
|
652
|
-
/** Canonical event allowlist shared by worker elements and host forwarding. */
|
|
653
|
-
const SUPPORTED_REMOTE_DOM_EVENTS = [
|
|
654
|
-
"blur",
|
|
655
|
-
"change",
|
|
656
|
-
"click",
|
|
657
|
-
"contextmenu",
|
|
658
|
-
"dblclick",
|
|
659
|
-
"focus",
|
|
660
|
-
"input",
|
|
661
|
-
"keydown",
|
|
662
|
-
"keypress",
|
|
663
|
-
"keyup",
|
|
664
|
-
"mousedown",
|
|
665
|
-
"mouseenter",
|
|
666
|
-
"mouseleave",
|
|
667
|
-
"mousemove",
|
|
668
|
-
"mouseout",
|
|
669
|
-
"mouseover",
|
|
670
|
-
"mouseup",
|
|
671
|
-
"pointercancel",
|
|
672
|
-
"pointerdown",
|
|
673
|
-
"pointerenter",
|
|
674
|
-
"pointerleave",
|
|
675
|
-
"pointermove",
|
|
676
|
-
"pointerout",
|
|
677
|
-
"pointerover",
|
|
678
|
-
"pointerup",
|
|
679
|
-
"submit"
|
|
680
|
-
];
|
|
681
|
-
[...new Set(REMOTE_DOM_UI_COMPONENTS.flatMap(({ events }) => events.map(({ eventName }) => eventName)))];
|
|
682
|
-
const REMOTE_DOM_UNSAFE_PROPERTY_KEYS = new Set([
|
|
683
|
-
"__proto__",
|
|
684
|
-
"constructor",
|
|
685
|
-
"prototype"
|
|
686
|
-
]);
|
|
687
|
-
const MAX_REMOTE_DOM_SERIALIZATION_DEPTH = 50;
|
|
688
|
-
function isSafeRemoteDomPropertyKey(key) {
|
|
689
|
-
return !REMOTE_DOM_UNSAFE_PROPERTY_KEYS.has(key);
|
|
690
|
-
}
|
|
691
|
-
/** Converts an arbitrary value into a structured-clone-safe Remote DOM value. */
|
|
692
|
-
function toRemoteDomSerializableValue(value) {
|
|
693
|
-
return serializeRemoteDomValue(value, /* @__PURE__ */ new WeakSet(), 0);
|
|
694
|
-
}
|
|
695
|
-
function serializeRemoteDomValue(value, ancestors, depth) {
|
|
696
|
-
if (value === void 0 || typeof value === "function" || typeof value === "symbol") return;
|
|
697
|
-
if (typeof value === "bigint") return value.toString();
|
|
698
|
-
if (value === null || typeof value === "string" || typeof value === "boolean") return value;
|
|
699
|
-
if (typeof value === "number") return Number.isFinite(value) ? value : null;
|
|
700
|
-
if (typeof value !== "object") return null;
|
|
701
|
-
if (depth > MAX_REMOTE_DOM_SERIALIZATION_DEPTH || ancestors.has(value)) return null;
|
|
702
|
-
if (value instanceof Date) return Number.isFinite(value.getTime()) ? value.toISOString() : null;
|
|
703
|
-
if (value instanceof Error) return {
|
|
704
|
-
name: value.name,
|
|
705
|
-
message: value.message
|
|
706
|
-
};
|
|
707
|
-
ancestors.add(value);
|
|
708
|
-
try {
|
|
709
|
-
if (Array.isArray(value)) return value.map((item) => serializeRemoteDomValue(item, ancestors, depth + 1) ?? null);
|
|
710
|
-
const prototype = Object.getPrototypeOf(value);
|
|
711
|
-
if (prototype !== Object.prototype && prototype !== null) return null;
|
|
712
|
-
const serialized = {};
|
|
713
|
-
for (const [key, item] of Object.entries(value)) {
|
|
714
|
-
if (!isSafeRemoteDomPropertyKey(key)) continue;
|
|
715
|
-
const serializedItem = serializeRemoteDomValue(item, ancestors, depth + 1);
|
|
716
|
-
if (serializedItem !== void 0) serialized[key] = serializedItem;
|
|
717
|
-
}
|
|
718
|
-
return serialized;
|
|
719
|
-
} finally {
|
|
720
|
-
ancestors.delete(value);
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
function isRemoteDomSerializableValue(value) {
|
|
724
|
-
return isRemoteDomSerializableValueInternal(value, /* @__PURE__ */ new WeakSet(), 0);
|
|
725
|
-
}
|
|
726
|
-
function isRemoteDomSerializableValueInternal(value, seen, depth) {
|
|
727
|
-
if (value === null) return true;
|
|
728
|
-
switch (typeof value) {
|
|
729
|
-
case "boolean":
|
|
730
|
-
case "string": return true;
|
|
731
|
-
case "number": return Number.isFinite(value);
|
|
732
|
-
case "object": return isRemoteDomSerializableObject(value, seen, depth);
|
|
733
|
-
default: return false;
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
function isRemoteDomSerializableObject(value, ancestors, depth) {
|
|
737
|
-
if (depth > 50 || ancestors.has(value)) return false;
|
|
738
|
-
const prototype = Object.getPrototypeOf(value);
|
|
739
|
-
if (!Array.isArray(value) && prototype !== Object.prototype && prototype !== null) return false;
|
|
740
|
-
ancestors.add(value);
|
|
741
|
-
try {
|
|
742
|
-
if (Array.isArray(value)) return value.every((item) => isRemoteDomSerializableValueInternal(item, ancestors, depth + 1));
|
|
743
|
-
return Object.entries(value).every(([key, item]) => isSafeRemoteDomPropertyKey(key) && isRemoteDomSerializableValueInternal(item, ancestors, depth + 1));
|
|
744
|
-
} finally {
|
|
745
|
-
ancestors.delete(value);
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
const DEFAULT_REMOTE_DOM_MEDIA_ORIGINS = [
|
|
749
|
-
"https://assets.fluid.app",
|
|
750
|
-
"https://cdn.fluid.app",
|
|
751
|
-
"https://ik.imagekit.io",
|
|
752
|
-
"https://media.fluid.app"
|
|
753
|
-
];
|
|
754
|
-
function createRemoteDomUrlOriginPolicy({ artifactUrls, mediaOrigins = DEFAULT_REMOTE_DOM_MEDIA_ORIGINS, navigationOrigin }) {
|
|
755
|
-
const artifactOriginSet = /* @__PURE__ */ new Set();
|
|
756
|
-
let artifactBaseUrl;
|
|
757
|
-
for (const artifactUrl of artifactUrls) {
|
|
758
|
-
const normalizedUrl = normalizeRemoteDomHttpUrl(artifactUrl);
|
|
759
|
-
if (!normalizedUrl) continue;
|
|
760
|
-
artifactOriginSet.add(normalizedUrl.origin);
|
|
761
|
-
artifactBaseUrl ??= normalizedUrl.href;
|
|
762
|
-
}
|
|
763
|
-
const mediaOriginSet = /* @__PURE__ */ new Set();
|
|
764
|
-
for (const mediaOrigin of mediaOrigins) {
|
|
765
|
-
const origin = normalizeRemoteDomHttpOrigin(mediaOrigin);
|
|
766
|
-
if (origin) mediaOriginSet.add(origin);
|
|
767
|
-
}
|
|
768
|
-
const navigationHttpOrigin = navigationOrigin ? normalizeRemoteDomHttpOrigin(navigationOrigin) : void 0;
|
|
769
|
-
return {
|
|
770
|
-
artifactOrigins: Array.from(artifactOriginSet),
|
|
771
|
-
...artifactBaseUrl ? { artifactBaseUrl } : {},
|
|
772
|
-
mediaOrigins: Array.from(mediaOriginSet),
|
|
773
|
-
...navigationHttpOrigin === void 0 ? {} : { navigationOrigin: navigationHttpOrigin }
|
|
774
|
-
};
|
|
775
|
-
}
|
|
776
|
-
function normalizeRemoteDomHttpOrigin(value) {
|
|
777
|
-
return normalizeRemoteDomHttpUrl(value)?.origin;
|
|
778
|
-
}
|
|
779
|
-
function normalizeRemoteDomHttpUrl(value) {
|
|
780
|
-
try {
|
|
781
|
-
const parsedUrl = new URL(value);
|
|
782
|
-
return parsedUrl.protocol === "http:" || parsedUrl.protocol === "https:" ? parsedUrl : void 0;
|
|
783
|
-
} catch {
|
|
784
|
-
return;
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
//#endregion
|
|
788
|
-
export { isRemoteDomSerializableValue as a, REMOTE_DOM_SUPPORTED_UI_CONTRACT_VERSIONS as c, createRemoteDomUrlOriginPolicy as i, REMOTE_DOM_UI_COMPONENTS as l, REMOTE_DOM_FULLSCREEN_CAPABILITY as n, isSafeRemoteDomPropertyKey as o, SUPPORTED_REMOTE_DOM_EVENTS as r, toRemoteDomSerializableValue as s, REMOTE_DOM_ALLOWED_TAG_NAMES as t, getRemoteDomUiComponent as u };
|
|
789
|
-
|
|
790
|
-
//# sourceMappingURL=remote-dom-values-wEbrw5iW.mjs.map
|