@vectoriox/iox-ui 5.100.0 → 5.102.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.
@@ -2,6 +2,7 @@ import { FrameSequence } from '@vectoriox/iox-ui/media-core';
2
2
  import { DesignChoices, AnimateId, ColorScheme, DesignTokenLike, StylePreset } from '@vectoriox/iox-ui/design-core';
3
3
  import { SeoRawDoc } from '@vectoriox/iox-ui/seo-core';
4
4
  import { ContentFieldLike } from '@vectoriox/iox-ui/composite-core';
5
+ import { CheckoutGateRefusal } from '@vectoriox/iox-ui/commerce-core';
5
6
  import { ParallaxDepth } from '@vectoriox/iox-ui/scene-core';
6
7
 
7
8
  declare const SPEC_SITE_PLAN_SHAPE: {
@@ -7758,7 +7759,10 @@ declare enum BuildNoticeCode {
7758
7759
  ShopHasProducts = "shop-has-products",
7759
7760
  /** Commerce G1: the studio had never set its currency and VAT — the build stored the ones its language implies
7760
7761
  * (Hebrew: ILS and 18%), said here so the owner checks them in Settings ▸ General before setting prices. */
7761
- ShopMoneyInferred = "shop-money-inferred"
7762
+ ShopMoneyInferred = "shop-money-inferred",
7763
+ /** Commerce G2: the facts the owner gave (email, phone, address) became the shop's contact details where it had none
7764
+ * — said, so the owner adds what only they know (the legal name, the business number) in Shop ▸ Settings. */
7765
+ ShopBusinessFromFacts = "shop-business-from-facts"
7762
7766
  }
7763
7767
  interface BuildNotice {
7764
7768
  code: string;
@@ -8578,6 +8582,13 @@ declare enum SiteFindingCode {
8578
8582
  /** Commerce G1 (shop-aware §3i): a sample product the build added still has no price — a price is a fact a buyer is
8579
8583
  * held to, so the owner sets it (or removes the sample) before the store goes live. */
8580
8584
  SamplePrice = "sample-price",
8585
+ /** Commerce G2: a sample product the build added has no stock count yet — how many the owner has is theirs to say;
8586
+ * unanswered, the sample is sold out to every visitor (the build never invents stock). */
8587
+ SampleStock = "sample-stock",
8588
+ /** Commerce G2 (R-H8): a site that sells, while the checkout gate (commerce-core `checkoutGate`, C-D19) still refuses
8589
+ * one of its facts — a way to get paid, delivery, the business's identity, the owner's own legal pages. Each is the
8590
+ * owner's to answer, never written for them; the finding carries the gate's code in `fact`. */
8591
+ StoreFact = "store-fact",
8581
8592
  StockPhoto = "stock-photo",
8582
8593
  /** M7: a picture made with AI for the site still stands where one of the studio's own could. */
8583
8594
  MadePicture = "made-picture",
@@ -8605,6 +8616,8 @@ interface SiteFinding {
8605
8616
  nodeId?: string;
8606
8617
  /** The global slot (`header` / `footer`) when it is in a global. */
8607
8618
  owner?: string;
8619
+ /** `store-fact`: the checkout gate's code (commerce-core `CheckoutGateCode`) — which fact, so a screen can open where it is answered. */
8620
+ fact?: string;
8608
8621
  }
8609
8622
  interface SiteCheck {
8610
8623
  id: SiteCheckId;
@@ -8653,6 +8666,19 @@ interface SiteAuditSnapshot {
8653
8666
  id: string;
8654
8667
  label?: string;
8655
8668
  }>;
8669
+ /** Commerce G2: sample products (`isSample`) whose stock count was never set. */
8670
+ unstockedSamples?: ReadonlyArray<{
8671
+ id: string;
8672
+ label?: string;
8673
+ }>;
8674
+ /**
8675
+ * Commerce G2: what the checkout gate refuses for this studio (commerce-core `checkoutGate(…).refusals`) and the
8676
+ * studio's language its words are said in. Read only when the site sells (`siteSells`).
8677
+ */
8678
+ store?: {
8679
+ refusals: ReadonlyArray<Pick<CheckoutGateRefusal, 'code' | 'label'>>;
8680
+ lang?: string | null;
8681
+ } | null;
8656
8682
  /** Stock photos a build placed that are still on the page. */
8657
8683
  stock?: ReadonlyArray<{
8658
8684
  nodeId: string;
@@ -8676,6 +8702,8 @@ interface SiteAuditOptions {
8676
8702
  /** Audit as if only this page were being published (its own page checks + every site-wide one). */
8677
8703
  pageId?: string;
8678
8704
  }
8705
+ /** Commerce G2: the site sells — a page or a global holds a part that puts a product in the bag or opens the checkout. */
8706
+ declare function siteSells(snapshot: Pick<SiteAuditSnapshot, 'pages' | 'globals'>): boolean;
8679
8707
  /** A route pattern (`/work/:slug`) matches a concrete path (`/work/blue-bowl`). */
8680
8708
  declare function routeMatches(pattern: string, path: string): boolean;
8681
8709
  /** Run the eight checks. `pageId` narrows the page checks to the page being published; site-wide ones always run. */
@@ -10074,5 +10102,5 @@ declare function applyLayoutEdits(page: LayoutPage, edits: ReadonlyArray<LayoutE
10074
10102
  /** The strict format a repair is asked in: `{ edits: [{ op, path, value }] }`, every key required. */
10075
10103
  declare function layoutRepairJsonSchema(): JsonSchema;
10076
10104
 
10077
- export { ACCOUNT_ENTRY_ID, ACTION_START_SCALE, ACTIVE_BUILD_STATUSES, AI_REFUSAL_NEXT, AI_REFUSAL_STATUS, AI_STEPS, AI_STEP_LABELS, AI_STEP_NEEDS, AI_STEP_PART_TOKENS, AI_STEP_TYPICAL_TOKENS, ART_DIRECTION_PARTS, AiCallStatus, AiCapability, AiFeature, AiGenerationStage, AiKeyMode, AiLimit, AiNextKind, AiProviderId, AiRefusalCode, AiStep, BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BUILD_STEPS, BaselineRole, BindScope, BuildNoticeCode, BuildStep, CONTENT_ROLE_MEANINGS, CREDITS_PER_USD, CardBindTarget, CheckSeverity, ComposeError, ComposeIssueCode, ContentFieldControl, ContentFieldType, ContentRole, ContentTypeAction, CreatedKind, DANGLING_LINK_CODES, DEFAULT_PHONE_MENU_BREAKPOINT, DEFAULT_SITE_LOCALE, ENTRANCE_EASING, ENTRANCE_ORIGIN_LOOK, ENTRANCE_TRIGGER, EntrancePart, EntranceSide, FACT_KEYS, FIELD_TYPE_OF_CONTROL, FILL_ASPECT, FILM_PATTERN, FINAL_GENERATION_STAGES, FINDING_SEVERITY, FilmUnplaced, GRAMMAR_TOO_LARGE_MESSAGE, GlobalSlot, HEBREW_PREFIXES, JSON_SCHEMA_BANNED_KEYWORDS, JsonSchemaShapeError, KeptReason, LAYOUT_ACCENT_TEXT, LAYOUT_BEAT_DELAY, LAYOUT_CHECK_VIEWPORT, LAYOUT_COLOUR_TOKEN, LAYOUT_COLUMN_GAP, LAYOUT_DEPTH_ON_PHONE, LAYOUT_DRIFT, LAYOUT_EASING, LAYOUT_ENTRANCE_MAX_MS, LAYOUT_FONT_SIZE, LAYOUT_GUTTER, LAYOUT_HIDDEN_OPACITY, LAYOUT_KINETIC_KINDS, LAYOUT_LINE_HEIGHT, LAYOUT_OPERATED, LAYOUT_PACE, LAYOUT_PHONE_BREAKPOINT, LAYOUT_PHONE_PADDING, LAYOUT_PHOTO_ASPECT, LAYOUT_READY_MADE_TOKEN, LAYOUT_RISE, LAYOUT_SCREEN_PX, LAYOUT_TEXT_KINDS, LAYOUT_TOOLTIP_TRAIT, LAYOUT_VIEWPORTS, LAYOUT_WIRE_AUTOPLAY_MS, LayoutAlign, LayoutBleed, LayoutButtonVariant, LayoutColour, LayoutColourMode, LayoutDepth, LayoutDial, LayoutEase, LayoutEditOp, LayoutEnter, LayoutGalleryEffect, LayoutGapCode, LayoutIssueCode, LayoutLayerKind, LayoutMendKind, LayoutNavKind, LayoutPace, LayoutPhotoShape, LayoutPhotoSource, LayoutRole, LayoutSectionKind, LayoutSequenceToken, LayoutSide, LayoutSignatureId, LayoutSize, LayoutSourceChoice, LayoutTrackProp, LayoutTransition, LayoutViewport, MAX_SITE_PICTURES, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NO_TOKENS, NavPagesSource, NavRole, NavShape, NavShapeError, PAGE_ARCHETYPES, PHOTO_ANALYSIS_WIDTH, PHOTO_CALM_DETAIL, PHOTO_GRID, PHOTO_LIGHT_LUMINANCE, PICTURE_ASPECTS, PICTURE_NEVER, PICTURE_REAL_PLACE_FAMILIES, PICTURE_REROLL_EVERY, PICTURE_REVIEW_FORMAT, PICTURE_REVIEW_SHAPE, PICTURE_TEXT_CONTRAST, PICTURE_WORLDS, PICTURE_WORLD_IDS, PLAN_EDITS_ANSWER_SHAPES, PLAN_EDITS_PART_SCHEMA_NAMES, PLAN_EDIT_OP_PART, PLAN_EDIT_SHAPE, PLAN_EDIT_WIRE_KEYS, PLAN_PARTS, PLAN_PART_KEYS, PLAN_WIRE_DERIVED, PLAN_WIRE_PART_SCHEMA_NAMES, PLAN_WIRE_SHAPE, PRICING_PATTERN, PROOF_FINGERPRINTS, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PhotoTone, PictureRefusal, PictureWorld, PlaceholderKind, PlanChangeAction, PlanChangeKind, PlanDataSourceMode, PlanDataSourceType, PlanEditIssueCode, PlanEditOp, PlanEditsOutcome, PlanPart, PlanWireEntry, PlanWireShapeError, PlanWordIssueCode, PreflightRefusalCode, PriceBindTarget, PublishRefusalCode, RENDER_CHECK, REQUIRED_CONTENT_ROLES, RelativeOp, SAMPLE_IMAGE_REF, SCENE_LEVEL, SCENE_OTHER_PAGES, SCRIM_BACKGROUND, SCRIM_COVER, SCRIM_LEVELS, SHOP_CART_BUTTON_ID, SHOP_CART_DRAWER_ID, SHOP_FIELDS, SHOP_LATEST_LIMIT, SHOP_LIST_LIMIT, SHOP_NEED, SHOP_ONLY_CONTENT_ROLES, SHOP_PRODUCTS_MAX, SHOP_ROLES, SHOP_SLUG_FIELD, SHOWCASE_FILM, SHOWCASE_SHOP, SIGN_IN_DIALOG_ID, SITE_CHECKS, SITE_FACT_LABELS, SITE_HEADER_PATTERN, SITE_LIBRARY, SITE_LOCALES, SITE_NEED_IDS, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_ARCHETYPES, SPEC_SITE_COPY_LENGTHS, SPEC_SITE_DENSITY_COPY, SPEC_SITE_FACTS, SPEC_SITE_LAYOUT, SPEC_SITE_LIBRARY, SPEC_SITE_LOCALES, SPEC_SITE_NEED_IDS, SPEC_SITE_PATTERNS, SPEC_SITE_PICTURE_NEVER, SPEC_SITE_PICTURE_WORLDS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_REQUIRED_ROLES, SPEC_SITE_ROLES, SPEC_SITE_TEMPLATES, STOCK_FAMILIES, STOCK_FAMILY_INTENTS, STOCK_INTENT_ORDER, STOCK_INTENT_SUBJECTS, STOCK_ITEM_ASPECT, STOCK_MIN_KEPT, STOCK_PROVIDER_TERMS, STOCK_SEED_MARGIN, STOCK_SUBJECT_WORDS, STRICT_SCHEMA_BUDGET, STRICT_SCHEMA_LIMITS, STUDIO_TEMPLATE, ScrimLevel, SectionFallbackLastResort, SectionSwapAction, SectionSwapRule, ShopResource, ShopSourceRole, SiteBuildKind, SiteBuildStatus, SiteCheckId, SiteFindingCode, SiteLocale, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, StepState, StockIntent, StockOrientation, StockProviderId, StockReviewFlag, StockReviewVerdict, StockSlotKind, StockSubject, WORDS_AREA_DEFAULT_SHARE, WordsEdge, addBarItem, addStockCredits, aiRefusalNext, aiStepParts, applyLayoutEdits, applyOwnPhotoGalleries, applyPictureScrims, applyPlanEdits, applyStockItemPhotos, applyStockPhotos, archetypeIssues, areaLuminance, artDirectionFor, artDirectionIssues, artDirectionPreamble, aspectRatioOf, assertStyleSlots, assertValidSitePlan, auditLayoutMotion, auditSite, barIconForRoute, blocksPublish, brandHueWord, buildKeys, buildStepFacts, buildStepsOf, builtHomePageId, calmParts, calmUnder, checkLayout, chooseScrim, composeContextOf, composeLayout, composeNavHeader, composePresetForm, composeSection, composeSite, contentTypeOfSource, contentTypePreviewFields, contentTypeToWire, copyLengthOf, costUsd, coverCrop, createSerializedNode, creditsOfUsd, dataSourceToWire, derivedBeats, derivedDataSources, derivedShopSources, describeInventoryForPrompt, describePlanData, describeShapeKey, driftAt, driftOverlap, emptyAreaPhrase, entranceAction, entranceInteraction, estimatePictures, estimateStepCredits, expandLayoutWire, expandPlanWire, expandWireContentType, expandWireDataSource, expandWireEdit, expandWireField, expandWirePage, expandWireSection, expandWireShop, failedBuildStep, fallBackBySection, fieldToWire, filmOfPlan, filmPlacement, findNavRoot, fingerprintOf, frameWords, isActiveBuild, isLayoutRule, isNonEmptyString, isPictureWorld, isPlainObject, isRtlLocale, isShopResource, jsonAnyOf, jsonBoolean, jsonClosedObject, jsonInteger, jsonListOf, jsonOneOf, jsonSchemaKeywords, jsonSchemaObjects, jsonShapedObject, jsonText, judgeLayoutRender, layerShownSpans, layoutBandScheme, layoutBoxPx, layoutColumnsVw, layoutDesignOf, layoutDialOf, layoutDriftPhoto, layoutElementStyle, layoutGalleryLists, layoutGallerySources, layoutGlideDepth, layoutHeldStill, layoutLookChanges, layoutLookOf, layoutMotionOf, layoutNodeClass, layoutOpeningDisplayMend, layoutOpeningDisplays, layoutPathSteps, layoutPhotoIds, layoutPresetColours, layoutPresetOf, layoutRepairJsonSchema, layoutRoomPx, layoutRuleEdge, layoutShapeHasPurpose, layoutStillLine, layoutTextFits, layoutTextWidthEm, layoutToWire, layoutVoidScreens, layoutVoids, layoutWireJsonSchema, luminanceOf, measureLayout, mendLayout, modelCanDo, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, orientationOfRatio, ownPhotoFit, pageToWire, parseLayoutPhotoId, parsePatternPath, parseSampleImageRef, pathAt, patternById, patternHasForm, patternLinkSlots, patternListGap, patternManifest, patternNeedsBinding, patternNodes, patternOptionalParts, patternRoleNeeds, patternScopes, patternSlotBudgets, patternSlots, patternTakesBinding, phoneGapBefore, phoneMenuPages, phoneWordsColour, photoInventory, photoShapeOf, pictureAspect, pictureItemsOf, picturePrompt, pictureRefusalOf, pictureRerolls, pictureReviewIssues, pictureReviewJsonSchema, pictureReviewPasses, pictureSlotKey, pictureTargets, pictureTryFits, pixelsUnder, placeFilm, planEditOps, planEditToWire, planEditWireGaps, planEditWireKeys, planEditWireOps, planEditWireShape, planEditsFromWire, planEditsJsonSchema, planEditsToWire, planEntrances, planFromTemplate, planHasShopSource, planLayoutPhotos, planNavShape, planOwnPhotos, planPartOfPath, planPartToWire, planPictures, planSells, planStockPhotos, planToWire, planWireGaps, planWirePartJsonSchema, planWirePartShape, planWordIssues, pricesIn, publishRefusal, publishVerdict, readyMadeColumn, recipeListBinds, recomposeAsks, releasedLayoutDefaults, removeBarItem, requiredAcknowledgements, requiredShapeKeys, roleField, routeMatches, routeParams, samenessIssues, sampleImageRef, scoreStockPhoto, screenFontSize, screenWordColumns, screenWordMisfit, screenWordOverflowPx, sectionEntrances, sectionPatternIds, sectionToWire, sectionsNamed, sequenceShare, sequenceTokenOf, setStyleProps, shapeKeys, shopCategoriesOf, shopContentType, shopSourceAliases, showcaseGlobals, showcasePages, showcasePlans, showcaseScenes, showcaseStorePages, shownTogether, signatureOf, siteNavPages, slotBudget, splitSide, stockCopyKey, stockCreditLine, stockCreditLines, stockCreditNode, stockCreditNodeId, stockFits, stockGroupOf, stockItemSlots, stockKept, stockPhotoRatio, stockPhotoSubject, stockPhotoUsable, stockPhotoWords, stockSlots, stockWord, stockWords, strictSchemaComplexity, strictSchemaRefusal, toneOf, typicalStepTokens, validatePlanEdits, validateSitePlan, variantNamesOf, walkSerialized, wireContentTypeJsonSchema, wireDataSourceJsonSchema, wireFieldJsonSchema, wirePageJsonSchema, wireSectionJsonSchema, wireShopProductJsonSchema, withDerivedSources, wordPattern, wordsOverPhotos, wordsOverPicture, writtenTexts };
10105
+ export { ACCOUNT_ENTRY_ID, ACTION_START_SCALE, ACTIVE_BUILD_STATUSES, AI_REFUSAL_NEXT, AI_REFUSAL_STATUS, AI_STEPS, AI_STEP_LABELS, AI_STEP_NEEDS, AI_STEP_PART_TOKENS, AI_STEP_TYPICAL_TOKENS, ART_DIRECTION_PARTS, AiCallStatus, AiCapability, AiFeature, AiGenerationStage, AiKeyMode, AiLimit, AiNextKind, AiProviderId, AiRefusalCode, AiStep, BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BUILD_STEPS, BaselineRole, BindScope, BuildNoticeCode, BuildStep, CONTENT_ROLE_MEANINGS, CREDITS_PER_USD, CardBindTarget, CheckSeverity, ComposeError, ComposeIssueCode, ContentFieldControl, ContentFieldType, ContentRole, ContentTypeAction, CreatedKind, DANGLING_LINK_CODES, DEFAULT_PHONE_MENU_BREAKPOINT, DEFAULT_SITE_LOCALE, ENTRANCE_EASING, ENTRANCE_ORIGIN_LOOK, ENTRANCE_TRIGGER, EntrancePart, EntranceSide, FACT_KEYS, FIELD_TYPE_OF_CONTROL, FILL_ASPECT, FILM_PATTERN, FINAL_GENERATION_STAGES, FINDING_SEVERITY, FilmUnplaced, GRAMMAR_TOO_LARGE_MESSAGE, GlobalSlot, HEBREW_PREFIXES, JSON_SCHEMA_BANNED_KEYWORDS, JsonSchemaShapeError, KeptReason, LAYOUT_ACCENT_TEXT, LAYOUT_BEAT_DELAY, LAYOUT_CHECK_VIEWPORT, LAYOUT_COLOUR_TOKEN, LAYOUT_COLUMN_GAP, LAYOUT_DEPTH_ON_PHONE, LAYOUT_DRIFT, LAYOUT_EASING, LAYOUT_ENTRANCE_MAX_MS, LAYOUT_FONT_SIZE, LAYOUT_GUTTER, LAYOUT_HIDDEN_OPACITY, LAYOUT_KINETIC_KINDS, LAYOUT_LINE_HEIGHT, LAYOUT_OPERATED, LAYOUT_PACE, LAYOUT_PHONE_BREAKPOINT, LAYOUT_PHONE_PADDING, LAYOUT_PHOTO_ASPECT, LAYOUT_READY_MADE_TOKEN, LAYOUT_RISE, LAYOUT_SCREEN_PX, LAYOUT_TEXT_KINDS, LAYOUT_TOOLTIP_TRAIT, LAYOUT_VIEWPORTS, LAYOUT_WIRE_AUTOPLAY_MS, LayoutAlign, LayoutBleed, LayoutButtonVariant, LayoutColour, LayoutColourMode, LayoutDepth, LayoutDial, LayoutEase, LayoutEditOp, LayoutEnter, LayoutGalleryEffect, LayoutGapCode, LayoutIssueCode, LayoutLayerKind, LayoutMendKind, LayoutNavKind, LayoutPace, LayoutPhotoShape, LayoutPhotoSource, LayoutRole, LayoutSectionKind, LayoutSequenceToken, LayoutSide, LayoutSignatureId, LayoutSize, LayoutSourceChoice, LayoutTrackProp, LayoutTransition, LayoutViewport, MAX_SITE_PICTURES, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NO_TOKENS, NavPagesSource, NavRole, NavShape, NavShapeError, PAGE_ARCHETYPES, PHOTO_ANALYSIS_WIDTH, PHOTO_CALM_DETAIL, PHOTO_GRID, PHOTO_LIGHT_LUMINANCE, PICTURE_ASPECTS, PICTURE_NEVER, PICTURE_REAL_PLACE_FAMILIES, PICTURE_REROLL_EVERY, PICTURE_REVIEW_FORMAT, PICTURE_REVIEW_SHAPE, PICTURE_TEXT_CONTRAST, PICTURE_WORLDS, PICTURE_WORLD_IDS, PLAN_EDITS_ANSWER_SHAPES, PLAN_EDITS_PART_SCHEMA_NAMES, PLAN_EDIT_OP_PART, PLAN_EDIT_SHAPE, PLAN_EDIT_WIRE_KEYS, PLAN_PARTS, PLAN_PART_KEYS, PLAN_WIRE_DERIVED, PLAN_WIRE_PART_SCHEMA_NAMES, PLAN_WIRE_SHAPE, PRICING_PATTERN, PROOF_FINGERPRINTS, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PhotoTone, PictureRefusal, PictureWorld, PlaceholderKind, PlanChangeAction, PlanChangeKind, PlanDataSourceMode, PlanDataSourceType, PlanEditIssueCode, PlanEditOp, PlanEditsOutcome, PlanPart, PlanWireEntry, PlanWireShapeError, PlanWordIssueCode, PreflightRefusalCode, PriceBindTarget, PublishRefusalCode, RENDER_CHECK, REQUIRED_CONTENT_ROLES, RelativeOp, SAMPLE_IMAGE_REF, SCENE_LEVEL, SCENE_OTHER_PAGES, SCRIM_BACKGROUND, SCRIM_COVER, SCRIM_LEVELS, SHOP_CART_BUTTON_ID, SHOP_CART_DRAWER_ID, SHOP_FIELDS, SHOP_LATEST_LIMIT, SHOP_LIST_LIMIT, SHOP_NEED, SHOP_ONLY_CONTENT_ROLES, SHOP_PRODUCTS_MAX, SHOP_ROLES, SHOP_SLUG_FIELD, SHOWCASE_FILM, SHOWCASE_SHOP, SIGN_IN_DIALOG_ID, SITE_CHECKS, SITE_FACT_LABELS, SITE_HEADER_PATTERN, SITE_LIBRARY, SITE_LOCALES, SITE_NEED_IDS, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_ARCHETYPES, SPEC_SITE_COPY_LENGTHS, SPEC_SITE_DENSITY_COPY, SPEC_SITE_FACTS, SPEC_SITE_LAYOUT, SPEC_SITE_LIBRARY, SPEC_SITE_LOCALES, SPEC_SITE_NEED_IDS, SPEC_SITE_PATTERNS, SPEC_SITE_PICTURE_NEVER, SPEC_SITE_PICTURE_WORLDS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_REQUIRED_ROLES, SPEC_SITE_ROLES, SPEC_SITE_TEMPLATES, STOCK_FAMILIES, STOCK_FAMILY_INTENTS, STOCK_INTENT_ORDER, STOCK_INTENT_SUBJECTS, STOCK_ITEM_ASPECT, STOCK_MIN_KEPT, STOCK_PROVIDER_TERMS, STOCK_SEED_MARGIN, STOCK_SUBJECT_WORDS, STRICT_SCHEMA_BUDGET, STRICT_SCHEMA_LIMITS, STUDIO_TEMPLATE, ScrimLevel, SectionFallbackLastResort, SectionSwapAction, SectionSwapRule, ShopResource, ShopSourceRole, SiteBuildKind, SiteBuildStatus, SiteCheckId, SiteFindingCode, SiteLocale, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, StepState, StockIntent, StockOrientation, StockProviderId, StockReviewFlag, StockReviewVerdict, StockSlotKind, StockSubject, WORDS_AREA_DEFAULT_SHARE, WordsEdge, addBarItem, addStockCredits, aiRefusalNext, aiStepParts, applyLayoutEdits, applyOwnPhotoGalleries, applyPictureScrims, applyPlanEdits, applyStockItemPhotos, applyStockPhotos, archetypeIssues, areaLuminance, artDirectionFor, artDirectionIssues, artDirectionPreamble, aspectRatioOf, assertStyleSlots, assertValidSitePlan, auditLayoutMotion, auditSite, barIconForRoute, blocksPublish, brandHueWord, buildKeys, buildStepFacts, buildStepsOf, builtHomePageId, calmParts, calmUnder, checkLayout, chooseScrim, composeContextOf, composeLayout, composeNavHeader, composePresetForm, composeSection, composeSite, contentTypeOfSource, contentTypePreviewFields, contentTypeToWire, copyLengthOf, costUsd, coverCrop, createSerializedNode, creditsOfUsd, dataSourceToWire, derivedBeats, derivedDataSources, derivedShopSources, describeInventoryForPrompt, describePlanData, describeShapeKey, driftAt, driftOverlap, emptyAreaPhrase, entranceAction, entranceInteraction, estimatePictures, estimateStepCredits, expandLayoutWire, expandPlanWire, expandWireContentType, expandWireDataSource, expandWireEdit, expandWireField, expandWirePage, expandWireSection, expandWireShop, failedBuildStep, fallBackBySection, fieldToWire, filmOfPlan, filmPlacement, findNavRoot, fingerprintOf, frameWords, isActiveBuild, isLayoutRule, isNonEmptyString, isPictureWorld, isPlainObject, isRtlLocale, isShopResource, jsonAnyOf, jsonBoolean, jsonClosedObject, jsonInteger, jsonListOf, jsonOneOf, jsonSchemaKeywords, jsonSchemaObjects, jsonShapedObject, jsonText, judgeLayoutRender, layerShownSpans, layoutBandScheme, layoutBoxPx, layoutColumnsVw, layoutDesignOf, layoutDialOf, layoutDriftPhoto, layoutElementStyle, layoutGalleryLists, layoutGallerySources, layoutGlideDepth, layoutHeldStill, layoutLookChanges, layoutLookOf, layoutMotionOf, layoutNodeClass, layoutOpeningDisplayMend, layoutOpeningDisplays, layoutPathSteps, layoutPhotoIds, layoutPresetColours, layoutPresetOf, layoutRepairJsonSchema, layoutRoomPx, layoutRuleEdge, layoutShapeHasPurpose, layoutStillLine, layoutTextFits, layoutTextWidthEm, layoutToWire, layoutVoidScreens, layoutVoids, layoutWireJsonSchema, luminanceOf, measureLayout, mendLayout, modelCanDo, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, orientationOfRatio, ownPhotoFit, pageToWire, parseLayoutPhotoId, parsePatternPath, parseSampleImageRef, pathAt, patternById, patternHasForm, patternLinkSlots, patternListGap, patternManifest, patternNeedsBinding, patternNodes, patternOptionalParts, patternRoleNeeds, patternScopes, patternSlotBudgets, patternSlots, patternTakesBinding, phoneGapBefore, phoneMenuPages, phoneWordsColour, photoInventory, photoShapeOf, pictureAspect, pictureItemsOf, picturePrompt, pictureRefusalOf, pictureRerolls, pictureReviewIssues, pictureReviewJsonSchema, pictureReviewPasses, pictureSlotKey, pictureTargets, pictureTryFits, pixelsUnder, placeFilm, planEditOps, planEditToWire, planEditWireGaps, planEditWireKeys, planEditWireOps, planEditWireShape, planEditsFromWire, planEditsJsonSchema, planEditsToWire, planEntrances, planFromTemplate, planHasShopSource, planLayoutPhotos, planNavShape, planOwnPhotos, planPartOfPath, planPartToWire, planPictures, planSells, planStockPhotos, planToWire, planWireGaps, planWirePartJsonSchema, planWirePartShape, planWordIssues, pricesIn, publishRefusal, publishVerdict, readyMadeColumn, recipeListBinds, recomposeAsks, releasedLayoutDefaults, removeBarItem, requiredAcknowledgements, requiredShapeKeys, roleField, routeMatches, routeParams, samenessIssues, sampleImageRef, scoreStockPhoto, screenFontSize, screenWordColumns, screenWordMisfit, screenWordOverflowPx, sectionEntrances, sectionPatternIds, sectionToWire, sectionsNamed, sequenceShare, sequenceTokenOf, setStyleProps, shapeKeys, shopCategoriesOf, shopContentType, shopSourceAliases, showcaseGlobals, showcasePages, showcasePlans, showcaseScenes, showcaseStorePages, shownTogether, signatureOf, siteNavPages, siteSells, slotBudget, splitSide, stockCopyKey, stockCreditLine, stockCreditLines, stockCreditNode, stockCreditNodeId, stockFits, stockGroupOf, stockItemSlots, stockKept, stockPhotoRatio, stockPhotoSubject, stockPhotoUsable, stockPhotoWords, stockSlots, stockWord, stockWords, strictSchemaComplexity, strictSchemaRefusal, toneOf, typicalStepTokens, validatePlanEdits, validateSitePlan, variantNamesOf, walkSerialized, wireContentTypeJsonSchema, wireDataSourceJsonSchema, wireFieldJsonSchema, wirePageJsonSchema, wireSectionJsonSchema, wireShopProductJsonSchema, withDerivedSources, wordPattern, wordsOverPhotos, wordsOverPicture, writtenTexts };
10078
10106
  export type { AddBarItemResult, AiBuyCredits, AiEntitlementsView, AiMeter, AiModelEntry, AiRefusal, AiTokenCounts, AiTokenPrice, AreaLuminance, ArtDirection, AuditPage, AuditPlaceholder, BarItemsEditResult, BuildNotice, BuildStepError, BuildStepFacts, BuildStepRecord, CalmReading, CheckLayoutContext, CmsDataSourcePlan, ComposeContext, ComposeIssue, ComposeLayoutOptions, ComposedDataSource, ComposedItem, ComposedLayout, ComposedNavHeader, ComposedPage, ComposedPlaceholder, ComposedProduct, ComposedRoute, ComposedSection, ComposedShop, ComposedSite, ContentFieldPlan, ContentRoles, ContentSeedPlan, ContentTypePlan, CreateNodeOptions, CreatedRecord, DataSourcePlan, DriftBox, DriftLayer, DriftMeeting, DynamicKeysAsList, EntranceAction, EntranceActionOptions, EntranceInteraction, EntranceMark, EntranceSpec, EntranceStamp, FactKey, FilmPlacement, FilmTarget, FingerprintedPage, FrameRegion, JsonSchema, LayoutBandMove, LayoutColours, LayoutEdit, LayoutFingerprint, LayoutForm, LayoutGallery, LayoutGalleryList, LayoutGap, LayoutGivenAway, LayoutIssue, LayoutLayer, LayoutLook, LayoutMend, LayoutPage, LayoutPhotoAddress, LayoutReadyMade, LayoutRect, LayoutSection, LayoutSite, LayoutTrack, LayoutVoid, LayoutWire, LayoutWireLayer, LayoutWireSection, LayoutWireSlot, LayoutWireTrack, MeasuredLayer, MeasuredLayout, NavHeaderInput, NavHeaderOptions, NavPage, NavShapeOptions, NavShapeResult, NodeBaseline, OwnPhoto, OwnPhotoPlacement, PageArchetype, PageArchetypeId, PageArchetypeSlot, PageData, PageDataLine, PagePlan, PageSectionPlan, PageSeoPlan, PathIssue, PatternManifestEntry, PatternManifestOptions, PatternNode, PatternPath, PatternRoleNeed, PatternTrack, PhotoInventory, PhotoWordsArea, PicturePlan, PicturePlanOptions, PicturePromptContext, PictureReview, PictureSlot, PictureTryBudget, PictureWorldSpec, PicturesEstimate, PixelReading, PlacedFilm, PlainObject, PlanChange, PlanDirection, PlanEdit, PlanEditIssue, PlanEditResult, PlanEditsAnswer, PlanEntrancesInput, PlanFilm, PlanWireContext, PlanWireParts, PlanWordContext, PlanWordIssue, PreflightRefusal, PublishRefusal, RecipeListBinds, RelativeDataSourcePlan, ScrimChoice, SectionEntrances, SectionFallback, SectionInput, SectionJudge, SectionOptions, SectionSwap, SerializedBinding, SerializedNode, SerializedResponsive, ShapeEntry, ShapeIssueCodes, ShopDataSourcePlan, ShopOptionPlan, ShopPlan, ShopProductPlan, ShowcaseInput, SiteAudit, SiteAuditOptions, SiteAuditSnapshot, SiteBuildRun, SiteBusiness, SiteCheck, SiteFinding, SiteNeedId, SitePageRef, SitePattern, SitePlan, SitePlanContext, SitePlanIssue, SitePlanSource, SitePlanValidation, SiteTemplate, StockCredit, StockItemSlot, StockLink, StockNeed, StockPhoto, StockPhotoTraits, StockPlacement, StockPlanOptions, StockProviderTerms, StockReview, StockSlot, StockTarget, StrictSchemaComplexity, StrictSchemaRefusal, TemplatePlanInput, UndoKept, UndoPreview, UndoRecord, WireOptions, WordsArea, WrittenText };
@@ -12,10 +12,11 @@ declare enum SignInPurpose {
12
12
  /** portal.iox.studio. */
13
13
  Portal = "portal"
14
14
  }
15
- /** A provider the broker runs. Google is live; the rest join one adapter at a time (board 18). */
15
+ /** A provider the broker runs (board 18). The enum's order is the order every sign-in shows them in. Each id is the path
16
+ * segment of the ONE address registered with that provider: `https://auth.iox.studio/<id>/callback`. */
16
17
  declare enum SignInProvider {
17
18
  Google = "google",
18
- Meta = "meta",
19
+ Facebook = "facebook",
19
20
  GitHub = "github",
20
21
  LinkedIn = "linkedin"
21
22
  }
@@ -28,10 +29,13 @@ interface SignInProviderSpec {
28
29
  readonly protocol: SignInProtocol;
29
30
  /** The answer is signed, so a studio can check it itself — the only kind an admin may sign in with (C-D6). */
30
31
  readonly signedAnswer: boolean;
31
- /** Running on the broker today. */
32
+ /** The broker has an adapter for it. Whether it is ON (both keys in the broker's env) is the broker's answer to
33
+ * `BrokerApiRoute.Providers`, read at run time — never a release. */
32
34
  readonly live: boolean;
33
35
  }
34
36
  declare const SIGN_IN_PROVIDER_SPECS: Readonly<Record<SignInProvider, SignInProviderSpec>>;
37
+ /** Every provider, in the order a sign-in shows them. */
38
+ declare const SIGN_IN_PROVIDERS: ReadonlyArray<SignInProvider>;
35
39
  declare function isSignInProvider(value: unknown): value is SignInProvider;
36
40
  declare function isSignInPurpose(value: unknown): value is SignInPurpose;
37
41
  /** May `provider` serve `purpose`? Buyers and the portal take any provider; a team member only a signed answer (C-D6). */
@@ -45,8 +49,18 @@ declare const SIGN_IN_HANDOFF_TTL_SECONDS = 60;
45
49
  /** The server-to-server routes on the control plane's API host (bearer: the studio's INSTANCE_TOKEN). */
46
50
  declare enum BrokerApiRoute {
47
51
  Tickets = "instances/me/sign-in/tickets",
48
- Redeem = "instances/me/sign-in/redeem"
49
- }
52
+ Redeem = "instances/me/sign-in/redeem",
53
+ /** `GET` → only the providers that are ON: `{ "google": true }` (`SignInProvidersAnswer`). */
54
+ Providers = "instances/me/sign-in/providers"
55
+ }
56
+ /** `GET instances/me/sign-in/providers` — each provider that is ON, `true`; an off one is absent. */
57
+ type SignInProvidersAnswer = Partial<Record<SignInProvider, true>>;
58
+ /** The providers ON in a broker's answer, in the order a sign-in shows them; anything else in the body is ignored. */
59
+ declare function providersOn(answer: unknown): SignInProvider[];
60
+ /** The providers ON at the broker that may serve `purpose` (C-D6: a team member only with a signed answer). */
61
+ declare function providersServing(on: readonly SignInProvider[], purpose: SignInPurpose): SignInProvider[];
62
+ /** How long a studio or the portal may keep the broker's providers answer before asking again. */
63
+ declare const SIGN_IN_PROVIDERS_CACHE_SECONDS = 60;
50
64
  /** The browser's routes on `auth.iox.studio`, one pair per provider. */
51
65
  declare enum BrokerBrowserRoute {
52
66
  Start = "start",
@@ -104,7 +118,9 @@ declare enum BrokerRefusalCode {
104
118
  /** 410 */
105
119
  CodeUsedOrExpired = "code-used-or-expired",
106
120
  /** 403 — another tenant's code. */
107
- NotYours = "not-yours"
121
+ NotYours = "not-yours",
122
+ /** 400 — a purpose this asker may not use, or a provider that may not serve it (C-D6). */
123
+ InvalidRequest = "invalid-request"
108
124
  }
109
125
  declare const BROKER_REFUSAL_STATUS: Readonly<Record<BrokerRefusalCode, number>>;
110
126
  declare function isBrokerRefusalCode(value: unknown): value is BrokerRefusalCode;
@@ -112,6 +128,14 @@ declare function isBrokerRefusalCode(value: unknown): value is BrokerRefusalCode
112
128
  declare const SIGN_IN_HANDOFF_PARAM = "iox_signin";
113
129
  /** The failure's query parameter on the return address. */
114
130
  declare const SIGN_IN_ERROR_PARAM = "iox_signin_error";
131
+ /** Beside a failure a studio sends back: the provider it was (`?iox_signin_via=github`), so the words can name it. */
132
+ declare const SIGN_IN_VIA_PARAM = "iox_signin_via";
133
+ /**
134
+ * The binding parameter on every return address a studio or the portal asks the broker for: `iox_sb=<sha256 of the
135
+ * random value in the starting browser's httpOnly cookie>`. The redeemed `returnUrl` must carry THIS browser's hash — a
136
+ * hand-off started in another browser is refused (login CSRF).
137
+ */
138
+ declare const SIGN_IN_BINDING_PARAM = "iox_sb";
115
139
  /** Why the browser came back without a person. */
116
140
  declare enum SignInReturnError {
117
141
  /** The person pressed Cancel on the provider's screen. */
@@ -182,7 +206,9 @@ declare enum SiteAuthRoute {
182
206
  SignOut = "auth/signout",
183
207
  /** `GET` → `{ customer }` (null when signed out). */
184
208
  Me = "me",
185
- MyOrders = "me/orders"
209
+ MyOrders = "me/orders",
210
+ /** `GET` → `{ methods }` — the ways this site lets a buyer sign in right now (`siteSignInMethods`). Public. */
211
+ Methods = "auth/methods"
186
212
  }
187
213
  /** Every route a site's sign-in calls, by name (the provider pair is per provider — `siteProviderPath`). */
188
214
  declare const SITE_AUTH_ROUTES: Readonly<Record<keyof typeof SiteAuthRoute, SiteAuthRoute>>;
@@ -252,6 +278,13 @@ declare const SITE_COOKIE_PATH = "/";
252
278
  declare const SIGN_IN_STATE_MAX_AGE_SECONDS = 600;
253
279
  declare function customerCookieName(orgId: string): string;
254
280
  declare function signInStateCookieName(orgId: string): string;
281
+ /**
282
+ * A cookie no sibling host can plant (vectoriox/iox-cms#73 — cookie tossing from another `*.iox.studio`): over https the
283
+ * name takes the `__Host-` prefix, which a browser accepts only `Secure`, with `Path=/` and no `Domain`. A server that
284
+ * sets one with this name must set exactly those; plain http (local development) keeps the bare name.
285
+ */
286
+ declare const HOST_ONLY_COOKIE_PREFIX = "__Host-";
287
+ declare function hostOnlyCookieName(name: string, secure: boolean): string;
255
288
  declare const EMAIL_CODE_LENGTH = 6;
256
289
  declare const EMAIL_CODE_TTL_MINUTES = 10;
257
290
  declare const EMAIL_CODE_TTL_MS: number;
@@ -270,6 +303,12 @@ declare function emailCodeTriesLeft(wrongTries: number): number;
270
303
  declare const ACCOUNT_PATH = "account";
271
304
  /** The buyer's account page — their orders: `/<orgLabel>/account` (the engine answers it on every studio). */
272
305
  declare function accountHref(orgLabel?: string | null): string;
306
+ /** The account page's segment for one order: `/<orgLabel>/account/orders/<number>`. */
307
+ declare const ACCOUNT_ORDERS_SEGMENT = "orders";
308
+ /** One of the signed-in buyer's own orders, under the account page — read by the session, never by a link token. */
309
+ declare function accountOrderHref(orgLabel: string | null | undefined, orderNumber: string | number): string;
310
+ /** `GET /api/site/<org>/me/orders/<number>` — one order of the signed-in buyer (404 for anyone else's). */
311
+ declare function siteMyOrderPath(orgId: string, orderNumber: string | number): string;
273
312
 
274
313
  /**
275
314
  * The sign-in dialog's words and its refusals, in English and Hebrew. A string-rendered site has no translation
@@ -289,7 +328,8 @@ declare enum SignInWord {
289
328
  SignIn = "signIn",
290
329
  SignInTo = "signInTo",
291
330
  Why = "why",
292
- ContinueWithGoogle = "continueWithGoogle",
331
+ /** `{provider}` = the brand's own name (`signInProviderName`), never translated. */
332
+ ContinueWith = "continueWith",
293
333
  Or = "or",
294
334
  Email = "email",
295
335
  EmailPlaceholder = "emailPlaceholder",
@@ -308,7 +348,13 @@ declare enum SignInWord {
308
348
  Hello = "hello",
309
349
  SignedIn = "signedIn",
310
350
  SignedOut = "signedOut",
311
- NoPassword = "noPassword"
351
+ NoPassword = "noPassword",
352
+ /** Before the checkout's "Sign in". */
353
+ HaveAccount = "haveAccount",
354
+ /** The account page with no orders. */
355
+ NoOrders = "noOrders",
356
+ /** An order row on the account page: `{date}`. */
357
+ PlacedOn = "placedOn"
312
358
  }
313
359
  /** `{site}`, `{email}`, `{name}`, `{minutes}` are filled by `signInWord`. */
314
360
  declare const SIGN_IN_WORDS: Readonly<Record<SignInWord, SignInLabel>>;
@@ -317,7 +363,7 @@ declare function signInWord(word: SignInWord, lang: string | null | undefined, f
317
363
  declare enum SignInSlot {
318
364
  Email = "email",
319
365
  Code = "code",
320
- /** Under "Continue with Google". */
366
+ /** Under the provider buttons ("Continue with Google"). */
321
367
  Provider = "provider",
322
368
  /** The dialog as a whole. */
323
369
  Dialog = "dialog"
@@ -342,6 +388,8 @@ declare enum SiteSignInRefusalCode {
342
388
  StateMismatch = "state-mismatch",
343
389
  Blocked = "blocked",
344
390
  NotSignedIn = "not-signed-in",
391
+ /** The studio has no working mailer, so it cannot send a code (it never says whether the email is known). */
392
+ EmailUnavailable = "email-unavailable",
345
393
  Network = "network"
346
394
  }
347
395
  interface SignInRefusalRule {
@@ -357,11 +405,55 @@ interface SignInRefusal {
357
405
  slot: SignInSlot;
358
406
  words: string;
359
407
  }
360
- /** One refusal, on its slot, in the visitor's words. */
361
- declare function signInRefusal(code: unknown, lang: string | null | undefined): SignInRefusal;
408
+ /** One refusal, on its slot, in the visitor's words; a provider's refusal names it (`provider`). */
409
+ declare function signInRefusal(code: unknown, lang: string | null | undefined, provider?: SignInProvider | null): SignInRefusal;
362
410
  /** A refused call's body (`{ code }`) — or nothing at all (`network`) — as one refusal. The body's `message` is a log
363
411
  * line and is never shown. A 429 with no code is `rate-limited`. */
364
- declare function signInRefusalOf(body: unknown, lang: string | null | undefined, status?: number | null): SignInRefusal;
412
+ declare function signInRefusalOf(body: unknown, lang: string | null | undefined, status?: number | null, provider?: SignInProvider | null): SignInRefusal;
413
+ /** A provider sign-in that came back refused to a site's page: the site's own code (a studio's `blocked`,
414
+ * `state-mismatch`… kept; a broker return error mapped) and the provider it was (`?iox_signin_via=`), or null. */
415
+ interface SiteSignInReturnRefusal {
416
+ code: SiteSignInRefusalCode;
417
+ provider: SignInProvider | null;
418
+ }
419
+ declare function siteSignInReturnRefusal(search: string | URLSearchParams | null | undefined): SiteSignInReturnRefusal | null;
420
+
421
+ /**
422
+ * Which ways a studio's SITE lets a buyer sign in (Settings ▸ Sign-in, board 18): the email code always, and each
423
+ * provider the owner switched on — while the broker has it ON and it may serve a buyer (C-D6). ONE rule for the studio
424
+ * that enforces it (iox-cms), the site that shows it (the engine, the canvas) and the screen that sets it (cms-client).
425
+ */
426
+ /** The email code — a `customerIdentities.provider` value beside the broker's providers; it never touches the broker. */
427
+ declare const EMAIL_CODE_PROVIDER: "email-code";
428
+ type EmailCodeProvider = typeof EMAIL_CODE_PROVIDER;
429
+ /** A way a buyer signs in, and the `customerIdentities.provider` it is stored as. */
430
+ type SiteSignInMethod = EmailCodeProvider | SignInProvider;
431
+ /** Every method, in the order a sign-in shows them. */
432
+ declare const SITE_SIGN_IN_METHODS: ReadonlyArray<SiteSignInMethod>;
433
+ declare function isSiteSignInMethod(value: unknown): value is SiteSignInMethod;
434
+ /** The settings type a studio's org stores its choice under (`settings` collection, one row per org). */
435
+ declare const SITE_SIGN_IN_SETTINGS_TYPE = "signIn";
436
+ /** What the owner chose: each provider on or off for buyers. The email code is not a choice — it is always on. */
437
+ interface SiteSignInSettings {
438
+ providers: Record<SignInProvider, boolean>;
439
+ }
440
+ /** A studio that never chose: Google on (C-D6 — "Google on by default, the others as owner switches"). */
441
+ declare const DEFAULT_SITE_SIGN_IN_SETTINGS: Readonly<SiteSignInSettings>;
442
+ /** Any stored or posted value as a whole setting: every provider present, booleans only, unknown keys dropped. */
443
+ declare function normalizeSiteSignInSettings(raw: unknown): SiteSignInSettings;
444
+ /** The methods a site offers right now: the email code, then every provider the owner switched on that the broker has
445
+ * ON (`brokerOn`) and that may serve a buyer. */
446
+ declare function siteSignInMethods(settings: unknown, brokerOn: readonly SignInProvider[]): SiteSignInMethod[];
447
+ /** May a buyer start `provider` on this site right now? */
448
+ declare function siteOffersProvider(settings: unknown, brokerOn: readonly SignInProvider[], provider: SignInProvider): boolean;
449
+ /** `GET api/site/<org>/auth/methods` — public, cacheable. */
450
+ interface SiteSignInMethodsAnswer {
451
+ methods: SiteSignInMethod[];
452
+ }
453
+ /** The methods in an answer (unknown values dropped, in the shown order); the email code is always one of them. */
454
+ declare function siteSignInMethodsOf(answer: unknown): SiteSignInMethod[];
455
+ /** The providers among a site's methods. */
456
+ declare function siteSignInProviders(methods: readonly SiteSignInMethod[]): SignInProvider[];
365
457
 
366
458
  /**
367
459
  * THE TRANSPORT a site's sign-in parts speak (commerce E3a, the `CartTransport` rule): the parts own no HTTP. The engine
@@ -381,6 +473,8 @@ interface SiteAuthTransport {
381
473
  /** Check the code; the signed-in buyer. */
382
474
  verifyCode(email: string, code: string): Promise<SiteCustomer>;
383
475
  signOut(): Promise<void>;
476
+ /** The ways this site lets a buyer sign in (`SiteAuthRoute.Methods`). Absent = the parts hide nothing. */
477
+ methods?(): Promise<SiteSignInMethod[]>;
384
478
  }
385
479
  /** A refused transport call, carrying the code the visitor's words come from (`signInRefusal`). */
386
480
  declare class SiteAuthError extends Error {
@@ -403,7 +497,7 @@ interface SimulatedSiteAuthTransport extends SiteAuthTransport {
403
497
  * sample buyer under the typed email, any other six digits are `code-wrong`; a provider's start answers the broker's
404
498
  * address with a sample ticket (the canvas host never follows it).
405
499
  */
406
- declare function simulatedSiteAuthTransport(start?: SiteCustomer | null): SimulatedSiteAuthTransport;
500
+ declare function simulatedSiteAuthTransport(start?: SiteCustomer | null, methods?: readonly SiteSignInMethod[]): SimulatedSiteAuthTransport;
407
501
  /** A transport that has nothing to reach: `me` is null, every change refused as `network`. */
408
502
  declare const NO_SITE_AUTH_TRANSPORT: SiteAuthTransport;
409
503
  /** The context slot the account parts bind to (`$customer.initial`, `$customer.name`). */
@@ -422,5 +516,25 @@ declare function customerInitial(customer: Pick<SiteCustomer, 'name' | 'email'>
422
516
  declare function customerDisplayName(customer: Pick<SiteCustomer, 'name' | 'email'> | null | undefined): string;
423
517
  declare function customerSlotOf(customer: SiteCustomer | null | undefined): CustomerSlot;
424
518
 
425
- export { ACCOUNT_PATH, BROKER_HOST, BROKER_ORIGIN, BROKER_REFUSAL_STATUS, BROKER_TICKET_PARAM, BrokerApiRoute, BrokerBrowserRoute, BrokerRefusalCode, CUSTOMER_COOKIE_PREFIX, CUSTOMER_SLOT, EMAIL_CODE_LENGTH, EMAIL_CODE_MAX_TRIES, EMAIL_CODE_TTL_MINUTES, EMAIL_CODE_TTL_MS, NEXT_PATH_MAX_LENGTH, NO_SITE_AUTH_TRANSPORT, SAMPLE_CUSTOMER, SIGN_IN_ERROR_PARAM, SIGN_IN_HANDOFF_PARAM, SIGN_IN_HANDOFF_TTL_SECONDS, SIGN_IN_NEXT_PARAM, SIGN_IN_PROVIDER_SPECS, SIGN_IN_REFUSALS, SIGN_IN_STATE_COOKIE_PREFIX, SIGN_IN_STATE_MAX_AGE_SECONDS, SIGN_IN_TICKET_TTL_SECONDS, SIGN_IN_WORDS, SIMULATED_SIGN_IN_CODE, SITE_AUDIENCE, SITE_AUTH_ROUTES, SITE_COOKIE_PATH, SignInLanguage, SignInProtocol, SignInProvider, SignInPurpose, SignInReturnError, SignInSlot, SignInWord, SiteAuthError, SiteAuthRoute, SiteProviderRoute, SiteSignInRefusalCode, accountHref, brokerApiPath, brokerBrowserUrl, brokerCallbackUrl, brokerStartUrl, customerCookieName, customerDisplayName, customerInitial, customerSlotOf, emailCodeExpired, emailCodeTriesLeft, hasSiteAudience, isAllowedReturnHost, isBrokerRefusalCode, isEmailCodeShape, isLoopbackHost, isSameOriginPath, isSignInProvider, isSignInPurpose, isSignInReturnError, isSiteSessionClaims, isSiteSignInRefusalCode, normalizeEmailCode, normalizeHost, normalizeSignInEmail, providerServes, readSignInReturn, safeNextPath, signInLanguage, signInRefusal, signInRefusalOf, signInStateCookieName, signInWord, simulatedSiteAuthTransport, siteAuthErrorCode, siteAuthPath, siteProviderPath, siteProviderReturnUrl, siteSignInCodeOf, withSignInError, withSignInHandoff };
426
- export type { CustomerSlot, ReturnHostOptions, SignInLabel, SignInProviderSpec, SignInRedeemAnswer, SignInRedeemRequest, SignInRefusal, SignInReturn, SignInTicketAnswer, SignInTicketRequest, SimulatedSiteAuthTransport, SiteAuthTransport, SiteCodeRequest, SiteCodeVerifyRequest, SiteCustomer, SiteMeAnswer, SiteProviderStartAnswer, SiteProviderStartRequest, SiteSessionClaims };
519
+ /**
520
+ * How each provider's button presents it — ONE copy for every IOX sign-in (the site's dialog, the admin login, the
521
+ * portal). Each brand's button guidelines: its own name, never translated ("Continue with GitHub" / "המשך עם GitHub"),
522
+ * and its official mark in its own colours, unaltered — Google's four-colour G, LinkedIn's "in" on its blue, Facebook's
523
+ * white f on its blue circle; GitHub's mark is single-colour by its rules, so it takes the button's ink (`currentColor`).
524
+ */
525
+ interface SignInProviderBrand {
526
+ /** The brand's name, as the brand writes it. */
527
+ readonly name: string;
528
+ /** The mark as one inline SVG (a square `viewBox`, no size — the button sizes it). */
529
+ readonly mark: string;
530
+ /** The mark for an `<img>`, where `currentColor` means nothing — when it differs from `mark`. */
531
+ readonly imageMark?: string;
532
+ }
533
+ declare const SIGN_IN_PROVIDER_BRANDS: Readonly<Record<SignInProvider, SignInProviderBrand>>;
534
+ /** The provider's name as its brand writes it. */
535
+ declare function signInProviderName(provider: SignInProvider | null | undefined): string;
536
+ /** The mark as a `data:` address — for an `<img>` (a builder Image part, an admin button). */
537
+ declare function signInProviderMarkUri(provider: SignInProvider): string;
538
+
539
+ export { ACCOUNT_ORDERS_SEGMENT, ACCOUNT_PATH, BROKER_HOST, BROKER_ORIGIN, BROKER_REFUSAL_STATUS, BROKER_TICKET_PARAM, BrokerApiRoute, BrokerBrowserRoute, BrokerRefusalCode, CUSTOMER_COOKIE_PREFIX, CUSTOMER_SLOT, DEFAULT_SITE_SIGN_IN_SETTINGS, EMAIL_CODE_LENGTH, EMAIL_CODE_MAX_TRIES, EMAIL_CODE_PROVIDER, EMAIL_CODE_TTL_MINUTES, EMAIL_CODE_TTL_MS, HOST_ONLY_COOKIE_PREFIX, NEXT_PATH_MAX_LENGTH, NO_SITE_AUTH_TRANSPORT, SAMPLE_CUSTOMER, SIGN_IN_BINDING_PARAM, SIGN_IN_ERROR_PARAM, SIGN_IN_HANDOFF_PARAM, SIGN_IN_HANDOFF_TTL_SECONDS, SIGN_IN_NEXT_PARAM, SIGN_IN_PROVIDERS, SIGN_IN_PROVIDERS_CACHE_SECONDS, SIGN_IN_PROVIDER_BRANDS, SIGN_IN_PROVIDER_SPECS, SIGN_IN_REFUSALS, SIGN_IN_STATE_COOKIE_PREFIX, SIGN_IN_STATE_MAX_AGE_SECONDS, SIGN_IN_TICKET_TTL_SECONDS, SIGN_IN_VIA_PARAM, SIGN_IN_WORDS, SIMULATED_SIGN_IN_CODE, SITE_AUDIENCE, SITE_AUTH_ROUTES, SITE_COOKIE_PATH, SITE_SIGN_IN_METHODS, SITE_SIGN_IN_SETTINGS_TYPE, SignInLanguage, SignInProtocol, SignInProvider, SignInPurpose, SignInReturnError, SignInSlot, SignInWord, SiteAuthError, SiteAuthRoute, SiteProviderRoute, SiteSignInRefusalCode, accountHref, accountOrderHref, brokerApiPath, brokerBrowserUrl, brokerCallbackUrl, brokerStartUrl, customerCookieName, customerDisplayName, customerInitial, customerSlotOf, emailCodeExpired, emailCodeTriesLeft, hasSiteAudience, hostOnlyCookieName, isAllowedReturnHost, isBrokerRefusalCode, isEmailCodeShape, isLoopbackHost, isSameOriginPath, isSignInProvider, isSignInPurpose, isSignInReturnError, isSiteSessionClaims, isSiteSignInMethod, isSiteSignInRefusalCode, normalizeEmailCode, normalizeHost, normalizeSignInEmail, normalizeSiteSignInSettings, providerServes, providersOn, providersServing, readSignInReturn, safeNextPath, signInLanguage, signInProviderMarkUri, signInProviderName, signInRefusal, signInRefusalOf, signInStateCookieName, signInWord, simulatedSiteAuthTransport, siteAuthErrorCode, siteAuthPath, siteMyOrderPath, siteOffersProvider, siteProviderPath, siteProviderReturnUrl, siteSignInCodeOf, siteSignInMethods, siteSignInMethodsOf, siteSignInProviders, siteSignInReturnRefusal, withSignInError, withSignInHandoff };
540
+ export type { CustomerSlot, EmailCodeProvider, ReturnHostOptions, SignInLabel, SignInProviderBrand, SignInProviderSpec, SignInProvidersAnswer, SignInRedeemAnswer, SignInRedeemRequest, SignInRefusal, SignInReturn, SignInTicketAnswer, SignInTicketRequest, SimulatedSiteAuthTransport, SiteAuthTransport, SiteCodeRequest, SiteCodeVerifyRequest, SiteCustomer, SiteMeAnswer, SiteProviderStartAnswer, SiteProviderStartRequest, SiteSessionClaims, SiteSignInMethod, SiteSignInMethodsAnswer, SiteSignInReturnRefusal, SiteSignInSettings };
package/index.d.ts CHANGED
@@ -3583,17 +3583,6 @@ declare function isContextAction(action: ContextActionLike | null | undefined):
3583
3583
  */
3584
3584
  declare function contextActionEffect(action: ContextActionLike | null | undefined, pass?: 'forward' | 'reverse'): ContextActionEffect | null;
3585
3585
 
3586
- /**
3587
- * Which slot keys are actually IN USE on a page — derived from the layout tree itself.
3588
- *
3589
- * A slot only matters at runtime if something writes it (a `setContext`/`clearContext` action) or
3590
- * reads it (a binding whose `source` names it). Deriving the set from the tree means the runtime
3591
- * works without waiting on the page model: a DECLARED `IoxContextSlot` adds typing for the bind
3592
- * picker and a `default`, but is not required for the channel to function.
3593
- *
3594
- * Union of declared + in-use, so a declared-but-unused slot still seeds its default, and a slot used
3595
- * by a symbol dropped onto a page that never declared it still works (it just has no default).
3596
- */
3597
3586
  declare function collectContextSlotKeys(nodes: readonly unknown[] | undefined,
3598
3587
  /** Declared VARIABLES — page resources of `type: 'variable'`, or legacy slot declarations. */
3599
3588
  declared?: readonly (IoxContextSlot | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "5.100.0",
3
+ "version": "5.102.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -326,6 +326,8 @@ export enum SiteRefusalCode {
326
326
  Busy = 'busy',
327
327
  UnknownOrder = 'unknown-order',
328
328
  UnknownSite = 'unknown-site',
329
+ /** The owner blocked this buyer (commerce E3c): no checkout, no order. */
330
+ CustomerBlocked = 'customer-blocked',
329
331
  Network = 'network',
330
332
  }
331
333
 
@@ -371,6 +373,7 @@ export const SITE_REFUSALS: Readonly<Record<SiteRefusalCode, RefusalRule>> = Obj
371
373
  [SiteRefusalCode.Busy]: { slot: CheckoutSlot.Page, label: TRY_AGAIN },
372
374
  [SiteRefusalCode.UnknownOrder]: { slot: CheckoutSlot.Page, label: { en: 'We could not find this order.', he: 'לא מצאנו את ההזמנה הזו.' } },
373
375
  [SiteRefusalCode.UnknownSite]: { slot: CheckoutSlot.Page, label: CLOSED },
376
+ [SiteRefusalCode.CustomerBlocked]: { slot: CheckoutSlot.Page, label: { en: 'This account cannot place orders here. Contact the business.', he: 'החשבון הזה לא יכול לבצע הזמנות כאן. פנו לעסק.' } },
374
377
  [SiteRefusalCode.Network]: { slot: CheckoutSlot.Page, label: { en: 'We could not reach the shop. Try again.', he: 'לא הצלחנו להגיע לחנות. נסו שוב.' } },
375
378
  });
376
379
 
@@ -1,11 +1,12 @@
1
1
  import { writeFieldError } from '@vectoriox/iox-ui/design-core';
2
2
  import {
3
3
  CUSTOMER_SLOT, customerDisplayName, customerSlotOf, EMAIL_CODE_TTL_MINUTES, isEmailCodeShape, normalizeEmailCode, normalizeSignInEmail,
4
- SignInProvider, signInRefusal, SignInSlot, SignInWord, signInWord, siteAuthErrorCode, SiteAuthTransport, SiteCustomer, SiteSignInRefusalCode,
4
+ SIGN_IN_PROVIDERS, SignInProvider, signInRefusal, SignInSlot, SignInWord, signInWord, siteAuthErrorCode, SiteAuthTransport, SiteCustomer,
5
+ SiteSignInMethod, SiteSignInRefusalCode, SiteSignInReturnRefusal,
5
6
  } from '@vectoriox/iox-ui/identity-core';
6
7
 
7
8
  import {
8
- ACCOUNT_HIDDEN_ATTRIBUTE, ACCOUNT_LIVE_CLASS, accountSelector, AccountRole, SIGN_IN_STEP_ATTRIBUTE, SignInStep, SIGNED_IN_ATTRIBUTE,
9
+ ACCOUNT_HIDDEN_ATTRIBUTE, ACCOUNT_LIVE_CLASS, accountSelector, AccountRole, PROVIDER_ROLES, SIGN_IN_STEP_ATTRIBUTE, SignInStep, SIGNED_IN_ATTRIBUTE,
9
10
  } from './account';
10
11
 
11
12
  /**
@@ -35,8 +36,9 @@ export interface AccountHost {
35
36
  returnPath?: () => string;
36
37
  /** The account page (`accountHref(orgLabel)`) — the menu's "Your orders" goes there. */
37
38
  accountHref?: () => string;
38
- /** A provider sign-in that came back refused (`?iox_signin_error=`, read by the host) — said in the dialog on load. */
39
- pendingError?: () => string | null;
39
+ /** A provider sign-in that came back refused (`?iox_signin_error=` + `iox_signin_via`, read by the host with
40
+ * identity-core `siteSignInReturnRefusal`) — said in the dialog on load, naming the provider. */
41
+ pendingError?: () => SiteSignInReturnRefusal | string | null;
40
42
  /** The signed-in state changed (the host may re-render personal parts). */
41
43
  onChange?: (customer: SiteCustomer | null) => void;
42
44
  /** Re-sync when the markup under the scope changes (the builder canvas re-renders parts). */
@@ -86,6 +88,10 @@ export class AccountRuntime {
86
88
  private syncing = false;
87
89
  private syncQueued = false;
88
90
  private lastPublished = '';
91
+ /** The ways the site offers right now (`transport.methods`); null until known — nothing is hidden then. */
92
+ private offered: ReadonlySet<SiteSignInMethod> | null = null;
93
+ /** The provider the last start was for — its refusal names it. */
94
+ private provider: SignInProvider | null = null;
89
95
 
90
96
  constructor(readonly scope: HTMLElement, private readonly host: AccountHost) {
91
97
  SCOPES.set(scope, this);
@@ -96,10 +102,17 @@ export class AccountRuntime {
96
102
  this.observer.observe(scope, { childList: true, subtree: true });
97
103
  }
98
104
  this.sync();
105
+ void this.host.transport.methods?.().then(methods => {
106
+ if (this.destroyed) return;
107
+ this.offered = new Set(methods);
108
+ this.sync();
109
+ }, () => undefined);
99
110
  void this.host.transport.me().then(customer => {
100
111
  this.setCustomer(customer);
101
112
  const pending = this.host.pendingError?.();
102
- if (pending) this.openSignIn(pending);
113
+ if (!pending) return;
114
+ if (typeof pending === 'string') this.openSignIn(pending);
115
+ else { this.provider = pending.provider; this.openSignIn(pending.code); }
103
116
  }, () => this.setCustomer(null));
104
117
  }
105
118
 
@@ -196,7 +209,7 @@ export class AccountRuntime {
196
209
 
197
210
  /** Say a refusal on its slot, and move focus to the field it is about. */
198
211
  private say(code: unknown): void {
199
- const refusal = signInRefusal(code, this.lang);
212
+ const refusal = signInRefusal(code, this.lang, this.provider);
200
213
  if (refusal.slot === SignInSlot.Email || refusal.slot === SignInSlot.Code) {
201
214
  const role = refusal.slot === SignInSlot.Email ? AccountRole.Email : AccountRole.Code;
202
215
  const field = fieldElementOf(this.part(role));
@@ -230,9 +243,10 @@ export class AccountRuntime {
230
243
  }
231
244
  }
232
245
 
233
- /** Continue with Google: the studio asks the broker for a ticket; the browser goes to its start address. */
246
+ /** Continue with a provider: the studio asks the broker for a ticket; the browser goes to its start address. */
234
247
  async startProvider(provider: SignInProvider = SignInProvider.Google, button: HTMLElement | null = null): Promise<void> {
235
248
  this.clearErrors();
249
+ this.provider = provider;
236
250
  await this.run(button, async () => {
237
251
  const { startUrl } = await this.host.transport.startProvider(provider, this.host.returnPath?.() ?? '/');
238
252
  this.host.navigate?.(startUrl);
@@ -330,6 +344,7 @@ export class AccountRuntime {
330
344
  const line = this.part(role);
331
345
  if (line && !wordsOf(line).textContent) setAttr(line, ACCOUNT_HIDDEN_ATTRIBUTE, '');
332
346
  }
347
+ this.showOffered(dialog);
333
348
  this.prepareInputs();
334
349
  }
335
350
  } finally {
@@ -338,6 +353,21 @@ export class AccountRuntime {
338
353
  }
339
354
  }
340
355
 
356
+ /** Only the providers the site offers right now; with none, the "or" between them and the email goes too. */
357
+ private showOffered(dialog: HTMLElement): void {
358
+ if (!this.offered) return;
359
+ let any = false;
360
+ for (const provider of SIGN_IN_PROVIDERS) {
361
+ const on = this.offered.has(provider);
362
+ for (const button of Array.from(dialog.querySelectorAll<HTMLElement>(sel(PROVIDER_ROLES[provider])))) {
363
+ setAttr(button, ACCOUNT_HIDDEN_ATTRIBUTE, on ? null : '');
364
+ any ||= on;
365
+ }
366
+ }
367
+ setAttr(dialog.querySelector(sel(AccountRole.Providers)), ACCOUNT_HIDDEN_ATTRIBUTE, any ? null : '');
368
+ setAttr(dialog.querySelector(sel(AccountRole.Or)), ACCOUNT_HIDDEN_ATTRIBUTE, any ? null : '');
369
+ }
370
+
341
371
  /** What a browser and a phone keyboard need to know about the two inputs (autofill, the one-time code). */
342
372
  private prepareInputs(): void {
343
373
  const email = controlOf(this.part(AccountRole.Email));
@@ -380,7 +410,10 @@ export class AccountRuntime {
380
410
  const entry = button(AccountRole.Entry);
381
411
  if (entry) { this.signIn(entry); return; }
382
412
  if (!target.closest(sel(AccountRole.SignIn))) return;
383
- if (button(AccountRole.Google)) { void this.startProvider(SignInProvider.Google, button(AccountRole.Google)); return; }
413
+ for (const provider of SIGN_IN_PROVIDERS) {
414
+ const pressed = button(PROVIDER_ROLES[provider]);
415
+ if (pressed) { void this.startProvider(provider, pressed); return; }
416
+ }
384
417
  if (button(AccountRole.SendCode)) { void this.sendCode(button(AccountRole.SendCode)); return; }
385
418
  if (button(AccountRole.SendAgain)) { void this.sendCode(button(AccountRole.SendAgain)); return; }
386
419
  if (button(AccountRole.Verify)) { void this.verify(button(AccountRole.Verify)); return; }