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

This commit is contained in:
Thomas authored and GitHub committed 2026-07-22 20:47:19 +02:00
1 parent 60cbd7bb7a
commit 6aceb2fd1f
450 files changed
+39817 -20588

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>,
) => ({