@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,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spacing Mappings - Shorthand for Internal Spacing
|
|
3
|
+
*
|
|
4
|
+
* Maps SpacingShorthand values to Factor24Config.
|
|
5
|
+
* Controls padding, gaps, and overall density.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
* @module resolution/shorthand/spacing-mappings
|
|
9
|
+
* @since 2.1.0
|
|
10
|
+
*
|
|
11
|
+
* Powered by Nikkory
|
|
12
|
+
*/
|
|
13
|
+
import type { Factor24Config, SpacingShorthand } from '../types';
|
|
14
|
+
/**
|
|
15
|
+
* Spacing shorthand to Factor24Config mappings.
|
|
16
|
+
*
|
|
17
|
+
* @since 2.1.0
|
|
18
|
+
*/
|
|
19
|
+
export declare const SPACING_MAPPINGS: Record<SpacingShorthand, Partial<Factor24Config>>;
|
|
20
|
+
/**
|
|
21
|
+
* Expand spacing shorthand to Factor24Config.
|
|
22
|
+
*
|
|
23
|
+
* @param spacing - The spacing shorthand value
|
|
24
|
+
* @returns Partial Factor24Config with spacing-related factors
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* const config = expandSpacingShorthand('tight');
|
|
29
|
+
* // Result: { spacing: 'xs', density: 'compact' }
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @since 2.1.0
|
|
33
|
+
*/
|
|
34
|
+
export declare function expandSpacingShorthand(spacing: SpacingShorthand): Partial<Factor24Config>;
|
|
35
|
+
/**
|
|
36
|
+
* All valid spacing shorthand values.
|
|
37
|
+
*
|
|
38
|
+
* @since 2.1.0
|
|
39
|
+
*/
|
|
40
|
+
export declare const VALID_SPACING_SHORTHAND_VALUES: ReadonlyArray<SpacingShorthand>;
|
|
41
|
+
/**
|
|
42
|
+
* Check if a value is a valid spacing shorthand.
|
|
43
|
+
*
|
|
44
|
+
* @param value - The value to check
|
|
45
|
+
* @returns True if the value is a valid spacing shorthand
|
|
46
|
+
* @since 2.1.0
|
|
47
|
+
*/
|
|
48
|
+
export declare function isValidSpacingShorthand(value: unknown): value is SpacingShorthand;
|
|
49
|
+
/**
|
|
50
|
+
* Get all available spacing values with their descriptions.
|
|
51
|
+
*
|
|
52
|
+
* @returns Array of spacing values with descriptions
|
|
53
|
+
* @since 2.1.0
|
|
54
|
+
*/
|
|
55
|
+
export declare function getSpacingDescriptions(): Array<{
|
|
56
|
+
value: SpacingShorthand;
|
|
57
|
+
description: string;
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Get the spacing multiplier for a shorthand.
|
|
61
|
+
*
|
|
62
|
+
* @param spacing - The spacing shorthand
|
|
63
|
+
* @returns Spacing multiplier (0.5-2.0)
|
|
64
|
+
* @since 2.1.0
|
|
65
|
+
*/
|
|
66
|
+
export declare function getSpacingMultiplier(spacing: SpacingShorthand): number;
|
|
67
|
+
/**
|
|
68
|
+
* Get the base spacing value in rem.
|
|
69
|
+
*
|
|
70
|
+
* @param spacing - The spacing shorthand
|
|
71
|
+
* @returns Spacing value in rem
|
|
72
|
+
* @since 2.1.0
|
|
73
|
+
*/
|
|
74
|
+
export declare function getSpacingValue(spacing: SpacingShorthand): string;
|
|
75
|
+
/**
|
|
76
|
+
* Get padding CSS value for a spacing shorthand.
|
|
77
|
+
*
|
|
78
|
+
* @param spacing - The spacing shorthand
|
|
79
|
+
* @returns CSS padding value
|
|
80
|
+
* @since 2.1.0
|
|
81
|
+
*/
|
|
82
|
+
export declare function getPaddingValue(spacing: SpacingShorthand): string;
|
|
83
|
+
/**
|
|
84
|
+
* Get gap CSS value for a spacing shorthand.
|
|
85
|
+
*
|
|
86
|
+
* @param spacing - The spacing shorthand
|
|
87
|
+
* @returns CSS gap value
|
|
88
|
+
* @since 2.1.0
|
|
89
|
+
*/
|
|
90
|
+
export declare function getGapValue(spacing: SpacingShorthand): string;
|
|
91
|
+
/**
|
|
92
|
+
* Get the density level (1-4 scale).
|
|
93
|
+
*
|
|
94
|
+
* @param spacing - The spacing shorthand
|
|
95
|
+
* @returns Density level from 1 (compact) to 4 (loose)
|
|
96
|
+
* @since 2.1.0
|
|
97
|
+
*/
|
|
98
|
+
export declare function getDensityLevel(spacing: SpacingShorthand): number;
|
|
99
|
+
/**
|
|
100
|
+
* Find the best spacing for a given density level.
|
|
101
|
+
*
|
|
102
|
+
* @param level - Target density level (1-4)
|
|
103
|
+
* @returns The most appropriate spacing shorthand
|
|
104
|
+
* @since 2.1.0
|
|
105
|
+
*/
|
|
106
|
+
export declare function getSpacingForDensity(level: number): SpacingShorthand;
|
|
107
|
+
/**
|
|
108
|
+
* Get a tighter spacing for the given spacing.
|
|
109
|
+
*
|
|
110
|
+
* @param spacing - The current spacing
|
|
111
|
+
* @returns A tighter spacing shorthand
|
|
112
|
+
* @since 2.1.0
|
|
113
|
+
*/
|
|
114
|
+
export declare function getTighterSpacing(spacing: SpacingShorthand): SpacingShorthand;
|
|
115
|
+
/**
|
|
116
|
+
* Get a looser spacing for the given spacing.
|
|
117
|
+
*
|
|
118
|
+
* @param spacing - The current spacing
|
|
119
|
+
* @returns A looser spacing shorthand
|
|
120
|
+
* @since 2.1.0
|
|
121
|
+
*/
|
|
122
|
+
export declare function getLooserSpacing(spacing: SpacingShorthand): SpacingShorthand;
|
|
123
|
+
/**
|
|
124
|
+
* Check if spacing is considered compact.
|
|
125
|
+
*
|
|
126
|
+
* @param spacing - The spacing shorthand
|
|
127
|
+
* @returns True if spacing is compact (tight)
|
|
128
|
+
* @since 2.1.0
|
|
129
|
+
*/
|
|
130
|
+
export declare function isCompactSpacing(spacing: SpacingShorthand): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Check if spacing is considered comfortable.
|
|
133
|
+
*
|
|
134
|
+
* @param spacing - The spacing shorthand
|
|
135
|
+
* @returns True if spacing is comfortable (relaxed or loose)
|
|
136
|
+
* @since 2.1.0
|
|
137
|
+
*/
|
|
138
|
+
export declare function isComfortableSpacing(spacing: SpacingShorthand): boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Get inline spacing value (horizontal).
|
|
141
|
+
*
|
|
142
|
+
* @param spacing - The spacing shorthand
|
|
143
|
+
* @returns CSS inline spacing value
|
|
144
|
+
* @since 2.1.0
|
|
145
|
+
*/
|
|
146
|
+
export declare function getInlineSpacing(spacing: SpacingShorthand): string;
|
|
147
|
+
/**
|
|
148
|
+
* Get block spacing value (vertical).
|
|
149
|
+
*
|
|
150
|
+
* @param spacing - The spacing shorthand
|
|
151
|
+
* @returns CSS block spacing value
|
|
152
|
+
* @since 2.1.0
|
|
153
|
+
*/
|
|
154
|
+
export declare function getBlockSpacing(spacing: SpacingShorthand): string;
|
|
155
|
+
/**
|
|
156
|
+
* Calculate responsive spacing based on viewport.
|
|
157
|
+
*
|
|
158
|
+
* @param spacing - The spacing shorthand
|
|
159
|
+
* @param viewport - Viewport size ('sm' | 'md' | 'lg')
|
|
160
|
+
* @returns Adjusted spacing shorthand
|
|
161
|
+
* @since 2.1.0
|
|
162
|
+
*/
|
|
163
|
+
export declare function getResponsiveSpacing(spacing: SpacingShorthand, viewport: 'sm' | 'md' | 'lg'): SpacingShorthand;
|
|
164
|
+
//# sourceMappingURL=spacing-mappings.d.ts.map
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Surface Mappings - Shorthand for Background and Elevation
|
|
3
|
+
*
|
|
4
|
+
* Maps SurfaceShorthand values to Factor24Config.
|
|
5
|
+
* Controls depth perception, layering, and visual hierarchy.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
* @module resolution/shorthand/surface-mappings
|
|
9
|
+
* @since 2.1.0
|
|
10
|
+
*
|
|
11
|
+
* Powered by Nikkory
|
|
12
|
+
*/
|
|
13
|
+
import type { Factor24Config, SurfaceShorthand } from '../types';
|
|
14
|
+
/**
|
|
15
|
+
* Surface shorthand to Factor24Config mappings.
|
|
16
|
+
*
|
|
17
|
+
* @since 2.1.0
|
|
18
|
+
*/
|
|
19
|
+
export declare const SURFACE_MAPPINGS: Record<SurfaceShorthand, Partial<Factor24Config>>;
|
|
20
|
+
/**
|
|
21
|
+
* Expand surface shorthand to Factor24Config.
|
|
22
|
+
*
|
|
23
|
+
* @param surface - The surface shorthand value
|
|
24
|
+
* @returns Partial Factor24Config with surface-related factors
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* const config = expandSurface('floating');
|
|
29
|
+
* // Result: { elevation: 'xl', border: 'none', opacity: 'full', zIndex: 'sticky' }
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @since 2.1.0
|
|
33
|
+
*/
|
|
34
|
+
export declare function expandSurface(surface: SurfaceShorthand): Partial<Factor24Config>;
|
|
35
|
+
/**
|
|
36
|
+
* All valid surface shorthand values.
|
|
37
|
+
*
|
|
38
|
+
* @since 2.1.0
|
|
39
|
+
*/
|
|
40
|
+
export declare const VALID_SURFACE_VALUES: ReadonlyArray<SurfaceShorthand>;
|
|
41
|
+
/**
|
|
42
|
+
* Check if a value is a valid surface shorthand.
|
|
43
|
+
*
|
|
44
|
+
* @param value - The value to check
|
|
45
|
+
* @returns True if the value is a valid surface shorthand
|
|
46
|
+
* @since 2.1.0
|
|
47
|
+
*/
|
|
48
|
+
export declare function isValidSurface(value: unknown): value is SurfaceShorthand;
|
|
49
|
+
/**
|
|
50
|
+
* Get all available surface values with their descriptions.
|
|
51
|
+
*
|
|
52
|
+
* @returns Array of surface values with descriptions
|
|
53
|
+
* @since 2.1.0
|
|
54
|
+
*/
|
|
55
|
+
export declare function getSurfaceDescriptions(): Array<{
|
|
56
|
+
value: SurfaceShorthand;
|
|
57
|
+
description: string;
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Get the depth level of a surface (0-4 scale).
|
|
61
|
+
*
|
|
62
|
+
* @param surface - The surface shorthand
|
|
63
|
+
* @returns Depth level from 0 (sunken) to 4 (floating)
|
|
64
|
+
* @since 2.1.0
|
|
65
|
+
*/
|
|
66
|
+
export declare function getSurfaceDepth(surface: SurfaceShorthand): number;
|
|
67
|
+
/**
|
|
68
|
+
* Check if a surface has elevation (shadow).
|
|
69
|
+
*
|
|
70
|
+
* @param surface - The surface shorthand
|
|
71
|
+
* @returns True if the surface has elevation
|
|
72
|
+
* @since 2.1.0
|
|
73
|
+
*/
|
|
74
|
+
export declare function hasSurfaceElevation(surface: SurfaceShorthand): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Check if a surface creates an overlay (blocks content below).
|
|
77
|
+
*
|
|
78
|
+
* @param surface - The surface shorthand
|
|
79
|
+
* @returns True if the surface is an overlay
|
|
80
|
+
* @since 2.1.0
|
|
81
|
+
*/
|
|
82
|
+
export declare function isOverlaySurface(surface: SurfaceShorthand): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Get the z-index value for a surface.
|
|
85
|
+
*
|
|
86
|
+
* @param surface - The surface shorthand
|
|
87
|
+
* @returns Numeric z-index value
|
|
88
|
+
* @since 2.1.0
|
|
89
|
+
*/
|
|
90
|
+
export declare function getSurfaceZIndex(surface: SurfaceShorthand): number;
|
|
91
|
+
/**
|
|
92
|
+
* Find the best surface for a given depth level.
|
|
93
|
+
*
|
|
94
|
+
* @param depth - Target depth level (0-4)
|
|
95
|
+
* @returns The most appropriate surface shorthand
|
|
96
|
+
* @since 2.1.0
|
|
97
|
+
*/
|
|
98
|
+
export declare function getSurfaceForDepth(depth: number): SurfaceShorthand;
|
|
99
|
+
/**
|
|
100
|
+
* Get a lower surface (less elevated) for the given surface.
|
|
101
|
+
*
|
|
102
|
+
* @param surface - The current surface
|
|
103
|
+
* @returns A lower surface shorthand
|
|
104
|
+
* @since 2.1.0
|
|
105
|
+
*/
|
|
106
|
+
export declare function getLowerSurface(surface: SurfaceShorthand): SurfaceShorthand;
|
|
107
|
+
/**
|
|
108
|
+
* Get a higher surface (more elevated) for the given surface.
|
|
109
|
+
*
|
|
110
|
+
* @param surface - The current surface
|
|
111
|
+
* @returns A higher surface shorthand
|
|
112
|
+
* @since 2.1.0
|
|
113
|
+
*/
|
|
114
|
+
export declare function getHigherSurface(surface: SurfaceShorthand): SurfaceShorthand;
|
|
115
|
+
/**
|
|
116
|
+
* Get the CSS box-shadow value for a surface.
|
|
117
|
+
*
|
|
118
|
+
* @param surface - The surface shorthand
|
|
119
|
+
* @returns CSS box-shadow value
|
|
120
|
+
* @since 2.1.0
|
|
121
|
+
*/
|
|
122
|
+
export declare function getSurfaceShadow(surface: SurfaceShorthand): string;
|
|
123
|
+
/**
|
|
124
|
+
* Check if content below this surface should be dimmed.
|
|
125
|
+
*
|
|
126
|
+
* @param surface - The surface shorthand
|
|
127
|
+
* @returns True if a backdrop should be shown
|
|
128
|
+
* @since 2.1.0
|
|
129
|
+
*/
|
|
130
|
+
export declare function needsBackdrop(surface: SurfaceShorthand): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Get appropriate aria role for surface.
|
|
133
|
+
*
|
|
134
|
+
* @param surface - The surface shorthand
|
|
135
|
+
* @returns ARIA role or undefined
|
|
136
|
+
* @since 2.1.0
|
|
137
|
+
*/
|
|
138
|
+
export declare function getSurfaceRole(surface: SurfaceShorthand): string | undefined;
|
|
139
|
+
//# sourceMappingURL=surface-mappings.d.ts.map
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Groups Resolution - Standard Tier (Pattern A+a)
|
|
3
|
+
*
|
|
4
|
+
* Adds validation on top of core group expansion.
|
|
5
|
+
* Validates groups before expanding, returns config with validation result.
|
|
6
|
+
* Used by standard tier components.
|
|
7
|
+
*
|
|
8
|
+
* @composition Standard = A + a (core + validation)
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
* @module resolution/standard/groups-standard
|
|
12
|
+
* @since 3.0.0
|
|
13
|
+
*
|
|
14
|
+
* Powered by Nikkory
|
|
15
|
+
*/
|
|
16
|
+
import type { Factor24Config, VisualGroup, MotionGroup, LayoutGroup, ExperienceGroup, FactorGroups, MultiLevelProps } from '../core/types-core';
|
|
17
|
+
/**
|
|
18
|
+
* Standard result with validation.
|
|
19
|
+
* @since 3.0.0
|
|
20
|
+
*/
|
|
21
|
+
export interface StandardGroupResult {
|
|
22
|
+
readonly config: Partial<Factor24Config>;
|
|
23
|
+
readonly valid: boolean;
|
|
24
|
+
readonly errors: readonly string[];
|
|
25
|
+
readonly warnings?: readonly string[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Expand visual group to Factor24Config (standard tier).
|
|
29
|
+
* Adds validation before calling core.
|
|
30
|
+
*
|
|
31
|
+
* @param visual - The visual group to expand
|
|
32
|
+
* @returns Config with validation result
|
|
33
|
+
* @since 3.0.0
|
|
34
|
+
*/
|
|
35
|
+
export declare function expandVisualGroup(visual: VisualGroup): StandardGroupResult;
|
|
36
|
+
/**
|
|
37
|
+
* Expand motion group to Factor24Config (standard tier).
|
|
38
|
+
* Adds validation before calling core.
|
|
39
|
+
*
|
|
40
|
+
* @param motion - The motion group to expand
|
|
41
|
+
* @returns Config with validation result
|
|
42
|
+
* @since 3.0.0
|
|
43
|
+
*/
|
|
44
|
+
export declare function expandMotionGroup(motion: MotionGroup): StandardGroupResult;
|
|
45
|
+
/**
|
|
46
|
+
* Expand layout group to Factor24Config (standard tier).
|
|
47
|
+
* Adds validation before calling core.
|
|
48
|
+
*
|
|
49
|
+
* @param layout - The layout group to expand
|
|
50
|
+
* @returns Config with validation result
|
|
51
|
+
* @since 3.0.0
|
|
52
|
+
*/
|
|
53
|
+
export declare function expandLayoutGroup(layout: LayoutGroup): StandardGroupResult;
|
|
54
|
+
/**
|
|
55
|
+
* Expand experience group to Factor24Config (standard tier).
|
|
56
|
+
* Adds validation before calling core.
|
|
57
|
+
*
|
|
58
|
+
* @param experience - The experience group to expand
|
|
59
|
+
* @returns Config with validation result
|
|
60
|
+
* @since 3.0.0
|
|
61
|
+
*/
|
|
62
|
+
export declare function expandExperienceGroup(experience: ExperienceGroup): StandardGroupResult;
|
|
63
|
+
/**
|
|
64
|
+
* Expand all groups to Factor24Config (standard tier).
|
|
65
|
+
* Adds validation before calling core.
|
|
66
|
+
*
|
|
67
|
+
* @param groups - The factor groups to expand
|
|
68
|
+
* @returns Config with validation result
|
|
69
|
+
* @since 3.0.0
|
|
70
|
+
*/
|
|
71
|
+
export declare function expandGroups(groups: FactorGroups): StandardGroupResult;
|
|
72
|
+
/**
|
|
73
|
+
* Merge multiple FactorGroups (standard tier).
|
|
74
|
+
* Adds validation before calling core.
|
|
75
|
+
*
|
|
76
|
+
* @param groups - Groups to merge
|
|
77
|
+
* @returns Merged groups with validation
|
|
78
|
+
* @since 3.0.0
|
|
79
|
+
*/
|
|
80
|
+
export declare function mergeFactorGroups(...groups: Array<FactorGroups | undefined>): {
|
|
81
|
+
readonly groups: FactorGroups;
|
|
82
|
+
readonly valid: boolean;
|
|
83
|
+
readonly errors: readonly string[];
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Extract all groups from MultiLevelProps (standard tier).
|
|
87
|
+
* Adds validation after extraction.
|
|
88
|
+
*
|
|
89
|
+
* @param props - The multi-level props
|
|
90
|
+
* @returns Extracted groups with validation
|
|
91
|
+
* @since 3.0.0
|
|
92
|
+
*/
|
|
93
|
+
export declare function extractAllGroups(props: MultiLevelProps): {
|
|
94
|
+
readonly groups: FactorGroups;
|
|
95
|
+
readonly valid: boolean;
|
|
96
|
+
readonly errors: readonly string[];
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=groups-standard.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolution Standard Tier - Barrel Export
|
|
3
|
+
*
|
|
4
|
+
* Central export point for standard tier resolution modules.
|
|
5
|
+
* Core logic + validation (A+a pattern).
|
|
6
|
+
*
|
|
7
|
+
* @composition Standard = A + a (core + validation)
|
|
8
|
+
*
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
* @module resolution/standard
|
|
11
|
+
* @since 3.0.0
|
|
12
|
+
*
|
|
13
|
+
* Powered by Nikkory
|
|
14
|
+
*/
|
|
15
|
+
export type { Factor24Config, MultiLevelProps, SemanticIntent, SemanticMood, IntentDefinition, MoodModifierDefinition, PresetDefinition, LookShorthand, FeelShorthand, SurfaceShorthand, SpacingShorthand, VisualGroup, MotionGroup, LayoutGroup, ExperienceGroup, FactorGroups, } from '../core/types-core';
|
|
16
|
+
export type { ValidationResult } from './validators';
|
|
17
|
+
export { validationSuccess, validationFailure, validateFactor24Config, validateVisualGroup, validateMotionGroup, validateLayoutGroup, validateExperienceGroup, validateFactorGroups, validateShorthands, validatePresetDefinition, validatePresetId, validateIntentDefinition, validateMoodDefinition, validateIntentId, validateMoodId, } from './validators';
|
|
18
|
+
export type { StandardGroupResult } from './groups-standard';
|
|
19
|
+
export { expandVisualGroup, expandMotionGroup, expandLayoutGroup, expandExperienceGroup, expandGroups, mergeFactorGroups, extractAllGroups, } from './groups-standard';
|
|
20
|
+
export type { StandardShorthandResult, ShorthandProps } from './shorthands-standard';
|
|
21
|
+
export { LOOK_MAPPINGS, FEEL_MAPPINGS, SURFACE_MAPPINGS, SPACING_MAPPINGS, expandLook, expandFeel, expandSurface, expandSpacingShorthand, expandShorthands, } from './shorthands-standard';
|
|
22
|
+
export type { PresetRegistrationResult, PresetResolutionResult } from './presets-standard';
|
|
23
|
+
export { PRESET_STORAGE, registerPreset, registerPresets, resolvePreset, hasPreset, unregisterPreset, clearPresets, getAllPresetIds, getPresetCount, getAllPresetConfigs, } from './presets-standard';
|
|
24
|
+
export type { IntentRegistrationResult, IntentResolutionResult } from './intents-standard';
|
|
25
|
+
export { INTENT_STORAGE, MOOD_STORAGE, registerIntent, registerIntents, registerMood, registerMoods, resolveIntent, resolveMood, hasIntent, hasMood, applyMood, resolveIntentWithMood, unregisterIntent, unregisterMood, clearIntents, clearMoods, getAllIntentIds, getAllMoodIds, getIntentCount, getMoodCount, getAllIntentConfigs, getAllMoodAdjustments, } from './intents-standard';
|
|
26
|
+
export type { StandardResolutionResult, LevelDetectionResult } from './resolver-standard';
|
|
27
|
+
export { extractLevel1Factors, extractLevel2Groups, extractLevel3Shorthands, extractLevel4Preset, extractLevel5Intent, mergeConfigs, resolveProps, detectLevels, } from './resolver-standard';
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Intents Resolution - Standard Tier (Pattern A+a)
|
|
3
|
+
*
|
|
4
|
+
* Adds validation on top of core intent resolution.
|
|
5
|
+
* Validates intents and moods before registration and resolution.
|
|
6
|
+
* Used by standard tier components.
|
|
7
|
+
*
|
|
8
|
+
* @composition Standard = A + a (core + validation)
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
* @module resolution/standard/intents-standard
|
|
12
|
+
* @since 3.0.0
|
|
13
|
+
*
|
|
14
|
+
* Powered by Nikkory
|
|
15
|
+
*/
|
|
16
|
+
import type { Factor24Config, IntentDefinition, MoodModifierDefinition, SemanticIntent, SemanticMood } from '../core/types-core';
|
|
17
|
+
/**
|
|
18
|
+
* Intent storage (standard tier).
|
|
19
|
+
* @since 3.0.0
|
|
20
|
+
*/
|
|
21
|
+
export declare const INTENT_STORAGE: Map<SemanticIntent, Partial<Factor24Config>>;
|
|
22
|
+
/**
|
|
23
|
+
* Mood storage (standard tier).
|
|
24
|
+
* @since 3.0.0
|
|
25
|
+
*/
|
|
26
|
+
export declare const MOOD_STORAGE: Map<SemanticMood, Partial<Factor24Config>>;
|
|
27
|
+
/**
|
|
28
|
+
* Standard intent/mood registration result.
|
|
29
|
+
* @since 3.0.0
|
|
30
|
+
*/
|
|
31
|
+
export interface IntentRegistrationResult {
|
|
32
|
+
readonly success: boolean;
|
|
33
|
+
readonly errors: readonly string[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Standard intent/mood resolution result.
|
|
37
|
+
* @since 3.0.0
|
|
38
|
+
*/
|
|
39
|
+
export interface IntentResolutionResult {
|
|
40
|
+
readonly config?: Partial<Factor24Config>;
|
|
41
|
+
readonly valid: boolean;
|
|
42
|
+
readonly errors: readonly string[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Register an intent (standard tier).
|
|
46
|
+
* Adds validation before calling core.
|
|
47
|
+
*
|
|
48
|
+
* @param intent - The intent definition to register
|
|
49
|
+
* @returns Registration result with validation
|
|
50
|
+
* @since 3.0.0
|
|
51
|
+
*/
|
|
52
|
+
export declare function registerIntent(intent: IntentDefinition): IntentRegistrationResult;
|
|
53
|
+
/**
|
|
54
|
+
* Register multiple intents (standard tier).
|
|
55
|
+
* Adds validation before calling core.
|
|
56
|
+
*
|
|
57
|
+
* @param intents - Array of intent definitions to register
|
|
58
|
+
* @returns Registration result with validation
|
|
59
|
+
* @since 3.0.0
|
|
60
|
+
*/
|
|
61
|
+
export declare function registerIntents(intents: ReadonlyArray<IntentDefinition | undefined>): IntentRegistrationResult;
|
|
62
|
+
/**
|
|
63
|
+
* Register a mood modifier (standard tier).
|
|
64
|
+
* Adds validation before calling core.
|
|
65
|
+
*
|
|
66
|
+
* @param mood - The mood definition to register
|
|
67
|
+
* @returns Registration result with validation
|
|
68
|
+
* @since 3.0.0
|
|
69
|
+
*/
|
|
70
|
+
export declare function registerMood(mood: MoodModifierDefinition): IntentRegistrationResult;
|
|
71
|
+
/**
|
|
72
|
+
* Register multiple moods (standard tier).
|
|
73
|
+
* Adds validation before calling core.
|
|
74
|
+
*
|
|
75
|
+
* @param moods - Array of mood definitions to register
|
|
76
|
+
* @returns Registration result with validation
|
|
77
|
+
* @since 3.0.0
|
|
78
|
+
*/
|
|
79
|
+
export declare function registerMoods(moods: ReadonlyArray<MoodModifierDefinition | undefined>): IntentRegistrationResult;
|
|
80
|
+
/**
|
|
81
|
+
* Resolve an intent ID to Factor24Config (standard tier).
|
|
82
|
+
* Adds validation before calling core.
|
|
83
|
+
*
|
|
84
|
+
* @param intentId - The intent ID to resolve
|
|
85
|
+
* @returns Resolution result with validation
|
|
86
|
+
* @since 3.0.0
|
|
87
|
+
*/
|
|
88
|
+
export declare function resolveIntent(intentId: SemanticIntent): IntentResolutionResult;
|
|
89
|
+
/**
|
|
90
|
+
* Resolve a mood ID to its adjustments (standard tier).
|
|
91
|
+
* Adds validation before calling core.
|
|
92
|
+
*
|
|
93
|
+
* @param moodId - The mood ID to resolve
|
|
94
|
+
* @returns Resolution result with validation
|
|
95
|
+
* @since 3.0.0
|
|
96
|
+
*/
|
|
97
|
+
export declare function resolveMood(moodId: SemanticMood): IntentResolutionResult;
|
|
98
|
+
/**
|
|
99
|
+
* Check if an intent exists (standard tier).
|
|
100
|
+
* Adds validation before calling core.
|
|
101
|
+
*
|
|
102
|
+
* @param intentId - The intent ID to check
|
|
103
|
+
* @returns True if intent exists, with validation
|
|
104
|
+
* @since 3.0.0
|
|
105
|
+
*/
|
|
106
|
+
export declare function hasIntent(intentId: SemanticIntent): {
|
|
107
|
+
readonly exists: boolean;
|
|
108
|
+
readonly valid: boolean;
|
|
109
|
+
readonly errors: readonly string[];
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Check if a mood exists (standard tier).
|
|
113
|
+
* Adds validation before calling core.
|
|
114
|
+
*
|
|
115
|
+
* @param moodId - The mood ID to check
|
|
116
|
+
* @returns True if mood exists, with validation
|
|
117
|
+
* @since 3.0.0
|
|
118
|
+
*/
|
|
119
|
+
export declare function hasMood(moodId: SemanticMood): {
|
|
120
|
+
readonly exists: boolean;
|
|
121
|
+
readonly valid: boolean;
|
|
122
|
+
readonly errors: readonly string[];
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Apply mood adjustments to a base config (standard tier).
|
|
126
|
+
* Simple wrapper - delegates to core (configs already validated).
|
|
127
|
+
*
|
|
128
|
+
* @param baseConfig - The base configuration
|
|
129
|
+
* @param moodAdjustments - The mood adjustments to apply
|
|
130
|
+
* @returns Merged configuration
|
|
131
|
+
* @since 3.0.0
|
|
132
|
+
*/
|
|
133
|
+
export declare function applyMood(baseConfig: Partial<Factor24Config>, moodAdjustments: Partial<Factor24Config>): Partial<Factor24Config>;
|
|
134
|
+
/**
|
|
135
|
+
* Resolve intent with mood application (standard tier).
|
|
136
|
+
* Adds validation before calling core.
|
|
137
|
+
*
|
|
138
|
+
* @param intentId - The intent ID to resolve
|
|
139
|
+
* @param moodId - The mood ID to apply (optional)
|
|
140
|
+
* @returns Resolution result with validation
|
|
141
|
+
* @since 3.0.0
|
|
142
|
+
*/
|
|
143
|
+
export declare function resolveIntentWithMood(intentId: SemanticIntent, moodId?: SemanticMood): IntentResolutionResult;
|
|
144
|
+
/**
|
|
145
|
+
* Remove an intent (standard tier).
|
|
146
|
+
* Adds validation before calling core.
|
|
147
|
+
*
|
|
148
|
+
* @param intentId - The intent ID to remove
|
|
149
|
+
* @returns True if intent was removed, with validation
|
|
150
|
+
* @since 3.0.0
|
|
151
|
+
*/
|
|
152
|
+
export declare function unregisterIntent(intentId: SemanticIntent): {
|
|
153
|
+
readonly removed: boolean;
|
|
154
|
+
readonly valid: boolean;
|
|
155
|
+
readonly errors: readonly string[];
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Remove a mood (standard tier).
|
|
159
|
+
* Adds validation before calling core.
|
|
160
|
+
*
|
|
161
|
+
* @param moodId - The mood ID to remove
|
|
162
|
+
* @returns True if mood was removed, with validation
|
|
163
|
+
* @since 3.0.0
|
|
164
|
+
*/
|
|
165
|
+
export declare function unregisterMood(moodId: SemanticMood): {
|
|
166
|
+
readonly removed: boolean;
|
|
167
|
+
readonly valid: boolean;
|
|
168
|
+
readonly errors: readonly string[];
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* Clear all intents (standard tier).
|
|
172
|
+
* Simple wrapper - no validation needed.
|
|
173
|
+
*
|
|
174
|
+
* @since 3.0.0
|
|
175
|
+
*/
|
|
176
|
+
export declare function clearIntents(): void;
|
|
177
|
+
/**
|
|
178
|
+
* Clear all moods (standard tier).
|
|
179
|
+
* Simple wrapper - no validation needed.
|
|
180
|
+
*
|
|
181
|
+
* @since 3.0.0
|
|
182
|
+
*/
|
|
183
|
+
export declare function clearMoods(): void;
|
|
184
|
+
/**
|
|
185
|
+
* Get all intent IDs (standard tier).
|
|
186
|
+
* Simple wrapper - no validation needed.
|
|
187
|
+
*
|
|
188
|
+
* @returns Array of all registered intent IDs
|
|
189
|
+
* @since 3.0.0
|
|
190
|
+
*/
|
|
191
|
+
export declare function getAllIntentIds(): SemanticIntent[];
|
|
192
|
+
/**
|
|
193
|
+
* Get all mood IDs (standard tier).
|
|
194
|
+
* Simple wrapper - no validation needed.
|
|
195
|
+
*
|
|
196
|
+
* @returns Array of all registered mood IDs
|
|
197
|
+
* @since 3.0.0
|
|
198
|
+
*/
|
|
199
|
+
export declare function getAllMoodIds(): SemanticMood[];
|
|
200
|
+
/**
|
|
201
|
+
* Get total intent count (standard tier).
|
|
202
|
+
* Simple wrapper - no validation needed.
|
|
203
|
+
*
|
|
204
|
+
* @returns Total number of registered intents
|
|
205
|
+
* @since 3.0.0
|
|
206
|
+
*/
|
|
207
|
+
export declare function getIntentCount(): number;
|
|
208
|
+
/**
|
|
209
|
+
* Get total mood count (standard tier).
|
|
210
|
+
* Simple wrapper - no validation needed.
|
|
211
|
+
*
|
|
212
|
+
* @returns Total number of registered moods
|
|
213
|
+
* @since 3.0.0
|
|
214
|
+
*/
|
|
215
|
+
export declare function getMoodCount(): number;
|
|
216
|
+
/**
|
|
217
|
+
* Get all intent configs (standard tier).
|
|
218
|
+
* Simple wrapper - no validation needed.
|
|
219
|
+
*
|
|
220
|
+
* @returns Array of all intent configs
|
|
221
|
+
* @since 3.0.0
|
|
222
|
+
*/
|
|
223
|
+
export declare function getAllIntentConfigs(): Array<Partial<Factor24Config>>;
|
|
224
|
+
/**
|
|
225
|
+
* Get all mood adjustment configs (standard tier).
|
|
226
|
+
* Simple wrapper - no validation needed.
|
|
227
|
+
*
|
|
228
|
+
* @returns Array of all mood adjustment configs
|
|
229
|
+
* @since 3.0.0
|
|
230
|
+
*/
|
|
231
|
+
export declare function getAllMoodAdjustments(): Array<Partial<Factor24Config>>;
|
|
232
|
+
//# sourceMappingURL=intents-standard.d.ts.map
|