@fluid-app/portal-core 0.1.22 → 0.1.23
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/registries/index.cjs +4 -4
- package/dist/registries/index.cjs.map +1 -1
- package/dist/registries/index.d.cts +1 -1
- package/dist/registries/index.d.mts +1 -1
- package/dist/registries/index.mjs +4 -4
- package/dist/registries/index.mjs.map +1 -1
- package/dist/shell/ScreenHeader.cjs +2 -6
- package/dist/shell/ScreenHeader.cjs.map +1 -1
- package/dist/shell/ScreenHeader.d.cts.map +1 -1
- package/dist/shell/ScreenHeader.d.mts.map +1 -1
- package/dist/shell/ScreenHeader.mjs +2 -6
- package/dist/shell/ScreenHeader.mjs.map +1 -1
- package/dist/{widget-manifest-Ei8Wnspj.d.cts → widget-manifest-BhPiatnI.d.cts} +3 -3
- package/dist/widget-manifest-BhPiatnI.d.cts.map +1 -0
- package/dist/{widget-manifest-DQmTtAF1.d.mts → widget-manifest-oQBD8Yoj.d.mts} +3 -3
- package/dist/widget-manifest-oQBD8Yoj.d.mts.map +1 -0
- package/dist/widget-utils/index.d.cts +1 -1
- package/dist/widget-utils/index.d.mts +1 -1
- package/package.json +3 -7
- package/dist/widget-manifest-DQmTtAF1.d.mts.map +0 -1
- package/dist/widget-manifest-Ei8Wnspj.d.cts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../chunk-CKQMccvm.cjs");
|
|
3
|
-
let
|
|
3
|
+
let lucide_react = require("lucide-react");
|
|
4
4
|
//#region src/registries/property-schema-types.ts
|
|
5
5
|
/**
|
|
6
6
|
* Property field type constant - single source of truth for field types.
|
|
@@ -87,7 +87,7 @@ const getBorderRadiusField = (props) => {
|
|
|
87
87
|
type: "buttonGroup",
|
|
88
88
|
options: [
|
|
89
89
|
{
|
|
90
|
-
icon:
|
|
90
|
+
icon: lucide_react.Ban,
|
|
91
91
|
value: "none"
|
|
92
92
|
},
|
|
93
93
|
{
|
|
@@ -119,7 +119,7 @@ const getPaddingField = (props) => {
|
|
|
119
119
|
type: "buttonGroup",
|
|
120
120
|
options: [
|
|
121
121
|
{
|
|
122
|
-
icon:
|
|
122
|
+
icon: lucide_react.Ban,
|
|
123
123
|
value: 0
|
|
124
124
|
},
|
|
125
125
|
{
|
|
@@ -181,7 +181,7 @@ const getGapField = (props) => {
|
|
|
181
181
|
type: "buttonGroup",
|
|
182
182
|
options: [
|
|
183
183
|
{
|
|
184
|
-
icon:
|
|
184
|
+
icon: lucide_react.Ban,
|
|
185
185
|
value: "none"
|
|
186
186
|
},
|
|
187
187
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["faBan"],"sources":["../../src/registries/property-schema-types.ts","../../src/registries/field-helpers.ts"],"sourcesContent":["import type { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\nimport type {\n WidgetType,\n WidgetSchema,\n AlignOptions,\n ColorOptions,\n FontSizeOptions,\n SectionLayoutType,\n StrictOmit,\n} from \"../types\";\n\n/**\n * Tab configuration for organizing properties\n */\nexport interface TabConfig {\n /** Unique identifier for the tab */\n id: string;\n /** Display label for the tab */\n label: string;\n}\n\n// ============================================================================\n// Property Field Types - Derive from constant for single source of truth\n// ============================================================================\n\n/**\n * Property field type constant - single source of truth for field types.\n * Use PROPERTY_FIELD_TYPES.text instead of \"text\" for type-safe comparisons.\n */\nexport const PROPERTY_FIELD_TYPES = {\n text: \"text\",\n textarea: \"textarea\",\n number: \"number\",\n boolean: \"boolean\",\n select: \"select\",\n color: \"color\",\n range: \"range\",\n dataSource: \"dataSource\",\n resource: \"resource\",\n image: \"image\",\n alignment: \"alignment\",\n slider: \"slider\",\n colorPicker: \"colorPicker\",\n sectionHeader: \"sectionHeader\",\n separator: \"separator\",\n buttonGroup: \"buttonGroup\",\n colorSelect: \"colorSelect\",\n sectionLayoutSelect: \"sectionLayoutSelect\",\n background: \"background\",\n contentPosition: \"contentPosition\",\n textSizeSelect: \"textSizeSelect\",\n cssUnit: \"cssUnit\",\n} as const;\n\n/**\n * Union type of all property field types, derived from PROPERTY_FIELD_TYPES constant.\n * @see deriving-typeof-for-object-keys pattern\n */\nexport type PropertyFieldType =\n (typeof PROPERTY_FIELD_TYPES)[keyof typeof PROPERTY_FIELD_TYPES];\n\n/**\n * Runtime validation for property field types.\n * @param value - The value to check\n * @returns true if value is a valid PropertyFieldType\n */\nexport function isPropertyFieldType(value: string): value is PropertyFieldType {\n return Object.values(PROPERTY_FIELD_TYPES).includes(\n value as PropertyFieldType,\n );\n}\n\n/**\n * Base schema for a property field\n */\nexport interface PropertyFieldSchema {\n /** Property key in the widget props */\n key: string;\n /** Display label for the field */\n label: string;\n /** Field type determines the input control */\n type: PropertyFieldType;\n /** Optional description/help text */\n description?: string;\n /** Optional default value */\n defaultValue?: unknown;\n /** Optional tab ID (must match a TabConfig id if widget has tabsConfig) */\n tab?: string;\n /** Optional group for organizing fields within a tab */\n group?: string;\n /**\n * @deprecated Use requiresKeyValue instead\n */\n requiresKeyToBeTrue?: string;\n /** Optional requires a specific key to have a specific value */\n requiresKeyValue?: { key: string; value: unknown };\n}\n\n/**\n * Text field schema\n */\nexport interface TextFieldSchema extends PropertyFieldSchema {\n type: \"text\";\n placeholder?: string;\n maxLength?: number;\n}\n\n/**\n * Textarea field schema\n */\nexport interface TextareaFieldSchema extends PropertyFieldSchema {\n type: \"textarea\";\n placeholder?: string;\n rows?: number;\n maxLength?: number;\n}\n\n/**\n * Number field schema\n */\nexport interface NumberFieldSchema extends PropertyFieldSchema {\n type: \"number\";\n min?: number;\n max?: number;\n step?: number;\n}\n\n/**\n * Boolean field schema\n */\nexport interface BooleanFieldSchema extends PropertyFieldSchema {\n type: \"boolean\";\n}\n\n/**\n * Select field schema with type-safe option values.\n * Uses StrictOmit to ensure \"defaultValue\" key exists on PropertyFieldSchema.\n */\nexport interface SelectFieldSchema<\n T extends string | number = string | number,\n> extends StrictOmit<PropertyFieldSchema, \"defaultValue\"> {\n type: \"select\";\n options: Array<{ label: string; value: T }>;\n defaultValue?: T;\n}\n\n/**\n * Color field schema\n */\nexport interface ColorFieldSchema extends PropertyFieldSchema {\n type: \"color\";\n}\n\n/**\n * Range slider field schema\n */\nexport interface RangeFieldSchema extends PropertyFieldSchema {\n type: \"range\";\n min: number;\n max: number;\n step?: number;\n}\n\n/**\n * Data source field schema for configuring widget data sources\n */\nexport interface DataSourceFieldSchema extends PropertyFieldSchema {\n type: \"dataSource\";\n}\n\n/**\n * Resource field schema for selecting a single resource from the selection modal\n */\nexport interface ResourceFieldSchema extends PropertyFieldSchema {\n type: \"resource\";\n /** Optional filter to specific shareable types */\n allowedTypes?: string[];\n}\n\n/**\n * Image field schema for selecting a single image from the image picker\n */\nexport interface ImageFieldSchema extends PropertyFieldSchema {\n type: \"image\";\n}\n\n/**\n * Alignment field schema\n */\nexport interface AlignmentFieldSchema extends PropertyFieldSchema {\n type: \"alignment\";\n options: {\n verticalEnabled: boolean;\n horizontalEnabled: boolean;\n };\n defaultValue?: AlignOptions;\n}\n\n/**\n * Slider field schema with optional unit suffix (e.g., \"rem\", \"px\")\n */\nexport interface SliderFieldSchema extends PropertyFieldSchema {\n type: \"slider\";\n min: number;\n max: number;\n step?: number;\n unit?: string;\n}\n\n/**\n * Color picker field schema with optional swatches\n */\nexport interface ColorPickerFieldSchema extends PropertyFieldSchema {\n type: \"colorPicker\";\n swatches?: string[];\n}\n\n/**\n * Section header field schema for visual grouping\n */\nexport interface SectionHeaderFieldSchema extends PropertyFieldSchema {\n type: \"sectionHeader\";\n subtitle?: string;\n}\n\n/**\n * Separator field schema for visual separation\n */\nexport interface SeparatorFieldSchema extends PropertyFieldSchema {\n type: \"separator\";\n}\n\n/**\n * Button group field schema.\n * Uses StrictOmit to ensure \"defaultValue\" key exists on PropertyFieldSchema.\n */\nexport interface ButtonGroupFieldSchema<\n T extends string | number = string | number,\n> extends StrictOmit<PropertyFieldSchema, \"defaultValue\"> {\n type: \"buttonGroup\";\n options: Array<{ label?: string; icon?: IconDefinition; value: T }>;\n defaultValue?: T;\n}\n\n/**\n * Color select field schema\n */\nexport interface ColorSelectFieldSchema extends PropertyFieldSchema {\n type: \"colorSelect\";\n defaultValue?: ColorOptions;\n}\n\n/**\n * Section layout select field schema for visual masonry layout selector\n */\nexport interface SectionLayoutSelectFieldSchema extends PropertyFieldSchema {\n type: \"sectionLayoutSelect\";\n defaultValue?: SectionLayoutType;\n}\n\n/**\n * Background field combines resource selection and color properties.\n * Uses StrictOmit to exclude conflicting \"type\" discriminant from parents.\n */\nexport interface BackgroundFieldSchema\n extends\n StrictOmit<ResourceFieldSchema, \"type\">,\n StrictOmit<ColorFieldSchema, \"type\"> {\n type: \"background\";\n}\n\n/**\n * Content position field schema for 3x3 grid position picker\n */\nexport interface ContentPositionFieldSchema extends PropertyFieldSchema {\n type: \"contentPosition\";\n defaultValue?: string;\n}\n\n/**\n * Text size select field schema for visual font size selector\n */\nexport interface TextSizeSelectFieldSchema extends PropertyFieldSchema {\n type: \"textSizeSelect\";\n defaultValue?: FontSizeOptions;\n}\n\n/**\n * CSS unit type for height/width fields\n */\nexport type CssUnit = \"px\" | \"rem\" | \"vh\" | \"%\";\n\n/**\n * CSS unit field schema for numeric values with selectable units (px, rem, vh, %)\n */\nexport interface CssUnitFieldSchema extends PropertyFieldSchema {\n type: \"cssUnit\";\n minByUnit?: Partial<Record<CssUnit, number>>;\n maxByUnit?: Partial<Record<CssUnit, number>>;\n stepByUnit?: Partial<Record<CssUnit, number>>;\n allowedUnits?: CssUnit[];\n defaultUnit?: CssUnit;\n}\n\n/**\n * Union of all field schema types\n */\nexport type PropertyField =\n | TextFieldSchema\n | TextareaFieldSchema\n | NumberFieldSchema\n | BooleanFieldSchema\n | SelectFieldSchema<string | number>\n | ColorFieldSchema\n | RangeFieldSchema\n | DataSourceFieldSchema\n | ResourceFieldSchema\n | ImageFieldSchema\n | AlignmentFieldSchema\n | SliderFieldSchema\n | ColorPickerFieldSchema\n | SectionHeaderFieldSchema\n | SeparatorFieldSchema\n | ButtonGroupFieldSchema<string | number>\n | ColorSelectFieldSchema\n | SectionLayoutSelectFieldSchema\n | BackgroundFieldSchema\n | ContentPositionFieldSchema\n | TextSizeSelectFieldSchema\n | CssUnitFieldSchema;\n\n/**\n * Schema for per-item configuration in custom data sources.\n * Widgets can define this to allow users to configure widget-specific\n * settings for each selected item (e.g., title, description, button).\n */\nexport interface ItemConfigSchema {\n /** Fields available for per-item configuration */\n fields: PropertyField[];\n /** Optional description shown at top of item config panel */\n description?: string;\n}\n\n/**\n * Schema for a widget's editable properties\n */\nexport interface WidgetPropertySchema {\n /** Widget type this schema applies to */\n widgetType: WidgetType;\n /** Display name for the widget */\n displayName: string;\n /** Optional tab configuration - if present, tabs are enabled */\n tabsConfig?: TabConfig[];\n /** Editable property fields */\n fields: PropertyField[];\n /** Optional custom validator function */\n validate?: (props: Record<string, unknown>) => string | null;\n /** Props that can be populated from data sources */\n dataSourceTargetProps?: string[];\n /** Optional schema for per-item configurations in custom data sources */\n itemConfigSchema?: ItemConfigSchema;\n}\n\n/**\n * Registry mapping widget types to their property schemas\n */\nexport type PropertySchemaRegistry = Record<WidgetType, WidgetPropertySchema>;\n\n/**\n * Group property fields by their group property\n */\nexport function groupPropertyFields(\n fields: readonly PropertyField[],\n): Record<string, PropertyField[]> {\n const grouped: Record<string, PropertyField[]> = {};\n\n fields.forEach((field) => {\n const group = field.group || \"General\";\n if (!grouped[group]) {\n grouped[group] = [];\n }\n grouped[group].push(field);\n });\n\n return grouped;\n}\n\n/**\n * Extract current values from widget props based on property fields\n */\nexport function extractPropertyValues(\n widget: Readonly<WidgetSchema>,\n fields: readonly PropertyField[],\n): Record<string, unknown> {\n const values: Record<string, unknown> = {};\n\n fields.forEach((field) => {\n const value = widget.props[field.key];\n values[field.key] = value !== undefined ? value : field.defaultValue;\n });\n\n return values;\n}\n\n/**\n * Apply property values to widget props\n */\nexport function applyPropertyValues(\n widget: Readonly<WidgetSchema>,\n values: Readonly<Record<string, unknown>>,\n): WidgetSchema {\n return {\n ...widget,\n props: {\n ...widget.props,\n ...values,\n },\n };\n}\n","import type {\n ButtonGroupFieldSchema,\n ColorSelectFieldSchema,\n CssUnitFieldSchema,\n TextSizeSelectFieldSchema,\n} from \"./property-schema-types\";\nimport type {\n BorderRadiusOptions,\n PaddingOptions,\n ButtonSizeOptions,\n GapOptions,\n} from \"../types\";\nimport { faBan } from \"@fortawesome/pro-regular-svg-icons\";\n\nexport const getColorField = (\n props: Readonly<Omit<ColorSelectFieldSchema, \"type\">>,\n): ColorSelectFieldSchema => {\n return {\n ...props,\n type: \"colorSelect\",\n };\n};\n\nexport const getBorderRadiusField = (\n props: Readonly<\n Omit<ButtonGroupFieldSchema<BorderRadiusOptions>, \"options\" | \"type\">\n >,\n): ButtonGroupFieldSchema<BorderRadiusOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { icon: faBan, value: \"none\" },\n { label: \"SM\", value: \"sm\" },\n { label: \"MD\", value: \"md\" },\n { label: \"LG\", value: \"lg\" },\n { label: \"XL\", value: \"xl\" },\n { label: \"FULL\", value: \"full\" },\n ],\n };\n};\n\nexport const getPaddingField = (\n props: Readonly<\n Omit<ButtonGroupFieldSchema<PaddingOptions>, \"options\" | \"type\">\n >,\n): ButtonGroupFieldSchema<PaddingOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { icon: faBan, value: 0 },\n { label: \"SM\", value: 2 },\n { label: \"MD\", value: 4 },\n { label: \"LG\", value: 6 },\n { label: \"XL\", value: 8 },\n { label: \"FULL\", value: 10 },\n ],\n };\n};\n\nexport const getButtonSizeField = (\n props: Readonly<\n Omit<ButtonGroupFieldSchema<ButtonSizeOptions>, \"options\" | \"type\">\n >,\n): ButtonGroupFieldSchema<ButtonSizeOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { label: \"SM\", value: \"sm\" },\n { label: \"MD\", value: \"default\" },\n { label: \"LG\", value: \"lg\" },\n { label: \"XL\", value: \"xl\" },\n ],\n };\n};\n\nexport const getFontSizeField = (\n props: Readonly<Omit<TextSizeSelectFieldSchema, \"type\">>,\n): TextSizeSelectFieldSchema => {\n return {\n ...props,\n type: \"textSizeSelect\",\n };\n};\n\nexport const getGapField = (\n props: Readonly<Omit<ButtonGroupFieldSchema<GapOptions>, \"options\" | \"type\">>,\n): ButtonGroupFieldSchema<GapOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { icon: faBan, value: \"none\" },\n { label: \"XS\", value: \"xs\" },\n { label: \"SM\", value: \"sm\" },\n { label: \"MD\", value: \"md\" },\n { label: \"LG\", value: \"lg\" },\n { label: \"XL\", value: \"xl\" },\n ],\n };\n};\n\nexport const getHeightField = (\n props: Readonly<\n Omit<\n CssUnitFieldSchema,\n \"type\" | \"minByUnit\" | \"maxByUnit\" | \"stepByUnit\" | \"allowedUnits\"\n >\n >,\n): CssUnitFieldSchema => {\n return {\n ...props,\n type: \"cssUnit\",\n allowedUnits: [\"px\", \"vh\", \"rem\"],\n minByUnit: { px: 10, vh: 1, rem: 1 },\n maxByUnit: { px: 1200, vh: 100, rem: 75 },\n stepByUnit: { px: 10, vh: 1, rem: 1 },\n };\n};\n\n/**\n * Gap value mapping - use `as const satisfies` for compile-time validation\n * with literal type preservation.\n */\nexport const gapValues: {\n readonly none: 0;\n readonly xs: 1;\n readonly sm: 2;\n readonly md: 4;\n readonly lg: 6;\n readonly xl: 8;\n} = {\n none: 0,\n xs: 1,\n sm: 2,\n md: 4,\n lg: 6,\n xl: 8,\n} as const satisfies Record<GapOptions, number>;\n"],"mappings":";;;;;;;;AA6BA,MAAa,uBAAuB;CAClC,MAAM;CACN,UAAU;CACV,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,OAAO;CACP,OAAO;CACP,YAAY;CACZ,UAAU;CACV,OAAO;CACP,WAAW;CACX,QAAQ;CACR,aAAa;CACb,eAAe;CACf,WAAW;CAC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zB;IAAE,OAAO;IAAM,OAAO;IAAG;GACzB;IAAE,OAAO;IAAM,OAAO;IAAG;GACzB;IAAE,OAAO;IAAM,OAAO;IAAG;GACzB;IAAE,OAAO;IAAQ,OAAO;IAAI;GAC7B;EACF;;AAGH,MAAa,sBACX,UAG8C;AAC9C,QAAO;EACL,GAAG;EACH,MAAM;EACN,SAAS;GACP;IAAE,OAAO;IAAM,OAAO;IAAM;GAC5B;IAAE,OAAO;IAAM,OAAO;IAAW;GACjC;IAAE,OAAO;IAAM,OAAO;IAAM;GAC5B;IAAE,OAAO;IAAM,OAAO;IAAM;GAC7B;EACF;;AAGH,MAAa,oBACX,UAC8B;AAC9B,QAAO;EACL,GAAG;EACH,MAAM;EACP;;AAGH,MAAa,eACX,UACuC;AACvC,QAAO;EACL,GAAG;EACH,MAAM;EACN,SAAS;GACP;IAAE,MAAMA,mCAAAA;IAAO,OAAO;IAAQ;GAC9B;IAAE,OAAO;IAAM,OAAO;IAAM;GAC5B;IAAE,OAAO;IAAM,OAAO;IAAM;GAC5B;IAAE,OAAO;IAAM,OAAO;IAAM;GAC5B;IAAE,OAAO;IAAM,OAAO;IAAM;GAC5B;IAAE,OAAO;IAAM,OAAO;IAAM;GAC7B;EACF;;AAGH,MAAa,kBACX,UAMuB;AACvB,QAAO;EACL,GAAG;EACH,MAAM;EACN,cAAc;GAAC;GAAM;GAAM;GAAM;EACjC,WAAW;GAAE,IAAI;GAAI,IAAI;GAAG,KAAK;GAAG;EACpC,WAAW;GAAE,IAAI;GAAM,IAAI;GAAK,KAAK;GAAI;EACzC,YAAY;GAAE,IAAI;GAAI,IAAI;GAAG,KAAK;GAAG;EACtC;;;;;;AAOH,MAAa,YAOT;CACF,MAAM;CACN,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACL"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["Ban"],"sources":["../../src/registries/property-schema-types.ts","../../src/registries/field-helpers.ts"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\nimport type {\n WidgetType,\n WidgetSchema,\n AlignOptions,\n ColorOptions,\n FontSizeOptions,\n SectionLayoutType,\n StrictOmit,\n} from \"../types\";\n\n/**\n * Tab configuration for organizing properties\n */\nexport interface TabConfig {\n /** Unique identifier for the tab */\n id: string;\n /** Display label for the tab */\n label: string;\n}\n\n// ============================================================================\n// Property Field Types - Derive from constant for single source of truth\n// ============================================================================\n\n/**\n * Property field type constant - single source of truth for field types.\n * Use PROPERTY_FIELD_TYPES.text instead of \"text\" for type-safe comparisons.\n */\nexport const PROPERTY_FIELD_TYPES = {\n text: \"text\",\n textarea: \"textarea\",\n number: \"number\",\n boolean: \"boolean\",\n select: \"select\",\n color: \"color\",\n range: \"range\",\n dataSource: \"dataSource\",\n resource: \"resource\",\n image: \"image\",\n alignment: \"alignment\",\n slider: \"slider\",\n colorPicker: \"colorPicker\",\n sectionHeader: \"sectionHeader\",\n separator: \"separator\",\n buttonGroup: \"buttonGroup\",\n colorSelect: \"colorSelect\",\n sectionLayoutSelect: \"sectionLayoutSelect\",\n background: \"background\",\n contentPosition: \"contentPosition\",\n textSizeSelect: \"textSizeSelect\",\n cssUnit: \"cssUnit\",\n} as const;\n\n/**\n * Union type of all property field types, derived from PROPERTY_FIELD_TYPES constant.\n * @see deriving-typeof-for-object-keys pattern\n */\nexport type PropertyFieldType =\n (typeof PROPERTY_FIELD_TYPES)[keyof typeof PROPERTY_FIELD_TYPES];\n\n/**\n * Runtime validation for property field types.\n * @param value - The value to check\n * @returns true if value is a valid PropertyFieldType\n */\nexport function isPropertyFieldType(value: string): value is PropertyFieldType {\n return Object.values(PROPERTY_FIELD_TYPES).includes(\n value as PropertyFieldType,\n );\n}\n\n/**\n * Base schema for a property field\n */\nexport interface PropertyFieldSchema {\n /** Property key in the widget props */\n key: string;\n /** Display label for the field */\n label: string;\n /** Field type determines the input control */\n type: PropertyFieldType;\n /** Optional description/help text */\n description?: string;\n /** Optional default value */\n defaultValue?: unknown;\n /** Optional tab ID (must match a TabConfig id if widget has tabsConfig) */\n tab?: string;\n /** Optional group for organizing fields within a tab */\n group?: string;\n /**\n * @deprecated Use requiresKeyValue instead\n */\n requiresKeyToBeTrue?: string;\n /** Optional requires a specific key to have a specific value */\n requiresKeyValue?: { key: string; value: unknown };\n}\n\n/**\n * Text field schema\n */\nexport interface TextFieldSchema extends PropertyFieldSchema {\n type: \"text\";\n placeholder?: string;\n maxLength?: number;\n}\n\n/**\n * Textarea field schema\n */\nexport interface TextareaFieldSchema extends PropertyFieldSchema {\n type: \"textarea\";\n placeholder?: string;\n rows?: number;\n maxLength?: number;\n}\n\n/**\n * Number field schema\n */\nexport interface NumberFieldSchema extends PropertyFieldSchema {\n type: \"number\";\n min?: number;\n max?: number;\n step?: number;\n}\n\n/**\n * Boolean field schema\n */\nexport interface BooleanFieldSchema extends PropertyFieldSchema {\n type: \"boolean\";\n}\n\n/**\n * Select field schema with type-safe option values.\n * Uses StrictOmit to ensure \"defaultValue\" key exists on PropertyFieldSchema.\n */\nexport interface SelectFieldSchema<\n T extends string | number = string | number,\n> extends StrictOmit<PropertyFieldSchema, \"defaultValue\"> {\n type: \"select\";\n options: Array<{ label: string; value: T }>;\n defaultValue?: T;\n}\n\n/**\n * Color field schema\n */\nexport interface ColorFieldSchema extends PropertyFieldSchema {\n type: \"color\";\n}\n\n/**\n * Range slider field schema\n */\nexport interface RangeFieldSchema extends PropertyFieldSchema {\n type: \"range\";\n min: number;\n max: number;\n step?: number;\n}\n\n/**\n * Data source field schema for configuring widget data sources\n */\nexport interface DataSourceFieldSchema extends PropertyFieldSchema {\n type: \"dataSource\";\n}\n\n/**\n * Resource field schema for selecting a single resource from the selection modal\n */\nexport interface ResourceFieldSchema extends PropertyFieldSchema {\n type: \"resource\";\n /** Optional filter to specific shareable types */\n allowedTypes?: string[];\n}\n\n/**\n * Image field schema for selecting a single image from the image picker\n */\nexport interface ImageFieldSchema extends PropertyFieldSchema {\n type: \"image\";\n}\n\n/**\n * Alignment field schema\n */\nexport interface AlignmentFieldSchema extends PropertyFieldSchema {\n type: \"alignment\";\n options: {\n verticalEnabled: boolean;\n horizontalEnabled: boolean;\n };\n defaultValue?: AlignOptions;\n}\n\n/**\n * Slider field schema with optional unit suffix (e.g., \"rem\", \"px\")\n */\nexport interface SliderFieldSchema extends PropertyFieldSchema {\n type: \"slider\";\n min: number;\n max: number;\n step?: number;\n unit?: string;\n}\n\n/**\n * Color picker field schema with optional swatches\n */\nexport interface ColorPickerFieldSchema extends PropertyFieldSchema {\n type: \"colorPicker\";\n swatches?: string[];\n}\n\n/**\n * Section header field schema for visual grouping\n */\nexport interface SectionHeaderFieldSchema extends PropertyFieldSchema {\n type: \"sectionHeader\";\n subtitle?: string;\n}\n\n/**\n * Separator field schema for visual separation\n */\nexport interface SeparatorFieldSchema extends PropertyFieldSchema {\n type: \"separator\";\n}\n\n/**\n * Button group field schema.\n * Uses StrictOmit to ensure \"defaultValue\" key exists on PropertyFieldSchema.\n */\nexport interface ButtonGroupFieldSchema<\n T extends string | number = string | number,\n> extends StrictOmit<PropertyFieldSchema, \"defaultValue\"> {\n type: \"buttonGroup\";\n options: Array<{ label?: string; icon?: LucideIcon; value: T }>;\n defaultValue?: T;\n}\n\n/**\n * Color select field schema\n */\nexport interface ColorSelectFieldSchema extends PropertyFieldSchema {\n type: \"colorSelect\";\n defaultValue?: ColorOptions;\n}\n\n/**\n * Section layout select field schema for visual masonry layout selector\n */\nexport interface SectionLayoutSelectFieldSchema extends PropertyFieldSchema {\n type: \"sectionLayoutSelect\";\n defaultValue?: SectionLayoutType;\n}\n\n/**\n * Background field combines resource selection and color properties.\n * Uses StrictOmit to exclude conflicting \"type\" discriminant from parents.\n */\nexport interface BackgroundFieldSchema\n extends\n StrictOmit<ResourceFieldSchema, \"type\">,\n StrictOmit<ColorFieldSchema, \"type\"> {\n type: \"background\";\n}\n\n/**\n * Content position field schema for 3x3 grid position picker\n */\nexport interface ContentPositionFieldSchema extends PropertyFieldSchema {\n type: \"contentPosition\";\n defaultValue?: string;\n}\n\n/**\n * Text size select field schema for visual font size selector\n */\nexport interface TextSizeSelectFieldSchema extends PropertyFieldSchema {\n type: \"textSizeSelect\";\n defaultValue?: FontSizeOptions;\n}\n\n/**\n * CSS unit type for height/width fields\n */\nexport type CssUnit = \"px\" | \"rem\" | \"vh\" | \"%\";\n\n/**\n * CSS unit field schema for numeric values with selectable units (px, rem, vh, %)\n */\nexport interface CssUnitFieldSchema extends PropertyFieldSchema {\n type: \"cssUnit\";\n minByUnit?: Partial<Record<CssUnit, number>>;\n maxByUnit?: Partial<Record<CssUnit, number>>;\n stepByUnit?: Partial<Record<CssUnit, number>>;\n allowedUnits?: CssUnit[];\n defaultUnit?: CssUnit;\n}\n\n/**\n * Union of all field schema types\n */\nexport type PropertyField =\n | TextFieldSchema\n | TextareaFieldSchema\n | NumberFieldSchema\n | BooleanFieldSchema\n | SelectFieldSchema<string | number>\n | ColorFieldSchema\n | RangeFieldSchema\n | DataSourceFieldSchema\n | ResourceFieldSchema\n | ImageFieldSchema\n | AlignmentFieldSchema\n | SliderFieldSchema\n | ColorPickerFieldSchema\n | SectionHeaderFieldSchema\n | SeparatorFieldSchema\n | ButtonGroupFieldSchema<string | number>\n | ColorSelectFieldSchema\n | SectionLayoutSelectFieldSchema\n | BackgroundFieldSchema\n | ContentPositionFieldSchema\n | TextSizeSelectFieldSchema\n | CssUnitFieldSchema;\n\n/**\n * Schema for per-item configuration in custom data sources.\n * Widgets can define this to allow users to configure widget-specific\n * settings for each selected item (e.g., title, description, button).\n */\nexport interface ItemConfigSchema {\n /** Fields available for per-item configuration */\n fields: PropertyField[];\n /** Optional description shown at top of item config panel */\n description?: string;\n}\n\n/**\n * Schema for a widget's editable properties\n */\nexport interface WidgetPropertySchema {\n /** Widget type this schema applies to */\n widgetType: WidgetType;\n /** Display name for the widget */\n displayName: string;\n /** Optional tab configuration - if present, tabs are enabled */\n tabsConfig?: TabConfig[];\n /** Editable property fields */\n fields: PropertyField[];\n /** Optional custom validator function */\n validate?: (props: Record<string, unknown>) => string | null;\n /** Props that can be populated from data sources */\n dataSourceTargetProps?: string[];\n /** Optional schema for per-item configurations in custom data sources */\n itemConfigSchema?: ItemConfigSchema;\n}\n\n/**\n * Registry mapping widget types to their property schemas\n */\nexport type PropertySchemaRegistry = Record<WidgetType, WidgetPropertySchema>;\n\n/**\n * Group property fields by their group property\n */\nexport function groupPropertyFields(\n fields: readonly PropertyField[],\n): Record<string, PropertyField[]> {\n const grouped: Record<string, PropertyField[]> = {};\n\n fields.forEach((field) => {\n const group = field.group || \"General\";\n if (!grouped[group]) {\n grouped[group] = [];\n }\n grouped[group].push(field);\n });\n\n return grouped;\n}\n\n/**\n * Extract current values from widget props based on property fields\n */\nexport function extractPropertyValues(\n widget: Readonly<WidgetSchema>,\n fields: readonly PropertyField[],\n): Record<string, unknown> {\n const values: Record<string, unknown> = {};\n\n fields.forEach((field) => {\n const value = widget.props[field.key];\n values[field.key] = value !== undefined ? value : field.defaultValue;\n });\n\n return values;\n}\n\n/**\n * Apply property values to widget props\n */\nexport function applyPropertyValues(\n widget: Readonly<WidgetSchema>,\n values: Readonly<Record<string, unknown>>,\n): WidgetSchema {\n return {\n ...widget,\n props: {\n ...widget.props,\n ...values,\n },\n };\n}\n","import type {\n ButtonGroupFieldSchema,\n ColorSelectFieldSchema,\n CssUnitFieldSchema,\n TextSizeSelectFieldSchema,\n} from \"./property-schema-types\";\nimport type {\n BorderRadiusOptions,\n PaddingOptions,\n ButtonSizeOptions,\n GapOptions,\n} from \"../types\";\nimport { Ban } from \"lucide-react\";\n\nexport const getColorField = (\n props: Readonly<Omit<ColorSelectFieldSchema, \"type\">>,\n): ColorSelectFieldSchema => {\n return {\n ...props,\n type: \"colorSelect\",\n };\n};\n\nexport const getBorderRadiusField = (\n props: Readonly<\n Omit<ButtonGroupFieldSchema<BorderRadiusOptions>, \"options\" | \"type\">\n >,\n): ButtonGroupFieldSchema<BorderRadiusOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { icon: Ban, value: \"none\" },\n { label: \"SM\", value: \"sm\" },\n { label: \"MD\", value: \"md\" },\n { label: \"LG\", value: \"lg\" },\n { label: \"XL\", value: \"xl\" },\n { label: \"FULL\", value: \"full\" },\n ],\n };\n};\n\nexport const getPaddingField = (\n props: Readonly<\n Omit<ButtonGroupFieldSchema<PaddingOptions>, \"options\" | \"type\">\n >,\n): ButtonGroupFieldSchema<PaddingOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { icon: Ban, value: 0 },\n { label: \"SM\", value: 2 },\n { label: \"MD\", value: 4 },\n { label: \"LG\", value: 6 },\n { label: \"XL\", value: 8 },\n { label: \"FULL\", value: 10 },\n ],\n };\n};\n\nexport const getButtonSizeField = (\n props: Readonly<\n Omit<ButtonGroupFieldSchema<ButtonSizeOptions>, \"options\" | \"type\">\n >,\n): ButtonGroupFieldSchema<ButtonSizeOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { label: \"SM\", value: \"sm\" },\n { label: \"MD\", value: \"default\" },\n { label: \"LG\", value: \"lg\" },\n { label: \"XL\", value: \"xl\" },\n ],\n };\n};\n\nexport const getFontSizeField = (\n props: Readonly<Omit<TextSizeSelectFieldSchema, \"type\">>,\n): TextSizeSelectFieldSchema => {\n return {\n ...props,\n type: \"textSizeSelect\",\n };\n};\n\nexport const getGapField = (\n props: Readonly<Omit<ButtonGroupFieldSchema<GapOptions>, \"options\" | \"type\">>,\n): ButtonGroupFieldSchema<GapOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { icon: Ban, value: \"none\" },\n { label: \"XS\", value: \"xs\" },\n { label: \"SM\", value: \"sm\" },\n { label: \"MD\", value: \"md\" },\n { label: \"LG\", value: \"lg\" },\n { label: \"XL\", value: \"xl\" },\n ],\n };\n};\n\nexport const getHeightField = (\n props: Readonly<\n Omit<\n CssUnitFieldSchema,\n \"type\" | \"minByUnit\" | \"maxByUnit\" | \"stepByUnit\" | \"allowedUnits\"\n >\n >,\n): CssUnitFieldSchema => {\n return {\n ...props,\n type: \"cssUnit\",\n allowedUnits: [\"px\", \"vh\", \"rem\"],\n minByUnit: { px: 10, vh: 1, rem: 1 },\n maxByUnit: { px: 1200, vh: 100, rem: 75 },\n stepByUnit: { px: 10, vh: 1, rem: 1 },\n };\n};\n\n/**\n * Gap value mapping - use `as const satisfies` for compile-time validation\n * with literal type preservation.\n */\nexport const gapValues: {\n readonly none: 0;\n readonly xs: 1;\n readonly sm: 2;\n readonly md: 4;\n readonly lg: 6;\n readonly xl: 8;\n} = {\n none: 0,\n xs: 1,\n sm: 2,\n md: 4,\n lg: 6,\n xl: 8,\n} as const satisfies Record<GapOptions, number>;\n"],"mappings":";;;;;;;;AA6BA,MAAa,uBAAuB;CAClC,MAAM;CACN,UAAU;CACV,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,OAAO;CACP,OAAO;CACP,YAAY;CACZ,UAAU;CACV,OAAO;CACP,WAAW;CACX,QAAQ;CACR,aAAa;CACb,eAAe;CACf,WAAW;CACX,aAAa;CACb,aAAa;CACb,qBAAqB;CACrB,YAAY;CACZ,iBAAiB;CACjB,gBAAgB;CAChB,SAAS;CACV;;;;;;AAcD,SAAgB,oBAAoB,OAA2C;AAC7E,QAAO,OAAO,OAAO,qBAAqB,CAAC,SACzC,MACD;;;;;AA8SH,SAAgB,oBACd,QACiC;CACjC,MAAM,UAA2C,EAAE;AAEnD,QAAO,SAAS,UAAU;EACxB,MAAM,QAAQ,MAAM,SAAS;AAC7B,MAAI,CAAC,QAAQ,OACX,SAAQ,SAAS,EAAE;AAErB,UAAQ,OAAO,KAAK,MAAM;GAC1B;AAEF,QAAO;;;;;AAMT,SAAgB,sBACd,QACA,QACyB;CACzB,MAAM,SAAkC,EAAE;AAE1C,QAAO,SAAS,UAAU;EACxB,MAAM,QAAQ,OAAO,MAAM,MAAM;AACjC,SAAO,MAAM,OAAO,UAAU,KAAA,IAAY,QAAQ,MAAM;GACxD;AAEF,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;IAAM,OAAO;IAAM;GAC5B;IAAE,OAAO;IAAM,OAAO;IAAM;GAC5B;IAAE,OAAO;IAAM,OAAO;IAAM;GAC5B;IAAE,OAAO;IAAM,OAAO;IAAM;GAC5B;IAAE,OAAO;IAAM,OAAO;IAAM;GAC7B;EACF;;AAGH,MAAa,kBACX,UAMuB;AACvB,QAAO;EACL,GAAG;EACH,MAAM;EACN,cAAc;GAAC;GAAM;GAAM;GAAM;EACjC,WAAW;GAAE,IAAI;GAAI,IAAI;GAAG,KAAK;GAAG;EACpC,WAAW;GAAE,IAAI;GAAM,IAAI;GAAK,KAAK;GAAI;EACzC,YAAY;GAAE,IAAI;GAAI,IAAI;GAAG,KAAK;GAAG;EACtC;;;;;;AAOH,MAAa,YAOT;CACF,MAAM;CACN,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACL"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as BorderRadiusOptions, h as GapOptions, l as ButtonSizeOptions, y as PaddingOptions } from "../index-B5cTNde-.cjs";
|
|
2
|
-
import { A as TextFieldSchema, C as ResourceFieldSchema, D as SeparatorFieldSchema, E as SelectFieldSchema, F as extractPropertyValues, I as groupPropertyFields, L as isPropertyFieldType, M as TextareaFieldSchema, N as WidgetPropertySchema, O as SliderFieldSchema, P as applyPropertyValues, S as RangeFieldSchema, T as SectionLayoutSelectFieldSchema, _ as PROPERTY_FIELD_TYPES, a as BooleanFieldSchema, b as PropertyFieldType, c as ColorPickerFieldSchema, d as CssUnit, f as CssUnitFieldSchema, g as NumberFieldSchema, h as ItemConfigSchema, i as BackgroundFieldSchema, j as TextSizeSelectFieldSchema, k as TabConfig, l as ColorSelectFieldSchema, m as ImageFieldSchema, n as ContainerWidgetBehavior, o as ButtonGroupFieldSchema, p as DataSourceFieldSchema, r as AlignmentFieldSchema, s as ColorFieldSchema, t as WidgetManifest, u as ContentPositionFieldSchema, v as PropertyField, w as SectionHeaderFieldSchema, x as PropertySchemaRegistry, y as PropertyFieldSchema } from "../widget-manifest-
|
|
2
|
+
import { A as TextFieldSchema, C as ResourceFieldSchema, D as SeparatorFieldSchema, E as SelectFieldSchema, F as extractPropertyValues, I as groupPropertyFields, L as isPropertyFieldType, M as TextareaFieldSchema, N as WidgetPropertySchema, O as SliderFieldSchema, P as applyPropertyValues, S as RangeFieldSchema, T as SectionLayoutSelectFieldSchema, _ as PROPERTY_FIELD_TYPES, a as BooleanFieldSchema, b as PropertyFieldType, c as ColorPickerFieldSchema, d as CssUnit, f as CssUnitFieldSchema, g as NumberFieldSchema, h as ItemConfigSchema, i as BackgroundFieldSchema, j as TextSizeSelectFieldSchema, k as TabConfig, l as ColorSelectFieldSchema, m as ImageFieldSchema, n as ContainerWidgetBehavior, o as ButtonGroupFieldSchema, p as DataSourceFieldSchema, r as AlignmentFieldSchema, s as ColorFieldSchema, t as WidgetManifest, u as ContentPositionFieldSchema, v as PropertyField, w as SectionHeaderFieldSchema, x as PropertySchemaRegistry, y as PropertyFieldSchema } from "../widget-manifest-BhPiatnI.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/registries/field-helpers.d.ts
|
|
5
5
|
declare const getColorField: (props: Readonly<Omit<ColorSelectFieldSchema, "type">>) => ColorSelectFieldSchema;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as BorderRadiusOptions, h as GapOptions, l as ButtonSizeOptions, y as PaddingOptions } from "../index-Cqt2JzkQ.mjs";
|
|
2
|
-
import { A as TextFieldSchema, C as ResourceFieldSchema, D as SeparatorFieldSchema, E as SelectFieldSchema, F as extractPropertyValues, I as groupPropertyFields, L as isPropertyFieldType, M as TextareaFieldSchema, N as WidgetPropertySchema, O as SliderFieldSchema, P as applyPropertyValues, S as RangeFieldSchema, T as SectionLayoutSelectFieldSchema, _ as PROPERTY_FIELD_TYPES, a as BooleanFieldSchema, b as PropertyFieldType, c as ColorPickerFieldSchema, d as CssUnit, f as CssUnitFieldSchema, g as NumberFieldSchema, h as ItemConfigSchema, i as BackgroundFieldSchema, j as TextSizeSelectFieldSchema, k as TabConfig, l as ColorSelectFieldSchema, m as ImageFieldSchema, n as ContainerWidgetBehavior, o as ButtonGroupFieldSchema, p as DataSourceFieldSchema, r as AlignmentFieldSchema, s as ColorFieldSchema, t as WidgetManifest, u as ContentPositionFieldSchema, v as PropertyField, w as SectionHeaderFieldSchema, x as PropertySchemaRegistry, y as PropertyFieldSchema } from "../widget-manifest-
|
|
2
|
+
import { A as TextFieldSchema, C as ResourceFieldSchema, D as SeparatorFieldSchema, E as SelectFieldSchema, F as extractPropertyValues, I as groupPropertyFields, L as isPropertyFieldType, M as TextareaFieldSchema, N as WidgetPropertySchema, O as SliderFieldSchema, P as applyPropertyValues, S as RangeFieldSchema, T as SectionLayoutSelectFieldSchema, _ as PROPERTY_FIELD_TYPES, a as BooleanFieldSchema, b as PropertyFieldType, c as ColorPickerFieldSchema, d as CssUnit, f as CssUnitFieldSchema, g as NumberFieldSchema, h as ItemConfigSchema, i as BackgroundFieldSchema, j as TextSizeSelectFieldSchema, k as TabConfig, l as ColorSelectFieldSchema, m as ImageFieldSchema, n as ContainerWidgetBehavior, o as ButtonGroupFieldSchema, p as DataSourceFieldSchema, r as AlignmentFieldSchema, s as ColorFieldSchema, t as WidgetManifest, u as ContentPositionFieldSchema, v as PropertyField, w as SectionHeaderFieldSchema, x as PropertySchemaRegistry, y as PropertyFieldSchema } from "../widget-manifest-oQBD8Yoj.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/registries/field-helpers.d.ts
|
|
5
5
|
declare const getColorField: (props: Readonly<Omit<ColorSelectFieldSchema, "type">>) => ColorSelectFieldSchema;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ban } from "lucide-react";
|
|
2
2
|
//#region src/registries/property-schema-types.ts
|
|
3
3
|
/**
|
|
4
4
|
* Property field type constant - single source of truth for field types.
|
|
@@ -85,7 +85,7 @@ const getBorderRadiusField = (props) => {
|
|
|
85
85
|
type: "buttonGroup",
|
|
86
86
|
options: [
|
|
87
87
|
{
|
|
88
|
-
icon:
|
|
88
|
+
icon: Ban,
|
|
89
89
|
value: "none"
|
|
90
90
|
},
|
|
91
91
|
{
|
|
@@ -117,7 +117,7 @@ const getPaddingField = (props) => {
|
|
|
117
117
|
type: "buttonGroup",
|
|
118
118
|
options: [
|
|
119
119
|
{
|
|
120
|
-
icon:
|
|
120
|
+
icon: Ban,
|
|
121
121
|
value: 0
|
|
122
122
|
},
|
|
123
123
|
{
|
|
@@ -179,7 +179,7 @@ const getGapField = (props) => {
|
|
|
179
179
|
type: "buttonGroup",
|
|
180
180
|
options: [
|
|
181
181
|
{
|
|
182
|
-
icon:
|
|
182
|
+
icon: Ban,
|
|
183
183
|
value: "none"
|
|
184
184
|
},
|
|
185
185
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/registries/property-schema-types.ts","../../src/registries/field-helpers.ts"],"sourcesContent":["import type { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\nimport type {\n WidgetType,\n WidgetSchema,\n AlignOptions,\n ColorOptions,\n FontSizeOptions,\n SectionLayoutType,\n StrictOmit,\n} from \"../types\";\n\n/**\n * Tab configuration for organizing properties\n */\nexport interface TabConfig {\n /** Unique identifier for the tab */\n id: string;\n /** Display label for the tab */\n label: string;\n}\n\n// ============================================================================\n// Property Field Types - Derive from constant for single source of truth\n// ============================================================================\n\n/**\n * Property field type constant - single source of truth for field types.\n * Use PROPERTY_FIELD_TYPES.text instead of \"text\" for type-safe comparisons.\n */\nexport const PROPERTY_FIELD_TYPES = {\n text: \"text\",\n textarea: \"textarea\",\n number: \"number\",\n boolean: \"boolean\",\n select: \"select\",\n color: \"color\",\n range: \"range\",\n dataSource: \"dataSource\",\n resource: \"resource\",\n image: \"image\",\n alignment: \"alignment\",\n slider: \"slider\",\n colorPicker: \"colorPicker\",\n sectionHeader: \"sectionHeader\",\n separator: \"separator\",\n buttonGroup: \"buttonGroup\",\n colorSelect: \"colorSelect\",\n sectionLayoutSelect: \"sectionLayoutSelect\",\n background: \"background\",\n contentPosition: \"contentPosition\",\n textSizeSelect: \"textSizeSelect\",\n cssUnit: \"cssUnit\",\n} as const;\n\n/**\n * Union type of all property field types, derived from PROPERTY_FIELD_TYPES constant.\n * @see deriving-typeof-for-object-keys pattern\n */\nexport type PropertyFieldType =\n (typeof PROPERTY_FIELD_TYPES)[keyof typeof PROPERTY_FIELD_TYPES];\n\n/**\n * Runtime validation for property field types.\n * @param value - The value to check\n * @returns true if value is a valid PropertyFieldType\n */\nexport function isPropertyFieldType(value: string): value is PropertyFieldType {\n return Object.values(PROPERTY_FIELD_TYPES).includes(\n value as PropertyFieldType,\n );\n}\n\n/**\n * Base schema for a property field\n */\nexport interface PropertyFieldSchema {\n /** Property key in the widget props */\n key: string;\n /** Display label for the field */\n label: string;\n /** Field type determines the input control */\n type: PropertyFieldType;\n /** Optional description/help text */\n description?: string;\n /** Optional default value */\n defaultValue?: unknown;\n /** Optional tab ID (must match a TabConfig id if widget has tabsConfig) */\n tab?: string;\n /** Optional group for organizing fields within a tab */\n group?: string;\n /**\n * @deprecated Use requiresKeyValue instead\n */\n requiresKeyToBeTrue?: string;\n /** Optional requires a specific key to have a specific value */\n requiresKeyValue?: { key: string; value: unknown };\n}\n\n/**\n * Text field schema\n */\nexport interface TextFieldSchema extends PropertyFieldSchema {\n type: \"text\";\n placeholder?: string;\n maxLength?: number;\n}\n\n/**\n * Textarea field schema\n */\nexport interface TextareaFieldSchema extends PropertyFieldSchema {\n type: \"textarea\";\n placeholder?: string;\n rows?: number;\n maxLength?: number;\n}\n\n/**\n * Number field schema\n */\nexport interface NumberFieldSchema extends PropertyFieldSchema {\n type: \"number\";\n min?: number;\n max?: number;\n step?: number;\n}\n\n/**\n * Boolean field schema\n */\nexport interface BooleanFieldSchema extends PropertyFieldSchema {\n type: \"boolean\";\n}\n\n/**\n * Select field schema with type-safe option values.\n * Uses StrictOmit to ensure \"defaultValue\" key exists on PropertyFieldSchema.\n */\nexport interface SelectFieldSchema<\n T extends string | number = string | number,\n> extends StrictOmit<PropertyFieldSchema, \"defaultValue\"> {\n type: \"select\";\n options: Array<{ label: string; value: T }>;\n defaultValue?: T;\n}\n\n/**\n * Color field schema\n */\nexport interface ColorFieldSchema extends PropertyFieldSchema {\n type: \"color\";\n}\n\n/**\n * Range slider field schema\n */\nexport interface RangeFieldSchema extends PropertyFieldSchema {\n type: \"range\";\n min: number;\n max: number;\n step?: number;\n}\n\n/**\n * Data source field schema for configuring widget data sources\n */\nexport interface DataSourceFieldSchema extends PropertyFieldSchema {\n type: \"dataSource\";\n}\n\n/**\n * Resource field schema for selecting a single resource from the selection modal\n */\nexport interface ResourceFieldSchema extends PropertyFieldSchema {\n type: \"resource\";\n /** Optional filter to specific shareable types */\n allowedTypes?: string[];\n}\n\n/**\n * Image field schema for selecting a single image from the image picker\n */\nexport interface ImageFieldSchema extends PropertyFieldSchema {\n type: \"image\";\n}\n\n/**\n * Alignment field schema\n */\nexport interface AlignmentFieldSchema extends PropertyFieldSchema {\n type: \"alignment\";\n options: {\n verticalEnabled: boolean;\n horizontalEnabled: boolean;\n };\n defaultValue?: AlignOptions;\n}\n\n/**\n * Slider field schema with optional unit suffix (e.g., \"rem\", \"px\")\n */\nexport interface SliderFieldSchema extends PropertyFieldSchema {\n type: \"slider\";\n min: number;\n max: number;\n step?: number;\n unit?: string;\n}\n\n/**\n * Color picker field schema with optional swatches\n */\nexport interface ColorPickerFieldSchema extends PropertyFieldSchema {\n type: \"colorPicker\";\n swatches?: string[];\n}\n\n/**\n * Section header field schema for visual grouping\n */\nexport interface SectionHeaderFieldSchema extends PropertyFieldSchema {\n type: \"sectionHeader\";\n subtitle?: string;\n}\n\n/**\n * Separator field schema for visual separation\n */\nexport interface SeparatorFieldSchema extends PropertyFieldSchema {\n type: \"separator\";\n}\n\n/**\n * Button group field schema.\n * Uses StrictOmit to ensure \"defaultValue\" key exists on PropertyFieldSchema.\n */\nexport interface ButtonGroupFieldSchema<\n T extends string | number = string | number,\n> extends StrictOmit<PropertyFieldSchema, \"defaultValue\"> {\n type: \"buttonGroup\";\n options: Array<{ label?: string; icon?: IconDefinition; value: T }>;\n defaultValue?: T;\n}\n\n/**\n * Color select field schema\n */\nexport interface ColorSelectFieldSchema extends PropertyFieldSchema {\n type: \"colorSelect\";\n defaultValue?: ColorOptions;\n}\n\n/**\n * Section layout select field schema for visual masonry layout selector\n */\nexport interface SectionLayoutSelectFieldSchema extends PropertyFieldSchema {\n type: \"sectionLayoutSelect\";\n defaultValue?: SectionLayoutType;\n}\n\n/**\n * Background field combines resource selection and color properties.\n * Uses StrictOmit to exclude conflicting \"type\" discriminant from parents.\n */\nexport interface BackgroundFieldSchema\n extends\n StrictOmit<ResourceFieldSchema, \"type\">,\n StrictOmit<ColorFieldSchema, \"type\"> {\n type: \"background\";\n}\n\n/**\n * Content position field schema for 3x3 grid position picker\n */\nexport interface ContentPositionFieldSchema extends PropertyFieldSchema {\n type: \"contentPosition\";\n defaultValue?: string;\n}\n\n/**\n * Text size select field schema for visual font size selector\n */\nexport interface TextSizeSelectFieldSchema extends PropertyFieldSchema {\n type: \"textSizeSelect\";\n defaultValue?: FontSizeOptions;\n}\n\n/**\n * CSS unit type for height/width fields\n */\nexport type CssUnit = \"px\" | \"rem\" | \"vh\" | \"%\";\n\n/**\n * CSS unit field schema for numeric values with selectable units (px, rem, vh, %)\n */\nexport interface CssUnitFieldSchema extends PropertyFieldSchema {\n type: \"cssUnit\";\n minByUnit?: Partial<Record<CssUnit, number>>;\n maxByUnit?: Partial<Record<CssUnit, number>>;\n stepByUnit?: Partial<Record<CssUnit, number>>;\n allowedUnits?: CssUnit[];\n defaultUnit?: CssUnit;\n}\n\n/**\n * Union of all field schema types\n */\nexport type PropertyField =\n | TextFieldSchema\n | TextareaFieldSchema\n | NumberFieldSchema\n | BooleanFieldSchema\n | SelectFieldSchema<string | number>\n | ColorFieldSchema\n | RangeFieldSchema\n | DataSourceFieldSchema\n | ResourceFieldSchema\n | ImageFieldSchema\n | AlignmentFieldSchema\n | SliderFieldSchema\n | ColorPickerFieldSchema\n | SectionHeaderFieldSchema\n | SeparatorFieldSchema\n | ButtonGroupFieldSchema<string | number>\n | ColorSelectFieldSchema\n | SectionLayoutSelectFieldSchema\n | BackgroundFieldSchema\n | ContentPositionFieldSchema\n | TextSizeSelectFieldSchema\n | CssUnitFieldSchema;\n\n/**\n * Schema for per-item configuration in custom data sources.\n * Widgets can define this to allow users to configure widget-specific\n * settings for each selected item (e.g., title, description, button).\n */\nexport interface ItemConfigSchema {\n /** Fields available for per-item configuration */\n fields: PropertyField[];\n /** Optional description shown at top of item config panel */\n description?: string;\n}\n\n/**\n * Schema for a widget's editable properties\n */\nexport interface WidgetPropertySchema {\n /** Widget type this schema applies to */\n widgetType: WidgetType;\n /** Display name for the widget */\n displayName: string;\n /** Optional tab configuration - if present, tabs are enabled */\n tabsConfig?: TabConfig[];\n /** Editable property fields */\n fields: PropertyField[];\n /** Optional custom validator function */\n validate?: (props: Record<string, unknown>) => string | null;\n /** Props that can be populated from data sources */\n dataSourceTargetProps?: string[];\n /** Optional schema for per-item configurations in custom data sources */\n itemConfigSchema?: ItemConfigSchema;\n}\n\n/**\n * Registry mapping widget types to their property schemas\n */\nexport type PropertySchemaRegistry = Record<WidgetType, WidgetPropertySchema>;\n\n/**\n * Group property fields by their group property\n */\nexport function groupPropertyFields(\n fields: readonly PropertyField[],\n): Record<string, PropertyField[]> {\n const grouped: Record<string, PropertyField[]> = {};\n\n fields.forEach((field) => {\n const group = field.group || \"General\";\n if (!grouped[group]) {\n grouped[group] = [];\n }\n grouped[group].push(field);\n });\n\n return grouped;\n}\n\n/**\n * Extract current values from widget props based on property fields\n */\nexport function extractPropertyValues(\n widget: Readonly<WidgetSchema>,\n fields: readonly PropertyField[],\n): Record<string, unknown> {\n const values: Record<string, unknown> = {};\n\n fields.forEach((field) => {\n const value = widget.props[field.key];\n values[field.key] = value !== undefined ? value : field.defaultValue;\n });\n\n return values;\n}\n\n/**\n * Apply property values to widget props\n */\nexport function applyPropertyValues(\n widget: Readonly<WidgetSchema>,\n values: Readonly<Record<string, unknown>>,\n): WidgetSchema {\n return {\n ...widget,\n props: {\n ...widget.props,\n ...values,\n },\n };\n}\n","import type {\n ButtonGroupFieldSchema,\n ColorSelectFieldSchema,\n CssUnitFieldSchema,\n TextSizeSelectFieldSchema,\n} from \"./property-schema-types\";\nimport type {\n BorderRadiusOptions,\n PaddingOptions,\n ButtonSizeOptions,\n GapOptions,\n} from \"../types\";\nimport { faBan } from \"@fortawesome/pro-regular-svg-icons\";\n\nexport const getColorField = (\n props: Readonly<Omit<ColorSelectFieldSchema, \"type\">>,\n): ColorSelectFieldSchema => {\n return {\n ...props,\n type: \"colorSelect\",\n };\n};\n\nexport const getBorderRadiusField = (\n props: Readonly<\n Omit<ButtonGroupFieldSchema<BorderRadiusOptions>, \"options\" | \"type\">\n >,\n): ButtonGroupFieldSchema<BorderRadiusOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { icon: faBan, value: \"none\" },\n { label: \"SM\", value: \"sm\" },\n { label: \"MD\", value: \"md\" },\n { label: \"LG\", value: \"lg\" },\n { label: \"XL\", value: \"xl\" },\n { label: \"FULL\", value: \"full\" },\n ],\n };\n};\n\nexport const getPaddingField = (\n props: Readonly<\n Omit<ButtonGroupFieldSchema<PaddingOptions>, \"options\" | \"type\">\n >,\n): ButtonGroupFieldSchema<PaddingOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { icon: faBan, value: 0 },\n { label: \"SM\", value: 2 },\n { label: \"MD\", value: 4 },\n { label: \"LG\", value: 6 },\n { label: \"XL\", value: 8 },\n { label: \"FULL\", value: 10 },\n ],\n };\n};\n\nexport const getButtonSizeField = (\n props: Readonly<\n Omit<ButtonGroupFieldSchema<ButtonSizeOptions>, \"options\" | \"type\">\n >,\n): ButtonGroupFieldSchema<ButtonSizeOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { label: \"SM\", value: \"sm\" },\n { label: \"MD\", value: \"default\" },\n { label: \"LG\", value: \"lg\" },\n { label: \"XL\", value: \"xl\" },\n ],\n };\n};\n\nexport const getFontSizeField = (\n props: Readonly<Omit<TextSizeSelectFieldSchema, \"type\">>,\n): TextSizeSelectFieldSchema => {\n return {\n ...props,\n type: \"textSizeSelect\",\n };\n};\n\nexport const getGapField = (\n props: Readonly<Omit<ButtonGroupFieldSchema<GapOptions>, \"options\" | \"type\">>,\n): ButtonGroupFieldSchema<GapOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { icon: faBan, value: \"none\" },\n { label: \"XS\", value: \"xs\" },\n { label: \"SM\", value: \"sm\" },\n { label: \"MD\", value: \"md\" },\n { label: \"LG\", value: \"lg\" },\n { label: \"XL\", value: \"xl\" },\n ],\n };\n};\n\nexport const getHeightField = (\n props: Readonly<\n Omit<\n CssUnitFieldSchema,\n \"type\" | \"minByUnit\" | \"maxByUnit\" | \"stepByUnit\" | \"allowedUnits\"\n >\n >,\n): CssUnitFieldSchema => {\n return {\n ...props,\n type: \"cssUnit\",\n allowedUnits: [\"px\", \"vh\", \"rem\"],\n minByUnit: { px: 10, vh: 1, rem: 1 },\n maxByUnit: { px: 1200, vh: 100, rem: 75 },\n stepByUnit: { px: 10, vh: 1, rem: 1 },\n };\n};\n\n/**\n * Gap value mapping - use `as const satisfies` for compile-time validation\n * with literal type preservation.\n */\nexport const gapValues: {\n readonly none: 0;\n readonly xs: 1;\n readonly sm: 2;\n readonly md: 4;\n readonly lg: 6;\n readonly xl: 8;\n} = {\n none: 0,\n xs: 1,\n sm: 2,\n md: 4,\n lg: 6,\n xl: 8,\n} as const satisfies Record<GapOptions, number>;\n"],"mappings":";;;;;;AA6BA,MAAa,uBAAuB;CAClC,MAAM;CACN,UAAU;CACV,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,OAAO;CACP,OAAO;CACP,YAAY;CACZ,U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ts","../../src/registries/field-helpers.ts"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\nimport type {\n WidgetType,\n WidgetSchema,\n AlignOptions,\n ColorOptions,\n FontSizeOptions,\n SectionLayoutType,\n StrictOmit,\n} from \"../types\";\n\n/**\n * Tab configuration for organizing properties\n */\nexport interface TabConfig {\n /** Unique identifier for the tab */\n id: string;\n /** Display label for the tab */\n label: string;\n}\n\n// ============================================================================\n// Property Field Types - Derive from constant for single source of truth\n// ============================================================================\n\n/**\n * Property field type constant - single source of truth for field types.\n * Use PROPERTY_FIELD_TYPES.text instead of \"text\" for type-safe comparisons.\n */\nexport const PROPERTY_FIELD_TYPES = {\n text: \"text\",\n textarea: \"textarea\",\n number: \"number\",\n boolean: \"boolean\",\n select: \"select\",\n color: \"color\",\n range: \"range\",\n dataSource: \"dataSource\",\n resource: \"resource\",\n image: \"image\",\n alignment: \"alignment\",\n slider: \"slider\",\n colorPicker: \"colorPicker\",\n sectionHeader: \"sectionHeader\",\n separator: \"separator\",\n buttonGroup: \"buttonGroup\",\n colorSelect: \"colorSelect\",\n sectionLayoutSelect: \"sectionLayoutSelect\",\n background: \"background\",\n contentPosition: \"contentPosition\",\n textSizeSelect: \"textSizeSelect\",\n cssUnit: \"cssUnit\",\n} as const;\n\n/**\n * Union type of all property field types, derived from PROPERTY_FIELD_TYPES constant.\n * @see deriving-typeof-for-object-keys pattern\n */\nexport type PropertyFieldType =\n (typeof PROPERTY_FIELD_TYPES)[keyof typeof PROPERTY_FIELD_TYPES];\n\n/**\n * Runtime validation for property field types.\n * @param value - The value to check\n * @returns true if value is a valid PropertyFieldType\n */\nexport function isPropertyFieldType(value: string): value is PropertyFieldType {\n return Object.values(PROPERTY_FIELD_TYPES).includes(\n value as PropertyFieldType,\n );\n}\n\n/**\n * Base schema for a property field\n */\nexport interface PropertyFieldSchema {\n /** Property key in the widget props */\n key: string;\n /** Display label for the field */\n label: string;\n /** Field type determines the input control */\n type: PropertyFieldType;\n /** Optional description/help text */\n description?: string;\n /** Optional default value */\n defaultValue?: unknown;\n /** Optional tab ID (must match a TabConfig id if widget has tabsConfig) */\n tab?: string;\n /** Optional group for organizing fields within a tab */\n group?: string;\n /**\n * @deprecated Use requiresKeyValue instead\n */\n requiresKeyToBeTrue?: string;\n /** Optional requires a specific key to have a specific value */\n requiresKeyValue?: { key: string; value: unknown };\n}\n\n/**\n * Text field schema\n */\nexport interface TextFieldSchema extends PropertyFieldSchema {\n type: \"text\";\n placeholder?: string;\n maxLength?: number;\n}\n\n/**\n * Textarea field schema\n */\nexport interface TextareaFieldSchema extends PropertyFieldSchema {\n type: \"textarea\";\n placeholder?: string;\n rows?: number;\n maxLength?: number;\n}\n\n/**\n * Number field schema\n */\nexport interface NumberFieldSchema extends PropertyFieldSchema {\n type: \"number\";\n min?: number;\n max?: number;\n step?: number;\n}\n\n/**\n * Boolean field schema\n */\nexport interface BooleanFieldSchema extends PropertyFieldSchema {\n type: \"boolean\";\n}\n\n/**\n * Select field schema with type-safe option values.\n * Uses StrictOmit to ensure \"defaultValue\" key exists on PropertyFieldSchema.\n */\nexport interface SelectFieldSchema<\n T extends string | number = string | number,\n> extends StrictOmit<PropertyFieldSchema, \"defaultValue\"> {\n type: \"select\";\n options: Array<{ label: string; value: T }>;\n defaultValue?: T;\n}\n\n/**\n * Color field schema\n */\nexport interface ColorFieldSchema extends PropertyFieldSchema {\n type: \"color\";\n}\n\n/**\n * Range slider field schema\n */\nexport interface RangeFieldSchema extends PropertyFieldSchema {\n type: \"range\";\n min: number;\n max: number;\n step?: number;\n}\n\n/**\n * Data source field schema for configuring widget data sources\n */\nexport interface DataSourceFieldSchema extends PropertyFieldSchema {\n type: \"dataSource\";\n}\n\n/**\n * Resource field schema for selecting a single resource from the selection modal\n */\nexport interface ResourceFieldSchema extends PropertyFieldSchema {\n type: \"resource\";\n /** Optional filter to specific shareable types */\n allowedTypes?: string[];\n}\n\n/**\n * Image field schema for selecting a single image from the image picker\n */\nexport interface ImageFieldSchema extends PropertyFieldSchema {\n type: \"image\";\n}\n\n/**\n * Alignment field schema\n */\nexport interface AlignmentFieldSchema extends PropertyFieldSchema {\n type: \"alignment\";\n options: {\n verticalEnabled: boolean;\n horizontalEnabled: boolean;\n };\n defaultValue?: AlignOptions;\n}\n\n/**\n * Slider field schema with optional unit suffix (e.g., \"rem\", \"px\")\n */\nexport interface SliderFieldSchema extends PropertyFieldSchema {\n type: \"slider\";\n min: number;\n max: number;\n step?: number;\n unit?: string;\n}\n\n/**\n * Color picker field schema with optional swatches\n */\nexport interface ColorPickerFieldSchema extends PropertyFieldSchema {\n type: \"colorPicker\";\n swatches?: string[];\n}\n\n/**\n * Section header field schema for visual grouping\n */\nexport interface SectionHeaderFieldSchema extends PropertyFieldSchema {\n type: \"sectionHeader\";\n subtitle?: string;\n}\n\n/**\n * Separator field schema for visual separation\n */\nexport interface SeparatorFieldSchema extends PropertyFieldSchema {\n type: \"separator\";\n}\n\n/**\n * Button group field schema.\n * Uses StrictOmit to ensure \"defaultValue\" key exists on PropertyFieldSchema.\n */\nexport interface ButtonGroupFieldSchema<\n T extends string | number = string | number,\n> extends StrictOmit<PropertyFieldSchema, \"defaultValue\"> {\n type: \"buttonGroup\";\n options: Array<{ label?: string; icon?: LucideIcon; value: T }>;\n defaultValue?: T;\n}\n\n/**\n * Color select field schema\n */\nexport interface ColorSelectFieldSchema extends PropertyFieldSchema {\n type: \"colorSelect\";\n defaultValue?: ColorOptions;\n}\n\n/**\n * Section layout select field schema for visual masonry layout selector\n */\nexport interface SectionLayoutSelectFieldSchema extends PropertyFieldSchema {\n type: \"sectionLayoutSelect\";\n defaultValue?: SectionLayoutType;\n}\n\n/**\n * Background field combines resource selection and color properties.\n * Uses StrictOmit to exclude conflicting \"type\" discriminant from parents.\n */\nexport interface BackgroundFieldSchema\n extends\n StrictOmit<ResourceFieldSchema, \"type\">,\n StrictOmit<ColorFieldSchema, \"type\"> {\n type: \"background\";\n}\n\n/**\n * Content position field schema for 3x3 grid position picker\n */\nexport interface ContentPositionFieldSchema extends PropertyFieldSchema {\n type: \"contentPosition\";\n defaultValue?: string;\n}\n\n/**\n * Text size select field schema for visual font size selector\n */\nexport interface TextSizeSelectFieldSchema extends PropertyFieldSchema {\n type: \"textSizeSelect\";\n defaultValue?: FontSizeOptions;\n}\n\n/**\n * CSS unit type for height/width fields\n */\nexport type CssUnit = \"px\" | \"rem\" | \"vh\" | \"%\";\n\n/**\n * CSS unit field schema for numeric values with selectable units (px, rem, vh, %)\n */\nexport interface CssUnitFieldSchema extends PropertyFieldSchema {\n type: \"cssUnit\";\n minByUnit?: Partial<Record<CssUnit, number>>;\n maxByUnit?: Partial<Record<CssUnit, number>>;\n stepByUnit?: Partial<Record<CssUnit, number>>;\n allowedUnits?: CssUnit[];\n defaultUnit?: CssUnit;\n}\n\n/**\n * Union of all field schema types\n */\nexport type PropertyField =\n | TextFieldSchema\n | TextareaFieldSchema\n | NumberFieldSchema\n | BooleanFieldSchema\n | SelectFieldSchema<string | number>\n | ColorFieldSchema\n | RangeFieldSchema\n | DataSourceFieldSchema\n | ResourceFieldSchema\n | ImageFieldSchema\n | AlignmentFieldSchema\n | SliderFieldSchema\n | ColorPickerFieldSchema\n | SectionHeaderFieldSchema\n | SeparatorFieldSchema\n | ButtonGroupFieldSchema<string | number>\n | ColorSelectFieldSchema\n | SectionLayoutSelectFieldSchema\n | BackgroundFieldSchema\n | ContentPositionFieldSchema\n | TextSizeSelectFieldSchema\n | CssUnitFieldSchema;\n\n/**\n * Schema for per-item configuration in custom data sources.\n * Widgets can define this to allow users to configure widget-specific\n * settings for each selected item (e.g., title, description, button).\n */\nexport interface ItemConfigSchema {\n /** Fields available for per-item configuration */\n fields: PropertyField[];\n /** Optional description shown at top of item config panel */\n description?: string;\n}\n\n/**\n * Schema for a widget's editable properties\n */\nexport interface WidgetPropertySchema {\n /** Widget type this schema applies to */\n widgetType: WidgetType;\n /** Display name for the widget */\n displayName: string;\n /** Optional tab configuration - if present, tabs are enabled */\n tabsConfig?: TabConfig[];\n /** Editable property fields */\n fields: PropertyField[];\n /** Optional custom validator function */\n validate?: (props: Record<string, unknown>) => string | null;\n /** Props that can be populated from data sources */\n dataSourceTargetProps?: string[];\n /** Optional schema for per-item configurations in custom data sources */\n itemConfigSchema?: ItemConfigSchema;\n}\n\n/**\n * Registry mapping widget types to their property schemas\n */\nexport type PropertySchemaRegistry = Record<WidgetType, WidgetPropertySchema>;\n\n/**\n * Group property fields by their group property\n */\nexport function groupPropertyFields(\n fields: readonly PropertyField[],\n): Record<string, PropertyField[]> {\n const grouped: Record<string, PropertyField[]> = {};\n\n fields.forEach((field) => {\n const group = field.group || \"General\";\n if (!grouped[group]) {\n grouped[group] = [];\n }\n grouped[group].push(field);\n });\n\n return grouped;\n}\n\n/**\n * Extract current values from widget props based on property fields\n */\nexport function extractPropertyValues(\n widget: Readonly<WidgetSchema>,\n fields: readonly PropertyField[],\n): Record<string, unknown> {\n const values: Record<string, unknown> = {};\n\n fields.forEach((field) => {\n const value = widget.props[field.key];\n values[field.key] = value !== undefined ? value : field.defaultValue;\n });\n\n return values;\n}\n\n/**\n * Apply property values to widget props\n */\nexport function applyPropertyValues(\n widget: Readonly<WidgetSchema>,\n values: Readonly<Record<string, unknown>>,\n): WidgetSchema {\n return {\n ...widget,\n props: {\n ...widget.props,\n ...values,\n },\n };\n}\n","import type {\n ButtonGroupFieldSchema,\n ColorSelectFieldSchema,\n CssUnitFieldSchema,\n TextSizeSelectFieldSchema,\n} from \"./property-schema-types\";\nimport type {\n BorderRadiusOptions,\n PaddingOptions,\n ButtonSizeOptions,\n GapOptions,\n} from \"../types\";\nimport { Ban } from \"lucide-react\";\n\nexport const getColorField = (\n props: Readonly<Omit<ColorSelectFieldSchema, \"type\">>,\n): ColorSelectFieldSchema => {\n return {\n ...props,\n type: \"colorSelect\",\n };\n};\n\nexport const getBorderRadiusField = (\n props: Readonly<\n Omit<ButtonGroupFieldSchema<BorderRadiusOptions>, \"options\" | \"type\">\n >,\n): ButtonGroupFieldSchema<BorderRadiusOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { icon: Ban, value: \"none\" },\n { label: \"SM\", value: \"sm\" },\n { label: \"MD\", value: \"md\" },\n { label: \"LG\", value: \"lg\" },\n { label: \"XL\", value: \"xl\" },\n { label: \"FULL\", value: \"full\" },\n ],\n };\n};\n\nexport const getPaddingField = (\n props: Readonly<\n Omit<ButtonGroupFieldSchema<PaddingOptions>, \"options\" | \"type\">\n >,\n): ButtonGroupFieldSchema<PaddingOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { icon: Ban, value: 0 },\n { label: \"SM\", value: 2 },\n { label: \"MD\", value: 4 },\n { label: \"LG\", value: 6 },\n { label: \"XL\", value: 8 },\n { label: \"FULL\", value: 10 },\n ],\n };\n};\n\nexport const getButtonSizeField = (\n props: Readonly<\n Omit<ButtonGroupFieldSchema<ButtonSizeOptions>, \"options\" | \"type\">\n >,\n): ButtonGroupFieldSchema<ButtonSizeOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { label: \"SM\", value: \"sm\" },\n { label: \"MD\", value: \"default\" },\n { label: \"LG\", value: \"lg\" },\n { label: \"XL\", value: \"xl\" },\n ],\n };\n};\n\nexport const getFontSizeField = (\n props: Readonly<Omit<TextSizeSelectFieldSchema, \"type\">>,\n): TextSizeSelectFieldSchema => {\n return {\n ...props,\n type: \"textSizeSelect\",\n };\n};\n\nexport const getGapField = (\n props: Readonly<Omit<ButtonGroupFieldSchema<GapOptions>, \"options\" | \"type\">>,\n): ButtonGroupFieldSchema<GapOptions> => {\n return {\n ...props,\n type: \"buttonGroup\",\n options: [\n { icon: Ban, value: \"none\" },\n { label: \"XS\", value: \"xs\" },\n { label: \"SM\", value: \"sm\" },\n { label: \"MD\", value: \"md\" },\n { label: \"LG\", value: \"lg\" },\n { label: \"XL\", value: \"xl\" },\n ],\n };\n};\n\nexport const getHeightField = (\n props: Readonly<\n Omit<\n CssUnitFieldSchema,\n \"type\" | \"minByUnit\" | \"maxByUnit\" | \"stepByUnit\" | \"allowedUnits\"\n >\n >,\n): CssUnitFieldSchema => {\n return {\n ...props,\n type: \"cssUnit\",\n allowedUnits: [\"px\", \"vh\", \"rem\"],\n minByUnit: { px: 10, vh: 1, rem: 1 },\n maxByUnit: { px: 1200, vh: 100, rem: 75 },\n stepByUnit: { px: 10, vh: 1, rem: 1 },\n };\n};\n\n/**\n * Gap value mapping - use `as const satisfies` for compile-time validation\n * with literal type preservation.\n */\nexport const gapValues: {\n readonly none: 0;\n readonly xs: 1;\n readonly sm: 2;\n readonly md: 4;\n readonly lg: 6;\n readonly xl: 8;\n} = {\n none: 0,\n xs: 1,\n sm: 2,\n md: 4,\n lg: 6,\n xl: 8,\n} as const satisfies Record<GapOptions, number>;\n"],"mappings":";;;;;;AA6BA,MAAa,uBAAuB;CAClC,MAAM;CACN,UAAU;CACV,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,OAAO;CACP,OAAO;CACP,YAAY;CACZ,UAAU;CACV,OAAO;CACP,WAAW;CACX,QAAQ;CACR,aAAa;CACb,eAAe;CACf,WAAW;CACX,aAAa;CACb,aAAa;CACb,qBAAqB;CACrB,YAAY;CACZ,iBAAiB;CACjB,gBAAgB;CAChB,SAAS;CACV;;;;;;AAcD,SAAgB,oBAAoB,OAA2C;AAC7E,QAAO,OAAO,OAAO,qBAAqB,CAAC,SACzC,MACD;;;;;AA8SH,SAAgB,oBACd,QACiC;CACjC,MAAM,UAA2C,EAAE;AAEnD,QAAO,SAAS,UAAU;EACxB,MAAM,QAAQ,MAAM,SAAS;AAC7B,MAAI,CAAC,QAAQ,OACX,SAAQ,SAAS,EAAE;AAErB,UAAQ,OAAO,KAAK,MAAM;GAC1B;AAEF,QAAO;;;;;AAMT,SAAgB,sBACd,QACA,QACyB;CACzB,MAAM,SAAkC,EAAE;AAE1C,QAAO,SAAS,UAAU;EACxB,MAAM,QAAQ,OAAO,MAAM,MAAM;AACjC,SAAO,MAAM,OAAO,UAAU,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;IAAE,OAAO;IAAM,OAAO;IAAM;GAC5B;IAAE,OAAO;IAAM,OAAO;IAAM;GAC5B;IAAE,OAAO;IAAM,OAAO;IAAM;GAC5B;IAAE,OAAO;IAAM,OAAO;IAAM;GAC5B;IAAE,OAAO;IAAM,OAAO;IAAM;GAC7B;EACF;;AAGH,MAAa,kBACX,UAMuB;AACvB,QAAO;EACL,GAAG;EACH,MAAM;EACN,cAAc;GAAC;GAAM;GAAM;GAAM;EACjC,WAAW;GAAE,IAAI;GAAI,IAAI;GAAG,KAAK;GAAG;EACpC,WAAW;GAAE,IAAI;GAAM,IAAI;GAAK,KAAK;GAAI;EACzC,YAAY;GAAE,IAAI;GAAI,IAAI;GAAG,KAAK;GAAG;EACtC;;;;;;AAOH,MAAa,YAOT;CACF,MAAM;CACN,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACL"}
|
|
@@ -4,8 +4,7 @@ require("../chunk-CKQMccvm.cjs");
|
|
|
4
4
|
const require_shell_sidebar = require("./sidebar.cjs");
|
|
5
5
|
const require_shell_ScreenHeaderContext = require("./ScreenHeaderContext.cjs");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
-
let
|
|
8
|
-
let _fortawesome_react_fontawesome = require("@fortawesome/react-fontawesome");
|
|
7
|
+
let lucide_react = require("lucide-react");
|
|
9
8
|
//#region src/shell/ScreenHeader.tsx
|
|
10
9
|
function ScreenHeader({ title }) {
|
|
11
10
|
const { toggleSidebar, isMobile } = require_shell_sidebar.useSidebar();
|
|
@@ -19,10 +18,7 @@ function ScreenHeader({ title }) {
|
|
|
19
18
|
onClick: toggleSidebar,
|
|
20
19
|
className: "text-muted-foreground hover:text-foreground -ml-1 inline-flex items-center justify-center rounded-md p-1",
|
|
21
20
|
"aria-label": "Toggle Sidebar",
|
|
22
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
23
|
-
icon: _fortawesome_pro_regular_svg_icons.faTableLayout,
|
|
24
|
-
className: "size-4"
|
|
25
|
-
})
|
|
21
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.PanelLeft, { className: "size-4" })
|
|
26
22
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "bg-border mx-2 h-4 w-px" })] }),
|
|
27
23
|
breadcrumbs ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
28
24
|
className: "min-w-0 flex-1",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenHeader.cjs","names":["useSidebar","useScreenHeaderContext","
|
|
1
|
+
{"version":3,"file":"ScreenHeader.cjs","names":["useSidebar","useScreenHeaderContext","PanelLeft"],"sources":["../../src/shell/ScreenHeader.tsx"],"sourcesContent":["\"use client\";\n\nimport type React from \"react\";\nimport { PanelLeft } from \"lucide-react\";\nimport { useSidebar } from \"./sidebar\";\nimport { useScreenHeaderContext } from \"./ScreenHeaderContext\";\n\nexport interface ScreenHeaderProps {\n title?: string;\n}\n\nexport function ScreenHeader({\n title,\n}: ScreenHeaderProps): React.JSX.Element | null {\n const { toggleSidebar, isMobile } = useSidebar();\n const { actions, breadcrumbs } = useScreenHeaderContext();\n\n if (!title && !breadcrumbs) return null;\n\n return (\n <div className=\"border-border bg-background sticky top-0 z-10 flex flex-row items-center border-b px-4 py-3 md:px-6\">\n {!isMobile && (\n <>\n <button\n type=\"button\"\n onClick={toggleSidebar}\n className=\"text-muted-foreground hover:text-foreground -ml-1 inline-flex items-center justify-center rounded-md p-1\"\n aria-label=\"Toggle Sidebar\"\n >\n <PanelLeft className=\"size-4\" />\n </button>\n <div className=\"bg-border mx-2 h-4 w-px\" />\n </>\n )}\n {breadcrumbs ? (\n <div className=\"min-w-0 flex-1\">{breadcrumbs}</div>\n ) : (\n <h1 className=\"text-foreground text-lg font-semibold\">{title}</h1>\n )}\n {actions && (\n <div className=\"ml-auto flex items-center gap-2\">{actions}</div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAWA,SAAgB,aAAa,EAC3B,SAC8C;CAC9C,MAAM,EAAE,eAAe,aAAaA,sBAAAA,YAAY;CAChD,MAAM,EAAE,SAAS,gBAAgBC,kCAAAA,wBAAwB;AAEzD,KAAI,CAAC,SAAS,CAAC,YAAa,QAAO;AAEnC,QACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EAAK,WAAU;YAAf;GACG,CAAC,YACA,iBAAA,GAAA,kBAAA,MAAA,kBAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,KAAC,UAAD;IACE,MAAK;IACL,SAAS;IACT,WAAU;IACV,cAAW;cAEX,iBAAA,GAAA,kBAAA,KAACC,aAAAA,WAAD,EAAW,WAAU,UAAW,CAAA;IACzB,CAAA,EACT,iBAAA,GAAA,kBAAA,KAAC,OAAD,EAAK,WAAU,2BAA4B,CAAA,CAC1C,EAAA,CAAA;GAEJ,cACC,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,WAAU;cAAkB;IAAkB,CAAA,GAEnD,iBAAA,GAAA,kBAAA,KAAC,MAAD;IAAI,WAAU;cAAyC;IAAW,CAAA;GAEnE,WACC,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,WAAU;cAAmC;IAAc,CAAA;GAE9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenHeader.d.cts","names":[],"sources":["../../src/shell/ScreenHeader.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ScreenHeader.d.cts","names":[],"sources":["../../src/shell/ScreenHeader.tsx"],"mappings":";;;UAOiB,iBAAA;EACf,KAAA;AAAA;AAAA,iBAGc,YAAA,CAAA;EACd;AAAA,GACC,iBAAA,GAAoB,KAAA,CAAM,GAAA,CAAI,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenHeader.d.mts","names":[],"sources":["../../src/shell/ScreenHeader.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ScreenHeader.d.mts","names":[],"sources":["../../src/shell/ScreenHeader.tsx"],"mappings":";;;UAOiB,iBAAA;EACf,KAAA;AAAA;AAAA,iBAGc,YAAA,CAAA;EACd;AAAA,GACC,iBAAA,GAAoB,KAAA,CAAM,GAAA,CAAI,OAAA"}
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
import { useSidebar } from "./sidebar.mjs";
|
|
3
3
|
import { useScreenHeaderContext } from "./ScreenHeaderContext.mjs";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import {
|
|
6
|
-
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
5
|
+
import { PanelLeft } from "lucide-react";
|
|
7
6
|
//#region src/shell/ScreenHeader.tsx
|
|
8
7
|
function ScreenHeader({ title }) {
|
|
9
8
|
const { toggleSidebar, isMobile } = useSidebar();
|
|
@@ -17,10 +16,7 @@ function ScreenHeader({ title }) {
|
|
|
17
16
|
onClick: toggleSidebar,
|
|
18
17
|
className: "text-muted-foreground hover:text-foreground -ml-1 inline-flex items-center justify-center rounded-md p-1",
|
|
19
18
|
"aria-label": "Toggle Sidebar",
|
|
20
|
-
children: /* @__PURE__ */ jsx(
|
|
21
|
-
icon: faTableLayout,
|
|
22
|
-
className: "size-4"
|
|
23
|
-
})
|
|
19
|
+
children: /* @__PURE__ */ jsx(PanelLeft, { className: "size-4" })
|
|
24
20
|
}), /* @__PURE__ */ jsx("div", { className: "bg-border mx-2 h-4 w-px" })] }),
|
|
25
21
|
breadcrumbs ? /* @__PURE__ */ jsx("div", {
|
|
26
22
|
className: "min-w-0 flex-1",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenHeader.mjs","names":[],"sources":["../../src/shell/ScreenHeader.tsx"],"sourcesContent":["\"use client\";\n\nimport type React from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"ScreenHeader.mjs","names":[],"sources":["../../src/shell/ScreenHeader.tsx"],"sourcesContent":["\"use client\";\n\nimport type React from \"react\";\nimport { PanelLeft } from \"lucide-react\";\nimport { useSidebar } from \"./sidebar\";\nimport { useScreenHeaderContext } from \"./ScreenHeaderContext\";\n\nexport interface ScreenHeaderProps {\n title?: string;\n}\n\nexport function ScreenHeader({\n title,\n}: ScreenHeaderProps): React.JSX.Element | null {\n const { toggleSidebar, isMobile } = useSidebar();\n const { actions, breadcrumbs } = useScreenHeaderContext();\n\n if (!title && !breadcrumbs) return null;\n\n return (\n <div className=\"border-border bg-background sticky top-0 z-10 flex flex-row items-center border-b px-4 py-3 md:px-6\">\n {!isMobile && (\n <>\n <button\n type=\"button\"\n onClick={toggleSidebar}\n className=\"text-muted-foreground hover:text-foreground -ml-1 inline-flex items-center justify-center rounded-md p-1\"\n aria-label=\"Toggle Sidebar\"\n >\n <PanelLeft className=\"size-4\" />\n </button>\n <div className=\"bg-border mx-2 h-4 w-px\" />\n </>\n )}\n {breadcrumbs ? (\n <div className=\"min-w-0 flex-1\">{breadcrumbs}</div>\n ) : (\n <h1 className=\"text-foreground text-lg font-semibold\">{title}</h1>\n )}\n {actions && (\n <div className=\"ml-auto flex items-center gap-2\">{actions}</div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;AAWA,SAAgB,aAAa,EAC3B,SAC8C;CAC9C,MAAM,EAAE,eAAe,aAAa,YAAY;CAChD,MAAM,EAAE,SAAS,gBAAgB,wBAAwB;AAEzD,KAAI,CAAC,SAAS,CAAC,YAAa,QAAO;AAEnC,QACE,qBAAC,OAAD;EAAK,WAAU;YAAf;GACG,CAAC,YACA,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,UAAD;IACE,MAAK;IACL,SAAS;IACT,WAAU;IACV,cAAW;cAEX,oBAAC,WAAD,EAAW,WAAU,UAAW,CAAA;IACzB,CAAA,EACT,oBAAC,OAAD,EAAK,WAAU,2BAA4B,CAAA,CAC1C,EAAA,CAAA;GAEJ,cACC,oBAAC,OAAD;IAAK,WAAU;cAAkB;IAAkB,CAAA,GAEnD,oBAAC,MAAD;IAAI,WAAU;cAAyC;IAAW,CAAA;GAEnE,WACC,oBAAC,OAAD;IAAK,WAAU;cAAmC;IAAc,CAAA;GAE9D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as WidgetSchema, o as WidgetType } from "./widget-schema-BSX2fVhW.cjs";
|
|
2
2
|
import { d as ColorOptions, n as AlignOptions, p as FontSizeOptions, t as StrictOmit, x as SectionLayoutType } from "./index-B5cTNde-.cjs";
|
|
3
3
|
import { ComponentType } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { LucideIcon } from "lucide-react";
|
|
5
5
|
|
|
6
6
|
//#region src/registries/property-schema-types.d.ts
|
|
7
7
|
/**
|
|
@@ -208,7 +208,7 @@ interface ButtonGroupFieldSchema<T extends string | number = string | number> ex
|
|
|
208
208
|
type: "buttonGroup";
|
|
209
209
|
options: Array<{
|
|
210
210
|
label?: string;
|
|
211
|
-
icon?:
|
|
211
|
+
icon?: LucideIcon;
|
|
212
212
|
value: T;
|
|
213
213
|
}>;
|
|
214
214
|
defaultValue?: T;
|
|
@@ -370,4 +370,4 @@ interface WidgetManifest {
|
|
|
370
370
|
}
|
|
371
371
|
//#endregion
|
|
372
372
|
export { TextFieldSchema as A, ResourceFieldSchema as C, SeparatorFieldSchema as D, SelectFieldSchema as E, extractPropertyValues as F, groupPropertyFields as I, isPropertyFieldType as L, TextareaFieldSchema as M, WidgetPropertySchema as N, SliderFieldSchema as O, applyPropertyValues as P, RangeFieldSchema as S, SectionLayoutSelectFieldSchema as T, PROPERTY_FIELD_TYPES as _, BooleanFieldSchema as a, PropertyFieldType as b, ColorPickerFieldSchema as c, CssUnit as d, CssUnitFieldSchema as f, NumberFieldSchema as g, ItemConfigSchema as h, BackgroundFieldSchema as i, TextSizeSelectFieldSchema as j, TabConfig as k, ColorSelectFieldSchema as l, ImageFieldSchema as m, ContainerWidgetBehavior as n, ButtonGroupFieldSchema as o, DataSourceFieldSchema as p, AlignmentFieldSchema as r, ColorFieldSchema as s, WidgetManifest as t, ContentPositionFieldSchema as u, PropertyField as v, SectionHeaderFieldSchema as w, PropertySchemaRegistry as x, PropertyFieldSchema as y };
|
|
373
|
-
//# sourceMappingURL=widget-manifest-
|
|
373
|
+
//# sourceMappingURL=widget-manifest-BhPiatnI.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-manifest-BhPiatnI.d.cts","names":[],"sources":["../src/registries/property-schema-types.ts","../src/registries/container-types.ts","../src/registries/widget-manifest.ts"],"mappings":";;;;;;;;;UAciB,SAAA;EAAjB;EAEE,EAAA;;EAEA,KAAA;AAAA;AAWF;;;;AAAA,cAAa,oBAAA;EAAA,SACX,IAAA;EAAA,SACA,QAAA;EAAA,SACA,MAAA;EAAA,SACA,OAAA;EAAA,SACA,MAAA;EAAA,SACA,KAAA;EAAA,SACA,KAAA;EAAA,SACA,UAAA;EAAA,SACA,QAAA;EAAA,SACA,KAAA;EAAA,SACA,SAAA;EAAA,SACA,MAAA;EAAA,SACA,WAAA;EAAA,SACA,aAAA;EAAA,SACA,SAAA;EAAA,SACA,WAAA;EAAA,SACA,WAAA;EAAA,SACA,mBAAA;EAAA,SACA,UAAA;EAAA,SACA,eAAA;EAAA,SACA,cAAA;EAAA,SACA,OAAA;AAAA;AAOF;;;;AAAA,KAAY,iBAAA,WACF,oBAAA,eAAmC,oBAAA;AAO7C;;;;;AAAA,iBAAgB,mBAAA,CAAoB,KAAA,WAAgB,KAAA,IAAS,iBAAA;;;;UAS5C,mBAAA;EAAA;EAEf,GAAA;EAIM;EAFN,KAAA;;EAEA,IAAA,EAAM,iBAAA;;EAEN,WAAA;;EAEA,YAAA;;EAEA,GAAA;;EAEA,KAAA;;;;EAIA,mBAAA;EAQe;EANf,gBAAA;IAAqB,GAAA;IAAa,KAAA;EAAA;AAAA;;;;UAMnB,eAAA,SAAwB,mBAAA;EACvC,IAAA;EACA,WAAA;EACA,SAAA;AAAA;;;;UA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;AAtErB;;;AAAA,KA4EY,sBAAA,GAAyB,MAAA,CAAO,UAAA,EAAY,oBAAA;;AAvExD;;iBA4EgB,mBAAA,CACd,MAAA,WAAiB,aAAA,KAChB,MAAA,SAAe,aAAA;;;;iBAiBF,qBAAA,CACd,MAAA,EAAQ,QAAA,CAAS,YAAA,GACjB,MAAA,WAAiB,aAAA,KAChB,MAAA;;;;iBAca,mBAAA,CACd,MAAA,EAAQ,QAAA,CAAS,YAAA,GACjB,MAAA,EAAQ,QAAA,CAAS,MAAA,qBAChB,YAAA;;;;;;;;UCnZc,uBAAA;EDOA;ECLf,WAAA;EDKe;ECFf,WAAA,GAAc,KAAA,EAAO,MAAA,uBAA6B,YAAA;EDiBpD;ECdE,WAAA,GACE,KAAA,EAAO,MAAA,mBACP,QAAA,GAAW,YAAA,eACR,MAAA;;EAGL,cAAA,IAAkB,SAAA;AAAA;;;;;;ADPpB;;UELiB,cAAA;EFKA;EEHf,eAAA;EFkBF;EEfE,IAAA;;EAIA,SAAA,EAAW,aAAA;;EAGX,WAAA;;EAGA,WAAA;;EAGA,IAAA;;EAGA,QAAA;;EAGA,cAAA,EAAgB,oBAAA;;EAGhB,YAAA,EAAc,MAAA;;EAGd,SAAA,GAAY,uBAAA;;EAGZ,aAAA;;EAGA,SAAA;IACE,UAAA;IACA,QAAA;IACA,QAAA;IACA,SAAA;EAAA;AAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as WidgetSchema, o as WidgetType } from "./widget-schema-BKZgsNG7.mjs";
|
|
2
2
|
import { d as ColorOptions, n as AlignOptions, p as FontSizeOptions, t as StrictOmit, x as SectionLayoutType } from "./index-Cqt2JzkQ.mjs";
|
|
3
3
|
import { ComponentType } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { LucideIcon } from "lucide-react";
|
|
5
5
|
|
|
6
6
|
//#region src/registries/property-schema-types.d.ts
|
|
7
7
|
/**
|
|
@@ -208,7 +208,7 @@ interface ButtonGroupFieldSchema<T extends string | number = string | number> ex
|
|
|
208
208
|
type: "buttonGroup";
|
|
209
209
|
options: Array<{
|
|
210
210
|
label?: string;
|
|
211
|
-
icon?:
|
|
211
|
+
icon?: LucideIcon;
|
|
212
212
|
value: T;
|
|
213
213
|
}>;
|
|
214
214
|
defaultValue?: T;
|
|
@@ -370,4 +370,4 @@ interface WidgetManifest {
|
|
|
370
370
|
}
|
|
371
371
|
//#endregion
|
|
372
372
|
export { TextFieldSchema as A, ResourceFieldSchema as C, SeparatorFieldSchema as D, SelectFieldSchema as E, extractPropertyValues as F, groupPropertyFields as I, isPropertyFieldType as L, TextareaFieldSchema as M, WidgetPropertySchema as N, SliderFieldSchema as O, applyPropertyValues as P, RangeFieldSchema as S, SectionLayoutSelectFieldSchema as T, PROPERTY_FIELD_TYPES as _, BooleanFieldSchema as a, PropertyFieldType as b, ColorPickerFieldSchema as c, CssUnit as d, CssUnitFieldSchema as f, NumberFieldSchema as g, ItemConfigSchema as h, BackgroundFieldSchema as i, TextSizeSelectFieldSchema as j, TabConfig as k, ColorSelectFieldSchema as l, ImageFieldSchema as m, ContainerWidgetBehavior as n, ButtonGroupFieldSchema as o, DataSourceFieldSchema as p, AlignmentFieldSchema as r, ColorFieldSchema as s, WidgetManifest as t, ContentPositionFieldSchema as u, PropertyField as v, SectionHeaderFieldSchema as w, PropertySchemaRegistry as x, PropertyFieldSchema as y };
|
|
373
|
-
//# sourceMappingURL=widget-manifest-
|
|
373
|
+
//# sourceMappingURL=widget-manifest-oQBD8Yoj.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-manifest-oQBD8Yoj.d.mts","names":[],"sources":["../src/registries/property-schema-types.ts","../src/registries/container-types.ts","../src/registries/widget-manifest.ts"],"mappings":";;;;;;;;;UAciB,SAAA;EAAjB;EAEE,EAAA;;EAEA,KAAA;AAAA;AAWF;;;;AAAA,cAAa,oBAAA;EAAA,SACX,IAAA;EAAA,SACA,QAAA;EAAA,SACA,MAAA;EA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AW,YAAA,eACR,MAAA;;EAGL,cAAA,IAAkB,SAAA;AAAA;;;;;;ADPpB;;UELiB,cAAA;EFKA;EEHf,eAAA;EFkBF;EEfE,IAAA;;EAIA,SAAA,EAAW,aAAA;;EAGX,WAAA;;EAGA,WAAA;;EAGA,IAAA;;EAGA,QAAA;;EAGA,cAAA,EAAgB,oBAAA;;EAGhB,YAAA,EAAc,MAAA;;EAGd,SAAA,GAAY,uBAAA;;EAGZ,aAAA;;EAGA,SAAA;IACE,UAAA;IACA,QAAA;IACA,QAAA;IACA,SAAA;EAAA;AAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as WidgetSchema, r as WidgetPath, t as TypedWidgetSchema } from "../widget-schema-BSX2fVhW.cjs";
|
|
2
2
|
import { T as ShareableItem } from "../index-B5cTNde-.cjs";
|
|
3
|
-
import { t as WidgetManifest } from "../widget-manifest-
|
|
3
|
+
import { t as WidgetManifest } from "../widget-manifest-BhPiatnI.cjs";
|
|
4
4
|
import { ComponentType } from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/widget-utils/widget-utils.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as WidgetSchema, r as WidgetPath, t as TypedWidgetSchema } from "../widget-schema-BKZgsNG7.mjs";
|
|
2
2
|
import { T as ShareableItem } from "../index-Cqt2JzkQ.mjs";
|
|
3
|
-
import { t as WidgetManifest } from "../widget-manifest-
|
|
3
|
+
import { t as WidgetManifest } from "../widget-manifest-oQBD8Yoj.mjs";
|
|
4
4
|
import { ComponentType } from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/widget-utils/widget-utils.d.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-app/portal-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"description": "Core types, theme engine, and widget utilities for the Fluid portal platform",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -158,13 +158,11 @@
|
|
|
158
158
|
"class-variance-authority": "^0.7.1",
|
|
159
159
|
"clsx": "^2.1.1",
|
|
160
160
|
"colorjs.io": "^0.5.2",
|
|
161
|
+
"lucide-react": "^0.575.0",
|
|
161
162
|
"tailwind-merge": "^3.0.2",
|
|
162
163
|
"@fluid-app/fluidos-api-client": "0.1.0"
|
|
163
164
|
},
|
|
164
165
|
"devDependencies": {
|
|
165
|
-
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
|
166
|
-
"@fortawesome/pro-regular-svg-icons": "^6.7.2",
|
|
167
|
-
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
168
166
|
"@swc/core": "^1.15.18",
|
|
169
167
|
"@swc/jest": "^0.2.39",
|
|
170
168
|
"@tanstack/react-query": "^5.90.11",
|
|
@@ -178,10 +176,8 @@
|
|
|
178
176
|
"@fluid-app/typescript-config": "0.0.0"
|
|
179
177
|
},
|
|
180
178
|
"peerDependencies": {
|
|
181
|
-
"@fortawesome/fontawesome-svg-core": ">=6.0.0",
|
|
182
|
-
"@fortawesome/pro-regular-svg-icons": ">=6.0.0",
|
|
183
|
-
"@fortawesome/react-fontawesome": ">=0.2.0",
|
|
184
179
|
"@tanstack/react-query": ">=5.0.0",
|
|
180
|
+
"lucide-react": ">=0.400.0",
|
|
185
181
|
"react": ">=18.0.0"
|
|
186
182
|
},
|
|
187
183
|
"peerDependenciesMeta": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"widget-manifest-DQmTtAF1.d.mts","names":[],"sources":["../src/registries/property-schema-types.ts","../src/registries/container-types.ts","../src/registries/widget-manifest.ts"],"mappings":";;;;;;;;;UAciB,SAAA;EAAjB;EAEE,EAAA;;EAEA,KAAA;AAAA;AAWF;;;;AAAA,cAAa,oBAAA;EAAA,SACX,IAAA;EAAA,SACA,QAAA;EAAA,SACA,MAAA;EAAA,SACA,OAAA;EAAA,SACA,MAAA;EAAA,SACA,KAAA;EAA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A;;;;;;ADPpB;;UELiB,cAAA;EFKA;EEHf,eAAA;EFkBF;EEfE,IAAA;;EAIA,SAAA,EAAW,aAAA;;EAGX,WAAA;;EAGA,WAAA;;EAGA,IAAA;;EAGA,QAAA;;EAGA,cAAA,EAAgB,oBAAA;;EAGhB,YAAA,EAAc,MAAA;;EAGd,SAAA,GAAY,uBAAA;;EAGZ,aAAA;;EAGA,SAAA;IACE,UAAA;IACA,QAAA;IACA,QAAA;IACA,SAAA;EAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"widget-manifest-Ei8Wnspj.d.cts","names":[],"sources":["../src/registries/property-schema-types.ts","../src/registries/container-types.ts","../src/registries/widget-manifest.ts"],"mappings":";;;;;;;;;UAciB,SAAA;EAAjB;EAEE,EAAA;;EAEA,KAAA;AAAA;AAWF;;;;AAAA,cAAa,oBAAA;EAAA,SACX,IAAA;EAAA,SACA,QAAA;EAAA,SACA,MAAA;EAAA,SACA,OAAA;EAAA,SACA,MAAA;EAAA,SACA,KAAA;EAAA,SACA,KAAA;EAAA,SACA,UAAA;EAAA,SACA,QAAA;EAAA,SACA,KAAA;EAAA,SACA,SAAA;EAAA,SACA,MAAA;EAAA,SACA,WAAA;EAAA,SACA,aAAA;EAAA,SACA,SAAA;EAAA,SACA,WAAA;EAAA,SACA,WAAA;EAAA,SACA,mBAAA;EAAA,SACA,UAAA;EAAA,SACA,eAAA;EAAA,SACA,cAAA;EAAA,SACA,OAAA;AAAA;AAOF;;;;AAAA,KAAY,iBAAA,WACF,oBAAA,eAAmC,oBAAA;AAO7C;;;;;AAAA,iBAAgB,mBAAA,CAAoB,KAAA,WAAgB,KAAA,IAAS,iBAAA;;;;UAS5C,mBAAA;EAAA;EAEf,GAAA;EAIM;EAFN,KAAA;;EAEA,IAAA,EAAM,iBAAA;;EAEN,WAAA;;EAEA,YAAA;;EAEA,GAAA;;EAEA,KAAA;;;;EAIA,mBAAA;EAQe;EANf,gBAAA;IAAqB,GA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