configurator library
Opt-in API for the curated configurator proof slice.
Classes
- SeoConfiguratorAction
- Closed user-intent vocabulary understood by package-owned controls.
- SeoConfiguratorConstraints
- Fixed bounds that package-owned configurator controls enforce.
- SeoConfiguratorDecrementQuantity
- Decrements quantity without moving before the configured minimum.
- SeoConfiguratorEvaluation
- Atomically validated state and view returned to a platform adapter.
- SeoConfiguratorIncrementQuantity
- Increments quantity without moving past the configured maximum.
- SeoConfiguratorSelectChoice
- Selects one entry in the package-owned single-choice group.
- SeoConfiguratorSetOption
- Sets the one package-owned boolean option.
- SeoConfiguratorState
- Complete presentation state owned independently by Flutter and the DOM.
- SeoConfiguratorView
- Fixed view values that application code may project from valid state.
Constants
- seoConfiguratorMaxAggregateLabelTextLength → const int
- Maximum raw UTF-16 length of all fixed component labels together.
- seoConfiguratorMaxAggregateTextLength → const int
- Maximum raw UTF-16 length across every application-authored text value.
- seoConfiguratorMaxAnnouncementTextLength → const int
- Maximum UTF-16 length of the package-owned polite announcement.
- seoConfiguratorMaxChoices → const int
- Largest selection group admitted by the first configurator slice.
- seoConfiguratorMaxLabelTextLength → const int
- Maximum raw UTF-16 length of one fixed component label.
- seoConfiguratorMaxPriceTextLength → const int
- Maximum UTF-16 length of the visible price slot.
- seoConfiguratorMaxQuantity → const int
- Largest quantity admitted by the package-owned bounded stepper.
- seoConfiguratorMaxSummaryTextLength → const int
- Maximum UTF-16 length of the visible summary slot.
Functions
-
buildSeoConfiguratorNodes(
{required List< SeoConfiguratorComponentChoice> choices, required List<SeoNode> optionNodes, required SeoConfiguratorConstraints constraints, required SeoConfiguratorState initialState, required SeoConfiguratorViewProjection project, String? interactionId, int headingLevel = 2, String heading = 'Configure your plan', String interactionLabel = 'Pricing configurator', String choiceGroupLabel = 'Plan', String quantityLabel = 'Quantity', String optionLabel = 'Additional option', String priceLabel = 'Estimated price', String decrementLabel = 'Decrease quantity', String incrementLabel = 'Increase quantity'}) → List<SeoNode> - Builds the complete no-script semantic source for a configurator.
-
canonicalizeSeoConfiguratorText(
String input, {required int maxLength}) → String? - Validates one bounded configurator text value and removes bidi controls.
-
evaluateInitialSeoConfiguratorView(
SeoConfiguratorViewProjection project, SeoConfiguratorState state, SeoConfiguratorConstraints constraints) → SeoConfiguratorEvaluation? - Validates an initial state and view before any platform enhancement.
-
evaluateSeoConfiguratorAction(
{required SeoConfiguratorTransition transition, required SeoConfiguratorViewProjection project, required SeoConfiguratorEvaluation current, required SeoConfiguratorAction action, required SeoConfiguratorConstraints constraints}) → SeoConfiguratorEvaluation? - Applies one action and validates state and projected view atomically.
-
initialSeoConfiguratorState(
{required SeoConfiguratorConstraints constraints, int choiceIndex = 0, int? quantity, bool optionEnabled = false}) → SeoConfiguratorState? -
Returns a canonical initial state, or
nullfor impossible constraints. -
isValidSeoConfiguratorConstraints(
SeoConfiguratorConstraints constraints) → bool -
Whether
constraintscan be represented identically on every platform. -
isValidSeoConfiguratorState(
SeoConfiguratorState state, SeoConfiguratorConstraints constraints) → bool -
Whether
statefits the fixed controls described byconstraints. -
sanitizeSeoConfiguratorText(
String input) → String - Removes directional controls that can visually reorder bounded slot text.
-
transitionSeoConfigurator(
SeoConfiguratorState state, SeoConfiguratorAction action, SeoConfiguratorConstraints constraints) → SeoConfiguratorState - Default closed transition for the package-owned configurator controls.
Typedefs
-
SeoConfiguratorComponentChoice
= ({String label, List<
SeoNode> nodes}) - Pure input for one package-owned configurator choice.
- SeoConfiguratorTransition = SeoConfiguratorState Function(SeoConfiguratorState state, SeoConfiguratorAction action, SeoConfiguratorConstraints constraints)
- Application-authored, state-free configurator transition.
- SeoConfiguratorViewProjection = SeoConfiguratorView Function(SeoConfiguratorState state)
- Application-authored, state-free projection into fixed package view slots.