@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,461 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolution Types - 5-Level Abstraction API
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the resolution system that converts high-level
|
|
5
|
+
* semantic props (intents, presets, moods) into complete 24-Factor configurations.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
* @module resolution/types
|
|
9
|
+
* @since 2.1.0
|
|
10
|
+
*
|
|
11
|
+
* Powered by Nikkory
|
|
12
|
+
*/
|
|
13
|
+
import type { FactorShape, FactorPosition, FactorIconPosition, FactorState, FactorAnimation, FactorElevation, FactorA11y, FactorAlignment, FactorOrientation, FactorDensity, FactorLoadingState, FactorResponsiveConfig, FactorTheme, FactorSpacing, FactorTypography, FactorBorder, FactorOpacity, FactorOverflow, FactorCursor, FactorZIndex, FactorTransition, ComponentSize, ColorScheme } from '../styling/types';
|
|
14
|
+
/**
|
|
15
|
+
* Complete 24-Factor configuration.
|
|
16
|
+
* This is the normalized output of the resolution engine.
|
|
17
|
+
*
|
|
18
|
+
* @since 2.1.0
|
|
19
|
+
*/
|
|
20
|
+
export interface Factor24Config {
|
|
21
|
+
/** Factor 1: Size */
|
|
22
|
+
size?: ComponentSize;
|
|
23
|
+
/** Factor 2: Variant (component-specific) */
|
|
24
|
+
variant?: string;
|
|
25
|
+
/** Factor 3: Color scheme */
|
|
26
|
+
colorScheme?: ColorScheme;
|
|
27
|
+
/** Factor 4: Shape */
|
|
28
|
+
shape?: FactorShape;
|
|
29
|
+
/** Factor 5: Position */
|
|
30
|
+
position?: FactorPosition;
|
|
31
|
+
/** Factor 6: Icon Position */
|
|
32
|
+
iconPosition?: FactorIconPosition;
|
|
33
|
+
/** Factor 7: State */
|
|
34
|
+
state?: FactorState;
|
|
35
|
+
/** Factor 8: Animation */
|
|
36
|
+
animation?: FactorAnimation;
|
|
37
|
+
/** Factor 9: Elevation */
|
|
38
|
+
elevation?: FactorElevation;
|
|
39
|
+
/** Factor 10: Accessibility */
|
|
40
|
+
a11y?: FactorA11y;
|
|
41
|
+
/** Factor 11: Justify alignment */
|
|
42
|
+
justify?: FactorAlignment;
|
|
43
|
+
/** Factor 11: Cross-axis alignment */
|
|
44
|
+
align?: FactorAlignment;
|
|
45
|
+
/** Factor 12: Orientation */
|
|
46
|
+
orientation?: FactorOrientation;
|
|
47
|
+
/** Factor 13: Density */
|
|
48
|
+
density?: FactorDensity;
|
|
49
|
+
/** Factor 14: Loading State */
|
|
50
|
+
loadingState?: FactorLoadingState;
|
|
51
|
+
/** Factor 15: Responsive config */
|
|
52
|
+
responsive?: FactorResponsiveConfig;
|
|
53
|
+
/** Factor 16: Theme */
|
|
54
|
+
theme?: FactorTheme;
|
|
55
|
+
/** Factor 17: Spacing */
|
|
56
|
+
spacing?: FactorSpacing;
|
|
57
|
+
/** Factor 18: Typography */
|
|
58
|
+
typography?: FactorTypography;
|
|
59
|
+
/** Factor 19: Border */
|
|
60
|
+
border?: FactorBorder;
|
|
61
|
+
/** Factor 20: Opacity */
|
|
62
|
+
opacity?: FactorOpacity;
|
|
63
|
+
/** Factor 21: Overflow */
|
|
64
|
+
overflow?: FactorOverflow;
|
|
65
|
+
/** Factor 22: Cursor */
|
|
66
|
+
cursor?: FactorCursor;
|
|
67
|
+
/** Factor 23: Z-Index */
|
|
68
|
+
zIndex?: FactorZIndex;
|
|
69
|
+
/** Factor 24: Transition */
|
|
70
|
+
transition?: FactorTransition;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Semantic intent - Highest level abstraction.
|
|
74
|
+
* Describes the PURPOSE of the component.
|
|
75
|
+
*
|
|
76
|
+
* @since 2.1.0
|
|
77
|
+
*/
|
|
78
|
+
export type SemanticIntent = 'cta' | 'primary' | 'secondary' | 'tertiary' | 'destructive' | 'confirm' | 'cancel' | 'nav' | 'navActive' | 'navSubtle' | 'link' | 'success' | 'warning' | 'error' | 'info' | 'ghost' | 'subtle' | 'hero' | 'premium' | 'brand' | 'inputText' | 'inputEmail' | 'inputPassword' | 'inputSearch' | 'inputCode' | 'inputNumber' | 'inputPhone' | 'inputUrl' | 'inputDate' | 'inputCurrency' | 'inputSelect' | 'inputMultiselect' | 'inputAutocomplete' | 'inputCheckbox' | 'inputSwitch' | 'inputRadio' | 'inputSlider' | 'inputRating' | 'inputTextarea' | 'inputRichtext' | 'inputError' | 'inputSuccess' | 'inputDisabled' | 'cardContent' | 'cardFeatured' | 'cardArticle' | 'cardInteractive' | 'cardSelectable' | 'cardDraggable' | 'cardProduct' | 'cardPricing' | 'cardProfile' | 'cardTestimonial' | 'cardStats' | 'cardNotification' | 'cardGlass' | 'cardNeumorphic' | 'alertInfo' | 'alertSuccess' | 'alertWarning' | 'alertError' | 'toastDefault' | 'toastSuccess' | 'toastError' | 'toastAction' | 'progressLinear' | 'progressCircular' | 'skeleton' | 'badgeDefault' | 'badgeStatus' | 'badgeCount' | 'chipDefault' | 'chipSelectable' | 'chipDeletable' | 'tooltipDefault' | 'tooltipRich';
|
|
79
|
+
/**
|
|
80
|
+
* Semantic mood - Modifies the emotional tone.
|
|
81
|
+
* Adjusts animation, spacing, and visual weight.
|
|
82
|
+
*
|
|
83
|
+
* @since 2.1.0
|
|
84
|
+
*/
|
|
85
|
+
export type SemanticMood = 'professional' | 'friendly' | 'playful' | 'serious' | 'luxurious' | 'minimal' | 'bold';
|
|
86
|
+
/**
|
|
87
|
+
* Intent definition for resolution.
|
|
88
|
+
*
|
|
89
|
+
* @since 2.1.0
|
|
90
|
+
*/
|
|
91
|
+
export interface IntentDefinition {
|
|
92
|
+
/** Unique intent identifier */
|
|
93
|
+
id: SemanticIntent;
|
|
94
|
+
/** Human-readable name */
|
|
95
|
+
name: string;
|
|
96
|
+
/** Description of when to use */
|
|
97
|
+
description: string;
|
|
98
|
+
/** Base 24-factor configuration */
|
|
99
|
+
config: Partial<Factor24Config>;
|
|
100
|
+
/** Mood modifiers - adjustments per mood */
|
|
101
|
+
moodModifiers?: Partial<Record<SemanticMood, Partial<Factor24Config>>>;
|
|
102
|
+
/** Compatible component types (empty = all) */
|
|
103
|
+
componentTypes?: string[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Mood modifier definition.
|
|
107
|
+
*
|
|
108
|
+
* @since 2.1.0
|
|
109
|
+
*/
|
|
110
|
+
export interface MoodModifierDefinition {
|
|
111
|
+
/** Unique mood identifier */
|
|
112
|
+
id: SemanticMood;
|
|
113
|
+
/** Human-readable name */
|
|
114
|
+
name: string;
|
|
115
|
+
/** Description */
|
|
116
|
+
description: string;
|
|
117
|
+
/** Factor adjustments applied by this mood */
|
|
118
|
+
adjustments: Partial<Factor24Config>;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Preset category for organization.
|
|
122
|
+
*
|
|
123
|
+
* @since 2.1.0
|
|
124
|
+
*/
|
|
125
|
+
export type PresetCategory = 'button' | 'card' | 'input' | 'navigation' | 'feedback' | 'overlay' | 'dataDisplay' | 'layout' | 'form' | 'utility';
|
|
126
|
+
/**
|
|
127
|
+
* Named preset definition.
|
|
128
|
+
*
|
|
129
|
+
* @since 2.1.0
|
|
130
|
+
*/
|
|
131
|
+
export interface PresetDefinition {
|
|
132
|
+
/** Unique preset identifier (e.g., 'hero-primary', 'form-input') */
|
|
133
|
+
id: string;
|
|
134
|
+
/** Human-readable name */
|
|
135
|
+
name: string;
|
|
136
|
+
/** Description of the preset's purpose */
|
|
137
|
+
description: string;
|
|
138
|
+
/** Category for organization */
|
|
139
|
+
category: PresetCategory;
|
|
140
|
+
/** Complete 24-factor configuration */
|
|
141
|
+
config: Partial<Factor24Config>;
|
|
142
|
+
/** Tags for searchability */
|
|
143
|
+
tags?: string[];
|
|
144
|
+
/** Preview image URL (optional) */
|
|
145
|
+
previewUrl?: string;
|
|
146
|
+
/** Compatible component types (empty = all) */
|
|
147
|
+
componentTypes?: string[];
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Look shorthand - Visual appearance.
|
|
151
|
+
*
|
|
152
|
+
* @since 2.1.0
|
|
153
|
+
*/
|
|
154
|
+
export type LookShorthand = 'bold' | 'subtle' | 'minimal' | 'elevated' | 'outlined' | 'ghost' | 'solid' | 'soft';
|
|
155
|
+
/**
|
|
156
|
+
* Feel shorthand - Interaction behavior.
|
|
157
|
+
*
|
|
158
|
+
* @since 2.1.0
|
|
159
|
+
*/
|
|
160
|
+
export type FeelShorthand = 'snappy' | 'smooth' | 'bouncy' | 'static' | 'responsive';
|
|
161
|
+
/**
|
|
162
|
+
* Surface shorthand - Background and elevation.
|
|
163
|
+
*
|
|
164
|
+
* @since 2.1.0
|
|
165
|
+
*/
|
|
166
|
+
export type SurfaceShorthand = 'flat' | 'raised' | 'floating' | 'sunken' | 'overlay';
|
|
167
|
+
/**
|
|
168
|
+
* Spacing shorthand - Internal spacing.
|
|
169
|
+
*
|
|
170
|
+
* @since 2.1.0
|
|
171
|
+
*/
|
|
172
|
+
export type SpacingShorthand = 'tight' | 'normal' | 'relaxed' | 'loose';
|
|
173
|
+
/**
|
|
174
|
+
* Shorthand mappings collection.
|
|
175
|
+
*
|
|
176
|
+
* @since 2.1.0
|
|
177
|
+
*/
|
|
178
|
+
export interface ShorthandMappings {
|
|
179
|
+
look: Record<LookShorthand, Partial<Factor24Config>>;
|
|
180
|
+
feel: Record<FeelShorthand, Partial<Factor24Config>>;
|
|
181
|
+
surface: Record<SurfaceShorthand, Partial<Factor24Config>>;
|
|
182
|
+
spacing: Record<SpacingShorthand, Partial<Factor24Config>>;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Visual factor group - Appearance-related factors.
|
|
186
|
+
*
|
|
187
|
+
* @since 2.1.0
|
|
188
|
+
*/
|
|
189
|
+
export interface VisualGroup {
|
|
190
|
+
/** Shape (Factor 4) */
|
|
191
|
+
shape?: FactorShape;
|
|
192
|
+
/** Border (Factor 19) */
|
|
193
|
+
border?: FactorBorder;
|
|
194
|
+
/** Opacity (Factor 20) */
|
|
195
|
+
opacity?: FactorOpacity;
|
|
196
|
+
/** Elevation (Factor 9) */
|
|
197
|
+
elevation?: FactorElevation;
|
|
198
|
+
/** Color scheme */
|
|
199
|
+
colorScheme?: ColorScheme;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Motion factor group - Animation-related factors.
|
|
203
|
+
*
|
|
204
|
+
* @since 2.1.0
|
|
205
|
+
*/
|
|
206
|
+
export interface MotionGroup {
|
|
207
|
+
/** Animation preset (Factor 8) */
|
|
208
|
+
animation?: FactorAnimation;
|
|
209
|
+
/** Transition timing (Factor 24) */
|
|
210
|
+
transition?: FactorTransition;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Layout factor group - Layout-related factors.
|
|
214
|
+
*
|
|
215
|
+
* @since 2.1.0
|
|
216
|
+
*/
|
|
217
|
+
export interface LayoutGroup {
|
|
218
|
+
/** Position (Factor 5) */
|
|
219
|
+
position?: FactorPosition;
|
|
220
|
+
/** Orientation (Factor 12) */
|
|
221
|
+
orientation?: FactorOrientation;
|
|
222
|
+
/** Density (Factor 13) */
|
|
223
|
+
density?: FactorDensity;
|
|
224
|
+
/** Spacing (Factor 17) */
|
|
225
|
+
spacing?: FactorSpacing;
|
|
226
|
+
/** Overflow (Factor 21) */
|
|
227
|
+
overflow?: FactorOverflow;
|
|
228
|
+
/** Justify alignment */
|
|
229
|
+
justify?: FactorAlignment;
|
|
230
|
+
/** Cross alignment */
|
|
231
|
+
align?: FactorAlignment;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Experience factor group - UX-related factors.
|
|
235
|
+
*
|
|
236
|
+
* @since 2.1.0
|
|
237
|
+
*/
|
|
238
|
+
export interface ExperienceGroup {
|
|
239
|
+
/** Accessibility level (Factor 10) */
|
|
240
|
+
a11y?: FactorA11y;
|
|
241
|
+
/** Cursor (Factor 22) */
|
|
242
|
+
cursor?: FactorCursor;
|
|
243
|
+
/** Z-Index (Factor 23) */
|
|
244
|
+
zIndex?: FactorZIndex;
|
|
245
|
+
/** Loading state (Factor 14) */
|
|
246
|
+
loadingState?: FactorLoadingState;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Combined factor groups for Level 2 props.
|
|
250
|
+
*
|
|
251
|
+
* @since 2.1.0
|
|
252
|
+
*/
|
|
253
|
+
export interface FactorGroups {
|
|
254
|
+
/** Visual appearance factors */
|
|
255
|
+
visual?: VisualGroup;
|
|
256
|
+
/** Motion/animation factors */
|
|
257
|
+
motion?: MotionGroup;
|
|
258
|
+
/** Layout factors */
|
|
259
|
+
layout?: LayoutGroup;
|
|
260
|
+
/** Experience/UX factors */
|
|
261
|
+
experience?: ExperienceGroup;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Multi-level props input.
|
|
265
|
+
* Users can provide props at any combination of levels.
|
|
266
|
+
* Resolution engine will merge them with correct priority.
|
|
267
|
+
*
|
|
268
|
+
* Priority: Level 1 (raw) > Level 2 (groups) > Level 3 (shorthand) > Level 4 (preset) > Level 5 (intent)
|
|
269
|
+
*
|
|
270
|
+
* @since 2.1.0
|
|
271
|
+
*/
|
|
272
|
+
export interface MultiLevelProps {
|
|
273
|
+
/** Semantic intent */
|
|
274
|
+
intent?: SemanticIntent;
|
|
275
|
+
/** Mood modifier */
|
|
276
|
+
mood?: SemanticMood;
|
|
277
|
+
/** Named preset */
|
|
278
|
+
preset?: string;
|
|
279
|
+
/** Visual look shorthand */
|
|
280
|
+
look?: LookShorthand;
|
|
281
|
+
/** Interaction feel shorthand */
|
|
282
|
+
feel?: FeelShorthand;
|
|
283
|
+
/** Surface/elevation shorthand */
|
|
284
|
+
surface?: SurfaceShorthand;
|
|
285
|
+
/** Spacing shorthand */
|
|
286
|
+
spacingPreset?: SpacingShorthand;
|
|
287
|
+
/** Visual factors group */
|
|
288
|
+
visual?: VisualGroup;
|
|
289
|
+
/** Motion factors group */
|
|
290
|
+
motion?: MotionGroup;
|
|
291
|
+
/** Layout factors group */
|
|
292
|
+
layout?: LayoutGroup;
|
|
293
|
+
/** Experience factors group */
|
|
294
|
+
experience?: ExperienceGroup;
|
|
295
|
+
/** All individual 24 factors can be specified directly */
|
|
296
|
+
size?: ComponentSize;
|
|
297
|
+
variant?: string;
|
|
298
|
+
colorScheme?: ColorScheme;
|
|
299
|
+
shape?: FactorShape;
|
|
300
|
+
position?: FactorPosition;
|
|
301
|
+
iconPosition?: FactorIconPosition;
|
|
302
|
+
state?: FactorState;
|
|
303
|
+
animation?: FactorAnimation;
|
|
304
|
+
elevation?: FactorElevation;
|
|
305
|
+
a11y?: FactorA11y;
|
|
306
|
+
justify?: FactorAlignment;
|
|
307
|
+
align?: FactorAlignment;
|
|
308
|
+
orientation?: FactorOrientation;
|
|
309
|
+
density?: FactorDensity;
|
|
310
|
+
loadingState?: FactorLoadingState;
|
|
311
|
+
responsive?: FactorResponsiveConfig;
|
|
312
|
+
theme?: FactorTheme;
|
|
313
|
+
spacing?: FactorSpacing;
|
|
314
|
+
typography?: FactorTypography;
|
|
315
|
+
border?: FactorBorder;
|
|
316
|
+
opacity?: FactorOpacity;
|
|
317
|
+
overflow?: FactorOverflow;
|
|
318
|
+
cursor?: FactorCursor;
|
|
319
|
+
zIndex?: FactorZIndex;
|
|
320
|
+
transition?: FactorTransition;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Resolution result with complete configuration.
|
|
324
|
+
*
|
|
325
|
+
* @since 2.1.0
|
|
326
|
+
*/
|
|
327
|
+
export interface ResolutionResult {
|
|
328
|
+
/** Complete 24-factor configuration */
|
|
329
|
+
config: Factor24Config;
|
|
330
|
+
/** Source levels that contributed to the result */
|
|
331
|
+
sources: {
|
|
332
|
+
level5Intent?: SemanticIntent;
|
|
333
|
+
level5Mood?: SemanticMood;
|
|
334
|
+
level4Preset?: string;
|
|
335
|
+
level3Shorthands?: string[];
|
|
336
|
+
level2Groups?: string[];
|
|
337
|
+
level1Factors?: string[];
|
|
338
|
+
};
|
|
339
|
+
/** Debug information (only in development) */
|
|
340
|
+
debug?: {
|
|
341
|
+
mergeOrder: string[];
|
|
342
|
+
overrides: Record<string, {
|
|
343
|
+
from: string;
|
|
344
|
+
to: string;
|
|
345
|
+
level: number;
|
|
346
|
+
}>;
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Preset registry interface.
|
|
351
|
+
*
|
|
352
|
+
* @since 2.1.0
|
|
353
|
+
*/
|
|
354
|
+
export interface PresetRegistry {
|
|
355
|
+
/** All registered presets */
|
|
356
|
+
presets: Map<string, PresetDefinition>;
|
|
357
|
+
/** Total number of presets */
|
|
358
|
+
size: number;
|
|
359
|
+
/** Get preset by ID */
|
|
360
|
+
get(id: string): PresetDefinition | undefined;
|
|
361
|
+
/** Check if preset exists */
|
|
362
|
+
has(id: string): boolean;
|
|
363
|
+
/** Register a new preset */
|
|
364
|
+
register(preset: PresetDefinition): void;
|
|
365
|
+
/** Unregister a preset */
|
|
366
|
+
unregister(id: string): boolean;
|
|
367
|
+
/** Clear all presets */
|
|
368
|
+
clear(): void;
|
|
369
|
+
/** Get presets by category */
|
|
370
|
+
getByCategory(category: PresetCategory): PresetDefinition[];
|
|
371
|
+
/** Get presets by component type */
|
|
372
|
+
getByComponentType(componentType: string): PresetDefinition[];
|
|
373
|
+
/** Search presets by tag */
|
|
374
|
+
searchByTag(tag: string): PresetDefinition[];
|
|
375
|
+
/** Search presets by multiple tags */
|
|
376
|
+
searchByTags(tags: string[]): PresetDefinition[];
|
|
377
|
+
/** Text search in presets */
|
|
378
|
+
search(query: string): PresetDefinition[];
|
|
379
|
+
/** Get all presets */
|
|
380
|
+
getAll(): PresetDefinition[];
|
|
381
|
+
/** Get category counts */
|
|
382
|
+
getCategoryCounts(): Map<PresetCategory, number>;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Intent registry interface.
|
|
386
|
+
*
|
|
387
|
+
* @since 2.1.0
|
|
388
|
+
*/
|
|
389
|
+
export interface IntentRegistry {
|
|
390
|
+
/** All registered intents */
|
|
391
|
+
intents: Map<SemanticIntent, IntentDefinition>;
|
|
392
|
+
/** All registered mood modifiers */
|
|
393
|
+
moods: Map<SemanticMood, MoodModifierDefinition>;
|
|
394
|
+
/** Get intent by ID */
|
|
395
|
+
getIntent(id: SemanticIntent): IntentDefinition | undefined;
|
|
396
|
+
/** Get mood modifier by ID */
|
|
397
|
+
getMood(id: SemanticMood): MoodModifierDefinition | undefined;
|
|
398
|
+
/** Register a new intent */
|
|
399
|
+
registerIntent(intent: IntentDefinition): void;
|
|
400
|
+
/** Register a mood modifier */
|
|
401
|
+
registerMood(mood: MoodModifierDefinition): void;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Default Factor24 configuration values.
|
|
405
|
+
* Used when factors are not specified during resolution.
|
|
406
|
+
*
|
|
407
|
+
* @since 2.1.0
|
|
408
|
+
*/
|
|
409
|
+
export declare const DEFAULT_FACTOR24_CONFIG: Required<Factor24Config>;
|
|
410
|
+
/**
|
|
411
|
+
* Get default value for a specific factor.
|
|
412
|
+
*
|
|
413
|
+
* @param factorKey - The factor key to get default for
|
|
414
|
+
* @returns The default value for the factor
|
|
415
|
+
* @since 2.1.0
|
|
416
|
+
*/
|
|
417
|
+
export declare function getDefaultFactorValue<K extends keyof Factor24Config>(factorKey: K): Required<Factor24Config>[K];
|
|
418
|
+
/**
|
|
419
|
+
* List of all Factor24 keys for validation and iteration.
|
|
420
|
+
*
|
|
421
|
+
* @since 2.1.0
|
|
422
|
+
*/
|
|
423
|
+
export declare const FACTOR24_KEYS: ReadonlyArray<keyof Factor24Config>;
|
|
424
|
+
/**
|
|
425
|
+
* Check if a key is a valid Factor24 key.
|
|
426
|
+
*
|
|
427
|
+
* @param key - The key to check
|
|
428
|
+
* @returns True if the key is a valid Factor24 key
|
|
429
|
+
* @since 2.1.0
|
|
430
|
+
*/
|
|
431
|
+
export declare function isValidFactor24Key(key: string): key is keyof Factor24Config;
|
|
432
|
+
/**
|
|
433
|
+
* All available semantic intents.
|
|
434
|
+
*
|
|
435
|
+
* @since 2.1.0
|
|
436
|
+
*/
|
|
437
|
+
export declare const SEMANTIC_INTENTS: ReadonlyArray<SemanticIntent>;
|
|
438
|
+
/**
|
|
439
|
+
* All available semantic moods.
|
|
440
|
+
*
|
|
441
|
+
* @since 2.1.0
|
|
442
|
+
*/
|
|
443
|
+
export declare const SEMANTIC_MOODS: ReadonlyArray<SemanticMood>;
|
|
444
|
+
/**
|
|
445
|
+
* Check if a value is a valid semantic intent.
|
|
446
|
+
*
|
|
447
|
+
* @param value - The value to check
|
|
448
|
+
* @returns True if the value is a valid intent
|
|
449
|
+
* @since 2.1.0
|
|
450
|
+
*/
|
|
451
|
+
export declare function isValidIntent(value: string): value is SemanticIntent;
|
|
452
|
+
/**
|
|
453
|
+
* Check if a value is a valid semantic mood.
|
|
454
|
+
*
|
|
455
|
+
* @param value - The value to check
|
|
456
|
+
* @returns True if the value is a valid mood
|
|
457
|
+
* @since 2.1.0
|
|
458
|
+
*/
|
|
459
|
+
export declare function isValidMood(value: string): value is SemanticMood;
|
|
460
|
+
export type { FactorShape, FactorPosition, FactorIconPosition, FactorState, FactorAnimation, FactorElevation, FactorA11y, FactorAlignment, FactorOrientation, FactorDensity, FactorLoadingState, FactorResponsiveConfig, FactorTheme, FactorSpacing, FactorTypography, FactorBorder, FactorOpacity, FactorOverflow, FactorCursor, FactorZIndex, FactorTransition, ComponentSize, ColorScheme, };
|
|
461
|
+
//# sourceMappingURL=types.d.ts.map
|