feat(custom-widgets): complete Custom JSX v2 (#6390)

This commit is contained in:
Thomas authored and ajnart committed 2026-08-13 19:48:57 +02:00
1 parent 3a1245cbc5
commit acdfcbb18e
416 files changed
+37853 -18066

No files matched your search

+12
View File
@@ -98,6 +98,12 @@ export interface OptionLocation {
}
const optionsFactory = {
internal: <T>(input: CommonInput<T> & { defaultValue: T }) => ({
type: "internal" as const,
defaultValue: input.defaultValue,
withDescription: false,
skipContextMenu: true,
}),
switch: (input?: CommonInput<boolean>) => ({
type: "switch" as const,
defaultValue: input?.defaultValue ?? false,
@@ -216,6 +222,12 @@ const optionsFactory = {
defaultValue: input?.defaultValue ?? "",
withDescription: input?.withDescription ?? false,
}),
customWidgetConfiguration: (input?: CommonInput<Record<string, unknown>>) => ({
type: "customWidgetConfiguration" as const,
defaultValue: input?.defaultValue ?? {},
withDescription: input?.withDescription ?? false,
skipContextMenu: true,
}),
sortableItemList: <const TItem, const TOptionValue extends UniqueIdentifier>(
input: SortableItemListInput<TItem, TOptionValue>,
) => ({