@vectoriox/iox-ui 5.50.0 → 5.52.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.
@@ -2854,6 +2854,8 @@ declare enum StepState {
2854
2854
  /** What a build creates, as Undo walks it. */
2855
2855
  declare enum CreatedKind {
2856
2856
  ContentType = "content-type",
2857
+ /** Fields the build added to a content type it found (types are shared by every organization of a studio). */
2858
+ ContentTypeFields = "content-type-fields",
2857
2859
  SampleImage = "sample-image",
2858
2860
  Item = "item",
2859
2861
  DataSource = "data-source",
@@ -2865,7 +2867,9 @@ declare enum CreatedKind {
2865
2867
  declare enum KeptReason {
2866
2868
  Edited = "edited",
2867
2869
  Published = "published",
2868
- InUse = "in-use"
2870
+ InUse = "in-use",
2871
+ /** Added to a content type every organization shares: removing a field is the studio owner's change. */
2872
+ Shared = "shared"
2869
2873
  }
2870
2874
  interface BuildStepError {
2871
2875
  code: string;
@@ -2890,6 +2894,8 @@ interface CreatedRecord {
2890
2894
  contentType?: string;
2891
2895
  /** A sample image's public URL — what items and pages reference. */
2892
2896
  url?: string;
2897
+ /** `content-type-fields`: the fields the build added. */
2898
+ fields?: string[];
2893
2899
  }
2894
2900
  interface UndoKept {
2895
2901
  kind: CreatedKind;
@@ -2910,7 +2916,9 @@ interface UndoRecord {
2910
2916
  }
2911
2917
  declare enum BuildNoticeCode {
2912
2918
  /** Storage is not configured: sample items get the empty image box, and the run says so. */
2913
- NoStorage = "no-storage"
2919
+ NoStorage = "no-storage",
2920
+ /** A content type the build reuses is not public in this studio: the site will not show its items. */
2921
+ ContentTypeNotPublic = "content-type-not-public"
2914
2922
  }
2915
2923
  interface BuildNotice {
2916
2924
  code: string;
@@ -2948,12 +2956,13 @@ declare enum PreflightRefusalCode {
2948
2956
  InvalidPlan = "invalid-plan",
2949
2957
  /** A route the plan wants is already a page of this organization. */
2950
2958
  RouteTaken = "route-taken",
2951
- /** A content type of that name exists in this instance (content types are instance-wide). */
2952
- ContentTypeTaken = "content-type-taken",
2959
+ /** The studio's content type of that name stores a field the plan needs differently (type or control) —
2960
+ * types are shared by every organization, so the build reuses one it finds and adds what it lacks. */
2961
+ ContentTypeConflict = "content-type-conflict",
2953
2962
  /** The name may not be a content type (a platform collection, or not a valid name). */
2954
2963
  ContentTypeName = "content-type-name",
2955
- /** Content types act on the whole instance: only the instance owner may create them (SEC1). */
2956
- ContentTypesNeedInstanceOwner = "content-types-need-instance-owner",
2964
+ /** The plan creates a content type or adds fields to one, and the caller may not (an org owner/admin — schema_all). */
2965
+ ContentTypesNeedPermission = "content-types-need-permission",
2957
2966
  /** The org library holds the alias with a different definition. */
2958
2967
  DataSourceConflict = "data-source-conflict",
2959
2968
  /** The studio has pages AND a header/footer: replace or keep them is the caller's choice (D7). */
@@ -2976,6 +2985,7 @@ interface PreflightRefusal {
2976
2985
  */
2977
2986
  declare const buildKeys: {
2978
2987
  readonly contentType: (name: string) => string;
2988
+ readonly contentTypeFields: (name: string) => string;
2979
2989
  readonly item: (contentType: string, n: number) => string;
2980
2990
  readonly sampleImage: (n: number) => string;
2981
2991
  readonly dataSource: (alias: string) => string;
@@ -2989,10 +2999,20 @@ declare function builtHomePageId(run: Pick<SiteBuildRun, 'plan' | 'created'> | n
2989
2999
  declare function failedBuildStep(run: Pick<SiteBuildRun, 'steps'> | null | undefined): BuildStepRecord | null;
2990
3000
  /** A run still holding the org's slot (building or undoing) — a page that left it comes back to its progress. */
2991
3001
  declare function isActiveBuild(run: Pick<SiteBuildRun, 'status'> | null | undefined): boolean;
2992
- /** What each step of a build of `plan` will make — the progress rows' words, from the plan alone. */
3002
+ /** What a build does with each content type its plan names (the preflight's `summary.contentTypes[].action`): content
3003
+ * types are shared by every organization of a studio, so one the studio already has is reused, or extended with the
3004
+ * fields it lacks — never created twice. */
3005
+ declare enum ContentTypeAction {
3006
+ Create = "create",
3007
+ Reuse = "reuse",
3008
+ Extend = "extend"
3009
+ }
3010
+ /** What each step of a build of `plan` will make — the progress rows' words, from the plan (+ the preflight's actions). */
2993
3011
  interface BuildStepFacts {
2994
- /** Content types to create: their labels. */
3012
+ /** The plan's content types: their labels (created, reused or extended — see `contentTypeActions`). */
2995
3013
  contentTypes: string[];
3014
+ /** Per label, what the build does with it — known only once the preflight said so (absent = not known). */
3015
+ contentTypeActions: Partial<Record<ContentTypeAction, string[]>>;
2996
3016
  /** Sample items, all types together. */
2997
3017
  items: number;
2998
3018
  /** Pages (template pages included) and their routes. */
@@ -3003,7 +3023,7 @@ interface BuildStepFacts {
3003
3023
  /** The look's flavor. */
3004
3024
  flavorId: string;
3005
3025
  }
3006
- declare function buildStepFacts(plan: SitePlan): BuildStepFacts;
3026
+ declare function buildStepFacts(plan: SitePlan, actions?: Readonly<Record<string, `${ContentTypeAction}`>>): BuildStepFacts;
3007
3027
 
3008
- export { ACTIVE_BUILD_STATUSES, BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BUILD_STEPS, BaselineRole, BindScope, BuildNoticeCode, BuildStep, CardBindTarget, ComposeError, ComposeIssueCode, CreatedKind, DANGLING_LINK_CODES, DEFAULT_PHONE_MENU_BREAKPOINT, ENTRANCE_EASING, ENTRANCE_ORIGIN_LOOK, ENTRANCE_TRIGGER, EntrancePart, FACT_KEYS, GlobalSlot, KeptReason, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NavPagesSource, NavRole, NavShape, NavShapeError, PRICING_PATTERN, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PlaceholderKind, PlanDataSourceMode, PlanDataSourceType, PreflightRefusalCode, RelativeOp, SAMPLE_IMAGE_REF, SITE_FACT_LABELS, SITE_HEADER_PATTERN, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_FACTS, SPEC_SITE_LIBRARY, SPEC_SITE_PATTERNS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_TEMPLATES, STUDIO_TEMPLATE, SiteBuildKind, SiteBuildStatus, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, StepState, addBarItem, altSourceScopes, assertStyleSlots, assertValidSitePlan, barIconForRoute, blocksPublish, buildKeys, buildStepFacts, builtHomePageId, composeNavHeader, composeSection, composeSite, createSerializedNode, describePlanData, entranceAction, entranceInteraction, failedBuildStep, findNavRoot, isActiveBuild, isNonEmptyString, isPlainObject, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, parseSampleImageRef, pathAt, patternById, patternNeedsBinding, patternNodes, patternOptionalParts, patternScopes, patternSlots, patternTakesBinding, phoneMenuPages, planFromTemplate, planNavShape, releasedLayoutDefaults, removeBarItem, requiredShapeKeys, routeParams, sampleImageRef, sectionEntrances, setStyleProps, shapeKeys, siteNavPages, staggerDelay, validateSitePlan, walkSerialized };
3028
+ export { ACTIVE_BUILD_STATUSES, BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BUILD_STEPS, BaselineRole, BindScope, BuildNoticeCode, BuildStep, CardBindTarget, ComposeError, ComposeIssueCode, ContentTypeAction, CreatedKind, DANGLING_LINK_CODES, DEFAULT_PHONE_MENU_BREAKPOINT, ENTRANCE_EASING, ENTRANCE_ORIGIN_LOOK, ENTRANCE_TRIGGER, EntrancePart, FACT_KEYS, GlobalSlot, KeptReason, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NavPagesSource, NavRole, NavShape, NavShapeError, PRICING_PATTERN, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PlaceholderKind, PlanDataSourceMode, PlanDataSourceType, PreflightRefusalCode, RelativeOp, SAMPLE_IMAGE_REF, SITE_FACT_LABELS, SITE_HEADER_PATTERN, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_FACTS, SPEC_SITE_LIBRARY, SPEC_SITE_PATTERNS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_TEMPLATES, STUDIO_TEMPLATE, SiteBuildKind, SiteBuildStatus, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, StepState, addBarItem, altSourceScopes, assertStyleSlots, assertValidSitePlan, barIconForRoute, blocksPublish, buildKeys, buildStepFacts, builtHomePageId, composeNavHeader, composeSection, composeSite, createSerializedNode, describePlanData, entranceAction, entranceInteraction, failedBuildStep, findNavRoot, isActiveBuild, isNonEmptyString, isPlainObject, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, parseSampleImageRef, pathAt, patternById, patternNeedsBinding, patternNodes, patternOptionalParts, patternScopes, patternSlots, patternTakesBinding, phoneMenuPages, planFromTemplate, planNavShape, releasedLayoutDefaults, removeBarItem, requiredShapeKeys, routeParams, sampleImageRef, sectionEntrances, setStyleProps, shapeKeys, siteNavPages, staggerDelay, validateSitePlan, walkSerialized };
3009
3029
  export type { AddBarItemResult, BarItemsEditResult, BuildNotice, BuildStepError, BuildStepFacts, BuildStepRecord, CmsDataSourcePlan, ComposeContext, ComposeIssue, ComposedDataSource, ComposedItem, ComposedNavHeader, ComposedPage, ComposedPlaceholder, ComposedRoute, ComposedSection, ComposedSite, ContentFieldPlan, ContentSeedPlan, ContentTypePlan, CreateNodeOptions, CreatedRecord, DataSourcePlan, EntranceAction, EntranceInteraction, EntranceSpec, FactKey, NavHeaderInput, NavHeaderOptions, NavPage, NavShapeOptions, NavShapeResult, NodeBaseline, PageData, PageDataLine, PagePlan, PageSectionPlan, PathIssue, PatternNode, PlainObject, PreflightRefusal, RelativeDataSourcePlan, SectionEntrances, SectionInput, SectionOptions, SerializedBinding, SerializedNode, SerializedResponsive, ShapeEntry, ShapeIssueCodes, SiteBuildRun, SiteBusiness, SitePageRef, SitePattern, SitePlan, SitePlanIssue, SitePlanSource, SitePlanValidation, SiteTemplate, TemplatePlanInput, UndoKept, UndoPreview, UndoRecord };