@fluid-app/rep-core 0.1.0 → 0.1.2
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/chunk-2IFFXFJL.js +621 -0
- package/dist/chunk-2IFFXFJL.js.map +1 -0
- package/dist/chunk-2SIG55BD.cjs +131 -0
- package/dist/chunk-2SIG55BD.cjs.map +1 -0
- package/dist/chunk-2SPTFZRC.js +72 -0
- package/dist/chunk-2SPTFZRC.js.map +1 -0
- package/dist/chunk-3I5Y3PEO.js +23 -0
- package/dist/chunk-3I5Y3PEO.js.map +1 -0
- package/dist/chunk-46PUWB7C.cjs +69 -0
- package/dist/chunk-46PUWB7C.cjs.map +1 -0
- package/dist/chunk-4WFDFEHC.js +134 -0
- package/dist/chunk-4WFDFEHC.js.map +1 -0
- package/dist/chunk-5NYM4UTW.cjs +58 -0
- package/dist/chunk-5NYM4UTW.cjs.map +1 -0
- package/dist/chunk-BWHUEED3.cjs +32 -0
- package/dist/chunk-BWHUEED3.cjs.map +1 -0
- package/dist/chunk-CMXYKDHC.cjs +666 -0
- package/dist/chunk-CMXYKDHC.cjs.map +1 -0
- package/dist/chunk-ESYAYVNK.cjs +136 -0
- package/dist/chunk-ESYAYVNK.cjs.map +1 -0
- package/dist/{chunk-6QLUUNJL.cjs → chunk-GDY76JA6.cjs} +2 -2
- package/dist/chunk-GDY76JA6.cjs.map +1 -0
- package/dist/chunk-HGVSPZEL.cjs +119 -0
- package/dist/chunk-HGVSPZEL.cjs.map +1 -0
- package/dist/chunk-HIDJYVKJ.js +54 -0
- package/dist/chunk-HIDJYVKJ.js.map +1 -0
- package/dist/chunk-HUR3MSO4.js +25 -0
- package/dist/chunk-HUR3MSO4.js.map +1 -0
- package/dist/chunk-LVLNO2YQ.cjs +28 -0
- package/dist/chunk-LVLNO2YQ.cjs.map +1 -0
- package/dist/chunk-N2K6W7FX.cjs +169 -0
- package/dist/chunk-N2K6W7FX.cjs.map +1 -0
- package/dist/chunk-NAMNXRI5.js +129 -0
- package/dist/chunk-NAMNXRI5.js.map +1 -0
- package/dist/chunk-OWU7MFJ2.cjs +15 -0
- package/dist/chunk-OWU7MFJ2.cjs.map +1 -0
- package/dist/chunk-PVTQWD4I.js +166 -0
- package/dist/chunk-PVTQWD4I.js.map +1 -0
- package/dist/chunk-PZ6BM57A.js +30 -0
- package/dist/chunk-PZ6BM57A.js.map +1 -0
- package/dist/chunk-SJQPHJL4.cjs +26 -0
- package/dist/chunk-SJQPHJL4.cjs.map +1 -0
- package/dist/chunk-V7D3QUE6.cjs +42 -0
- package/dist/chunk-V7D3QUE6.cjs.map +1 -0
- package/dist/chunk-VRF7QEID.js +67 -0
- package/dist/chunk-VRF7QEID.js.map +1 -0
- package/dist/chunk-WASVMCZB.js +13 -0
- package/dist/chunk-WASVMCZB.js.map +1 -0
- package/dist/chunk-WYOHFNNW.js +117 -0
- package/dist/chunk-WYOHFNNW.js.map +1 -0
- package/dist/chunk-XCNBVV4T.js +38 -0
- package/dist/chunk-XCNBVV4T.js.map +1 -0
- package/dist/{chunk-EWR5EIBP.js → chunk-YKF5ZFF5.js} +2 -2
- package/dist/chunk-YKF5ZFF5.js.map +1 -0
- package/dist/chunk-YXJMBVXO.cjs +76 -0
- package/dist/chunk-YXJMBVXO.cjs.map +1 -0
- package/dist/data-sources/DataAwareWidget.cjs +59 -0
- package/dist/data-sources/DataAwareWidget.cjs.map +1 -0
- package/dist/data-sources/DataAwareWidget.d.cts +30 -0
- package/dist/data-sources/DataAwareWidget.d.ts +30 -0
- package/dist/data-sources/DataAwareWidget.js +57 -0
- package/dist/data-sources/DataAwareWidget.js.map +1 -0
- package/dist/data-sources/ErrorState.cjs +12 -0
- package/dist/data-sources/ErrorState.cjs.map +1 -0
- package/dist/data-sources/ErrorState.d.cts +5 -0
- package/dist/data-sources/ErrorState.d.ts +5 -0
- package/dist/data-sources/ErrorState.js +3 -0
- package/dist/data-sources/ErrorState.js.map +1 -0
- package/dist/data-sources/context.cjs +10 -20
- package/dist/data-sources/context.cjs.map +1 -1
- package/dist/data-sources/context.d.cts +2 -2
- package/dist/data-sources/context.d.ts +2 -2
- package/dist/data-sources/context.js +1 -21
- package/dist/data-sources/context.js.map +1 -1
- package/dist/data-sources/fetchers/api.cjs +12 -0
- package/dist/data-sources/fetchers/api.cjs.map +1 -0
- package/dist/data-sources/fetchers/api.d.cts +8 -0
- package/dist/data-sources/fetchers/api.d.ts +8 -0
- package/dist/data-sources/fetchers/api.js +3 -0
- package/dist/data-sources/fetchers/api.js.map +1 -0
- package/dist/data-sources/fetchers/custom.cjs +12 -0
- package/dist/data-sources/fetchers/custom.cjs.map +1 -0
- package/dist/data-sources/fetchers/custom.d.cts +15 -0
- package/dist/data-sources/fetchers/custom.d.ts +15 -0
- package/dist/data-sources/fetchers/custom.js +3 -0
- package/dist/data-sources/fetchers/custom.js.map +1 -0
- package/dist/data-sources/fetchers/static.cjs +16 -0
- package/dist/data-sources/fetchers/static.cjs.map +1 -0
- package/dist/data-sources/fetchers/static.d.cts +38 -0
- package/dist/data-sources/fetchers/static.d.ts +38 -0
- package/dist/data-sources/fetchers/static.js +3 -0
- package/dist/data-sources/fetchers/static.js.map +1 -0
- package/dist/data-sources/registry-context.cjs +26 -0
- package/dist/data-sources/registry-context.cjs.map +1 -0
- package/dist/data-sources/registry-context.d.cts +41 -0
- package/dist/data-sources/registry-context.d.ts +41 -0
- package/dist/data-sources/registry-context.js +9 -0
- package/dist/data-sources/registry-context.js.map +1 -0
- package/dist/data-sources/registry.cjs +20 -0
- package/dist/data-sources/registry.cjs.map +1 -0
- package/dist/data-sources/registry.d.cts +17 -0
- package/dist/data-sources/registry.d.ts +17 -0
- package/dist/data-sources/registry.js +7 -0
- package/dist/data-sources/registry.js.map +1 -0
- package/dist/data-sources/transformers.cjs +12 -0
- package/dist/data-sources/transformers.cjs.map +1 -0
- package/dist/data-sources/transformers.d.cts +23 -0
- package/dist/data-sources/transformers.d.ts +23 -0
- package/dist/data-sources/transformers.js +3 -0
- package/dist/data-sources/transformers.js.map +1 -0
- package/dist/data-sources/types.d.cts +37 -2
- package/dist/data-sources/types.d.ts +37 -2
- package/dist/data-sources/use-widget-data.cjs +19 -0
- package/dist/data-sources/use-widget-data.cjs.map +1 -0
- package/dist/data-sources/use-widget-data.d.cts +16 -0
- package/dist/data-sources/use-widget-data.d.ts +16 -0
- package/dist/data-sources/use-widget-data.js +10 -0
- package/dist/data-sources/use-widget-data.js.map +1 -0
- package/dist/registries/index.cjs +8 -15
- package/dist/registries/index.cjs.map +1 -1
- package/dist/registries/index.d.cts +20 -7
- package/dist/registries/index.d.ts +20 -7
- package/dist/registries/index.js +8 -15
- package/dist/registries/index.js.map +1 -1
- package/dist/shareable-item-DkgWpwoU.d.cts +21 -0
- package/dist/shareable-item-DkgWpwoU.d.ts +21 -0
- package/dist/shell/AppShellLayout.cjs +14 -0
- package/dist/shell/AppShellLayout.cjs.map +1 -0
- package/dist/shell/AppShellLayout.d.cts +30 -0
- package/dist/shell/AppShellLayout.d.ts +30 -0
- package/dist/shell/AppShellLayout.js +5 -0
- package/dist/shell/AppShellLayout.js.map +1 -0
- package/dist/shell/ThemeModeContext.cjs +20 -0
- package/dist/shell/ThemeModeContext.cjs.map +1 -0
- package/dist/shell/ThemeModeContext.d.cts +27 -0
- package/dist/shell/ThemeModeContext.d.ts +27 -0
- package/dist/shell/ThemeModeContext.js +3 -0
- package/dist/shell/ThemeModeContext.js.map +1 -0
- package/dist/shell/index.cjs +135 -0
- package/dist/shell/index.cjs.map +1 -0
- package/dist/shell/index.d.cts +8 -0
- package/dist/shell/index.d.ts +8 -0
- package/dist/shell/index.js +6 -0
- package/dist/shell/index.js.map +1 -0
- package/dist/shell/sidebar.cjs +105 -0
- package/dist/shell/sidebar.cjs.map +1 -0
- package/dist/shell/sidebar.d.cts +73 -0
- package/dist/shell/sidebar.d.ts +73 -0
- package/dist/shell/sidebar.js +4 -0
- package/dist/shell/sidebar.js.map +1 -0
- package/dist/shell/use-mobile.cjs +20 -0
- package/dist/shell/use-mobile.cjs.map +1 -0
- package/dist/shell/use-mobile.d.cts +5 -0
- package/dist/shell/use-mobile.d.ts +5 -0
- package/dist/shell/use-mobile.js +3 -0
- package/dist/shell/use-mobile.js.map +1 -0
- package/dist/theme/index.cjs +599 -970
- package/dist/theme/index.cjs.map +1 -1
- package/dist/theme/index.d.cts +106 -2655
- package/dist/theme/index.d.ts +106 -2655
- package/dist/theme/index.js +570 -917
- package/dist/theme/index.js.map +1 -1
- package/dist/types/index.cjs +17 -17
- package/dist/types/index.d.cts +28 -4
- package/dist/types/index.d.ts +28 -4
- package/dist/types/index.js +1 -1
- package/dist/types-R1kV_DKF.d.cts +80 -0
- package/dist/types-R1kV_DKF.d.ts +80 -0
- package/dist/{shareable-item-DPmNZkE1.d.cts → widget-schema-36uGUTWL.d.cts} +5 -21
- package/dist/{shareable-item-DPmNZkE1.d.ts → widget-schema-DxdlJD8E.d.ts} +5 -21
- package/dist/widget-utils/index.cjs +3 -3
- package/dist/widget-utils/index.d.cts +3 -1
- package/dist/widget-utils/index.d.ts +3 -1
- package/dist/widget-utils/index.js +1 -1
- package/package.json +84 -13
- package/dist/chunk-6QLUUNJL.cjs.map +0 -1
- package/dist/chunk-EWR5EIBP.js.map +0 -1
- package/dist/theme-DrMUYZTO.d.cts +0 -22
- package/dist/theme-DrMUYZTO.d.ts +0 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/registries/property-schema-types.ts","../../src/registries/field-helpers.ts"],"names":[],"mappings":";AA2BO,IAAM,oBAAA,GAAuB;AAAA,EAClC,IAAA,EAAM,MAAA;AAAA,EACN,QAAA,EAAU,UAAA;AAAA,EACV,MAAA,EAAQ,QAAA;AAAA,EACR,OAAA,EAAS,SAAA;AAAA,EACT,MAAA,EAAQ,QAAA;AAAA,EACR,KAAA,EAAO,OAAA;AAAA,EACP,KAAA,EAAO,OAAA;AAAA,EACP,UAAA,EAAY,YAAA;AAAA,EACZ,QAAA,EAA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AM,aAAA;AAAA,IACN,OAAA,EAAS;AAAA,MACP,EAAE,KAAA,EAAO,MAAA,EAAQ,KAAA,EAAO,MAAA,EAAO;AAAA,MAC/B,EAAE,KAAA,EAAO,IAAA,EAAM,KAAA,EAAO,IAAA,EAAK;AAAA,MAC3B,EAAE,KAAA,EAAO,IAAA,EAAM,KAAA,EAAO,IAAA,EAAK;AAAA,MAC3B,EAAE,KAAA,EAAO,IAAA,EAAM,KAAA,EAAO,IAAA,EAAK;AAAA,MAC3B,EAAE,KAAA,EAAO,IAAA,EAAM,KAAA,EAAO,IAAA,EAAK;AAAA,MAC3B,EAAE,KAAA,EAAO,IAAA,EAAM,KAAA,EAAO,IAAA;AAAK;AAC7B,GACF;AACF;AAMO,IAAM,SAAA,GAAY;AAAA,EACvB,IAAA,EAAM,CAAA;AAAA,EACN,EAAA,EAAI,CAAA;AAAA,EACJ,EAAA,EAAI,CAAA;AAAA,EACJ,EAAA,EAAI,CAAA;AAAA,EACJ,EAAA,EAAI,CAAA;AAAA,EACJ,EAAA,EAAI;AACN","file":"index.js","sourcesContent":["import type {\n WidgetType,\n WidgetSchema,\n AlignOptions,\n ColorOptions,\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 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} 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<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 * 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; 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 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 * 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 | AlignmentFieldSchema\n | SliderFieldSchema\n | ColorPickerFieldSchema\n | SectionHeaderFieldSchema\n | SeparatorFieldSchema\n | ButtonGroupFieldSchema<string | number>\n | ColorSelectFieldSchema\n | SectionLayoutSelectFieldSchema\n | BackgroundFieldSchema\n | ContentPositionFieldSchema;\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 SelectFieldSchema,\n} from \"./property-schema-types\";\nimport type {\n BorderRadiusOptions,\n FontSizeOptions,\n PaddingOptions,\n ButtonSizeOptions,\n GapOptions,\n} from \"../types\";\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 { label: \"None\", 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 { label: \"None\", 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<SelectFieldSchema<FontSizeOptions>, \"options\" | \"type\">>,\n): SelectFieldSchema<FontSizeOptions> => {\n return {\n ...props,\n type: \"select\",\n options: [\n { label: \"Giant\", value: \"2xl\" },\n { label: \"Extra Large\", value: \"xl\" },\n { label: \"Large\", value: \"lg\" },\n { label: \"Regular\", value: \"md\" },\n { label: \"Small\", value: \"sm\" },\n { label: \"Extra Small\", value: \"xs\" },\n ],\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 { label: \"None\", 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\n/**\n * Gap value mapping - use `as const satisfies` for compile-time validation\n * with literal type preservation.\n */\nexport const gapValues = {\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"]}
|
|
1
|
+
{"version":3,"sources":["../../src/registries/property-schema-types.ts","../../src/registries/field-helpers.ts"],"names":[],"mappings":";;;AA6BO,IAAM,oBAAA,GAAuB;AAAA,EAClC,IAAA,EAAM,MAAA;AAAA,EACN,QAAA,EAAU,UAAA;AAAA,EACV,MAAA,EAAQ,QAAA;AAAA,EACR,OAAA,EAAS,SAAA;AAAA,EACT,MAAA,EAAQ,QAAA;AAAA,EACR,KAAA,EAAO,OAAA;AAAA,EACP,KAAA,EAAO,OAAA;AAAA,EACP,UAAA,EAAY,YAAA;AAAA,EACZ,QAAA,EAAU,UAAA;AAAA,EACV,SAAA,EAAW,WAAA;AAAA,EACX,MAAA,EAAQ,QAAA;AAAA,EACR,WAAA,EAAa,aAAA;AAAA,EACb,aAAA,EAAe,eAAA;AAAA,EACf,SAAA,EAAW,WAAA;AAAA,EACX,WAAA,EAAa,aAAA;AAAA,EACb,WAAA,EAAa,aAAA;AAAA,EACb,mBAAA,EAAqB,qBAAA;AAAA,EACrB,UAAA,EAAY,YAAA;AAAA,EACZ,eAAA,EAAiB,iBAAA;AAAA,EACjB,cAAA,EAAgB;AAClB;AAcO,SAAS,oBAAoB,KAAA,EAA2C;AAC7E,EAAA,OAAO,MAAA,CAAO,MAAA,CAAO,oBAAoB,CAAA,CAAE,QAAA;AAAA,IACzC;AAAA,GACF;AACF;AAiRO,SAAS,oBACd,MAAA,EACiC;AACjC,EAAA,MAAM,UAA2C,EAAC;AAElD,EAAA,MAAA,CAAO,OAAA,CAAQ,CAAC,KAAA,KAAU;AACxB,IAAA,MAAM,KAAA,GAAQ,MAAM,KAAA,IAAS,SAAA;AAC7B,IAAA,IAAI,CAAC,OA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AAA,IACL,GAAG,KAAA;AAAA,IACH,IAAA,EAAM;AAAA,GACR;AACF;AAEO,IAAM,WAAA,GAAc,CACzB,KAAA,KACuC;AACvC,EAAA,OAAO;AAAA,IACL,GAAG,KAAA;AAAA,IACH,IAAA,EAAM,aAAA;AAAA,IACN,OAAA,EAAS;AAAA,MACP,EAAE,IAAA,EAAM,KAAA,EAAO,KAAA,EAAO,MAAA,EAAO;AAAA,MAC7B,EAAE,KAAA,EAAO,IAAA,EAAM,KAAA,EAAO,IAAA,EAAK;AAAA,MAC3B,EAAE,KAAA,EAAO,IAAA,EAAM,KAAA,EAAO,IAAA,EAAK;AAAA,MAC3B,EAAE,KAAA,EAAO,IAAA,EAAM,KAAA,EAAO,IAAA,EAAK;AAAA,MAC3B,EAAE,KAAA,EAAO,IAAA,EAAM,KAAA,EAAO,IAAA,EAAK;AAAA,MAC3B,EAAE,KAAA,EAAO,IAAA,EAAM,KAAA,EAAO,IAAA;AAAK;AAC7B,GACF;AACF;AAMO,IAAM,SAAA,GAAY;AAAA,EACvB,IAAA,EAAM,CAAA;AAAA,EACN,EAAA,EAAI,CAAA;AAAA,EACJ,EAAA,EAAI,CAAA;AAAA,EACJ,EAAA,EAAI,CAAA;AAAA,EACJ,EAAA,EAAI,CAAA;AAAA,EACJ,EAAA,EAAI;AACN","file":"index.js","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 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} 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<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 * 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 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 * 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 | AlignmentFieldSchema\n | SliderFieldSchema\n | ColorPickerFieldSchema\n | SectionHeaderFieldSchema\n | SeparatorFieldSchema\n | ButtonGroupFieldSchema<string | number>\n | ColorSelectFieldSchema\n | SectionLayoutSelectFieldSchema\n | BackgroundFieldSchema\n | ContentPositionFieldSchema\n | TextSizeSelectFieldSchema;\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 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\n/**\n * Gap value mapping - use `as const satisfies` for compile-time validation\n * with literal type preservation.\n */\nexport const gapValues = {\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"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base props for a shareable item.
|
|
3
|
+
* Uses structural typing to be compatible with various modal implementations.
|
|
4
|
+
* The index signature allows additional properties from consuming apps.
|
|
5
|
+
*/
|
|
6
|
+
interface ShareableItem {
|
|
7
|
+
id: string | number;
|
|
8
|
+
title?: string | null;
|
|
9
|
+
image_url?: string | null;
|
|
10
|
+
imageUrl?: string | null;
|
|
11
|
+
kind?: string | null;
|
|
12
|
+
type?: string | null;
|
|
13
|
+
shareableType?: string | null;
|
|
14
|
+
share_link?: string | null;
|
|
15
|
+
videoUrl?: string;
|
|
16
|
+
price?: string | number | null;
|
|
17
|
+
display_price?: string | null;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type { ShareableItem as S };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base props for a shareable item.
|
|
3
|
+
* Uses structural typing to be compatible with various modal implementations.
|
|
4
|
+
* The index signature allows additional properties from consuming apps.
|
|
5
|
+
*/
|
|
6
|
+
interface ShareableItem {
|
|
7
|
+
id: string | number;
|
|
8
|
+
title?: string | null;
|
|
9
|
+
image_url?: string | null;
|
|
10
|
+
imageUrl?: string | null;
|
|
11
|
+
kind?: string | null;
|
|
12
|
+
type?: string | null;
|
|
13
|
+
shareableType?: string | null;
|
|
14
|
+
share_link?: string | null;
|
|
15
|
+
videoUrl?: string;
|
|
16
|
+
price?: string | number | null;
|
|
17
|
+
display_price?: string | null;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type { ShareableItem as S };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkBWHUEED3_cjs = require('../chunk-BWHUEED3.cjs');
|
|
4
|
+
require('../chunk-CMXYKDHC.cjs');
|
|
5
|
+
require('../chunk-5NYM4UTW.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "AppShellLayout", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkBWHUEED3_cjs.AppShellLayout; }
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=AppShellLayout.cjs.map
|
|
14
|
+
//# sourceMappingURL=AppShellLayout.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"AppShellLayout.cjs"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
interface AppShellLayoutProps {
|
|
5
|
+
/** Navigation content rendered inside the sidebar's scrollable area */
|
|
6
|
+
sidebarContent: React.ReactNode;
|
|
7
|
+
/** Header content rendered above the main content area */
|
|
8
|
+
headerContent: React.ReactNode;
|
|
9
|
+
/** Main page content */
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
/** Optional slot at the top of the sidebar (e.g. logo, search) */
|
|
12
|
+
sidebarHeader?: React.ReactNode;
|
|
13
|
+
/** Optional slot at the bottom of the sidebar (e.g. user info) */
|
|
14
|
+
sidebarFooter?: React.ReactNode;
|
|
15
|
+
/** Content rendered after SidebarInset (e.g. MobileBottomNav) */
|
|
16
|
+
afterContent?: React.ReactNode;
|
|
17
|
+
/** Enable bottom nav mode (hides sidebar on mobile, adds bottom padding) */
|
|
18
|
+
useBottomNav?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Pure visual frame that replicates the RepApp layout:
|
|
22
|
+
* - 13rem collapsible sidebar
|
|
23
|
+
* - 52px header area
|
|
24
|
+
* - rounded-xl bg-background shadow-lg content area with bg-muted gutters
|
|
25
|
+
*
|
|
26
|
+
* This component handles zero business logic — it simply provides the visual shell.
|
|
27
|
+
*/
|
|
28
|
+
declare function AppShellLayout({ sidebarContent, headerContent, children, sidebarHeader, sidebarFooter, afterContent, useBottomNav, }: AppShellLayoutProps): react_jsx_runtime.JSX.Element;
|
|
29
|
+
|
|
30
|
+
export { AppShellLayout, type AppShellLayoutProps };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
interface AppShellLayoutProps {
|
|
5
|
+
/** Navigation content rendered inside the sidebar's scrollable area */
|
|
6
|
+
sidebarContent: React.ReactNode;
|
|
7
|
+
/** Header content rendered above the main content area */
|
|
8
|
+
headerContent: React.ReactNode;
|
|
9
|
+
/** Main page content */
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
/** Optional slot at the top of the sidebar (e.g. logo, search) */
|
|
12
|
+
sidebarHeader?: React.ReactNode;
|
|
13
|
+
/** Optional slot at the bottom of the sidebar (e.g. user info) */
|
|
14
|
+
sidebarFooter?: React.ReactNode;
|
|
15
|
+
/** Content rendered after SidebarInset (e.g. MobileBottomNav) */
|
|
16
|
+
afterContent?: React.ReactNode;
|
|
17
|
+
/** Enable bottom nav mode (hides sidebar on mobile, adds bottom padding) */
|
|
18
|
+
useBottomNav?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Pure visual frame that replicates the RepApp layout:
|
|
22
|
+
* - 13rem collapsible sidebar
|
|
23
|
+
* - 52px header area
|
|
24
|
+
* - rounded-xl bg-background shadow-lg content area with bg-muted gutters
|
|
25
|
+
*
|
|
26
|
+
* This component handles zero business logic — it simply provides the visual shell.
|
|
27
|
+
*/
|
|
28
|
+
declare function AppShellLayout({ sidebarContent, headerContent, children, sidebarHeader, sidebarFooter, afterContent, useBottomNav, }: AppShellLayoutProps): react_jsx_runtime.JSX.Element;
|
|
29
|
+
|
|
30
|
+
export { AppShellLayout, type AppShellLayoutProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"AppShellLayout.js"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkYXJMBVXO_cjs = require('../chunk-YXJMBVXO.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "ThemeModeProvider", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkYXJMBVXO_cjs.ThemeModeProvider; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "getThemeModeAttribute", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkYXJMBVXO_cjs.getThemeModeAttribute; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "useThemeMode", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkYXJMBVXO_cjs.useThemeMode; }
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=ThemeModeContext.cjs.map
|
|
20
|
+
//# sourceMappingURL=ThemeModeContext.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ThemeModeContext.cjs"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type ThemeMode = "auto" | "light" | "dark";
|
|
5
|
+
type DisplayMode = "light" | "dark";
|
|
6
|
+
interface ThemeModeContextValue {
|
|
7
|
+
mode: ThemeMode;
|
|
8
|
+
displayMode: DisplayMode;
|
|
9
|
+
setMode: (mode: ThemeMode) => void;
|
|
10
|
+
autoModeEnabled: boolean;
|
|
11
|
+
cycleMode: () => void;
|
|
12
|
+
dataAttribute: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
interface ThemeModeProviderProps {
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
mode: ThemeMode;
|
|
17
|
+
onModeChange: (mode: ThemeMode) => void;
|
|
18
|
+
/** When false, auto mode is skipped in the cycle (light↔dark only). Default true. */
|
|
19
|
+
autoModeEnabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare function ThemeModeProvider({ children, mode, onModeChange, autoModeEnabled, }: ThemeModeProviderProps): react_jsx_runtime.JSX.Element;
|
|
22
|
+
/** Access the current theme mode, setter, and cycle helper. Must be used within a `ThemeModeProvider`. */
|
|
23
|
+
declare function useThemeMode(): ThemeModeContextValue;
|
|
24
|
+
/** Maps a ThemeMode to the value for `data-theme-mode`. Returns undefined for "auto". */
|
|
25
|
+
declare function getThemeModeAttribute(mode: ThemeMode): string | undefined;
|
|
26
|
+
|
|
27
|
+
export { type DisplayMode, type ThemeMode, type ThemeModeContextValue, ThemeModeProvider, getThemeModeAttribute, useThemeMode };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type ThemeMode = "auto" | "light" | "dark";
|
|
5
|
+
type DisplayMode = "light" | "dark";
|
|
6
|
+
interface ThemeModeContextValue {
|
|
7
|
+
mode: ThemeMode;
|
|
8
|
+
displayMode: DisplayMode;
|
|
9
|
+
setMode: (mode: ThemeMode) => void;
|
|
10
|
+
autoModeEnabled: boolean;
|
|
11
|
+
cycleMode: () => void;
|
|
12
|
+
dataAttribute: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
interface ThemeModeProviderProps {
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
mode: ThemeMode;
|
|
17
|
+
onModeChange: (mode: ThemeMode) => void;
|
|
18
|
+
/** When false, auto mode is skipped in the cycle (light↔dark only). Default true. */
|
|
19
|
+
autoModeEnabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare function ThemeModeProvider({ children, mode, onModeChange, autoModeEnabled, }: ThemeModeProviderProps): react_jsx_runtime.JSX.Element;
|
|
22
|
+
/** Access the current theme mode, setter, and cycle helper. Must be used within a `ThemeModeProvider`. */
|
|
23
|
+
declare function useThemeMode(): ThemeModeContextValue;
|
|
24
|
+
/** Maps a ThemeMode to the value for `data-theme-mode`. Returns undefined for "auto". */
|
|
25
|
+
declare function getThemeModeAttribute(mode: ThemeMode): string | undefined;
|
|
26
|
+
|
|
27
|
+
export { type DisplayMode, type ThemeMode, type ThemeModeContextValue, ThemeModeProvider, getThemeModeAttribute, useThemeMode };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ThemeModeContext.js"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkYXJMBVXO_cjs = require('../chunk-YXJMBVXO.cjs');
|
|
4
|
+
var chunkBWHUEED3_cjs = require('../chunk-BWHUEED3.cjs');
|
|
5
|
+
var chunkCMXYKDHC_cjs = require('../chunk-CMXYKDHC.cjs');
|
|
6
|
+
var chunk5NYM4UTW_cjs = require('../chunk-5NYM4UTW.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "ThemeModeProvider", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return chunkYXJMBVXO_cjs.ThemeModeProvider; }
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "getThemeModeAttribute", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return chunkYXJMBVXO_cjs.getThemeModeAttribute; }
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "useThemeMode", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return chunkYXJMBVXO_cjs.useThemeMode; }
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "AppShellLayout", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return chunkBWHUEED3_cjs.AppShellLayout; }
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "Sidebar", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () { return chunkCMXYKDHC_cjs.Sidebar; }
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "SidebarContent", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarContent; }
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports, "SidebarContext", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarContext; }
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "SidebarFooter", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarFooter; }
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "SidebarGroup", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarGroup; }
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "SidebarGroupAction", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarGroupAction; }
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "SidebarGroupContent", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarGroupContent; }
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "SidebarGroupLabel", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarGroupLabel; }
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(exports, "SidebarHeader", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarHeader; }
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "SidebarInput", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarInput; }
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "SidebarInset", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarInset; }
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(exports, "SidebarMenu", {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenu; }
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(exports, "SidebarMenuAction", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuAction; }
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "SidebarMenuBadge", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuBadge; }
|
|
81
|
+
});
|
|
82
|
+
Object.defineProperty(exports, "SidebarMenuButton", {
|
|
83
|
+
enumerable: true,
|
|
84
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuButton; }
|
|
85
|
+
});
|
|
86
|
+
Object.defineProperty(exports, "SidebarMenuItem", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuItem; }
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "SidebarMenuSkeleton", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuSkeleton; }
|
|
93
|
+
});
|
|
94
|
+
Object.defineProperty(exports, "SidebarMenuSub", {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuSub; }
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(exports, "SidebarMenuSubButton", {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuSubButton; }
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "SidebarMenuSubItem", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuSubItem; }
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(exports, "SidebarProvider", {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarProvider; }
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(exports, "SidebarRail", {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarRail; }
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, "SidebarSeparator", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarSeparator; }
|
|
117
|
+
});
|
|
118
|
+
Object.defineProperty(exports, "useSidebar", {
|
|
119
|
+
enumerable: true,
|
|
120
|
+
get: function () { return chunkCMXYKDHC_cjs.useSidebar; }
|
|
121
|
+
});
|
|
122
|
+
Object.defineProperty(exports, "useIsMobile", {
|
|
123
|
+
enumerable: true,
|
|
124
|
+
get: function () { return chunk5NYM4UTW_cjs.useIsMobile; }
|
|
125
|
+
});
|
|
126
|
+
Object.defineProperty(exports, "useIsMobileOrTablet", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function () { return chunk5NYM4UTW_cjs.useIsMobileOrTablet; }
|
|
129
|
+
});
|
|
130
|
+
Object.defineProperty(exports, "useIsTablet", {
|
|
131
|
+
enumerable: true,
|
|
132
|
+
get: function () { return chunk5NYM4UTW_cjs.useIsTablet; }
|
|
133
|
+
});
|
|
134
|
+
//# sourceMappingURL=index.cjs.map
|
|
135
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { AppShellLayout, AppShellLayoutProps } from './AppShellLayout.cjs';
|
|
2
|
+
export { Sidebar, SidebarContent, SidebarContext, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, useSidebar } from './sidebar.cjs';
|
|
3
|
+
export { DisplayMode, ThemeMode, ThemeModeContextValue, ThemeModeProvider, getThemeModeAttribute, useThemeMode } from './ThemeModeContext.cjs';
|
|
4
|
+
export { useIsMobile, useIsMobileOrTablet, useIsTablet } from './use-mobile.cjs';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
6
|
+
import 'react';
|
|
7
|
+
import 'class-variance-authority/types';
|
|
8
|
+
import 'class-variance-authority';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { AppShellLayout, AppShellLayoutProps } from './AppShellLayout.js';
|
|
2
|
+
export { Sidebar, SidebarContent, SidebarContext, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, useSidebar } from './sidebar.js';
|
|
3
|
+
export { DisplayMode, ThemeMode, ThemeModeContextValue, ThemeModeProvider, getThemeModeAttribute, useThemeMode } from './ThemeModeContext.js';
|
|
4
|
+
export { useIsMobile, useIsMobileOrTablet, useIsTablet } from './use-mobile.js';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
6
|
+
import 'react';
|
|
7
|
+
import 'class-variance-authority/types';
|
|
8
|
+
import 'class-variance-authority';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ThemeModeProvider, getThemeModeAttribute, useThemeMode } from '../chunk-2SPTFZRC.js';
|
|
2
|
+
export { AppShellLayout } from '../chunk-PZ6BM57A.js';
|
|
3
|
+
export { Sidebar, SidebarContent, SidebarContext, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, useSidebar } from '../chunk-2IFFXFJL.js';
|
|
4
|
+
export { useIsMobile, useIsMobileOrTablet, useIsTablet } from '../chunk-HIDJYVKJ.js';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkCMXYKDHC_cjs = require('../chunk-CMXYKDHC.cjs');
|
|
4
|
+
require('../chunk-5NYM4UTW.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "Sidebar", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkCMXYKDHC_cjs.Sidebar; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "SidebarContent", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarContent; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "SidebarContext", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarContext; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "SidebarFooter", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarFooter; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "SidebarGroup", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarGroup; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "SidebarGroupAction", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarGroupAction; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "SidebarGroupContent", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarGroupContent; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "SidebarGroupLabel", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarGroupLabel; }
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "SidebarHeader", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarHeader; }
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "SidebarInput", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarInput; }
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "SidebarInset", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarInset; }
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "SidebarMenu", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenu; }
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "SidebarMenuAction", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuAction; }
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "SidebarMenuBadge", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuBadge; }
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(exports, "SidebarMenuButton", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuButton; }
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "SidebarMenuItem", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuItem; }
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "SidebarMenuSkeleton", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuSkeleton; }
|
|
75
|
+
});
|
|
76
|
+
Object.defineProperty(exports, "SidebarMenuSub", {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuSub; }
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, "SidebarMenuSubButton", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuSubButton; }
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "SidebarMenuSubItem", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarMenuSubItem; }
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, "SidebarProvider", {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarProvider; }
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(exports, "SidebarRail", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarRail; }
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "SidebarSeparator", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () { return chunkCMXYKDHC_cjs.SidebarSeparator; }
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(exports, "useSidebar", {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
get: function () { return chunkCMXYKDHC_cjs.useSidebar; }
|
|
103
|
+
});
|
|
104
|
+
//# sourceMappingURL=sidebar.cjs.map
|
|
105
|
+
//# sourceMappingURL=sidebar.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"sidebar.cjs"}
|