@nikkory/vibe-engine 4.0.0
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/PUBLISH-GUIDE.md +250 -0
- package/README.md +1267 -0
- package/bin/vibe.js +22 -0
- package/dist/adapters/index.d.ts +19 -0
- package/dist/browser.d.ts +25 -0
- package/dist/browser.js +15083 -0
- package/dist/browser.mjs +15000 -0
- package/dist/cli/batch-command.d.ts +142 -0
- package/dist/cli/generate-command.d.ts +119 -0
- package/dist/cli/index.d.ts +34 -0
- package/dist/constants/ComponentTypes.d.ts +65 -0
- package/dist/constants/DesignSystems.d.ts +64 -0
- package/dist/constants/Frameworks.d.ts +71 -0
- package/dist/constants/Tiers.d.ts +72 -0
- package/dist/constants/index.d.ts +10 -0
- package/dist/converters/index.d.ts +12 -0
- package/dist/converters/section-converter.d.ts +176 -0
- package/dist/index.d.ts +58 -0
- package/dist/index.js +19819 -0
- package/dist/index.mjs +19496 -0
- package/dist/resolution/basic/groups-basic.d.ts +80 -0
- package/dist/resolution/basic/index.d.ts +21 -0
- package/dist/resolution/basic/intents-basic.d.ts +195 -0
- package/dist/resolution/basic/presets-basic.d.ts +96 -0
- package/dist/resolution/basic/resolver-basic.d.ts +127 -0
- package/dist/resolution/basic/shorthands-basic.d.ts +88 -0
- package/dist/resolution/core/groups-core.d.ts +160 -0
- package/dist/resolution/core/index.d.ts +21 -0
- package/dist/resolution/core/intents-core.d.ts +355 -0
- package/dist/resolution/core/presets-core.d.ts +160 -0
- package/dist/resolution/core/resolver-core.d.ts +207 -0
- package/dist/resolution/core/shorthands-core.d.ts +144 -0
- package/dist/resolution/core/types-core.d.ts +167 -0
- package/dist/resolution/debugger.d.ts +183 -0
- package/dist/resolution/demo.d.ts +57 -0
- package/dist/resolution/enterprise/index.d.ts +22 -0
- package/dist/resolution/enterprise/metrics.d.ts +152 -0
- package/dist/resolution/enterprise/resolver-enterprise.d.ts +108 -0
- package/dist/resolution/examples.d.ts +486 -0
- package/dist/resolution/groups/experience-group.d.ts +197 -0
- package/dist/resolution/groups/index.d.ts +196 -0
- package/dist/resolution/groups/layout-group.d.ts +192 -0
- package/dist/resolution/groups/motion-group.d.ts +127 -0
- package/dist/resolution/groups/visual-group.d.ts +146 -0
- package/dist/resolution/index.d.ts +41 -0
- package/dist/resolution/intents/button-intents.d.ts +231 -0
- package/dist/resolution/intents/card-intents.d.ts +177 -0
- package/dist/resolution/intents/feedback-intents.d.ts +222 -0
- package/dist/resolution/intents/index.d.ts +189 -0
- package/dist/resolution/intents/input-intents.d.ts +231 -0
- package/dist/resolution/intents/mood-modifiers.d.ts +154 -0
- package/dist/resolution/performance.d.ts +264 -0
- package/dist/resolution/presets/button-presets.d.ts +243 -0
- package/dist/resolution/presets/card-presets.d.ts +216 -0
- package/dist/resolution/presets/data-display-presets.d.ts +290 -0
- package/dist/resolution/presets/feedback-presets.d.ts +335 -0
- package/dist/resolution/presets/form-presets.d.ts +308 -0
- package/dist/resolution/presets/index.d.ts +22 -0
- package/dist/resolution/presets/input-presets.d.ts +207 -0
- package/dist/resolution/presets/nav-presets.d.ts +235 -0
- package/dist/resolution/presets/overlay-presets.d.ts +216 -0
- package/dist/resolution/presets/preset-registry.d.ts +212 -0
- package/dist/resolution/resolveProps.d.ts +235 -0
- package/dist/resolution/shorthand/feel-mappings.d.ts +140 -0
- package/dist/resolution/shorthand/index.d.ts +172 -0
- package/dist/resolution/shorthand/look-mappings.d.ts +107 -0
- package/dist/resolution/shorthand/spacing-mappings.d.ts +164 -0
- package/dist/resolution/shorthand/surface-mappings.d.ts +139 -0
- package/dist/resolution/standard/groups-standard.d.ts +98 -0
- package/dist/resolution/standard/index.d.ts +28 -0
- package/dist/resolution/standard/intents-standard.d.ts +232 -0
- package/dist/resolution/standard/presets-standard.d.ts +123 -0
- package/dist/resolution/standard/resolver-standard.d.ts +204 -0
- package/dist/resolution/standard/shorthands-standard.d.ts +98 -0
- package/dist/resolution/standard/validators.d.ts +141 -0
- package/dist/resolution/types.d.ts +461 -0
- package/dist/resolution/validators/factor24-validator.d.ts +418 -0
- package/dist/resolution/validators/index.d.ts +14 -0
- package/dist/scripts/generate-react-library.d.ts +15 -0
- package/dist/scripts/write-react-library.d.ts +18 -0
- package/dist/storage/cloud-sync.d.ts +182 -0
- package/dist/storage/index.d.ts +69 -0
- package/dist/storage/local-storage.d.ts +131 -0
- package/dist/storage/section-storage.d.ts +191 -0
- package/dist/styling/StyleGenerator.d.ts +76 -0
- package/dist/styling/TokenStyleResolver.d.ts +163 -0
- package/dist/styling/factor-migration.d.ts +192 -0
- package/dist/styling/factor-validators.d.ts +327 -0
- package/dist/styling/factors-1-6.d.ts +674 -0
- package/dist/styling/factors-12-16.d.ts +700 -0
- package/dist/styling/factors-17-24.d.ts +668 -0
- package/dist/styling/factors-all.d.ts +348 -0
- package/dist/styling/factors.d.ts +291 -0
- package/dist/styling/index.d.ts +31 -0
- package/dist/styling/types.d.ts +400 -0
- package/dist/tokens/schema.d.ts +486 -0
- package/dist/types/Option.d.ts +178 -0
- package/dist/types/Result.d.ts +148 -0
- package/dist/types/algorithm-engine.types.d.ts +298 -0
- package/dist/types/granularity/base.types.d.ts +268 -0
- package/dist/types/granularity/config.types.d.ts +177 -0
- package/dist/types/granularity/factors.types.d.ts +194 -0
- package/dist/types/granularity/index.d.ts +57 -0
- package/dist/types/granularity/slot.types.d.ts +128 -0
- package/dist/types/granularity/template.types.d.ts +179 -0
- package/dist/types/granularity-levels/atom.config.d.ts +151 -0
- package/dist/types/granularity-levels/component.config.d.ts +175 -0
- package/dist/types/granularity-levels/index.d.ts +47 -0
- package/dist/types/granularity-levels/layout.config.d.ts +278 -0
- package/dist/types/granularity-levels/page.config.d.ts +210 -0
- package/dist/types/granularity-levels/section.config.d.ts +188 -0
- package/dist/types/granularity-levels/template.config.d.ts +340 -0
- package/dist/types/index.d.ts +152 -0
- package/dist/types/section-slot.types.d.ts +169 -0
- package/dist/types/section-storage.types.d.ts +298 -0
- package/dist/types/section-template.types.d.ts +170 -0
- package/dist/types/section.types.d.ts +326 -0
- package/dist/ui-studio/ComponentGenerator.d.ts +219 -0
- package/dist/ui-studio/composition/FactorPropagator.d.ts +268 -0
- package/dist/ui-studio/composition/PageGenerator.d.ts +176 -0
- package/dist/ui-studio/composition/SectionGenerator.d.ts +312 -0
- package/dist/ui-studio/composition/SlotResolver.d.ts +295 -0
- package/dist/ui-studio/composition/section-orchestrator.d.ts +306 -0
- package/dist/ui-studio/granularity/FactorCascade.d.ts +328 -0
- package/dist/ui-studio/granularity/GranularityGenerator.d.ts +266 -0
- package/dist/ui-studio/granularity/RecursiveGenerator.d.ts +328 -0
- package/dist/ui-studio/index.d.ts +94 -0
- package/dist/ui-studio/matrix/ClassMapper.d.ts +128 -0
- package/dist/ui-studio/matrix/MatrixResolver.d.ts +203 -0
- package/dist/ui-studio/matrix/types.d.ts +96 -0
- package/dist/ui-studio/presets/IndustryDetector.d.ts +183 -0
- package/dist/ui-studio/presets/component-registry.d.ts +213 -0
- package/dist/ui-studio/presets/factor-registry.d.ts +364 -0
- package/dist/ui-studio/presets/granularity-registry.d.ts +252 -0
- package/dist/ui-studio/presets/index.d.ts +32 -0
- package/dist/ui-studio/presets/industries.d.ts +143 -0
- package/dist/ui-studio/presets/layout-registry.d.ts +21 -0
- package/dist/ui-studio/presets/matrix-groups.d.ts +195 -0
- package/dist/ui-studio/presets/page-registry.d.ts +24 -0
- package/dist/ui-studio/presets/registry.constants.d.ts +69 -0
- package/dist/ui-studio/presets/registry.types.d.ts +166 -0
- package/dist/ui-studio/presets/section-defaults.d.ts +175 -0
- package/dist/ui-studio/presets/section-registry.d.ts +83 -0
- package/dist/ui-studio/presets/section-registry.defaults.d.ts +106 -0
- package/dist/ui-studio/presets/section-registry.helpers.d.ts +112 -0
- package/dist/ui-studio/presets/section-registry.types.d.ts +181 -0
- package/dist/ui-studio/presets/template-registry.d.ts +23 -0
- package/dist/ui-studio/presets/variants.d.ts +1038 -0
- package/dist/ui-studio/registries/components-registry.d.ts +193 -0
- package/dist/ui-studio/registries/design-systems-registry.d.ts +153 -0
- package/dist/ui-studio/registries/factors-registry.d.ts +145 -0
- package/dist/ui-studio/registries/tiers-registry.d.ts +150 -0
- package/dist/ui-studio/resolution/FactorResolver.d.ts +201 -0
- package/dist/ui-studio/templates/TestGenerator.d.ts +55 -0
- package/dist/ui-studio/templates/TierGenerator.d.ts +153 -0
- package/dist/ui-studio/templates/TypesGenerator.d.ts +51 -0
- package/dist/ui-studio/types/granularity/base.types.d.ts +268 -0
- package/dist/ui-studio/types/granularity/config.types.d.ts +177 -0
- package/dist/ui-studio/types/granularity/factors.types.d.ts +194 -0
- package/dist/ui-studio/types/granularity/index.d.ts +57 -0
- package/dist/ui-studio/types/granularity/slot.types.d.ts +128 -0
- package/dist/ui-studio/types/granularity/template.types.d.ts +179 -0
- package/dist/ui-studio/types/granularity-levels/atom.config.d.ts +151 -0
- package/dist/ui-studio/types/granularity-levels/component.config.d.ts +175 -0
- package/dist/ui-studio/types/granularity-levels/index.d.ts +47 -0
- package/dist/ui-studio/types/granularity-levels/layout.config.d.ts +278 -0
- package/dist/ui-studio/types/granularity-levels/page.config.d.ts +210 -0
- package/dist/ui-studio/types/granularity-levels/section.config.d.ts +188 -0
- package/dist/ui-studio/types/granularity-levels/template.config.d.ts +340 -0
- package/dist/ui-studio/types.d.ts +323 -0
- package/dist/utils/CodeUtils.d.ts +103 -0
- package/dist/utils/GenerateComponentValidator.d.ts +35 -0
- package/dist/utils/Logger.d.ts +101 -0
- package/dist/utils/StringUtils.d.ts +120 -0
- package/dist/utils/ValidationUtils.d.ts +71 -0
- package/dist/utils/errors/BaseError.d.ts +23 -0
- package/dist/utils/errors/GenerationError.d.ts +14 -0
- package/dist/utils/errors/TemplateNotFoundError.d.ts +13 -0
- package/dist/utils/errors/ValidationError.d.ts +13 -0
- package/dist/utils/errors/index.d.ts +12 -0
- package/dist/utils/factor-resolver.d.ts +294 -0
- package/dist/utils/granularity-helpers.d.ts +359 -0
- package/dist/utils/index.d.ts +20 -0
- package/dist/utils/performance.d.ts +26 -0
- package/dist/utils/stringify.d.ts +28 -0
- package/dist/validators/component-validator.d.ts +86 -0
- package/dist/validators/design-system-validator.d.ts +95 -0
- package/dist/validators/factor-validator.d.ts +101 -0
- package/dist/validators/index.d.ts +263 -0
- package/dist/validators/section-validator.d.ts +120 -0
- package/dist/validators/slot-validator.d.ts +161 -0
- package/dist/validators/tier-validator.d.ts +102 -0
- package/package.json +67 -0
- package/tests/16-factor-integration.test.d.ts +14 -0
- package/tests/16-factor-visual.test.d.ts +14 -0
- package/tests/5-level-integration.test.d.ts +14 -0
- package/tests/CodeUtils.test.d.ts +7 -0
- package/tests/DesignSystems.test.d.ts +7 -0
- package/tests/GenerateComponentValidator.test.d.ts +7 -0
- package/tests/Logger.test.d.ts +7 -0
- package/tests/StringUtils.test.d.ts +7 -0
- package/tests/StyleGenerator.test.d.ts +13 -0
- package/tests/Tiers.test.d.ts +7 -0
- package/tests/TokenRegistry.test.d.ts +14 -0
- package/tests/TokenStyleResolver.test.d.ts +13 -0
- package/tests/ValidationUtils.test.d.ts +7 -0
- package/tests/_pending_fix/Accordion.test.d.ts +13 -0
- package/tests/_pending_fix/Alert.test.d.ts +13 -0
- package/tests/_pending_fix/AlertDialog.test.d.ts +13 -0
- package/tests/_pending_fix/AspectRatio.test.d.ts +13 -0
- package/tests/_pending_fix/Autocomplete.test.d.ts +13 -0
- package/tests/_pending_fix/Avatar.test.d.ts +13 -0
- package/tests/_pending_fix/Badge.test.d.ts +13 -0
- package/tests/_pending_fix/Banner.test.d.ts +13 -0
- package/tests/_pending_fix/Box.test.d.ts +13 -0
- package/tests/_pending_fix/Breadcrumb.test.d.ts +13 -0
- package/tests/_pending_fix/Callout.test.d.ts +13 -0
- package/tests/_pending_fix/Card.test.d.ts +13 -0
- package/tests/_pending_fix/Center.test.d.ts +13 -0
- package/tests/_pending_fix/Checkbox.test.d.ts +13 -0
- package/tests/_pending_fix/Chip.test.d.ts +13 -0
- package/tests/_pending_fix/ColorPicker.test.d.ts +13 -0
- package/tests/_pending_fix/Combobox.test.d.ts +13 -0
- package/tests/_pending_fix/CommandPalette.test.d.ts +13 -0
- package/tests/_pending_fix/ConfirmationModal.test.d.ts +13 -0
- package/tests/_pending_fix/Container.test.d.ts +13 -0
- package/tests/_pending_fix/DataTable.test.d.ts +13 -0
- package/tests/_pending_fix/DatePicker.test.d.ts +13 -0
- package/tests/_pending_fix/DateRangePicker.test.d.ts +13 -0
- package/tests/_pending_fix/DateTimePicker.test.d.ts +13 -0
- package/tests/_pending_fix/Divider.test.d.ts +13 -0
- package/tests/_pending_fix/Drawer.test.d.ts +13 -0
- package/tests/_pending_fix/Dropdown.test.d.ts +13 -0
- package/tests/_pending_fix/EmptyState.test.d.ts +13 -0
- package/tests/_pending_fix/ErrorState.test.d.ts +13 -0
- package/tests/_pending_fix/FileDropzone.test.d.ts +13 -0
- package/tests/_pending_fix/FileUpload.test.d.ts +13 -0
- package/tests/_pending_fix/Flex.test.d.ts +13 -0
- package/tests/_pending_fix/Grid.test.d.ts +13 -0
- package/tests/_pending_fix/GridItem.test.d.ts +13 -0
- package/tests/_pending_fix/HStack.test.d.ts +13 -0
- package/tests/_pending_fix/Input.test.d.ts +13 -0
- package/tests/_pending_fix/InputCurrency.test.d.ts +13 -0
- package/tests/_pending_fix/InputGroup.test.d.ts +13 -0
- package/tests/_pending_fix/InputOTP.test.d.ts +13 -0
- package/tests/_pending_fix/InputPassword.test.d.ts +13 -0
- package/tests/_pending_fix/InputPhone.test.d.ts +13 -0
- package/tests/_pending_fix/InputSearch.test.d.ts +13 -0
- package/tests/_pending_fix/Link.test.d.ts +13 -0
- package/tests/_pending_fix/List.test.d.ts +13 -0
- package/tests/_pending_fix/LoadingOverlay.test.d.ts +13 -0
- package/tests/_pending_fix/Menu.test.d.ts +13 -0
- package/tests/_pending_fix/Modal.test.d.ts +13 -0
- package/tests/_pending_fix/MultiSelect.test.d.ts +13 -0
- package/tests/_pending_fix/NavGroup.test.d.ts +13 -0
- package/tests/_pending_fix/NavItem.test.d.ts +13 -0
- package/tests/_pending_fix/NavLink.test.d.ts +13 -0
- package/tests/_pending_fix/Navbar.test.d.ts +13 -0
- package/tests/_pending_fix/Notification.test.d.ts +13 -0
- package/tests/_pending_fix/NotificationBadge.test.d.ts +13 -0
- package/tests/_pending_fix/NumberInput.test.d.ts +13 -0
- package/tests/_pending_fix/Pagination.test.d.ts +13 -0
- package/tests/_pending_fix/Popover.test.d.ts +13 -0
- package/tests/_pending_fix/Progress.test.d.ts +13 -0
- package/tests/_pending_fix/ProgressCircle.test.d.ts +13 -0
- package/tests/_pending_fix/ProgressSteps.test.d.ts +13 -0
- package/tests/_pending_fix/Radio.test.d.ts +13 -0
- package/tests/_pending_fix/RangeSlider.test.d.ts +13 -0
- package/tests/_pending_fix/ResizablePanel.test.d.ts +13 -0
- package/tests/_pending_fix/ResultState.test.d.ts +13 -0
- package/tests/_pending_fix/ScrollArea.test.d.ts +13 -0
- package/tests/_pending_fix/Select.test.d.ts +14 -0
- package/tests/_pending_fix/Sheet.test.d.ts +13 -0
- package/tests/_pending_fix/Sidebar.test.d.ts +13 -0
- package/tests/_pending_fix/SimpleGrid.test.d.ts +13 -0
- package/tests/_pending_fix/Skeleton.test.d.ts +13 -0
- package/tests/_pending_fix/Slider.test.d.ts +13 -0
- package/tests/_pending_fix/Spacer.test.d.ts +13 -0
- package/tests/_pending_fix/Spinner.test.d.ts +13 -0
- package/tests/_pending_fix/Stack.test.d.ts +13 -0
- package/tests/_pending_fix/Stat.test.d.ts +13 -0
- package/tests/_pending_fix/Stepper.test.d.ts +14 -0
- package/tests/_pending_fix/Switch.test.d.ts +13 -0
- package/tests/_pending_fix/Table.test.d.ts +13 -0
- package/tests/_pending_fix/Tabs.test.d.ts +13 -0
- package/tests/_pending_fix/Textarea.test.d.ts +13 -0
- package/tests/_pending_fix/Timeline.test.d.ts +13 -0
- package/tests/_pending_fix/Toast.test.d.ts +14 -0
- package/tests/_pending_fix/Tooltip.test.d.ts +14 -0
- package/tests/_pending_fix/VStack.test.d.ts +13 -0
- package/tests/alert.test.d.ts +13 -0
- package/tests/badge.test.d.ts +13 -0
- package/tests/benchmarks/factor-resolution.bench.d.ts +41 -0
- package/tests/button.test.d.ts +16 -0
- package/tests/card.test.d.ts +19 -0
- package/tests/checkbox.test.d.ts +13 -0
- package/tests/component-16-factor-types.test.d.ts +13 -0
- package/tests/component-5level-integration.test.d.ts +14 -0
- package/tests/component-registry-ui.test.d.ts +13 -0
- package/tests/e2e/16-factor-visual.test.d.ts +14 -0
- package/tests/edge-cases.test.d.ts +14 -0
- package/tests/factor-17-24-integration.test.d.ts +14 -0
- package/tests/factor-17-24-performance.test.d.ts +14 -0
- package/tests/factor-validators.test.d.ts +13 -0
- package/tests/factors-1-6.test.d.ts +13 -0
- package/tests/factors-12-16.test.d.ts +13 -0
- package/tests/factors-17-24.test.d.ts +21 -0
- package/tests/factors-all.test.d.ts +13 -0
- package/tests/factors-registry.test.d.ts +11 -0
- package/tests/factors.test.d.ts +13 -0
- package/tests/granularity-types.test.d.ts +18 -0
- package/tests/groups.test.d.ts +14 -0
- package/tests/input.test.d.ts +16 -0
- package/tests/intents.test.d.ts +14 -0
- package/tests/memory-leak.test.d.ts +14 -0
- package/tests/modal.test.d.ts +19 -0
- package/tests/presets.test.d.ts +14 -0
- package/tests/radio.test.d.ts +13 -0
- package/tests/resolution-intents.test.d.ts +13 -0
- package/tests/resolution-presets.test.d.ts +13 -0
- package/tests/resolveProps.test.d.ts +14 -0
- package/tests/section-integration.test.d.ts +16 -0
- package/tests/section-types.test.d.ts +11 -0
- package/tests/setup.d.ts +13 -0
- package/tests/shorthands.test.d.ts +14 -0
- package/tests/switch.test.d.ts +13 -0
- package/tests/tabs.test.d.ts +13 -0
- package/tests/tiers-registry.test.d.ts +11 -0
- package/tests/useComponentStyles.test.d.ts +11 -0
- package/tests/useFactors.test.d.ts +13 -0
- package/tests/validators-invalid-input.test.d.ts +13 -0
- package/tsup.config.d.ts +11 -0
- package/vitest.config.d.ts +3 -0
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template Configuration Types
|
|
3
|
+
*
|
|
4
|
+
* Template-level configuration for complete applications like Admin, E-commerce.
|
|
5
|
+
* Templates are the highest granularity level, containing layouts, pages, and
|
|
6
|
+
* shared components that form a complete application.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
* @module types/granularity-levels
|
|
10
|
+
* @since 4.0.0
|
|
11
|
+
*
|
|
12
|
+
* Powered by Nikkory
|
|
13
|
+
*/
|
|
14
|
+
import type { GranularityLevel, GranularityFactorValues, GranularityStyleOverrides, GranularityLayoutConfig, GranularityTemplateVisibility } from '../granularity/base.types';
|
|
15
|
+
import type { GranularityConfig, ChildReference } from '../granularity/config.types';
|
|
16
|
+
import type { GranularitySlotPosition, GranularitySlotConfig } from '../granularity/slot.types';
|
|
17
|
+
import type { GranularityTemplateMetadata, GranularityTemplate } from '../granularity/template.types';
|
|
18
|
+
import type { DesignSystem, Tier } from '../index';
|
|
19
|
+
/**
|
|
20
|
+
* Template slot positions - pages, shared, assets
|
|
21
|
+
*
|
|
22
|
+
* @category types
|
|
23
|
+
* @since 4.0.0
|
|
24
|
+
*
|
|
25
|
+
* Powered by Nikkory
|
|
26
|
+
*/
|
|
27
|
+
export type TemplateSlotPosition = GranularitySlotPosition<'template'>;
|
|
28
|
+
/**
|
|
29
|
+
* Template slot configuration
|
|
30
|
+
*
|
|
31
|
+
* @category types
|
|
32
|
+
* @since 4.0.0
|
|
33
|
+
*
|
|
34
|
+
* Powered by Nikkory
|
|
35
|
+
*/
|
|
36
|
+
export type TemplateSlotConfig = GranularitySlotConfig<'template'>;
|
|
37
|
+
/**
|
|
38
|
+
* Template type categories - 20+ types organized by purpose
|
|
39
|
+
*
|
|
40
|
+
* @category types
|
|
41
|
+
* @since 4.0.0
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* const category: TemplateCategory = 'admin';
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* Powered by Nikkory
|
|
49
|
+
*/
|
|
50
|
+
export type TemplateCategory = 'admin' | 'ecommerce' | 'saas' | 'portfolio' | 'blog' | 'landing' | 'documentation' | 'social' | 'marketplace' | 'booking';
|
|
51
|
+
/**
|
|
52
|
+
* Template type identifiers (20+ types)
|
|
53
|
+
*
|
|
54
|
+
* @category types
|
|
55
|
+
* @since 4.0.0
|
|
56
|
+
*
|
|
57
|
+
* Powered by Nikkory
|
|
58
|
+
*/
|
|
59
|
+
export type TemplateType = 'admin-dashboard' | 'cms-admin' | 'analytics-dashboard' | 'ecommerce-store' | 'marketplace-vendor' | 'digital-products' | 'saas-landing' | 'saas-dashboard' | 'saas-onboarding' | 'portfolio-minimal' | 'portfolio-creative' | 'resume-cv' | 'blog-personal' | 'blog-magazine' | 'blog-technical' | 'landing-product' | 'landing-startup' | 'landing-agency' | 'docs-technical' | 'docs-api' | 'knowledge-base';
|
|
60
|
+
/**
|
|
61
|
+
* Technology stack configuration
|
|
62
|
+
*
|
|
63
|
+
* @category types
|
|
64
|
+
* @since 4.0.0
|
|
65
|
+
*
|
|
66
|
+
* Powered by Nikkory
|
|
67
|
+
*/
|
|
68
|
+
export interface TechStack {
|
|
69
|
+
/** Frontend framework */
|
|
70
|
+
readonly framework: 'react' | 'vue' | 'angular' | 'svelte' | 'solid';
|
|
71
|
+
/** UI library */
|
|
72
|
+
readonly uiLibrary?: 'tailwind' | 'styled-components' | 'emotion' | 'vanilla';
|
|
73
|
+
/** State management */
|
|
74
|
+
readonly stateManagement?: 'zustand' | 'redux' | 'jotai' | 'mobx' | 'none';
|
|
75
|
+
/** Form handling */
|
|
76
|
+
readonly formLibrary?: 'react-hook-form' | 'formik' | 'final-form' | 'none';
|
|
77
|
+
/** API layer */
|
|
78
|
+
readonly apiLayer?: 'trpc' | 'graphql' | 'rest' | 'none';
|
|
79
|
+
/** Authentication */
|
|
80
|
+
readonly auth?: 'next-auth' | 'clerk' | 'supabase' | 'firebase' | 'custom';
|
|
81
|
+
/** Database */
|
|
82
|
+
readonly database?: 'prisma' | 'drizzle' | 'mongoose' | 'none';
|
|
83
|
+
/** Testing framework */
|
|
84
|
+
readonly testing?: 'vitest' | 'jest' | 'playwright' | 'cypress';
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Pages configuration for template
|
|
88
|
+
*
|
|
89
|
+
* @category types
|
|
90
|
+
* @since 4.0.0
|
|
91
|
+
*
|
|
92
|
+
* Powered by Nikkory
|
|
93
|
+
*/
|
|
94
|
+
export interface TemplatePages {
|
|
95
|
+
/** All page IDs included in template */
|
|
96
|
+
readonly included: readonly string[];
|
|
97
|
+
/** Default/home page ID */
|
|
98
|
+
readonly homePage: string;
|
|
99
|
+
/** 404 page ID */
|
|
100
|
+
readonly notFoundPage?: string;
|
|
101
|
+
/** Error page ID */
|
|
102
|
+
readonly errorPage?: string;
|
|
103
|
+
/** Page groups for navigation */
|
|
104
|
+
readonly groups?: readonly PageGroup[];
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Page group for navigation organization
|
|
108
|
+
*
|
|
109
|
+
* @category types
|
|
110
|
+
* @since 4.0.0
|
|
111
|
+
*
|
|
112
|
+
* Powered by Nikkory
|
|
113
|
+
*/
|
|
114
|
+
export interface PageGroup {
|
|
115
|
+
/** Group identifier */
|
|
116
|
+
readonly id: string;
|
|
117
|
+
/** Group display name */
|
|
118
|
+
readonly name: string;
|
|
119
|
+
/** Page IDs in this group */
|
|
120
|
+
readonly pages: readonly string[];
|
|
121
|
+
/** Group icon */
|
|
122
|
+
readonly icon?: string;
|
|
123
|
+
/** Whether group is collapsible */
|
|
124
|
+
readonly collapsible?: boolean;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Shared assets configuration
|
|
128
|
+
*
|
|
129
|
+
* @category types
|
|
130
|
+
* @since 4.0.0
|
|
131
|
+
*
|
|
132
|
+
* Powered by Nikkory
|
|
133
|
+
*/
|
|
134
|
+
export interface TemplateAssets {
|
|
135
|
+
/** Shared components IDs */
|
|
136
|
+
readonly components?: readonly string[];
|
|
137
|
+
/** Shared layouts IDs */
|
|
138
|
+
readonly layouts?: readonly string[];
|
|
139
|
+
/** Image assets */
|
|
140
|
+
readonly images?: readonly AssetReference[];
|
|
141
|
+
/** Icon set */
|
|
142
|
+
readonly icons?: 'lucide' | 'heroicons' | 'phosphor' | 'custom';
|
|
143
|
+
/** Font configuration */
|
|
144
|
+
readonly fonts?: FontConfig;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Asset reference
|
|
148
|
+
*
|
|
149
|
+
* @category types
|
|
150
|
+
* @since 4.0.0
|
|
151
|
+
*
|
|
152
|
+
* Powered by Nikkory
|
|
153
|
+
*/
|
|
154
|
+
export interface AssetReference {
|
|
155
|
+
/** Asset identifier */
|
|
156
|
+
readonly id: string;
|
|
157
|
+
/** Asset path or URL */
|
|
158
|
+
readonly path: string;
|
|
159
|
+
/** Asset type */
|
|
160
|
+
readonly type: 'image' | 'svg' | 'video' | 'font';
|
|
161
|
+
/** Asset alt text */
|
|
162
|
+
readonly alt?: string;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Font configuration
|
|
166
|
+
*
|
|
167
|
+
* @category types
|
|
168
|
+
* @since 4.0.0
|
|
169
|
+
*
|
|
170
|
+
* Powered by Nikkory
|
|
171
|
+
*/
|
|
172
|
+
export interface FontConfig {
|
|
173
|
+
/** Primary font family */
|
|
174
|
+
readonly primary: string;
|
|
175
|
+
/** Secondary font family */
|
|
176
|
+
readonly secondary?: string;
|
|
177
|
+
/** Monospace font family */
|
|
178
|
+
readonly mono?: string;
|
|
179
|
+
/** Font weights to include */
|
|
180
|
+
readonly weights?: readonly number[];
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Template-specific extension fields beyond GranularityConfig
|
|
184
|
+
*
|
|
185
|
+
* @category types
|
|
186
|
+
* @since 4.0.0
|
|
187
|
+
*
|
|
188
|
+
* Powered by Nikkory
|
|
189
|
+
*/
|
|
190
|
+
export interface TemplateExtensions {
|
|
191
|
+
/** Template type identifier */
|
|
192
|
+
readonly templateType: TemplateType;
|
|
193
|
+
/** Template category for organization */
|
|
194
|
+
readonly templateCategory: TemplateCategory;
|
|
195
|
+
/** Technology stack */
|
|
196
|
+
readonly stack: TechStack;
|
|
197
|
+
/** Pages configuration */
|
|
198
|
+
readonly pages: TemplatePages;
|
|
199
|
+
/** Shared assets */
|
|
200
|
+
readonly assets?: TemplateAssets;
|
|
201
|
+
/** Template version */
|
|
202
|
+
readonly version: string;
|
|
203
|
+
/** Template visibility */
|
|
204
|
+
readonly visibility: GranularityTemplateVisibility;
|
|
205
|
+
/** License type */
|
|
206
|
+
readonly license?: 'mit' | 'apache-2.0' | 'proprietary' | 'custom';
|
|
207
|
+
/** Pricing tier (if applicable) */
|
|
208
|
+
readonly pricingTier?: 'free' | 'starter' | 'pro' | 'enterprise';
|
|
209
|
+
/** Preview URL */
|
|
210
|
+
readonly previewUrl?: string;
|
|
211
|
+
/** Repository URL */
|
|
212
|
+
readonly repositoryUrl?: string;
|
|
213
|
+
/** Documentation URL */
|
|
214
|
+
readonly docsUrl?: string;
|
|
215
|
+
/** Whether template is featured */
|
|
216
|
+
readonly featured?: boolean;
|
|
217
|
+
/** Download count */
|
|
218
|
+
readonly downloads?: number;
|
|
219
|
+
/** Rating (1-5) */
|
|
220
|
+
readonly rating?: number;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* TemplateLevelConfig - Full configuration for template-level elements
|
|
224
|
+
*
|
|
225
|
+
* Extends GranularityConfig<'template'> with template-specific fields.
|
|
226
|
+
*
|
|
227
|
+
* @category types
|
|
228
|
+
* @since 4.0.0
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* ```typescript
|
|
232
|
+
* const adminTemplate: TemplateLevelConfig = {
|
|
233
|
+
* id: 'admin-dashboard-template',
|
|
234
|
+
* granularity: 'template',
|
|
235
|
+
* designSystem: 'material-design',
|
|
236
|
+
* tier: 'enterprise',
|
|
237
|
+
* title: 'Admin Dashboard',
|
|
238
|
+
* subtitle: 'Complete admin panel with analytics',
|
|
239
|
+
* templateType: 'admin-dashboard',
|
|
240
|
+
* templateCategory: 'admin',
|
|
241
|
+
* version: '1.0.0',
|
|
242
|
+
* visibility: 'public',
|
|
243
|
+
* stack: {
|
|
244
|
+
* framework: 'react',
|
|
245
|
+
* uiLibrary: 'tailwind',
|
|
246
|
+
* stateManagement: 'zustand',
|
|
247
|
+
* apiLayer: 'trpc'
|
|
248
|
+
* },
|
|
249
|
+
* pages: {
|
|
250
|
+
* included: ['dashboard', 'users', 'settings'],
|
|
251
|
+
* homePage: 'dashboard',
|
|
252
|
+
* notFoundPage: '404',
|
|
253
|
+
* groups: [
|
|
254
|
+
* { id: 'main', name: 'Main', pages: ['dashboard'] },
|
|
255
|
+
* { id: 'admin', name: 'Admin', pages: ['users', 'settings'] }
|
|
256
|
+
* ]
|
|
257
|
+
* }
|
|
258
|
+
* };
|
|
259
|
+
* ```
|
|
260
|
+
*
|
|
261
|
+
* Powered by Nikkory
|
|
262
|
+
*/
|
|
263
|
+
export interface TemplateLevelConfig extends TemplateExtensions {
|
|
264
|
+
/** Unique identifier */
|
|
265
|
+
readonly id: string;
|
|
266
|
+
/** Granularity level - always 'template' */
|
|
267
|
+
readonly granularity: 'template';
|
|
268
|
+
/** Design system */
|
|
269
|
+
readonly designSystem: DesignSystem;
|
|
270
|
+
/** Quality tier */
|
|
271
|
+
readonly tier: Tier;
|
|
272
|
+
/** Display title */
|
|
273
|
+
readonly title: string;
|
|
274
|
+
/** Optional subtitle/description */
|
|
275
|
+
readonly subtitle?: string;
|
|
276
|
+
/** Layout configuration */
|
|
277
|
+
readonly layout?: GranularityLayoutConfig;
|
|
278
|
+
/** Slots for template organization */
|
|
279
|
+
readonly slots?: readonly TemplateSlotConfig[];
|
|
280
|
+
/** Factor values */
|
|
281
|
+
readonly factors?: GranularityFactorValues;
|
|
282
|
+
/** Children references (layouts and pages) */
|
|
283
|
+
readonly children?: readonly ChildReference<'template'>[];
|
|
284
|
+
/** Style overrides */
|
|
285
|
+
readonly styleOverrides?: GranularityStyleOverrides;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Default slot configurations for templates
|
|
289
|
+
*
|
|
290
|
+
* @category constants
|
|
291
|
+
* @since 4.0.0
|
|
292
|
+
*
|
|
293
|
+
* Powered by Nikkory
|
|
294
|
+
*/
|
|
295
|
+
export declare const DEFAULT_TEMPLATE_SLOTS: readonly TemplateSlotConfig[];
|
|
296
|
+
/**
|
|
297
|
+
* FullTemplate - Complete template with metadata for marketplace
|
|
298
|
+
*
|
|
299
|
+
* Combines TemplateLevelConfig with TemplateMetadata for full template definition.
|
|
300
|
+
*
|
|
301
|
+
* @category types
|
|
302
|
+
* @since 4.0.0
|
|
303
|
+
*
|
|
304
|
+
* Powered by Nikkory
|
|
305
|
+
*/
|
|
306
|
+
export interface FullTemplate extends TemplateLevelConfig, GranularityTemplateMetadata {
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Type guard to check if a config is a TemplateLevelConfig
|
|
310
|
+
*
|
|
311
|
+
* @category utils
|
|
312
|
+
* @since 4.0.0
|
|
313
|
+
*
|
|
314
|
+
* @param config - The config to check
|
|
315
|
+
* @returns True if config is a TemplateLevelConfig
|
|
316
|
+
*
|
|
317
|
+
* Powered by Nikkory
|
|
318
|
+
*/
|
|
319
|
+
export declare function isTemplateLevelConfig(config: GranularityConfig<GranularityLevel>): config is TemplateLevelConfig & GranularityConfig<'template'>;
|
|
320
|
+
/**
|
|
321
|
+
* TemplateGranularityConfig - Alias to GranularityConfig<'template'>
|
|
322
|
+
*
|
|
323
|
+
* Use TemplateLevelConfig for the full extended version with template-specific fields.
|
|
324
|
+
*
|
|
325
|
+
* @category types
|
|
326
|
+
* @since 4.0.0
|
|
327
|
+
*
|
|
328
|
+
* Powered by Nikkory
|
|
329
|
+
*/
|
|
330
|
+
export type TemplateGranularityConfig = GranularityConfig<'template'>;
|
|
331
|
+
/**
|
|
332
|
+
* Re-export GranularityTemplate for convenience
|
|
333
|
+
*
|
|
334
|
+
* @category types
|
|
335
|
+
* @since 4.0.0
|
|
336
|
+
*
|
|
337
|
+
* Powered by Nikkory
|
|
338
|
+
*/
|
|
339
|
+
export type { GranularityTemplate, GranularityTemplateMetadata as TemplateMetadata };
|
|
340
|
+
//# sourceMappingURL=template.config.d.ts.map
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Types for Nikkory Vibe v4.0
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
* @module engine/types
|
|
6
|
+
* @since 4.0.0
|
|
7
|
+
*
|
|
8
|
+
* Powered by Nikkory
|
|
9
|
+
*/
|
|
10
|
+
export * from './Result';
|
|
11
|
+
export * from './Option';
|
|
12
|
+
export * from './algorithm-engine.types';
|
|
13
|
+
export * from './section.types';
|
|
14
|
+
export * from './section-template.types';
|
|
15
|
+
export * from './section-slot.types';
|
|
16
|
+
export * from './section-storage.types';
|
|
17
|
+
export * from './granularity';
|
|
18
|
+
/**
|
|
19
|
+
* Component quality tier
|
|
20
|
+
* - basic: Prototype/MVP (30-50 LOC)
|
|
21
|
+
* - standard: Production (50-150 LOC, forwardRef)
|
|
22
|
+
* - enterprise: Mission-critical (150-300 LOC, memo, analytics, ARIA)
|
|
23
|
+
*/
|
|
24
|
+
export type Tier = 'basic' | 'standard' | 'enterprise';
|
|
25
|
+
/**
|
|
26
|
+
* Supported design systems (12 total)
|
|
27
|
+
*/
|
|
28
|
+
export type DesignSystem = 'material-design' | 'ios-hig' | 'glassmorphism' | 'neumorphism' | 'brutalism' | 'minimalism' | 'cyberpunk' | 'flat-design' | 'retro-vintage' | 'fluent-design' | 'carbon-design' | 'ant-design';
|
|
29
|
+
/**
|
|
30
|
+
* Component types (40+ supported)
|
|
31
|
+
*/
|
|
32
|
+
export type ComponentType = 'button' | 'input' | 'textarea' | 'checkbox' | 'radio-group' | 'switch' | 'select' | 'slider' | 'alert' | 'badge' | 'chip' | 'progress' | 'spinner' | 'skeleton' | 'tooltip' | 'tabs' | 'menu' | 'breadcrumb' | 'pagination' | 'stepper' | 'card' | 'table' | 'list' | 'accordion' | 'avatar' | 'modal' | 'drawer' | 'popover' | 'date-picker' | 'calendar' | 'audio' | 'video' | 'image' | 'file';
|
|
33
|
+
/**
|
|
34
|
+
* Component granularity levels (6 levels)
|
|
35
|
+
*/
|
|
36
|
+
export type ComponentGranularity = 'atom' | 'component' | 'section' | 'page' | 'layout' | 'template';
|
|
37
|
+
/**
|
|
38
|
+
* Supported frontend frameworks
|
|
39
|
+
*/
|
|
40
|
+
export type Framework = 'react' | 'vue' | 'svelte' | 'angular' | 'solid' | 'qwik';
|
|
41
|
+
/**
|
|
42
|
+
* 24-Factor Dynamic Matrix configuration
|
|
43
|
+
*/
|
|
44
|
+
export interface FactorConfig {
|
|
45
|
+
readonly preset?: string;
|
|
46
|
+
readonly spacing?: string;
|
|
47
|
+
readonly sizing?: string;
|
|
48
|
+
readonly typography?: string;
|
|
49
|
+
readonly colors?: string;
|
|
50
|
+
readonly borders?: string;
|
|
51
|
+
readonly shadows?: string;
|
|
52
|
+
readonly animations?: string;
|
|
53
|
+
readonly layout?: string;
|
|
54
|
+
readonly responsive?: string;
|
|
55
|
+
readonly darkMode?: string;
|
|
56
|
+
readonly accessibility?: string;
|
|
57
|
+
readonly performance?: string;
|
|
58
|
+
readonly state?: string;
|
|
59
|
+
readonly validation?: string;
|
|
60
|
+
readonly localization?: string;
|
|
61
|
+
readonly analytics?: string;
|
|
62
|
+
readonly security?: string;
|
|
63
|
+
readonly testing?: string;
|
|
64
|
+
readonly documentation?: string;
|
|
65
|
+
readonly versioning?: string;
|
|
66
|
+
readonly compatibility?: string;
|
|
67
|
+
readonly optimization?: string;
|
|
68
|
+
readonly monitoring?: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Component generation configuration
|
|
72
|
+
*/
|
|
73
|
+
export interface GenerationConfig {
|
|
74
|
+
readonly componentType: ComponentType;
|
|
75
|
+
readonly framework: Framework;
|
|
76
|
+
readonly designSystem: DesignSystem;
|
|
77
|
+
readonly tier: Tier;
|
|
78
|
+
readonly granularity?: ComponentGranularity;
|
|
79
|
+
readonly factors?: FactorConfig;
|
|
80
|
+
readonly customProps?: Record<string, unknown>;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Component registry definition
|
|
84
|
+
*/
|
|
85
|
+
export interface ComponentRegistryDefinition {
|
|
86
|
+
readonly id: string;
|
|
87
|
+
readonly name: string;
|
|
88
|
+
readonly category: string;
|
|
89
|
+
readonly complexity: 'basic' | 'standard' | 'complex';
|
|
90
|
+
readonly status: 'stable' | 'beta' | 'planned';
|
|
91
|
+
readonly icon: string;
|
|
92
|
+
readonly emoji: string;
|
|
93
|
+
readonly designSystems: readonly DesignSystem[];
|
|
94
|
+
readonly tiers: readonly Tier[];
|
|
95
|
+
readonly isNew?: boolean;
|
|
96
|
+
readonly isPopular?: boolean;
|
|
97
|
+
readonly tags: readonly string[];
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Component features that can be enabled
|
|
101
|
+
*/
|
|
102
|
+
export type ComponentFeature = 'loading' | 'disabled' | 'tooltip' | 'icon' | 'badge' | 'analytics' | 'a11y' | 'animation' | 'responsive';
|
|
103
|
+
/**
|
|
104
|
+
* Generation options
|
|
105
|
+
*/
|
|
106
|
+
export interface GenerateComponentOptions {
|
|
107
|
+
includeTests?: boolean;
|
|
108
|
+
includeStorybook?: boolean;
|
|
109
|
+
includeCss?: boolean;
|
|
110
|
+
formatCode?: boolean;
|
|
111
|
+
overwrite?: boolean;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Generate Component DTO
|
|
115
|
+
* Data Transfer Object for component generation use case.
|
|
116
|
+
*/
|
|
117
|
+
export interface GenerateComponentDto {
|
|
118
|
+
template: string;
|
|
119
|
+
name: string;
|
|
120
|
+
designSystem: string;
|
|
121
|
+
tier: 'basic' | 'standard' | 'enterprise';
|
|
122
|
+
framework?: 'react' | 'vue' | 'angular' | 'svelte' | 'solid';
|
|
123
|
+
outputPath?: string;
|
|
124
|
+
variants?: string[];
|
|
125
|
+
props?: Record<string, string>;
|
|
126
|
+
features?: ComponentFeature[];
|
|
127
|
+
options?: GenerateComponentOptions;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Generated component metadata
|
|
131
|
+
*/
|
|
132
|
+
export interface GeneratedComponentMetadata {
|
|
133
|
+
template: string;
|
|
134
|
+
name: string;
|
|
135
|
+
designSystem: string;
|
|
136
|
+
tier: string;
|
|
137
|
+
framework: string;
|
|
138
|
+
generatedAt: Date;
|
|
139
|
+
linesOfCode: number;
|
|
140
|
+
features: string[];
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Generated component result
|
|
144
|
+
*/
|
|
145
|
+
export interface GeneratedComponent {
|
|
146
|
+
code: string;
|
|
147
|
+
path?: string;
|
|
148
|
+
testCode?: string;
|
|
149
|
+
storybookCode?: string;
|
|
150
|
+
metadata: GeneratedComponentMetadata;
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section Slot Types
|
|
3
|
+
* Type definitions for section slots and component placement
|
|
4
|
+
*
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
* @module types/section-slot
|
|
7
|
+
* @since 4.0.0
|
|
8
|
+
*
|
|
9
|
+
* Powered by Nikkory
|
|
10
|
+
*/
|
|
11
|
+
import type { ComponentType } from './index';
|
|
12
|
+
import type { SlotConfig, StoredComponentInSlot } from './section.types';
|
|
13
|
+
/**
|
|
14
|
+
* Slot state for runtime management
|
|
15
|
+
*/
|
|
16
|
+
export interface SlotState {
|
|
17
|
+
/** Slot configuration */
|
|
18
|
+
readonly config: SlotConfig;
|
|
19
|
+
/** Components currently in slot */
|
|
20
|
+
readonly components: readonly StoredComponentInSlot[];
|
|
21
|
+
/** Whether slot is currently being edited */
|
|
22
|
+
readonly isEditing: boolean;
|
|
23
|
+
/** Whether slot accepts more components */
|
|
24
|
+
readonly canAddMore: boolean;
|
|
25
|
+
/** Validation errors for slot */
|
|
26
|
+
readonly errors: readonly string[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Add component to slot operation
|
|
30
|
+
*/
|
|
31
|
+
export interface AddComponentToSlotInput {
|
|
32
|
+
/** Slot ID to add component to */
|
|
33
|
+
readonly slotId: string;
|
|
34
|
+
/** Component type to add */
|
|
35
|
+
readonly componentType: ComponentType;
|
|
36
|
+
/** Initial prop overrides */
|
|
37
|
+
readonly propOverrides?: Record<string, unknown>;
|
|
38
|
+
/** Position in slot (appends if not specified) */
|
|
39
|
+
readonly position?: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Remove component from slot operation
|
|
43
|
+
*/
|
|
44
|
+
export interface RemoveComponentFromSlotInput {
|
|
45
|
+
/** Slot ID to remove component from */
|
|
46
|
+
readonly slotId: string;
|
|
47
|
+
/** Instance ID of component to remove */
|
|
48
|
+
readonly instanceId: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Update component in slot operation
|
|
52
|
+
*/
|
|
53
|
+
export interface UpdateComponentInSlotInput {
|
|
54
|
+
/** Slot ID containing component */
|
|
55
|
+
readonly slotId: string;
|
|
56
|
+
/** Instance ID of component to update */
|
|
57
|
+
readonly instanceId: string;
|
|
58
|
+
/** New prop overrides (merged with existing) */
|
|
59
|
+
readonly propOverrides?: Record<string, unknown>;
|
|
60
|
+
/** New visibility state */
|
|
61
|
+
readonly visible?: boolean;
|
|
62
|
+
/** New position in slot */
|
|
63
|
+
readonly order?: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Reorder components in slot operation
|
|
67
|
+
*/
|
|
68
|
+
export interface ReorderSlotComponentsInput {
|
|
69
|
+
/** Slot ID to reorder */
|
|
70
|
+
readonly slotId: string;
|
|
71
|
+
/** New order of instance IDs */
|
|
72
|
+
readonly instanceIds: readonly string[];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Slot validation result
|
|
76
|
+
*/
|
|
77
|
+
export interface SlotValidationResult {
|
|
78
|
+
/** Whether slot is valid */
|
|
79
|
+
readonly valid: boolean;
|
|
80
|
+
/** Validation errors */
|
|
81
|
+
readonly errors: readonly string[];
|
|
82
|
+
/** Validation warnings */
|
|
83
|
+
readonly warnings: readonly string[];
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Component placement validation input
|
|
87
|
+
*/
|
|
88
|
+
export interface ComponentPlacementValidationInput {
|
|
89
|
+
/** Slot configuration */
|
|
90
|
+
readonly slotConfig: SlotConfig;
|
|
91
|
+
/** Component type to place */
|
|
92
|
+
readonly componentType: ComponentType;
|
|
93
|
+
/** Current components in slot */
|
|
94
|
+
readonly currentComponents: readonly StoredComponentInSlot[];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Default slot configurations by section type
|
|
98
|
+
*/
|
|
99
|
+
export interface SectionSlotDefaults {
|
|
100
|
+
/** Section type */
|
|
101
|
+
readonly sectionType: string;
|
|
102
|
+
/** Default slot configurations */
|
|
103
|
+
readonly slots: readonly SlotConfig[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Slot preset for quick configuration
|
|
107
|
+
*/
|
|
108
|
+
export interface SlotPreset {
|
|
109
|
+
/** Preset identifier */
|
|
110
|
+
readonly presetId: string;
|
|
111
|
+
/** Preset name */
|
|
112
|
+
readonly name: string;
|
|
113
|
+
/** Preset description */
|
|
114
|
+
readonly description: string;
|
|
115
|
+
/** Slot configuration */
|
|
116
|
+
readonly config: SlotConfig;
|
|
117
|
+
/** Default components to place */
|
|
118
|
+
readonly defaultComponents: readonly StoredComponentInSlot[];
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Slot event types for state management
|
|
122
|
+
*/
|
|
123
|
+
export type SlotEventType = 'component-added' | 'component-removed' | 'component-updated' | 'components-reordered' | 'slot-cleared';
|
|
124
|
+
/**
|
|
125
|
+
* Slot event payload
|
|
126
|
+
*/
|
|
127
|
+
export interface SlotEvent {
|
|
128
|
+
/** Event type */
|
|
129
|
+
readonly type: SlotEventType;
|
|
130
|
+
/** Slot ID */
|
|
131
|
+
readonly slotId: string;
|
|
132
|
+
/** Affected instance ID (if applicable) */
|
|
133
|
+
readonly instanceId?: string;
|
|
134
|
+
/** Timestamp */
|
|
135
|
+
readonly timestamp: Date;
|
|
136
|
+
/** Event payload */
|
|
137
|
+
readonly payload?: Record<string, unknown>;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Slot render context for component generation
|
|
141
|
+
*/
|
|
142
|
+
export interface SlotRenderContext {
|
|
143
|
+
/** Slot configuration */
|
|
144
|
+
readonly slot: SlotConfig;
|
|
145
|
+
/** Components to render */
|
|
146
|
+
readonly components: readonly StoredComponentInSlot[];
|
|
147
|
+
/** Parent section ID */
|
|
148
|
+
readonly sectionId: string;
|
|
149
|
+
/** Design system to use */
|
|
150
|
+
readonly designSystem: string;
|
|
151
|
+
/** Tier to use */
|
|
152
|
+
readonly tier: string;
|
|
153
|
+
/** Whether in edit mode */
|
|
154
|
+
readonly isEditMode: boolean;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Rendered slot output
|
|
158
|
+
*/
|
|
159
|
+
export interface RenderedSlot {
|
|
160
|
+
/** Slot ID */
|
|
161
|
+
readonly slotId: string;
|
|
162
|
+
/** Generated HTML/JSX */
|
|
163
|
+
readonly content: string;
|
|
164
|
+
/** Component instance IDs rendered */
|
|
165
|
+
readonly renderedInstances: readonly string[];
|
|
166
|
+
/** Render errors (if any) */
|
|
167
|
+
readonly errors: readonly string[];
|
|
168
|
+
}
|
|
169
|
+
//# sourceMappingURL=section-slot.types.d.ts.map
|