@contentstack/studio-client 3.0.0 → 3.2.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.
Files changed (51) hide show
  1. package/README.md +21 -0
  2. package/dist/breakpoints/BreakpointManager.js +1 -0
  3. package/dist/breakpoints/BreakpointManager.js.map +1 -1
  4. package/dist/canvas/canvas.utils.js +18 -1
  5. package/dist/canvas/canvas.utils.js.map +1 -1
  6. package/dist/composable-studio/build-scoped-data.js +58 -3
  7. package/dist/composable-studio/build-scoped-data.js.map +1 -1
  8. package/dist/composable-studio/collect-data-needs.js +24 -4
  9. package/dist/composable-studio/collect-data-needs.js.map +1 -1
  10. package/dist/composable-studio/data/pre-process-static-values.js +13 -0
  11. package/dist/composable-studio/data/pre-process-static-values.js.map +1 -1
  12. package/dist/composable-studio/sdk.js +496 -136
  13. package/dist/composable-studio/sdk.js.map +1 -1
  14. package/dist/composable-studio/section-data.js +316 -0
  15. package/dist/composable-studio/section-data.js.map +1 -0
  16. package/dist/composable-studio/studio-intelligence.manager.js +1 -0
  17. package/dist/composable-studio/studio-intelligence.manager.js.map +1 -1
  18. package/dist/config/config.schema.js +26 -0
  19. package/dist/config/config.schema.js.map +1 -1
  20. package/dist/config/process-user-config.js +6 -0
  21. package/dist/config/process-user-config.js.map +1 -1
  22. package/dist/config/stack-sdk-wrapper.js +36 -1
  23. package/dist/config/stack-sdk-wrapper.js.map +1 -1
  24. package/dist/context-menu/context-menu.js +1 -0
  25. package/dist/context-menu/context-menu.js.map +1 -1
  26. package/dist/dnd/dnd-manager.js +1 -0
  27. package/dist/dnd/dnd-manager.js.map +1 -1
  28. package/dist/get-active-node-screenshot/get-node-screenshot-event.js +45 -4
  29. package/dist/get-active-node-screenshot/get-node-screenshot-event.js.map +1 -1
  30. package/dist/highlight-node/highlight-node-manager.js +2 -4
  31. package/dist/highlight-node/highlight-node-manager.js.map +1 -1
  32. package/dist/highlight-node/highlight-node.js +1 -0
  33. package/dist/highlight-node/highlight-node.js.map +1 -1
  34. package/dist/index.d.ts +347 -25
  35. package/dist/index.js +2 -1
  36. package/dist/index.js.map +1 -1
  37. package/dist/url-metadata/build-template-query.js +13 -3
  38. package/dist/url-metadata/build-template-query.js.map +1 -1
  39. package/dist/utils/conditionBlock.js +132 -5
  40. package/dist/utils/conditionBlock.js.map +1 -1
  41. package/dist/utils/constants.js +1 -1
  42. package/dist/utils/include-path-rules.js +102 -0
  43. package/dist/utils/include-path-rules.js.map +1 -0
  44. package/dist/utils/query-url-budget.js +79 -0
  45. package/dist/utils/query-url-budget.js.map +1 -0
  46. package/dist/utils/reference_fetcher.js +22 -2
  47. package/dist/utils/reference_fetcher.js.map +1 -1
  48. package/dist/utils/spec-analyzer.js +2 -2
  49. package/dist/utils/spec-analyzer.js.map +1 -1
  50. package/package.json +8 -9
  51. package/LICENSE +0 -21
@@ -6,7 +6,7 @@ import { createClassNameUid } from '../design/create-class-name-uid.js';
6
6
  import { findPath } from '../utils/editor-utils.js';
7
7
  import '@contentstack/studio-registry';
8
8
  import '../utils/editor-mode.js';
9
- import 'lodash-es';
9
+ import '../utils/conditionBlock.js';
10
10
  import { serializeComputedStyles } from '../utils/canvas.js';
11
11
  import { dndEventManager } from '../shared/dnd-events.js';
12
12
  import { TARGET_NODE } from '@contentstack/studio-message-types/latest';
@@ -280,9 +280,7 @@ class HighlightNodeManager {
280
280
  if (!element)
281
281
  return null;
282
282
  const node = ELEMENT_TO_NODE.get(element);
283
- if (node?.type !== "repeater" &&
284
- node?.type !== "condition-block" &&
285
- node?.type !== "symbol") {
283
+ if (node?.type !== "repeater" && node?.type !== "condition-block") {
286
284
  return element.getBoundingClientRect();
287
285
  }
288
286
  return this.getBoundingRectOfDisplayContents(element);
@@ -1 +1 @@
1
- {"version":3,"file":"highlight-node-manager.js","sources":["../../src/highlight-node/highlight-node-manager.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;AA2BA,MAAM,oBAAoB,CAAA;IACxB,aAAa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,IAAI,EAAE,IAAI,KAAK,QAAQ,EACvB;AACA,YAAA,OAAO,OAAO,CAAC,qBAAqB,EAAE;QACxC;AACA,QAAA,OAAO,IAAI,CAAC,gCAAgC,CAAC,OAAO,CAAC;IACvD;AAEQ,IAAA,WAAW,CAAC,OAAe,EAAA;AACjC,QAAA,MAAM,OAAO,GAAG,oBAAoB,CAAC,OAAO,CAAC;QAC7C,MAAM,IAAI,GAAG,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC;AACzC,QAAA,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB;AAEA,IAAA,oBAAoB,CAAC,MAAmB,EAAA;AACtC,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,EAAE;;QAEtB,MAAM,SAAS,GAAkB,EAAE;AACnC,QAAA,IAAI,MAAM,GAAG,MAAM,CAAC,aAAa;QACjC,OAAO,MAAM,EAAE;AACb,YAAA,IAAI,MAAM,CAAC,YAAY,CAAC,6BAA6B,CAAC,EAAE;AACtD,gBAAA,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;YACxB;AACA,YAAA,MAAM,GAAG,MAAM,CAAC,aAAa;QAC/B;AACA,QAAA,OAAO,SAAS;IAClB;AACD;MAEY,oBAAoB,mBAAmB,IAAI,oBAAoB;;;;"}
1
+ {"version":3,"file":"highlight-node-manager.js","sources":["../../src/highlight-node/highlight-node-manager.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;AA2BA,MAAM,oBAAoB,CAAA;IACxB,aAAa,GAAkB,IAAI;IACnC,cAAc,GAAkB,IAAI;IACpC,cAAc,GAAgB,IAAI;IAClC,eAAe,GAAgB,IAAI;IACnC,cAAc,GAAkB,IAAI;IACpC,aAAa,GAAkB,IAAI;IACnC,UAAU,GAAkB,IAAI;AAChC,IAAA,sBAAsB,GAA+B,IAAI,GAAG,EAAE;AAC9D,IAAA,2BAA2B,GACzB,IAAI,GAAG,EAAE;IACX,OAAO,GAAY,KAAK;AACxB,IAAA,W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,IAAI,CAAC;IACvB;AAEA,IAAA,oBAAoB,CAAC,MAAmB,EAAA;AACtC,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,EAAE;;QAEtB,MAAM,SAAS,GAAkB,EAAE;AACnC,QAAA,IAAI,MAAM,GAAG,MAAM,CAAC,aAAa;QACjC,OAAO,MAAM,EAAE;AACb,YAAA,IAAI,MAAM,CAAC,YAAY,CAAC,6BAA6B,CAAC,EAAE;AACtD,gBAAA,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;YACxB;AACA,YAAA,MAAM,GAAG,MAAM,CAAC,aAAa;QAC/B;AACA,QAAA,OAAO,SAAS;IAClB;AACD;MAEY,oBAAoB,mBAAmB,IAAI,oBAAoB;;;;"}
@@ -4,6 +4,7 @@ import { COMPOSABLE_DATA_ATTRIBUTES } from '../utils/constants.js';
4
4
  import 'lodash-es';
5
5
  import '@contentstack/studio-registry';
6
6
  import '../utils/editor-mode.js';
7
+ import '../utils/conditionBlock.js';
7
8
  import { getComposableElement, getHitboxDetails, serializeEvent } from '../canvas/canvas.utils.js';
8
9
  import { dndEventManager } from '../shared/dnd-events.js';
9
10
  import { highlightNodeManager } from './highlight-node-manager.js';
@@ -1 +1 @@
1
- {"version":3,"file":"highlight-node.js","sources":["../../src/highlight-node/highlight-node.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;AAwBA,IAAI,WAAW,GAAG,KAAK;AACvB,IAAI,SAAS,GAAQ,CAAC;SACN,cAAc,GAAA;IAC5B,WAAW,GAAG,IAAI;IAClB,oBAAoB,CAAC,oBAAoB,EAAE;IAC3C,YAAY,CAAC,SAAS,CAAC;AAEvB,IAAA,SAAS,GAAG,UAAU,CAAC,MAAK;QAC1B,WAAW,GAAG,KAAK;QACnB,oBAAoB,CAAC,mBAAmB,EAAE;QAC1C,oBAAoB,CAAC,oBAAoB,EAAE;QAC3C,oBAAoB,CAAC,kBAAkB,EAAE;QACzC,oBAAoB,CAAC,iBAAiB,EAAE;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AC;QAC7D;AACF,IAAA,CAAC,CACF;AAEH,IAAA,MAAM,yBAAyB,GAAG,4BAA4B,EAAE,EAAE,CAGhE,mBAAmB,CAAC,2BAA2B,EAAE,CAAC,KAAK,KAAI;QAC3D,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,IAAI;QACtC,OAAO,oBAAoB,CAAC,wBAAwB,CAAC,UAAU,EAAE,GAAG,CAAC;AACvE,IAAA,CAAC,CAAC;AAEF,IAAA,IAAI,kBAAkB;AAAE,QAAA,oBAAoB,CAAC,IAAI,CAAC,kBAAkB,CAAC;AACrE,IAAA,IAAI,mBAAmB;AAAE,QAAA,oBAAoB,CAAC,IAAI,CAAC,mBAAmB,CAAC;AACvE,IAAA,IAAI,yBAAyB;AAC3B,QAAA,oBAAoB,CAAC,IAAI,CAAC,yBAAyB,CAAC;AACtD,IAAA,IAAI,mBAAmB;AAAE,QAAA,oBAAoB,CAAC,IAAI,CAAC,mBAAmB,CAAC;AACvE,IAAA,IAAI,kBAAkB;AAAE,QAAA,oBAAoB,CAAC,IAAI,CAAC,kBAAkB,CAAC;IAErE,OAAO;QACL,oBAAoB,EAAE,MAAK;AACzB,YAAA,oBAAoB,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAI;gBAC1D,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC;AACpD,YAAA,CAAC,CAAC;YACF,oBAAoB,CAAC,OAAO,CAAC,CAAC,EAAE,UAAU,EAAE,KAAI;AAC9C,gBAAA,UAAU,EAAE;AACd,YAAA,CAAC,CAAC;QACJ,CAAC;KACF;AACH;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import * as _contentstack_studio_internal from '@contentstack/studio-internal';
2
2
  import { Node, BindingType, PathNode, Operation, Descendant, Path, Condition, NodeStyles } from '@contentstack/studio-internal';
3
3
  import * as _contentstack_studio_registry from '@contentstack/studio-registry';
4
- import { RawStaticValue, ICSEntryReference, StudioSpecData, DataSources, SectionScopedDataSources, StaticValue, BreakpointInput, Breakpoint } from '@contentstack/studio-registry';
4
+ import { StudioStateConfig, RawStaticValue, ICSEntryReference, StudioSpecData, DataSources, SectionScopedDataSources, StaticValue, BreakpointInput, Breakpoint } from '@contentstack/studio-registry';
5
5
  export { Breakpoint } from '@contentstack/studio-registry';
6
6
  import * as _contentstack_studio_messenger from '@contentstack/studio-messenger';
7
- import { CompositionQuery, CompositionQueryInput, ComposableStudioQueryParams, ComposableStudioQueryParamsKeys, HiddenElementNotificationEventData, POST_MESSAGE_EVENTS } from '@contentstack/studio-messenger';
7
+ import { CompositionQuery, CompositionQueryInput, ComposableStudioQueryParams, ComposableStudioQueryParamsKeys, HiddenElementNotificationEventData } from '@contentstack/studio-messenger';
8
8
  export { IS_BROWSER } from '@contentstack/studio-messenger';
9
9
  import { z } from 'zod';
10
10
  import deliverySdk, { BaseAsset } from '@contentstack/delivery-sdk';
11
11
  import { Stack } from 'contentstack';
12
- import { HitboxDetails, SerializedEvent, RefetchSpecEventData, ApplySymbolOperationEventData } from '@contentstack/studio-message-types/latest';
12
+ import { HitboxDetails, SerializedEvent, RefetchSpecEventData } from '@contentstack/studio-message-types/latest';
13
13
  export { ActiveBreakpointEventPayload, BaseHighlightEventPayload, ChangeActiveStyleGroupPayload, ComputedStyleSection, DraggerPosition, HighlightActiveNodeEventPayload, HighlightAncestorsEventPayload, HighlightFocusedNodeEventPayload, HighlightNodeEventPayload, HighlightSlotNodeEventPayload, HighlightStyleNodeEventPayload, HitboxDetails, MouseMoveEventPayload, MouseUpEventPayload, RefetchSpecEventData, RequestHighlightNodeEventPayload, SetCursorTypeEventPayload, TARGET_NODE, UpdateStyleEventPayload, ValidatePropEventPayload, handleActiveNodePayload, handleActiveSlotNode, handleFocusedNodePayload } from '@contentstack/studio-message-types/latest';
14
14
  import { EventEmitter } from 'eventemitter3';
15
15
  import { IJsonToHtmlOptions } from '@contentstack/json-rte-serializer';
@@ -50,6 +50,14 @@ declare const userConfigSchema: z.ZodObject<{
50
50
  }>>;
51
51
  fetchComposition: z.ZodOptional<z.ZodType<CompositionFetcher, z.ZodTypeDef, CompositionFetcher>>;
52
52
  fetchTemplateEntry: z.ZodOptional<z.ZodType<TemplateEntryFetcher, z.ZodTypeDef, TemplateEntryFetcher>>;
53
+ /**
54
+ * Shared-state integration. Storage options: `"local"` / `"session"` use
55
+ * built-in web-storage stores; `"custom"` (or providing getState/setState
56
+ * with no `storage`) delegates to the user's own store. `state` present
57
+ * with neither → built-in SESSION store. Omit `state` entirely to keep the
58
+ * SDK's internal in-memory Map (fully backward compatible).
59
+ */
60
+ state: z.ZodOptional<z.ZodType<StudioStateConfig, z.ZodTypeDef, StudioStateConfig>>;
53
61
  }, "strip", z.ZodTypeAny, {
54
62
  locale?: string | undefined;
55
63
  contentTypeUid?: string | undefined;
@@ -63,6 +71,7 @@ declare const userConfigSchema: z.ZodObject<{
63
71
  } | undefined;
64
72
  fetchComposition?: CompositionFetcher | undefined;
65
73
  fetchTemplateEntry?: TemplateEntryFetcher | undefined;
74
+ state?: StudioStateConfig | undefined;
66
75
  }, {
67
76
  locale?: string | undefined;
68
77
  contentTypeUid?: string | undefined;
@@ -76,6 +85,7 @@ declare const userConfigSchema: z.ZodObject<{
76
85
  } | undefined;
77
86
  fetchComposition?: CompositionFetcher | undefined;
78
87
  fetchTemplateEntry?: TemplateEntryFetcher | undefined;
88
+ state?: StudioStateConfig | undefined;
79
89
  }>;
80
90
 
81
91
  type JSStack = Stack;
@@ -123,7 +133,7 @@ declare class StackSDK {
123
133
  applyTaxonomyFilters(query: any, taxonomyConstraints: Record<string, string>): any;
124
134
  }
125
135
 
126
- interface Config extends DeepRequired<Omit<UserConfig, "stackSdk" | "locale" | "fetchComposition" | "fetchTemplateEntry">> {
136
+ interface Config extends DeepRequired<Omit<UserConfig, "stackSdk" | "locale" | "fetchComposition" | "fetchTemplateEntry" | "state">> {
127
137
  stackSdk: StackSDK;
128
138
  locale?: string;
129
139
  /**
@@ -135,6 +145,11 @@ interface Config extends DeepRequired<Omit<UserConfig, "stackSdk" | "locale" | "
135
145
  variantAlias?: string;
136
146
  fetchComposition?: CompositionFetcher;
137
147
  fetchTemplateEntry?: TemplateEntryFetcher;
148
+ /**
149
+ * Bring-Your-Own-State config, passed through as-is (kept out of
150
+ * DeepRequired so `subscribe` / `variables` stay optional).
151
+ */
152
+ state?: StudioStateConfig;
138
153
  }
139
154
  type LightConfig = Pick<Config, "openInStudioButton" | "contentTypeUid" | "cslp">;
140
155
  type UserConfig = z.infer<typeof userConfigSchema>;
@@ -192,6 +207,23 @@ declare const findNearestBuilderNode: (ele: HTMLElement) => HTMLElement | null;
192
207
  declare const findNearestSlotNode: (ele: HTMLElement) => HTMLElement | null;
193
208
  declare const hasSlotDropzone: (event: MouseEvent) => boolean;
194
209
  declare const getHitboxDirection: (event: MouseEvent, nodeBoundingBox: DOMRect) => "top" | "bottom" | "left" | "right";
210
+ /**
211
+ * Give a `display: contents` node a real box so it can be measured and captured,
212
+ * and put it back afterwards.
213
+ *
214
+ * `flow-root`, not `block`. A `display: contents` node has NO box at all, so the
215
+ * one we fabricate here has to match what a screenshot of it will actually
216
+ * render. `block` does not: a child's top margin collapses THROUGH a plain block
217
+ * with auto height, so the measured box excludes it — but inside the
218
+ * `<foreignObject>` used to rasterise the node the cloned root establishes a new
219
+ * block formatting context, the margin is retained, and the content is pushed
220
+ * down out of a box that was sized without it. A section that is just an `<h1>`
221
+ * (0.67em default margin) then captures only the top few pixels of its glyphs.
222
+ * `flow-root` makes the live box a formatting context too, so measured layout
223
+ * matches rendered layout, while keeping block-level width — unlike
224
+ * `inline-block` or `table`, which shrink-to-fit and truncate the capture
225
+ * horizontally.
226
+ */
195
227
  declare const toggleNodeVisible: (node: Element, visible: boolean) => void;
196
228
  declare const getComposableElement: (uid: string) => HTMLElement;
197
229
  declare const getHitboxDetails: (event: MouseEvent) => HitboxDetails;
@@ -401,11 +433,11 @@ interface CompositionEntry {
401
433
  content_type_uid: string;
402
434
  selected_field?: string;
403
435
  display_name?: string;
436
+ cardinality?: "collection" | "single";
404
437
  }[];
405
438
  ui: CompositionEntryIncompleteUi;
406
439
  data_sources: string;
407
440
  static_value?: RawStaticValue;
408
- symbols?: ICSEntryReference[];
409
441
  url_metadata?: CompositionUrlMetadataSerialized;
410
442
  /**
411
443
  * CMA-level references to section composition entries placed inside this
@@ -414,11 +446,6 @@ interface CompositionEntry {
414
446
  */
415
447
  linked_sections?: ICSEntryReference[] | CompositionEntry[];
416
448
  }
417
- interface SymbolEntry extends Omit<CompositionEntry, "ui"> {
418
- ui_preview?: BaseAsset;
419
- ui: Node;
420
- tags: ["symbol"];
421
- }
422
449
  interface SectionCompositionEntry extends Omit<CompositionEntry, "ui"> {
423
450
  ui_preview?: BaseAsset;
424
451
  ui: Node;
@@ -433,7 +460,6 @@ interface StudioSpec {
433
460
  data: StudioSpecData;
434
461
  ui: Node;
435
462
  compositionEntry: RenderableCompositionEntry;
436
- symbols?: SymbolEntry[];
437
463
  sectionCompositions?: SectionCompositionEntry[];
438
464
  config?: LightConfig;
439
465
  /**
@@ -588,23 +614,45 @@ type StudioComponentFetchOptions = {
588
614
  */
589
615
  type StudioComponentSpecOptions = {
590
616
  /**
591
- * When the componen is rendered in SSR within the studio,
592
- * we get the spec as null. YOU SHOULD NOT PASS IT AS NULL.
617
+ * The resolved composition. `null` only when a caller builds this object by
618
+ * hand to mean "I hold no spec, fetch it from the parent window" — the
619
+ * built-in canvas does exactly that, having no credentials to fetch with.
620
+ * A fetch never returns `null`; it rejects instead.
593
621
  */
594
622
  spec: StudioSpec | null;
623
+ /**
624
+ * Opaque machinery for `<StudioComponent>` — pass it through, do not inspect
625
+ * it. The renderer reads the composition query, the query options and the
626
+ * config out of it to re-initialise and re-fetch on the client.
627
+ */
595
628
  fetchOptions: StudioComponentFetchOptions;
596
629
  /**
597
- * This is used to determine whether the spec is available.
598
- * If the spec is not available, we can show a 404 page.
630
+ * Whether the resolved spec carries a composition entry.
631
+ *
632
+ * **Not a 404 signal.** Every "there is no composition here" outcome rejects
633
+ * rather than returning, so on a resolved fetch this is always `true`, and on
634
+ * the push path it is `true` whenever Studio supplied a spec. To test for the
635
+ * no-spec sentinel, check `spec` itself.
636
+ *
637
+ * @deprecated Read `spec.compositionEntry` directly, and decide 404 from the
638
+ * rejected `ComposableStudioError`. Slated for removal in a future major.
599
639
  */
600
640
  hasSpec: boolean;
601
641
  /**
602
- * This is used to determine whether the template (connected Template data)
603
- * is available.
604
- * If the template is not available, we can show a 404 page.
642
+ * Whether the spec carries resolved data for a connected content type.
643
+ *
644
+ * **Not a 404 signal.** It is `false` for every **freeform** composition, so
645
+ * gating a 404 on it returns 404 for every freeform page, however that page
646
+ * is published. Its exact meaning also differs between the fetch and push
647
+ * paths, which is a second reason not to branch on it.
605
648
  *
606
- * This value is false if the template is not available or the composition
607
- * is not connected to a template.
649
+ * @deprecated For composition kind read
650
+ * `spec.compositionEntry.connected_content_type` (empty or absent means
651
+ * freeform). For the 404 decision branch on the rejected
652
+ * `ComposableStudioError`'s `id`: `COMPOSITION_NOT_FOUND`,
653
+ * `COMPOSITION_NOT_FOUND_BY_URL` and `PREVIEW_ENTRY_NOT_FOUND` mean "no page
654
+ * at this URL"; every other id is a render failure and should surface as
655
+ * 5xx, not 404. Slated for removal in a future major.
608
656
  */
609
657
  hasTemplate: boolean;
610
658
  /**
@@ -812,6 +860,24 @@ declare class ComposableStudioError extends Error {
812
860
  }
813
861
 
814
862
  declare const evaluateCondition: (condition: Condition, data: any) => boolean;
863
+ /**
864
+ * Answers both questions a ConditionBlock has to ask: does this condition pass,
865
+ * and what data should its children see.
866
+ *
867
+ * When the condition binds through a repeater, the bound value is projected
868
+ * onto the repeater's context path so descendants resolve against the matched
869
+ * branch. Everything off that path is shared by reference — the projection must
870
+ * not deep-copy the spec, which is large.
871
+ *
872
+ * Lives here, with `evaluateCondition`, because all three renderers (runtime,
873
+ * editor and RSC) need the identical answer and previously derived it
874
+ * separately. `shouldRender` is evaluated against the UNPROJECTED data, which
875
+ * is what all three did.
876
+ */
877
+ declare const resolveConditionScope: <T>(condition: Condition, data: T) => {
878
+ shouldRender: boolean;
879
+ scopedData: T;
880
+ };
815
881
 
816
882
  declare class RendererModeUtil {
817
883
  private searchParams;
@@ -954,7 +1020,20 @@ interface SectionNeeds {
954
1020
  parentRepeaterUID?: string;
955
1021
  selectedField?: string;
956
1022
  uidRemapping?: Record<string, string>;
1023
+ cardinality?: "collection" | "single";
957
1024
  componentPropsFallback?: Record<string, unknown>;
1025
+ /**
1026
+ * The document this instance's section data lives in (ADR 0017): `"template"`,
1027
+ * a `<ct>:<uid>` pinned-entry key, or `query:<dsUid>`. Absent ⇒ template, so
1028
+ * every pre-existing composition behaves exactly as before.
1029
+ */
1030
+ fetchRootKey?: string;
1031
+ /**
1032
+ * The path WITHIN that document. For the template root this is the same thing
1033
+ * as `selectedField`; for a pinned-entry root it is the root path with the
1034
+ * `<ct>:<uid>` document segment already dropped.
1035
+ */
1036
+ fetchRootPrefix?: string[];
958
1037
  }
959
1038
  type NeedsBySection = Map<string, SectionNeeds>;
960
1039
 
@@ -1059,6 +1138,251 @@ declare function getCompositionMetadata(specOptions: Pick<StudioComponentSpecOpt
1059
1138
  */
1060
1139
  declare function renderMetadataToHtml(metadata: CompositionMetadata): string;
1061
1140
 
1141
+ /**
1142
+ * A placement's **Section data** — the binding that supplies a placed section's
1143
+ * data, i.e. what the section's own `template.*` paths resolve against.
1144
+ *
1145
+ * Persisted on the placed section-composition node as part of
1146
+ * `metadata.sectionBindingOverride`. Being a binding rather than a bare field
1147
+ * path is what lets a section root at a pinned entry, a query result or a
1148
+ * repeater item — none of which a freeform page can express as a path into a
1149
+ * page template entry it does not have. See ADR 0016.
1150
+ *
1151
+ * Three states, all distinguishable and all load-bearing:
1152
+ *
1153
+ * | value | meaning |
1154
+ * |-------------|--------------------------------------------------------|
1155
+ * | `undefined` | inherit the section's declared `selected_field` |
1156
+ * | `null` | deliberately cleared — render no bound data |
1157
+ * | a binding | the author's choice |
1158
+ *
1159
+ * `undefined` cannot be collapsed into `null`: absence has to keep meaning
1160
+ * "follow the section's declaration", so a section author's later change to
1161
+ * `linked_schemas` still propagates to placements that never opted in.
1162
+ */
1163
+ type SectionDataBinding = BindingType | null | undefined;
1164
+ interface SectionBindingOverride {
1165
+ /**
1166
+ * Legacy per-placement field path. Still READ (it is the migration source for
1167
+ * `rootBinding`), never newly written.
1168
+ */
1169
+ selectedField?: string;
1170
+ uidRemapping?: Record<string, string>;
1171
+ /** The Section data. See {@link SectionDataBinding} for the three states. */
1172
+ rootBinding?: BindingType | null;
1173
+ /**
1174
+ * Which `linked_schemas` entry the Section data matched.
1175
+ *
1176
+ * On a template the winner is found by `content_type_uid === pageCT`. A
1177
+ * freeform page has no page content type, so without this the cold-load path
1178
+ * falls back to `linked_schemas[0]` and reads `cardinality` off the wrong
1179
+ * schema — a collection section then silently renders as a single element.
1180
+ */
1181
+ matchedSchemaCt?: string;
1182
+ }
1183
+ /** Binding `type` for a path into the page's template entry. */
1184
+ declare const TEMPLATE_BINDING_TYPE = "template";
1185
+ /**
1186
+ * Split a dotted field path into binding-path segments, dropping the array
1187
+ * indices and modular-block numeric prefixes that are not data keys. Mirrors
1188
+ * `sanitizeFieldPath` in sdk.ts — kept local so this module stays dependency-free
1189
+ * and usable from Studio.
1190
+ */
1191
+ declare function splitFieldPath(path: string): string[];
1192
+ /**
1193
+ * Nest dotted path segments into the object shape a binding `value.path` uses:
1194
+ * `["a", "b"]` → `{ a: { b: {} } }`. An empty path nests to `{}`, which is what
1195
+ * a scope-root binding carries.
1196
+ */
1197
+ declare function nestPath(segments: string[]): Record<string, unknown>;
1198
+ /** The inverse of {@link nestPath}: walk the single-key chain back to segments. */
1199
+ declare function flattenPath(path: Record<string, unknown> | undefined | null): string[];
1200
+ /**
1201
+ * Build the template-typed Section data equivalent to a legacy `selectedField`.
1202
+ *
1203
+ * This is the whole migration: every placement saved before the Section data
1204
+ * existed resolves to exactly the binding it behaved as, derived on read. No
1205
+ * stored data changes.
1206
+ */
1207
+ declare function synthesizeTemplateRootBinding(selectedField: string | undefined): BindingType;
1208
+ /** Whether a resolved Section data means "deliberately cleared". */
1209
+ declare function isDataRootCleared(root: SectionDataBinding): root is null;
1210
+ /**
1211
+ * Whether a Section data points into the page's template entry — the only kind
1212
+ * that extends a page-template prefix. A contentstack / query / repeater-typed
1213
+ * root names its own document instead (see ADR 0017's fetch root).
1214
+ */
1215
+ declare function isTemplateRootBinding(root: SectionDataBinding): boolean;
1216
+ /**
1217
+ * The path a Section data addresses **within the scope its placement already
1218
+ * inherits** — the page template entry for a `template` root, the live
1219
+ * iteration item for a `repeater` one (ADR 0006).
1220
+ *
1221
+ * This is what the renderer means by `selectedField`: the provider scopes the
1222
+ * enclosing repeater item (or the template entry) by it. A root naming ANOTHER
1223
+ * document carries its path in the fetch root's `prefix` instead, so it has no
1224
+ * scope path — the two are never both in play.
1225
+ *
1226
+ * The `template`-only version of this test is what left a repeater-relative
1227
+ * root unusable: its path (`hero_card` inside the item) was dropped on the way
1228
+ * to the renderer, every iteration scoped to the whole item, and the section
1229
+ * rendered component defaults.
1230
+ */
1231
+ declare function getRootScopePath(root: SectionDataBinding): string[];
1232
+ /**
1233
+ * The dotted path a Section data addresses *within* its document.
1234
+ *
1235
+ * For a template root this is the old `selectedField`. For a contentstack root
1236
+ * the first segment is the `<ct>:<uid>` pool key, which names the **document**
1237
+ * rather than a field inside it — callers that need the in-document path must
1238
+ * drop it (`dropDocumentSegment`).
1239
+ */
1240
+ declare function getRootBindingPath(root: SectionDataBinding): string[];
1241
+ interface SectionInstanceNode {
1242
+ metadata?: {
1243
+ sectionBindingOverride?: SectionBindingOverride;
1244
+ selectedField?: string;
1245
+ compositionUID?: string;
1246
+ [key: string]: unknown;
1247
+ };
1248
+ }
1249
+ type LinkedSchemasLookup = (compositionUid: string | undefined) => Array<{
1250
+ content_type_uid: string;
1251
+ selected_field?: string;
1252
+ }>;
1253
+ /**
1254
+ * The legacy `selectedField` ladder, verbatim: per-instance override → legacy
1255
+ * `metadata.selectedField` → the `linked_schemas` default for the page content
1256
+ * type → the first schema.
1257
+ *
1258
+ * Extracted so the Section data resolver and the existing page-template
1259
+ * projection read the SAME ladder and cannot drift. Returns the path
1260
+ * **unsanitised** — callers that need CDA-safe segments sanitise at the point
1261
+ * of use, exactly as they did before the Section data existed.
1262
+ */
1263
+ declare function resolveLegacySelectedField(node: SectionInstanceNode, linkedSchemasFor: LinkedSchemasLookup, pageContentTypeUid: string): string;
1264
+ /**
1265
+ * Where a resolved `selectedField` came from — which decides whether it is
1266
+ * relative to an enclosing wrapper section or absolute from the page root.
1267
+ *
1268
+ * - `"override"` — the page composer picked it. The picker's options come from
1269
+ * `findMatchingPageFields` against the schema **scoped to the drop
1270
+ * location**, so an override is RELATIVE to the enclosing wrapper.
1271
+ * - `"declared"` — read off `linked_schemas` by matching the PAGE content
1272
+ * type, so it is rooted at the page entry: ABSOLUTE.
1273
+ * - `"legacy"` — `metadata.selectedField` from before per-instance overrides
1274
+ * existed; same origin as `declared`, so also absolute.
1275
+ *
1276
+ * This distinction is what the leading-overlap collapse in
1277
+ * `composeSectionTemplatePrefix` was approximating by string comparison. Overlap
1278
+ * catches an absolute path that happens to SHARE a leading segment with its
1279
+ * ancestor; it cannot catch one that does not, which is how a slot child ends up
1280
+ * with `author.related_block` — a path the referenced content type does not
1281
+ * have, silently dropped by CDA.
1282
+ */
1283
+ type SelectedFieldProvenance = "override" | "legacy" | "declared";
1284
+ declare function resolveLegacySelectedFieldWithProvenance(node: SectionInstanceNode, linkedSchemasFor: LinkedSchemasLookup, pageContentTypeUid: string): {
1285
+ field: string;
1286
+ provenance: SelectedFieldProvenance;
1287
+ };
1288
+ /**
1289
+ * Whether a resolved field is rooted at the page entry rather than at an
1290
+ * enclosing wrapper section. A page-absolute field must REPLACE the inherited
1291
+ * prefix, never be concatenated onto it.
1292
+ *
1293
+ * A scope-root field ("") is neither — it adds no segment either way — so it is
1294
+ * reported as not absolute to keep the inherited prefix intact.
1295
+ */
1296
+ declare function isPageAbsoluteField(field: string, provenance: SelectedFieldProvenance): boolean;
1297
+ /**
1298
+ * Resolve a section-composition node's effective **Section data**.
1299
+ *
1300
+ * Resolution order — the existing `selectedField` ladder with one tier added on
1301
+ * top, so this is strictly a superset of today's behaviour:
1302
+ *
1303
+ * 1. `sectionBindingOverride.rootBinding` when the key is PRESENT (including
1304
+ * an explicit `null`, which means cleared)
1305
+ * 2. otherwise synthesise a template-typed binding from the legacy
1306
+ * `selectedField` ladder: override → `metadata.selectedField` →
1307
+ * `linked_schemas` default for the page content type → first schema
1308
+ *
1309
+ * The caller MUST NOT write the result back onto the node. Persisted state is
1310
+ * structurally diffed against the save baseline (ADR 0007), so persisting a
1311
+ * derived value would mark every pre-existing page dirty the moment it opens,
1312
+ * and would freeze a live fallback into a copy.
1313
+ */
1314
+ declare function resolveInstanceRootBinding(node: SectionInstanceNode, linkedSchemasFor: LinkedSchemasLookup, pageContentTypeUid: string): SectionDataBinding;
1315
+ /**
1316
+ * Which `linked_schemas` entry a placement is bound to.
1317
+ *
1318
+ * Prefers the persisted `matchedSchemaCt` (the only answer available on a
1319
+ * freeform page), falling back to matching the page content type the way the
1320
+ * template path always has.
1321
+ */
1322
+ declare function resolveMatchedSchema<T extends {
1323
+ content_type_uid: string;
1324
+ selected_field?: string;
1325
+ }>(node: {
1326
+ metadata?: {
1327
+ sectionBindingOverride?: SectionBindingOverride;
1328
+ };
1329
+ }, linkedSchemas: T[] | undefined, pageContentTypeUid: string): T | undefined;
1330
+ /**
1331
+ * Deep-compare two Section datas. Used by the stamp pass, which must compare a
1332
+ * DERIVED binding against a DERIVED binding: comparing a `BindingType` object
1333
+ * against a raw `selectedField` string never matches, so every template
1334
+ * placement would stamp and every old page would go dirty on open.
1335
+ */
1336
+ declare function sectionDataEqual(a: SectionDataBinding, b: SectionDataBinding): boolean;
1337
+ /**
1338
+ * A **fetch root**: the single fetched document a set of data paths is rooted
1339
+ * at, and whose CDA `include[]` those paths are contributed to.
1340
+ *
1341
+ * `include[]` / `only[]` are properties of a *request*, not of a path — you can
1342
+ * only add an include to a document that is actually being fetched. So a path
1343
+ * is only meaningful paired with the document it counts from.
1344
+ *
1345
+ * A template page has exactly ONE fetch root (the template entry), which is why
1346
+ * the pre-existing code could accumulate every section's paths into two flat
1347
+ * arrays. A freeform page has one per Section data in play, so the destination is
1348
+ * per-instance and only knowable after resolving that instance's binding.
1349
+ */
1350
+ interface FetchRoot {
1351
+ /** `"template"`, a `<ct>:<uid>` pool key, or `query:<dsUid>`. */
1352
+ key: string;
1353
+ /** The path *within* that document. */
1354
+ prefix: string[];
1355
+ }
1356
+ declare const TEMPLATE_FETCH_ROOT_KEY = "template";
1357
+ declare const templateFetchRoot: (prefix?: string[]) => FetchRoot;
1358
+ /** Whether a fetch-root key names the page template entry. */
1359
+ declare function isTemplateFetchRoot(key: string): boolean;
1360
+ /**
1361
+ * Parse a `<ct>:<uid>` fetch-root key back into its parts. Returns null for the
1362
+ * template root and for query roots, neither of which is an entry.
1363
+ */
1364
+ declare function parseEntryFetchRootKey(key: string): {
1365
+ contentTypeUid: string;
1366
+ entryUid: string;
1367
+ } | null;
1368
+ /**
1369
+ * Derive the fetch root a Section data addresses.
1370
+ *
1371
+ * The first path segment of a non-template binding names the **document**, not
1372
+ * a field inside it, so it becomes the key and is dropped from the prefix:
1373
+ *
1374
+ * { contentstack, path: { "mkt_ct:blt1": { banner: {} } } }
1375
+ * → { key: "mkt_ct:blt1", prefix: ["banner"] }
1376
+ *
1377
+ * A `repeater`-typed root inherits the enclosing document: the repeater re-scopes
1378
+ * per iteration at render time, but the includes still belong to whichever
1379
+ * document the repeater's own source was fetched from.
1380
+ *
1381
+ * Returns `inherited` unchanged for a cleared root — there is nothing to fetch,
1382
+ * so nothing should be re-anchored.
1383
+ */
1384
+ declare function fetchRootFromBinding(root: SectionDataBinding, inherited: FetchRoot): FetchRoot;
1385
+
1062
1386
  /**
1063
1387
  * Processes the raw static values and stored them against their static value UID.
1064
1388
  *
@@ -1085,7 +1409,7 @@ declare function renderMetadataToHtml(metadata: CompositionMetadata): string;
1085
1409
  *
1086
1410
  * }
1087
1411
  */
1088
- declare function preProcessStaticValues(rawStaticValues: RawStaticValue): StaticValue;
1412
+ declare function preProcessStaticValues(rawStaticValues: RawStaticValue | string): StaticValue;
1089
1413
  type ParsedStringResult = {
1090
1414
  value: any;
1091
1415
  } & ({
@@ -1322,14 +1646,12 @@ declare const COMPOSABLE_STUDIO_EMITTED_EVENTS: {
1322
1646
 
1323
1647
  type RefetchSpecHandler = (data: RefetchSpecEventData) => void;
1324
1648
  type HiddenElementNotificationHandler = (data: HiddenElementNotificationEventData) => void;
1325
- type ApplySymbolOperationHandler = (data: ApplySymbolOperationEventData) => void;
1326
1649
  /**
1327
1650
  * Emitted events
1328
1651
  */
1329
1652
  interface EmittedEvents {
1330
1653
  [COMPOSABLE_STUDIO_EMITTED_EVENTS.REFETCH_SPEC]: RefetchSpecHandler;
1331
1654
  [COMPOSABLE_STUDIO_EMITTED_EVENTS.HIDDEN_ELEMENT_NOTIFICATION]: HiddenElementNotificationHandler;
1332
- [POST_MESSAGE_EVENTS.APPLY_SYMBOL_OPERATION]: ApplySymbolOperationHandler;
1333
1655
  }
1334
1656
 
1335
1657
  declare const composableStudioEventEmitter: EventEmitter<EmittedEvents, any>;
@@ -1704,5 +2026,5 @@ declare function rankUrlMatches(requestUrl: string, lightweightEntries: Lightwei
1704
2026
  */
1705
2027
  declare function shouldUseUrlMetadataPath(url_metadata?: Partial<CompositionUrlMetadataSerialized>): boolean;
1706
2028
 
1707
- export { BreakpointManager, COMPOSABLE_DATA_ATTRIBUTES, COMPOSABLE_STUDIO_EMITTED_EVENTS, COMPOSITION_PLACEMENT_OPTIONS, COMPOSITION_PREVIEW_URL_SOURCES, COMPOSITION_PREVIEW_URL_SOURCES_VALUES, ComposableStudioError, ComposableStudioErrors, DEFAULT_BREAKPOINTS, DEFAULT_COMPOSITION_PREVIEW_URL_SOURCE, EDGE_PADDING, ELEMENT_TO_NODE, ExpressionResolver, GOOGLE_FONT_API, INCLUDE_DEPTH_COUNT, MAX_SCROLL_SPEED, NODE_TO_ELEMENT, NODE_TO_PARENT, NODE_TO_PATH_NODE, QueryExecutor, RendererMode, RendererModeUtil, SCHEMA_VERSION, SCROLL_INTERVAL, SDK_VERSION, SECTION_COMPOSITIONS_KEY, STUDIO_CANVAS_QUERY_PARAM, STUDIO_MODE_HTML_CLASS, TEMPLATE_FULL_ENTRY_KEY, URL_PATTERN_DATE_VARIABLES, URL_PATTERN_METADATA_FIELDS, URL_PATTERN_METADATA_FIELDS_VALUES, URL_PATTERN_VARIABLE_TYPES, addBreakpointEventListeners, addContextMenuEventListeners, addHighlightNodeEventListeners, addHighlightSpacingEventListeners, addUrlChangeListeners, analyzeMultipleSpecs, analyzeUsedComponents, applyOperation, batchFetchEntries, buildSectionScopedData, buildTemplateQuery, buildUrlMetadataQueryObject, calculateDynamicSpeed, clientRendererModeUtil, closeHiddenElementNotification, compileUrlPattern, composableStudioEventEmitter, compositionSaveEventListener, computePatternSpecificity, createClassNameUid, createEmbeddedEntryConversion, studioSdk as default, defaultAssetRender, detectStudioMode, dndEventListener, dndManager, entriesFromResponse, evaluateCondition, extractHtmlRteRefs, extractJsonRteRefs, fetchEmbeddedEntries, findNearestBuilderNode, findNearestSlotNode, findPath, findPathForElement, getBindingStringForCS, getComponentUsageStats, getComposableElement, getCompositionMetadata, getComputedStyles, getDefaultConfig, getEmbeddedAssetRenderer, getEmbeddedEntryRenderer, getHitboxDetails, getHitboxDirection, getJSONRTE, getNodeScreenshotEvent, getScrollableParent, getSeoMetadataPure, handleOnScroll, handleResize, hasSlotDropzone, hiddenElementNotificationEventEmitter, highlightNodeManager, isBrowser, isCompositionBeingEdited, isInsideIframe, isInsideVisualBuilderFrame, isModKey, isStudioCanvas, isStudioEditorMode, loadGoogleFont, markStudioMode, matchCompositionUrl, matchUrlPattern, onlyParmasGenerator, openHiddenElementNotification, parseStringValue, parseUrlMetadata, preProcessStaticValues, queryParam, rankUrlMatches, registerEmbeddedEntryRenderer, registerJSONRTE, registerRTERenderer, removeStaticEntryFromDS, renderMetadataToHtml, resolveByUrlSource, serializeComputedStyles, serializeEvent, setStaticEntryInDS, setTemplateEntryInDS, shouldExtractTaxonomies, shouldUseUrlMetadataPath, specUsesComponent, studioSdk, toggleNodeVisible, updateStyleOnStyleNodeChange };
1708
- export type { ClientEditableNodeInternalAttributes, ClientPreviewNodeInternalAttributes, ComposableStudioErrorDetails, ComposableStudioLightSdk, CompositionEntry, CompositionEntryIncompleteUi, CompositionFetcher, CompositionMetaTag, CompositionMetadata, CompositionPlacement, CompositionPreviewUrlSource, CompositionPreviewUrlSourceValues, CompositionQueryForSSR, CompositionQueryForSSRInput, CompositionQueryOptions, CompositionUrlMetadata, CompositionUrlMetadataSerialized, CompositionUrlQueries, Config, ConnectedEntryResult, DateVariableKey, EmbeddedAssetRenderArgs, EmbeddedEntryConversionOptions, EmbeddedEntryRenderArgs, EmittedEvents, ExtractedUrlPatternVariables, ExtractedUrlVariables, FetchCompositionContext, FetchTemplateEntryContext, FieldValue, FontVariants, GetCompositionMetadataOptions, GoogleFont, HiddenElementNotificationHandler, LightConfig, LightweightCompositionEntry, MetaProp, ParsedStringResult, PatternMatchResult, QueryExecutionOptions, QueryResult, QuerySpec, QueryState, RTEConfig, RankingResult, ReferenceFieldValue, RenderableCompositionEntry, ResolvedEmbeddedEntry, ResolvedQueryOptions, RuntimeContext, SearchQueryInput, SectionCompositionEntry, SeoMetadata, StudioComponentFetchOptions, StudioComponentSpecOptions, StudioMode, StudioSdk, StudioSpec, SymbolEntry, TemplateEntryFetcher, TemplateQueryContext, TroubleshootingInfo, URLSearchParamsString, UrlMatchDiagnostic, UrlMetadataQueryMode, UrlPatternMetadataField, UrlPatternMetadataFieldValue, UserConfig };
2029
+ export { BreakpointManager, COMPOSABLE_DATA_ATTRIBUTES, COMPOSABLE_STUDIO_EMITTED_EVENTS, COMPOSITION_PLACEMENT_OPTIONS, COMPOSITION_PREVIEW_URL_SOURCES, COMPOSITION_PREVIEW_URL_SOURCES_VALUES, ComposableStudioError, ComposableStudioErrors, DEFAULT_BREAKPOINTS, DEFAULT_COMPOSITION_PREVIEW_URL_SOURCE, EDGE_PADDING, ELEMENT_TO_NODE, ExpressionResolver, GOOGLE_FONT_API, INCLUDE_DEPTH_COUNT, MAX_SCROLL_SPEED, NODE_TO_ELEMENT, NODE_TO_PARENT, NODE_TO_PATH_NODE, QueryExecutor, RendererMode, RendererModeUtil, SCHEMA_VERSION, SCROLL_INTERVAL, SDK_VERSION, SECTION_COMPOSITIONS_KEY, STUDIO_CANVAS_QUERY_PARAM, STUDIO_MODE_HTML_CLASS, TEMPLATE_BINDING_TYPE, TEMPLATE_FETCH_ROOT_KEY, TEMPLATE_FULL_ENTRY_KEY, URL_PATTERN_DATE_VARIABLES, URL_PATTERN_METADATA_FIELDS, URL_PATTERN_METADATA_FIELDS_VALUES, URL_PATTERN_VARIABLE_TYPES, addBreakpointEventListeners, addContextMenuEventListeners, addHighlightNodeEventListeners, addHighlightSpacingEventListeners, addUrlChangeListeners, analyzeMultipleSpecs, analyzeUsedComponents, applyOperation, batchFetchEntries, buildSectionScopedData, buildTemplateQuery, buildUrlMetadataQueryObject, calculateDynamicSpeed, clientRendererModeUtil, closeHiddenElementNotification, compileUrlPattern, composableStudioEventEmitter, compositionSaveEventListener, computePatternSpecificity, createClassNameUid, createEmbeddedEntryConversion, studioSdk as default, defaultAssetRender, detectStudioMode, dndEventListener, dndManager, entriesFromResponse, evaluateCondition, extractHtmlRteRefs, extractJsonRteRefs, fetchEmbeddedEntries, fetchRootFromBinding, findNearestBuilderNode, findNearestSlotNode, findPath, findPathForElement, flattenPath, getBindingStringForCS, getComponentUsageStats, getComposableElement, getCompositionMetadata, getComputedStyles, getDefaultConfig, getEmbeddedAssetRenderer, getEmbeddedEntryRenderer, getHitboxDetails, getHitboxDirection, getJSONRTE, getNodeScreenshotEvent, getRootBindingPath, getRootScopePath, getScrollableParent, getSeoMetadataPure, handleOnScroll, handleResize, hasSlotDropzone, hiddenElementNotificationEventEmitter, highlightNodeManager, isBrowser, isCompositionBeingEdited, isDataRootCleared, isInsideIframe, isInsideVisualBuilderFrame, isModKey, isPageAbsoluteField, isStudioCanvas, isStudioEditorMode, isTemplateFetchRoot, isTemplateRootBinding, loadGoogleFont, markStudioMode, matchCompositionUrl, matchUrlPattern, nestPath, onlyParmasGenerator, openHiddenElementNotification, parseEntryFetchRootKey, parseStringValue, parseUrlMetadata, preProcessStaticValues, queryParam, rankUrlMatches, registerEmbeddedEntryRenderer, registerJSONRTE, registerRTERenderer, removeStaticEntryFromDS, renderMetadataToHtml, resolveByUrlSource, resolveConditionScope, resolveInstanceRootBinding, resolveLegacySelectedField, resolveLegacySelectedFieldWithProvenance, resolveMatchedSchema, sectionDataEqual, serializeComputedStyles, serializeEvent, setStaticEntryInDS, setTemplateEntryInDS, shouldExtractTaxonomies, shouldUseUrlMetadataPath, specUsesComponent, splitFieldPath, studioSdk, synthesizeTemplateRootBinding, templateFetchRoot, toggleNodeVisible, updateStyleOnStyleNodeChange };
2030
+ export type { ClientEditableNodeInternalAttributes, ClientPreviewNodeInternalAttributes, ComposableStudioErrorDetails, ComposableStudioLightSdk, CompositionEntry, CompositionEntryIncompleteUi, CompositionFetcher, CompositionMetaTag, CompositionMetadata, CompositionPlacement, CompositionPreviewUrlSource, CompositionPreviewUrlSourceValues, CompositionQueryForSSR, CompositionQueryForSSRInput, CompositionQueryOptions, CompositionUrlMetadata, CompositionUrlMetadataSerialized, CompositionUrlQueries, Config, ConnectedEntryResult, DateVariableKey, EmbeddedAssetRenderArgs, EmbeddedEntryConversionOptions, EmbeddedEntryRenderArgs, EmittedEvents, ExtractedUrlPatternVariables, ExtractedUrlVariables, FetchCompositionContext, FetchRoot, FetchTemplateEntryContext, FieldValue, FontVariants, GetCompositionMetadataOptions, GoogleFont, HiddenElementNotificationHandler, LightConfig, LightweightCompositionEntry, LinkedSchemasLookup, MetaProp, ParsedStringResult, PatternMatchResult, QueryExecutionOptions, QueryResult, QuerySpec, QueryState, RTEConfig, RankingResult, ReferenceFieldValue, RenderableCompositionEntry, ResolvedEmbeddedEntry, ResolvedQueryOptions, RuntimeContext, SearchQueryInput, SectionBindingOverride, SectionCompositionEntry, SectionDataBinding, SectionInstanceNode, SelectedFieldProvenance, SeoMetadata, StudioComponentFetchOptions, StudioComponentSpecOptions, StudioMode, StudioSdk, StudioSpec, TemplateEntryFetcher, TemplateQueryContext, TroubleshootingInfo, URLSearchParamsString, UrlMatchDiagnostic, UrlMetadataQueryMode, UrlPatternMetadataField, UrlPatternMetadataFieldValue, UserConfig };
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ import { studioSdk } from './composable-studio/initializer-sdk.js';
2
2
  export { ELEMENT_TO_NODE, NODE_TO_ELEMENT, NODE_TO_PARENT, NODE_TO_PATH_NODE } from './composable-studio/weak-maps.js';
3
3
  export { buildSectionScopedData, getSeoMetadataPure } from './composable-studio/sdk.js';
4
4
  export { getCompositionMetadata, renderMetadataToHtml } from './composable-studio/composition-metadata.js';
5
+ export { TEMPLATE_BINDING_TYPE, TEMPLATE_FETCH_ROOT_KEY, fetchRootFromBinding, flattenPath, getRootBindingPath, getRootScopePath, isDataRootCleared, isPageAbsoluteField, isTemplateFetchRoot, isTemplateRootBinding, nestPath, parseEntryFetchRootKey, resolveInstanceRootBinding, resolveLegacySelectedField, resolveLegacySelectedFieldWithProvenance, resolveMatchedSchema, sectionDataEqual, splitFieldPath, synthesizeTemplateRootBinding, templateFetchRoot } from './composable-studio/section-data.js';
5
6
  export { parseStringValue, preProcessStaticValues } from './composable-studio/data/pre-process-static-values.js';
6
7
  export { COMPOSITION_PLACEMENT_OPTIONS } from './composable-studio/composition-placement.types.js';
7
8
  export { addContextMenuEventListeners } from './context-menu/context-menu.js';
@@ -28,7 +29,7 @@ export { isInsideVisualBuilderFrame } from './utils/is-inside-visual-builder-fra
28
29
  export { isInsideIframe } from './utils/is-inside-iframe.js';
29
30
  export { STUDIO_CANVAS_QUERY_PARAM, STUDIO_MODE_HTML_CLASS, detectStudioMode, isStudioCanvas, isStudioEditorMode, markStudioMode } from './utils/editor-mode.js';
30
31
  export { ComposableStudioError, ComposableStudioErrors } from './utils/composable-studio-error.js';
31
- export { evaluateCondition } from './utils/conditionBlock.js';
32
+ export { evaluateCondition, resolveConditionScope } from './utils/conditionBlock.js';
32
33
  export { RendererModeUtil, clientRendererModeUtil, serializeComputedStyles } from './utils/canvas.js';
33
34
  export { analyzeMultipleSpecs, analyzeUsedComponents, getComponentUsageStats, specUsesComponent } from './utils/spec-analyzer.js';
34
35
  export { loadGoogleFont } from './design/fonts/index.js';