@contentstack/studio-client 1.5.0 → 1.5.1

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 (81) hide show
  1. package/dist/breakpoints/BreakpointManager.js +17 -5
  2. package/dist/breakpoints/BreakpointManager.js.map +1 -1
  3. package/dist/canvas/canvas.utils.js +1 -1
  4. package/dist/canvas/canvas.utils.js.map +1 -1
  5. package/dist/composable-studio/build-scoped-data.js +101 -0
  6. package/dist/composable-studio/build-scoped-data.js.map +1 -0
  7. package/dist/composable-studio/collect-data-needs.js +226 -0
  8. package/dist/composable-studio/collect-data-needs.js.map +1 -0
  9. package/dist/composable-studio/composition-placement.types.js +7 -0
  10. package/dist/composable-studio/composition-placement.types.js.map +1 -0
  11. package/dist/composable-studio/sdk.js +1316 -113
  12. package/dist/composable-studio/sdk.js.map +1 -1
  13. package/dist/composable-studio/studio-intelligence.manager.js +124 -0
  14. package/dist/composable-studio/studio-intelligence.manager.js.map +1 -0
  15. package/dist/config/default-config.js +1 -0
  16. package/dist/config/default-config.js.map +1 -1
  17. package/dist/config/stack-sdk-wrapper.js +87 -2
  18. package/dist/config/stack-sdk-wrapper.js.map +1 -1
  19. package/dist/design/handle-active-style-change.js +0 -3
  20. package/dist/design/handle-active-style-change.js.map +1 -1
  21. package/dist/dnd/dnd-manager.js +25 -7
  22. package/dist/dnd/dnd-manager.js.map +1 -1
  23. package/dist/dnd/{utils.js → scroll-utils.js} +2 -27
  24. package/dist/dnd/scroll-utils.js.map +1 -0
  25. package/dist/hidden-element-notification/hidden-element-notification-event.js +7 -0
  26. package/dist/hidden-element-notification/hidden-element-notification-event.js.map +1 -1
  27. package/dist/highlight-node/highlight-node-manager.js +7 -1
  28. package/dist/highlight-node/highlight-node-manager.js.map +1 -1
  29. package/dist/highlight-node/highlight-node.js +8 -5
  30. package/dist/highlight-node/highlight-node.js.map +1 -1
  31. package/dist/index.d.ts +432 -22
  32. package/dist/index.js +11 -3
  33. package/dist/index.js.map +1 -1
  34. package/dist/query/query-executor.js +182 -27
  35. package/dist/query/query-executor.js.map +1 -1
  36. package/dist/shared/dnd-events.js +39 -0
  37. package/dist/shared/dnd-events.js.map +1 -0
  38. package/dist/url-metadata/build-template-query.js +124 -0
  39. package/dist/url-metadata/build-template-query.js.map +1 -0
  40. package/dist/url-metadata/parse-url-metadata.js +75 -0
  41. package/dist/url-metadata/parse-url-metadata.js.map +1 -0
  42. package/dist/url-metadata/rank-url-matches.js +100 -0
  43. package/dist/url-metadata/rank-url-matches.js.map +1 -0
  44. package/dist/url-metadata/select-url-winner.js +45 -0
  45. package/dist/url-metadata/select-url-winner.js.map +1 -0
  46. package/dist/url-metadata/shouldUseUrlMetadataPath.js +22 -0
  47. package/dist/url-metadata/shouldUseUrlMetadataPath.js.map +1 -0
  48. package/dist/url-metadata/types.js +50 -0
  49. package/dist/url-metadata/types.js.map +1 -0
  50. package/dist/url-metadata/url-pattern-matcher.js +311 -0
  51. package/dist/url-metadata/url-pattern-matcher.js.map +1 -0
  52. package/dist/utils/build-composition-fetch-query.js +19 -0
  53. package/dist/utils/build-composition-fetch-query.js.map +1 -0
  54. package/dist/utils/composable-studio-error.js +1 -0
  55. package/dist/utils/composable-studio-error.js.map +1 -1
  56. package/dist/utils/conditionBlock.js +1 -1
  57. package/dist/utils/conditionBlock.js.map +1 -1
  58. package/dist/utils/constants.js +22 -2
  59. package/dist/utils/constants.js.map +1 -1
  60. package/dist/utils/convertCompositionQueryInputToCompositionQuery.js +11 -1
  61. package/dist/utils/convertCompositionQueryInputToCompositionQuery.js.map +1 -1
  62. package/dist/utils/editor-utils.js +9 -0
  63. package/dist/utils/editor-utils.js.map +1 -1
  64. package/dist/utils/error-messages.default.js +1 -1
  65. package/dist/utils/error-messages.default.js.map +1 -1
  66. package/dist/utils/http-error.constants.js +11 -2
  67. package/dist/utils/http-error.constants.js.map +1 -1
  68. package/dist/utils/query-param.js +1 -1
  69. package/dist/utils/query-param.js.map +1 -1
  70. package/dist/utils/reference_fetcher.js +37 -22
  71. package/dist/utils/reference_fetcher.js.map +1 -1
  72. package/dist/utils/sdk.js +3 -1
  73. package/dist/utils/sdk.js.map +1 -1
  74. package/dist/utils/spec-analyzer.js +112 -0
  75. package/dist/utils/spec-analyzer.js.map +1 -0
  76. package/package.json +10 -9
  77. package/dist/dnd/utils.js.map +0 -1
  78. package/dist/get-composition-from-slug/get-composition-from-slug.js +0 -59
  79. package/dist/get-composition-from-slug/get-composition-from-slug.js.map +0 -1
  80. package/dist/utils/get-url-patterns.js +0 -40
  81. package/dist/utils/get-url-patterns.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -14,6 +14,12 @@ export { ActiveBreakpointEventPayload, BaseHighlightEventPayload, ChangeActiveSt
14
14
  import { EventEmitter } from 'eventemitter3';
15
15
  import { IJsonToHtmlOptions } from '@contentstack/json-rte-serializer';
16
16
 
17
+ declare const COMPOSITION_PLACEMENT_OPTIONS: {
18
+ readonly PAGE: "page";
19
+ readonly SECTION: "section";
20
+ };
21
+ type CompositionPlacement = (typeof COMPOSITION_PLACEMENT_OPTIONS)[keyof typeof COMPOSITION_PLACEMENT_OPTIONS];
22
+
17
23
  type DeepRequired<T> = Required<{
18
24
  [K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
19
25
  }>;
@@ -45,9 +51,9 @@ declare const userConfigSchema: z.ZodObject<{
45
51
  fetchComposition: z.ZodOptional<z.ZodType<CompositionFetcher, z.ZodTypeDef, CompositionFetcher>>;
46
52
  fetchTemplateEntry: z.ZodOptional<z.ZodType<TemplateEntryFetcher, z.ZodTypeDef, TemplateEntryFetcher>>;
47
53
  }, "strip", z.ZodTypeAny, {
54
+ locale?: string | undefined;
48
55
  contentTypeUid?: string | undefined;
49
56
  stackSdk?: any;
50
- locale?: string | undefined;
51
57
  cslp?: {
52
58
  appendTags?: boolean | undefined;
53
59
  } | undefined;
@@ -58,9 +64,9 @@ declare const userConfigSchema: z.ZodObject<{
58
64
  fetchComposition?: CompositionFetcher | undefined;
59
65
  fetchTemplateEntry?: TemplateEntryFetcher | undefined;
60
66
  }, {
67
+ locale?: string | undefined;
61
68
  contentTypeUid?: string | undefined;
62
69
  stackSdk?: any;
63
- locale?: string | undefined;
64
70
  cslp?: {
65
71
  appendTags?: boolean | undefined;
66
72
  } | undefined;
@@ -78,7 +84,7 @@ declare class StackSDK {
78
84
  sdk: JSStack | TSStack;
79
85
  private _locale?;
80
86
  constructor(sdk: JSStack | TSStack, locale?: string);
81
- isJavaScriptSDK(sdk: Stack | ReturnType<(typeof deliverySdk)["stack"]>): sdk is Stack;
87
+ isJavaScriptSDK(_sdk: Stack | ReturnType<(typeof deliverySdk)["stack"]>): _sdk is Stack;
82
88
  livePreviewQuery(livePreviewHash: string): void;
83
89
  ctQuery(contentTypeUid: string, options?: {
84
90
  includeAll?: boolean;
@@ -87,6 +93,8 @@ declare class StackSDK {
87
93
  only?: [string, string][];
88
94
  variantAlias?: string;
89
95
  locale?: string;
96
+ branch?: string;
97
+ environment?: string;
90
98
  query?: Record<string, any>;
91
99
  }): any;
92
100
  entryQuery(contentTypeUid: string, entryUID: string, options?: {
@@ -103,11 +111,28 @@ declare class StackSDK {
103
111
  enable?: boolean;
104
112
  } | undefined;
105
113
  get locale(): string | undefined;
114
+ /**
115
+ * Create a taxonomy query - mirrors ctQuery style for consistency
116
+ * Prefers stack.Taxonomies() but falls back to ctQuery approach
117
+ */
118
+ taxonomies(): any;
119
+ /**
120
+ * Apply taxonomy filters to a query using taxonomy methods when available,
121
+ * otherwise fall back to ctQuery + where approach
122
+ */
123
+ applyTaxonomyFilters(query: any, taxonomyConstraints: Record<string, string>): any;
106
124
  }
107
125
 
108
126
  interface Config extends DeepRequired<Omit<UserConfig, "stackSdk" | "locale" | "fetchComposition" | "fetchTemplateEntry">> {
109
127
  stackSdk: StackSDK;
110
128
  locale?: string;
129
+ /**
130
+ * Variant alias the SDK should use for all data fetches. Not part of the
131
+ * public `UserConfig` — set by Studio (when running inside a Studio iframe)
132
+ * via the `cs-variant-alias` URL search param so the SDK can render and
133
+ * fetch references in the variant Studio picked.
134
+ */
135
+ variantAlias?: string;
111
136
  fetchComposition?: CompositionFetcher;
112
137
  fetchTemplateEntry?: TemplateEntryFetcher;
113
138
  }
@@ -117,7 +142,26 @@ type UserConfig = z.infer<typeof userConfigSchema>;
117
142
  declare function getDefaultConfig(): Config;
118
143
 
119
144
  declare const isBrowser: () => boolean;
120
- declare const INCLUDE_DEPTH_COUNT = 4;
145
+ /**
146
+ * Depth used for `includeAllDepth` when fetching entries with referenced content.
147
+ *
148
+ * NOTE: This is currently a workaround, not a real fix.
149
+ *
150
+ * The CDA enforces a hard limit of 100 on the number of include reference paths
151
+ * it will process. Exceeding it returns:
152
+ * { error_code: 141, error_message: "The include reference paths processing
153
+ * limit has been exceeded", errors: { include: ["should not be greater than 100"] } }
154
+ *
155
+ * History: started at 5 (worked), hit the 141 error, dropped to 4 (worked again),
156
+ * hit the same error, now at 3. Each step only treats the symptom — the real cause
157
+ * (why our reference path count blows past 100 at higher depths) is still unknown.
158
+ *
159
+ * TODO(COMS-1520): investigate the root cause and replace this magic number with a
160
+ * proper fix instead of lowering the depth each time the limit is hit.
161
+ */
162
+ declare const INCLUDE_DEPTH_COUNT = 3;
163
+ declare const SDK_VERSION: string;
164
+ declare const SCHEMA_VERSION = "1.0.0";
121
165
  declare const COMPOSABLE_DATA_ATTRIBUTES: {
122
166
  readonly BUILDER: "data-composable-studio-builder";
123
167
  readonly PLACEHOLDER: "data-composable-studio-placeholder";
@@ -154,6 +198,186 @@ declare const getHitboxDetails: (event: MouseEvent) => HitboxDetails;
154
198
  declare const getComputedStyles: (event: MouseEvent) => Record<string, string> | null;
155
199
  declare const serializeEvent: (event: MouseEvent) => SerializedEvent;
156
200
 
201
+ /**
202
+ * Composition preview URL source types for CMS field `url_metadata.url_source`
203
+ *
204
+ * These constants define how the composition's preview URL is derived:
205
+ * - From custom preview URLs
206
+ * - From content type URL patterns
207
+ * - From default URL patterns
208
+ * - From user-specified patterns
209
+ * - From legacy URL configuration
210
+ */
211
+ declare const COMPOSITION_PREVIEW_URL_SOURCES: {
212
+ readonly CUSTOM_PREVIEW_URL: "custom_preview_url";
213
+ readonly CONTENT_TYPE_URL_PATTERN: "content_type_url_pattern";
214
+ readonly DEFAULT_URL_PATTERN: "default_url_pattern";
215
+ readonly USER_SPECIFIED_PATTERN: "user_specified_pattern";
216
+ readonly LEGACY_URL: "legacy_url";
217
+ };
218
+ declare const COMPOSITION_PREVIEW_URL_SOURCES_VALUES: ("custom_preview_url" | "content_type_url_pattern" | "default_url_pattern" | "user_specified_pattern" | "legacy_url")[];
219
+ type CompositionPreviewUrlSource = typeof COMPOSITION_PREVIEW_URL_SOURCES;
220
+ type CompositionPreviewUrlSourceValues = CompositionPreviewUrlSource[keyof CompositionPreviewUrlSource];
221
+ declare const DEFAULT_COMPOSITION_PREVIEW_URL_SOURCE: "legacy_url";
222
+ /**
223
+ * URL queries structure - mirrors UI CompositionUrlQueries but excludes 'where' at runtime
224
+ * 'where' is present in the UI type but explicitly ignored in the SDK implementation
225
+ */
226
+ interface CompositionUrlQueries {
227
+ include: string[];
228
+ only: Record<string, string[]>;
229
+ where: Record<string, any>;
230
+ }
231
+ /**
232
+ * URL metadata structure - mirrors UI CompositionUrlMetadata
233
+ */
234
+ interface CompositionUrlMetadata {
235
+ url_source: CompositionPreviewUrlSourceValues;
236
+ url_queries: CompositionUrlQueries;
237
+ }
238
+ /** URL metadata as stored on CMS entries — `url_queries` is a JSON string */
239
+ type CompositionUrlMetadataSerialized = Omit<CompositionUrlMetadata, "url_queries"> & {
240
+ url_queries: string;
241
+ };
242
+ declare const URL_PATTERN_VARIABLE_TYPES: {
243
+ readonly ENTRY: "entry";
244
+ readonly TAXONOMY: "taxonomy";
245
+ readonly METADATA: "metadata";
246
+ readonly DATE: "date";
247
+ readonly WILDCARD: "wildcard";
248
+ };
249
+ declare const URL_PATTERN_METADATA_FIELDS: {
250
+ readonly COMPOSITION_UID: "composition_uid";
251
+ readonly CONTENT_TYPE_UID: "content_type_uid";
252
+ readonly ENVIRONMENT: "environment";
253
+ readonly LOCALE: "locale";
254
+ readonly BRANCH: "branch";
255
+ };
256
+ declare const URL_PATTERN_METADATA_FIELDS_VALUES: ("composition_uid" | "content_type_uid" | "environment" | "locale" | "branch")[];
257
+ type UrlPatternMetadataField = typeof URL_PATTERN_METADATA_FIELDS;
258
+ type UrlPatternMetadataFieldValue = (typeof URL_PATTERN_METADATA_FIELDS_VALUES)[number];
259
+ declare const URL_PATTERN_DATE_VARIABLES: {
260
+ readonly YEAR: "entry_created_date:year";
261
+ readonly YEAR_SHORT: "entry_created_date:year_short";
262
+ readonly MONTH: "entry_created_date:month";
263
+ readonly MONTH_NAME: "entry_created_date:monthname";
264
+ readonly MONTH_NAME_SHORT: "entry_created_date:monthname_short";
265
+ readonly DAY: "entry_created_date:day";
266
+ };
267
+ type DateVariableKey = (typeof URL_PATTERN_DATE_VARIABLES)[keyof typeof URL_PATTERN_DATE_VARIABLES];
268
+ /**
269
+ * Reference field value structure for nested reference objects
270
+ * Used when URL patterns contain reference fields like {{entry.reference.title}}
271
+ */
272
+ type ReferenceFieldValue = Record<string, string | number | boolean>;
273
+ /**
274
+ * Union type for field values - supports both simple values and reference objects
275
+ * - Simple values: "My Title", 123, true
276
+ * - Reference values: { "title": "Ref Title", "group.field": "value" }
277
+ */
278
+ type FieldValue = string | number | boolean | ReferenceFieldValue;
279
+ /**
280
+ * Variables extracted from URL pattern matching
281
+ */
282
+ interface ExtractedUrlPatternVariables {
283
+ /** Entry field variables - supports both simple values and reference objects */
284
+ fields: Record<string, FieldValue>;
285
+ /** Taxonomy variables like { category: "tech", tags: "javascript" } */
286
+ taxonomies: Record<string, string>;
287
+ /** Fixed metadata variables (not used for querying but tracked for future) */
288
+ metadata: {
289
+ composition_uid?: string;
290
+ content_type_uid?: string;
291
+ environment?: string;
292
+ locale?: string;
293
+ branch?: string;
294
+ };
295
+ /** Date pattern variables from content type URL patterns - strongly typed */
296
+ dateVariables: Partial<Record<DateVariableKey, string>>;
297
+ /** Count of literal (non-placeholder) characters for specificity scoring */
298
+ literalCharCount: number;
299
+ /**
300
+ * The full decoded request path that matched this pattern. Used to build the
301
+ * `{{entry.url}}` full-path `$or` branch (match the `url` field against the
302
+ * whole path, not just the captured segment).
303
+ */
304
+ requestPath?: string;
305
+ }
306
+ /**
307
+ * @deprecated Use ExtractedUrlPatternVariables instead
308
+ * Kept for backward compatibility during migration
309
+ */
310
+ type ExtractedUrlVariables = ExtractedUrlPatternVariables;
311
+ /**
312
+ * Result from pattern matching a single URL against a composition URL pattern
313
+ */
314
+ interface PatternMatchResult {
315
+ matched: boolean;
316
+ composable_uid: string;
317
+ /** Only present if matched is true */
318
+ variables?: ExtractedUrlPatternVariables;
319
+ connected_content_type?: string;
320
+ }
321
+ /**
322
+ * Result from ranking multiple patterns against a request URL
323
+ */
324
+ interface RankingResult {
325
+ /** Array of composable_uid strings tied at the highest specificity */
326
+ composableUids: string[];
327
+ /** Array of freeform composition UIDs tied at highest specificity */
328
+ freeformComposableUids: string[];
329
+ /** Array of templated composition UIDs tied at highest specificity */
330
+ templatedComposableUids: string[];
331
+ /** The highest specificity score achieved */
332
+ specificity: number;
333
+ /** All pattern match results for potential future tie-breaking */
334
+ matches: PatternMatchResult[];
335
+ /**
336
+ * Every match across ALL specificity tiers (not just the top tier), each with
337
+ * its score — used for Studio resolution diagnostics so a lower-specificity
338
+ * match of the edited composition is still reported.
339
+ */
340
+ allMatches: UrlMatchDiagnostic[];
341
+ }
342
+ /**
343
+ * Outcome of the entry-existence probe for a candidate during URL resolution
344
+ * (top-tier tie disambiguation):
345
+ * - "found": the connected content type owns a matching entry (a valid winner).
346
+ * - "absent": the content type was queried but owns no matching entry.
347
+ * - "not-checked": no probe ran — not a tie, or a freeform/lower-tier candidate.
348
+ */
349
+ type ConnectedEntryResult = "found" | "absent" | "not-checked";
350
+ /** A single URL match surfaced for diagnostics — lightweight, includes specificity. */
351
+ interface UrlMatchDiagnostic {
352
+ composable_uid: string;
353
+ url?: string;
354
+ specificity: number;
355
+ connected_content_type?: string;
356
+ /** Entry-existence probe outcome; undefined until the probe stamps it. */
357
+ connectedEntryResult?: ConnectedEntryResult;
358
+ }
359
+ /**
360
+ * Lightweight composition entry used in the metadata query phase.
361
+ */
362
+ interface LightweightCompositionEntry {
363
+ composable_uid: string;
364
+ url: string;
365
+ url_metadata?: Partial<CompositionUrlMetadataSerialized>;
366
+ connected_content_type?: string;
367
+ }
368
+ /**
369
+ * Query building context for template entry resolution
370
+ */
371
+ interface TemplateQueryContext {
372
+ compositionQuery: {
373
+ url?: string;
374
+ };
375
+ extractedVariables: ExtractedUrlPatternVariables;
376
+ parsedUrlQueries: CompositionUrlQueries;
377
+ connectedContentType: string;
378
+ url_source: CompositionPreviewUrlSourceValues;
379
+ }
380
+
157
381
  type StudioSdk = ReturnType<typeof studioSdk.init>;
158
382
  type ComposableStudioLightSdk = ReturnType<typeof studioSdk.lightInit>;
159
383
  /**
@@ -172,17 +396,34 @@ interface CompositionEntry {
172
396
  created_at: string;
173
397
  updated_at: string;
174
398
  url?: string;
175
- place_composition_as?: "page" | "section";
399
+ place_composition_as?: CompositionPlacement;
400
+ linked_schemas?: {
401
+ content_type_uid: string;
402
+ selected_field?: string;
403
+ display_name?: string;
404
+ }[];
176
405
  ui: CompositionEntryIncompleteUi;
177
406
  data_sources: string;
178
407
  static_value?: RawStaticValue;
179
408
  symbols?: ICSEntryReference[];
409
+ url_metadata?: CompositionUrlMetadataSerialized;
410
+ /**
411
+ * CMA-level references to section composition entries placed inside this
412
+ * composition's UI. When fetched with `include[]=linked_sections`, this
413
+ * carries the resolved section entries inline.
414
+ */
415
+ linked_sections?: ICSEntryReference[] | CompositionEntry[];
180
416
  }
181
417
  interface SymbolEntry extends Omit<CompositionEntry, "ui"> {
182
418
  ui_preview?: BaseAsset;
183
419
  ui: Node;
184
420
  tags: ["symbol"];
185
421
  }
422
+ interface SectionCompositionEntry extends Omit<CompositionEntry, "ui"> {
423
+ ui_preview?: BaseAsset;
424
+ ui: Node;
425
+ }
426
+ type RenderableCompositionEntry = CompositionEntry | SectionCompositionEntry;
186
427
  /**
187
428
  * This spec is the one we get from our `fetchSpec()` method.
188
429
  * It contains all the information we can derive from the compositionEntry.
@@ -191,9 +432,19 @@ interface SymbolEntry extends Omit<CompositionEntry, "ui"> {
191
432
  interface StudioSpec {
192
433
  data: StudioSpecData;
193
434
  ui: Node;
194
- compositionEntry: CompositionEntry;
435
+ compositionEntry: RenderableCompositionEntry;
195
436
  symbols?: SymbolEntry[];
437
+ sectionCompositions?: SectionCompositionEntry[];
196
438
  config?: LightConfig;
439
+ /**
440
+ * Studio-only resolution diagnostics for the URL metadata path. Present when
441
+ * the composition was resolved by URL ranking; carries every candidate
442
+ * considered with its specificity. Consumed by the React hook to build the
443
+ * `SDK_DIAGNOSTICS` post-message. Not part of the rendered output.
444
+ */
445
+ urlResolution?: {
446
+ shortlisted: UrlMatchDiagnostic[];
447
+ };
197
448
  }
198
449
  type SearchQueryInput = (Partial<ComposableStudioQueryParams> & {
199
450
  [key: string]: string | string[] | undefined;
@@ -381,8 +632,9 @@ declare const studioSdk: {
381
632
  internal: {
382
633
  getConfig(): Config;
383
634
  isInsideStudioFrame: () => boolean;
384
- fetchSpec: (queryOptions: _contentstack_studio_messenger.CompositionQuery, options?: CompositionQueryOptions) => Promise<StudioSpec>;
385
- fetchData: (compositionEntry: CompositionEntry, queryOptions: _contentstack_studio_messenger.CompositionQuery, options?: CompositionQueryOptions) => Promise<_contentstack_studio_registry.StudioSpecData>;
635
+ fetchSpec: (queryOptions: _contentstack_studio_messenger.CompositionQuery, options?: CompositionQueryOptions, skipComponentLoading?: boolean) => Promise<StudioSpec>;
636
+ fetchMultipleSpecs: (queries: _contentstack_studio_messenger.CompositionQuery[], options?: CompositionQueryOptions) => Promise<StudioSpec[]>;
637
+ fetchData: (compositionEntry: CompositionEntry, queryOptions: _contentstack_studio_messenger.CompositionQuery, options?: CompositionQueryOptions, sectionEntries?: SectionCompositionEntry[]) => Promise<_contentstack_studio_registry.StudioSpecData>;
386
638
  fetchTemplateEntry: (fetchOptions: {
387
639
  connected_content_type: string;
388
640
  compositionQuery: _contentstack_studio_messenger.CompositionQuery;
@@ -495,15 +747,6 @@ declare const dndEventListener: () => {
495
747
  };
496
748
 
497
749
  declare const getScrollableParent: (el: HTMLElement) => HTMLElement;
498
- declare const getScrollContainerRect: () => DOMRect | {
499
- top: number;
500
- left: number;
501
- right: number;
502
- bottom: number;
503
- width: number;
504
- height: number;
505
- } | null;
506
- declare const getScrollContainer: () => HTMLElement | (Window & typeof globalThis) | null;
507
750
  declare const calculateDynamicSpeed: (distance: number, padding: number, maxSpeed: number) => number;
508
751
 
509
752
  declare function handleOnScroll(): void;
@@ -626,11 +869,20 @@ declare function addBreakpointEventListeners(): {
626
869
  declare const DEFAULT_BREAKPOINTS: BreakpointInput;
627
870
 
628
871
  declare class BreakpointManager {
629
- private static instance;
630
872
  private activeBreakpoint;
631
873
  private breakpointRegistry;
632
874
  private constructor();
875
+ /**
876
+ * Returns the singleton `BreakpointManager` instance from the SDK's
877
+ * versioned `globalThis` slot. See
878
+ * `@contentstack/studio-registry/common/global-store.ts` for why singletons
879
+ * live on globalThis instead of a class-static field.
880
+ */
633
881
  static getInstance(): BreakpointManager;
882
+ /**
883
+ * Resets the singleton. For tests only.
884
+ */
885
+ static resetInstance(): void;
634
886
  setActiveBreakpoint(breakpoint: Breakpoint): void;
635
887
  getActiveBreakpoint(): Breakpoint | null;
636
888
  findMatchingBreakpoint(): Breakpoint;
@@ -649,8 +901,10 @@ declare const queryParam: {
649
901
  get(key: ComposableStudioQueryParamsKeys): string | null;
650
902
  has(key: ComposableStudioQueryParamsKeys): boolean;
651
903
  };
652
- declare const onlyParmasGenerator: (only: [string, string][]) => Record<string, string>;
904
+ declare const onlyParmasGenerator: (only: [string, string][]) => Record<string, string[]>;
653
905
 
906
+ declare const SECTION_COMPOSITIONS_KEY = "section_compositions";
907
+ declare const TEMPLATE_FULL_ENTRY_KEY = "template_full_entry";
654
908
  declare const setTemplateEntryInDS: (dataSources: Record<string, any>, entry: unknown) => void;
655
909
  declare const setStaticEntryInDS: (dataSources: Record<string, any>, ct_uid: string, _entries: unknown) => void;
656
910
  declare const batchFetchEntries: (sdk: StackSDK, entries: ICSEntryReference[]) => Promise<[string, CompositionEntry[]][]>;
@@ -683,6 +937,7 @@ declare const ComposableStudioErrors: {
683
937
  readonly NETWORK_ERROR: "NETWORK_ERROR";
684
938
  readonly AUTHENTICATION_ERROR: "AUTHENTICATION_ERROR";
685
939
  readonly SERVER_ERROR: "SERVER_ERROR";
940
+ readonly COMPONENT_NOT_FOUND: "COMPONENT_NOT_FOUND";
686
941
  };
687
942
  /**
688
943
  * Information about a possible cause of an error and how to fix it
@@ -772,6 +1027,38 @@ declare class RendererModeUtil {
772
1027
  declare const clientRendererModeUtil: RendererModeUtil;
773
1028
  declare const serializeComputedStyles: (computedStyle: CSSStyleDeclaration) => Record<string, string>;
774
1029
 
1030
+ /**
1031
+ * Analyzes a UI spec (Node tree) and extracts all component types used.
1032
+ * Recursively traverses the spec to find all components.
1033
+ *
1034
+ * @param spec - The root node of the UI spec
1035
+ * @returns Set of component types used in the spec
1036
+ */
1037
+ declare function analyzeUsedComponents(spec: Node | null | undefined): Set<string>;
1038
+ /**
1039
+ * Analyzes multiple UI specs and returns the union of all component types used.
1040
+ * Useful for optimizing multi-composition loading.
1041
+ *
1042
+ * @param specs - Array of UI spec root nodes
1043
+ * @returns Set of all unique component types used across all specs
1044
+ */
1045
+ declare function analyzeMultipleSpecs(specs: (Node | null | undefined)[]): Set<string>;
1046
+ /**
1047
+ * Checks if a spec uses a specific component type.
1048
+ *
1049
+ * @param spec - The UI spec to check
1050
+ * @param componentType - The component type to look for
1051
+ * @returns true if the component is used in the spec
1052
+ */
1053
+ declare function specUsesComponent(spec: Node | null | undefined, componentType: string): boolean;
1054
+ /**
1055
+ * Gets component usage statistics for a spec.
1056
+ *
1057
+ * @param spec - The UI spec to analyze
1058
+ * @returns Map of component types to their usage count
1059
+ */
1060
+ declare function getComponentUsageStats(spec: Node | null | undefined): Map<string, number>;
1061
+
775
1062
  interface GoogleFont {
776
1063
  family: string;
777
1064
  variants: string[];
@@ -868,7 +1155,7 @@ declare function getNodeScreenshotEvent(): {
868
1155
 
869
1156
  interface QuerySpec {
870
1157
  contentType: string;
871
- sourceType?: "content_type" | "taxonomy";
1158
+ sourceType?: "content_type" | "contentstack" | "taxonomy";
872
1159
  query: Record<string, any>;
873
1160
  params: Record<string, any>;
874
1161
  }
@@ -938,5 +1225,128 @@ declare class QueryExecutor {
938
1225
  private resolveExpressionsInQuery;
939
1226
  }
940
1227
 
941
- export { BreakpointManager, COMPOSABLE_DATA_ATTRIBUTES, COMPOSABLE_STUDIO_EMITTED_EVENTS, ComposableStudioError, ComposableStudioErrors, DEFAULT_BREAKPOINTS, 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, SCROLL_INTERVAL, addBreakpointEventListeners, addContextMenuEventListeners, addHighlightNodeEventListeners, addHighlightSpacingEventListeners, addUrlChangeListeners, applyOperation, batchFetchEntries, calculateDynamicSpeed, clientRendererModeUtil, closeHiddenElementNotification, composableStudioEventEmitter, compositionSaveEventListener, createClassNameUid, studioSdk as default, dndEventListener, dndManager, entriesFromResponse, evaluateCondition, findNearestBuilderNode, findNearestSlotNode, findPath, findPathForElement, getBindingStringForCS, getComposableElement, getComputedStyles, getDefaultConfig, getHitboxDetails, getHitboxDirection, getJSONRTE, getNodeScreenshotEvent, getScrollContainer, getScrollContainerRect, getScrollableParent, handleOnScroll, handleResize, hasSlotDropzone, hiddenElementNotificationEventEmitter, highlightNodeManager, isBrowser, isCompositionBeingEdited, isInsideIframe, isInsideVisualBuilderFrame, isModKey, loadGoogleFont, onlyParmasGenerator, openHiddenElementNotification, parseStringValue, preProcessStaticValues, queryParam, registerJSONRTE, serializeComputedStyles, serializeEvent, setStaticEntryInDS, setTemplateEntryInDS, studioSdk, toggleNodeVisible, updateStyleOnStyleNodeChange };
942
- export type { ClientEditableNodeInternalAttributes, ClientPreviewNodeInternalAttributes, ComposableStudioErrorDetails, ComposableStudioLightSdk, CompositionEntry, CompositionEntryIncompleteUi, CompositionFetcher, CompositionQueryForSSR, CompositionQueryForSSRInput, CompositionQueryOptions, Config, EmittedEvents, FetchCompositionContext, FetchTemplateEntryContext, FontVariants, GoogleFont, HiddenElementNotificationHandler, LightConfig, MetaProp, ParsedStringResult, QueryExecutionOptions, QueryResult, QuerySpec, QueryState, ResolvedQueryOptions, RuntimeContext, SearchQueryInput, SeoMetadata, StudioComponentFetchOptions, StudioComponentSpecOptions, StudioSdk, StudioSpec, SymbolEntry, TemplateEntryFetcher, TroubleshootingInfo, URLSearchParamsString, UserConfig };
1228
+ /**
1229
+ * Query-building mode.
1230
+ * - `match`: predicates equal the captured value (production composition lookup).
1231
+ * - `existence`: predicates require the field to be present and non-empty (Studio
1232
+ * iframe-URL flow — we have no URL to match against; we only need an entry
1233
+ * that has values for every variable in the pattern).
1234
+ */
1235
+ type UrlMetadataQueryMode = "match" | "existence";
1236
+ /**
1237
+ * Build the plain JSON query object for a composition's URL metadata.
1238
+ *
1239
+ * Shared between the SDK (production composition resolution) and the Studio
1240
+ * UI (iframe-URL preview-entry fetch). The SDK passes the returned object (possibly
1241
+ * wrapped in an `$or` by `buildTemplateQuery`) to `ctQuery({ query })`; the UI
1242
+ * stringifies it and passes it to `api.cma.entry.getAll` via the `query` param.
1243
+ *
1244
+ * In `existence` mode for `legacy_url` and `content_type_url_pattern` the
1245
+ * object is `{ url: { $nin: ["", null] } }` regardless of `extractedVariables`.
1246
+ */
1247
+ declare function buildUrlMetadataQueryObject(context: Pick<TemplateQueryContext, "compositionQuery" | "extractedVariables" | "url_source">, mode?: UrlMetadataQueryMode): Record<string, any>;
1248
+ /**
1249
+ * Build the full template-entry query as a single raw query object and hand it
1250
+ * to `ctQuery({ query })`.
1251
+ *
1252
+ * Unlike the old per-field `where()` chaining, this builds one object so it can
1253
+ * express a top-level `$or` and embed `taxonomies.<uid>` directly (the dedicated
1254
+ * `applyTaxonomyFilters`/`Taxonomies()` path cannot compose inside an `$or`).
1255
+ *
1256
+ * For `{{entry.url}}` in a pattern-based source (match mode), the query becomes
1257
+ * `{ $or: [ <per-field decomposition>, { url: <full request path> } ] }` so the
1258
+ * `url` field matches the whole request path as well as the captured segment —
1259
+ * the prefix-duplication / bare-`/{{entry.url}}` case. Other sources and modes
1260
+ * pass the per-field object unchanged.
1261
+ */
1262
+ declare function buildTemplateQuery(stackSdk: StackSDK, context: TemplateQueryContext, queryOptions: {
1263
+ references: string[];
1264
+ only?: [string, string][];
1265
+ variantAlias?: string;
1266
+ locale?: string;
1267
+ branch?: string;
1268
+ environment?: string;
1269
+ }, mode?: UrlMetadataQueryMode): any;
1270
+ /**
1271
+ * Resolve template entry based on url_source type and query context
1272
+ */
1273
+ declare function resolveByUrlSource(stackSdk: StackSDK, url_source: string, compositionQuery: {
1274
+ url?: string;
1275
+ }, extractedVariables: ExtractedUrlPatternVariables, parsedUrlQueries: CompositionUrlQueries, connectedContentType: string, queryOptions: {
1276
+ references: string[];
1277
+ only?: [string, string][];
1278
+ variantAlias?: string;
1279
+ locale?: string;
1280
+ branch?: string;
1281
+ environment?: string;
1282
+ }): any;
1283
+
1284
+ /**
1285
+ * Parse and validate url_metadata field from a composition entry
1286
+ * Returns parsed metadata or legacy object if metadata is missing, malformed, or legacy
1287
+ */
1288
+ declare function parseUrlMetadata(url_metadata?: Partial<CompositionUrlMetadataSerialized>): CompositionUrlMetadata;
1289
+ /**
1290
+ * Check if a composition entry has taxonomy extraction enabled
1291
+ * Returns true if only.BASE includes "taxonomies"
1292
+ */
1293
+ declare function shouldExtractTaxonomies(parsedMetadata: CompositionUrlMetadata): boolean;
1294
+
1295
+ /**
1296
+ * Rank URL matches across multiple composition entries
1297
+ * Returns all composable_uid strings tied at the highest specificity score
1298
+ *
1299
+ * @param requestUrl The incoming URL to match against
1300
+ * @param lightweightEntries Composition entries with url and composable_uid
1301
+ * @returns Ranking result with all entries at max specificity tier
1302
+ */
1303
+ declare function rankUrlMatches(requestUrl: string, lightweightEntries: LightweightCompositionEntry[]): RankingResult;
1304
+
1305
+ /**
1306
+ * Determine if the metadata-driven path should be used
1307
+ * It means whether we want to fallback to the wildcard routes
1308
+ * or parse the URL for variables and determine the composition
1309
+ * Returns false if metadata is missing, invalid JSON, or url_source is legacy_url
1310
+ *
1311
+ * @param url_metadata Raw url_metadata from composition entry
1312
+ * @returns true if metadata path should be used, false for legacy path
1313
+ */
1314
+ declare function shouldUseUrlMetadataPath(url_metadata?: Partial<CompositionUrlMetadataSerialized>): boolean;
1315
+
1316
+ interface UrlPatternVariableInfo {
1317
+ type: string;
1318
+ name: string;
1319
+ category: (typeof URL_PATTERN_VARIABLE_TYPES)[keyof typeof URL_PATTERN_VARIABLE_TYPES];
1320
+ referenceName?: string;
1321
+ referenceField?: string;
1322
+ }
1323
+ /**
1324
+ * Compile a URL pattern into a regex that can match and extract variables
1325
+ * Handles arbitrary patterns like: "lsefj{{entry.url}}assefs{{content_type_uid}}/{{taxonomy:ola}}"
1326
+ */
1327
+ declare function compileUrlPattern(pattern: string, includeReferences?: string[]): {
1328
+ regex: RegExp;
1329
+ variableOrder: Array<UrlPatternVariableInfo>;
1330
+ literalCharCount: number;
1331
+ };
1332
+ /**
1333
+ * Match a request URL against a compiled pattern and extract variables
1334
+ */
1335
+ declare function matchUrlPattern(requestUrl: string, compiledPattern: ReturnType<typeof compileUrlPattern>): ExtractedUrlPatternVariables | null;
1336
+ /**
1337
+ * Compute pattern specificity score for ranking
1338
+ * Primary: literal character count (more specific)
1339
+ * Secondary: total pattern length
1340
+ */
1341
+ declare function computePatternSpecificity(pattern: string): number;
1342
+ interface MatchCompositionOptions {
1343
+ includeReferences?: string[];
1344
+ connected_content_type?: string;
1345
+ }
1346
+ /**
1347
+ * Match a single composition entry against a request URL
1348
+ */
1349
+ declare function matchCompositionUrl(requestUrl: string, compositionUrl: string, composable_uid: string, options?: MatchCompositionOptions): PatternMatchResult;
1350
+
1351
+ 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, 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, buildTemplateQuery, buildUrlMetadataQueryObject, calculateDynamicSpeed, clientRendererModeUtil, closeHiddenElementNotification, compileUrlPattern, composableStudioEventEmitter, compositionSaveEventListener, computePatternSpecificity, createClassNameUid, studioSdk as default, dndEventListener, dndManager, entriesFromResponse, evaluateCondition, findNearestBuilderNode, findNearestSlotNode, findPath, findPathForElement, getBindingStringForCS, getComponentUsageStats, getComposableElement, getComputedStyles, getDefaultConfig, getHitboxDetails, getHitboxDirection, getJSONRTE, getNodeScreenshotEvent, getScrollableParent, handleOnScroll, handleResize, hasSlotDropzone, hiddenElementNotificationEventEmitter, highlightNodeManager, isBrowser, isCompositionBeingEdited, isInsideIframe, isInsideVisualBuilderFrame, isModKey, loadGoogleFont, matchCompositionUrl, matchUrlPattern, onlyParmasGenerator, openHiddenElementNotification, parseStringValue, parseUrlMetadata, preProcessStaticValues, queryParam, rankUrlMatches, registerJSONRTE, resolveByUrlSource, serializeComputedStyles, serializeEvent, setStaticEntryInDS, setTemplateEntryInDS, shouldExtractTaxonomies, shouldUseUrlMetadataPath, specUsesComponent, studioSdk, toggleNodeVisible, updateStyleOnStyleNodeChange };
1352
+ export type { ClientEditableNodeInternalAttributes, ClientPreviewNodeInternalAttributes, ComposableStudioErrorDetails, ComposableStudioLightSdk, CompositionEntry, CompositionEntryIncompleteUi, CompositionFetcher, CompositionPlacement, CompositionPreviewUrlSource, CompositionPreviewUrlSourceValues, CompositionQueryForSSR, CompositionQueryForSSRInput, CompositionQueryOptions, CompositionUrlMetadata, CompositionUrlMetadataSerialized, CompositionUrlQueries, Config, ConnectedEntryResult, DateVariableKey, EmittedEvents, ExtractedUrlPatternVariables, ExtractedUrlVariables, FetchCompositionContext, FetchTemplateEntryContext, FieldValue, FontVariants, GoogleFont, HiddenElementNotificationHandler, LightConfig, LightweightCompositionEntry, MetaProp, ParsedStringResult, PatternMatchResult, QueryExecutionOptions, QueryResult, QuerySpec, QueryState, RankingResult, ReferenceFieldValue, RenderableCompositionEntry, ResolvedQueryOptions, RuntimeContext, SearchQueryInput, SectionCompositionEntry, SeoMetadata, StudioComponentFetchOptions, StudioComponentSpecOptions, StudioSdk, StudioSpec, SymbolEntry, TemplateEntryFetcher, TemplateQueryContext, TroubleshootingInfo, URLSearchParamsString, UrlMatchDiagnostic, UrlMetadataQueryMode, UrlPatternMetadataField, UrlPatternMetadataFieldValue, UserConfig };
package/dist/index.js CHANGED
@@ -1,10 +1,11 @@
1
1
  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 { parseStringValue, preProcessStaticValues } from './composable-studio/data/pre-process-static-values.js';
4
+ export { COMPOSITION_PLACEMENT_OPTIONS } from './composable-studio/composition-placement.types.js';
4
5
  export { addContextMenuEventListeners } from './context-menu/context-menu.js';
5
6
  export { EDGE_PADDING, MAX_SCROLL_SPEED, SCROLL_INTERVAL, dndManager } from './dnd/dnd-manager.js';
6
7
  export { dndEventListener } from './dnd/dnd-event.js';
7
- export { calculateDynamicSpeed, getScrollContainer, getScrollContainerRect, getScrollableParent } from './dnd/utils.js';
8
+ export { calculateDynamicSpeed, getScrollableParent } from './dnd/scroll-utils.js';
8
9
  export { addHighlightNodeEventListeners, handleOnScroll, handleResize, isModKey } from './highlight-node/highlight-node.js';
9
10
  export { highlightNodeManager } from './highlight-node/highlight-node-manager.js';
10
11
  export { TARGET_NODE } from '@contentstack/studio-message-types/latest';
@@ -16,16 +17,17 @@ export { DEFAULT_BREAKPOINTS } from './breakpoints/breakpoint.constant.js';
16
17
  export { BreakpointManager } from './breakpoints/BreakpointManager.js';
17
18
  export { RendererMode } from './canvas/canvas.type.js';
18
19
  export { findNearestBuilderNode, findNearestSlotNode, getComposableElement, getComputedStyles, getHitboxDetails, getHitboxDirection, hasSlotDropzone, serializeEvent, toggleNodeVisible } from './canvas/canvas.utils.js';
19
- export { COMPOSABLE_DATA_ATTRIBUTES, INCLUDE_DEPTH_COUNT, isBrowser } from './utils/constants.js';
20
+ export { COMPOSABLE_DATA_ATTRIBUTES, INCLUDE_DEPTH_COUNT, SCHEMA_VERSION, SDK_VERSION, isBrowser } from './utils/constants.js';
20
21
  export { applyOperation, findPath, findPathForElement } from './utils/editor-utils.js';
21
22
  export { isCompositionBeingEdited } from './utils/is-composition-being-edited.js';
22
23
  export { onlyParmasGenerator, queryParam } from './utils/query-param.js';
23
- export { batchFetchEntries, entriesFromResponse, getBindingStringForCS, setStaticEntryInDS, setTemplateEntryInDS } from './utils/sdk.js';
24
+ export { SECTION_COMPOSITIONS_KEY, TEMPLATE_FULL_ENTRY_KEY, batchFetchEntries, entriesFromResponse, getBindingStringForCS, setStaticEntryInDS, setTemplateEntryInDS } from './utils/sdk.js';
24
25
  export { isInsideVisualBuilderFrame } from './utils/is-inside-visual-builder-frame.js';
25
26
  export { isInsideIframe } from './utils/is-inside-iframe.js';
26
27
  export { ComposableStudioError, ComposableStudioErrors } from './utils/composable-studio-error.js';
27
28
  export { evaluateCondition } from './utils/conditionBlock.js';
28
29
  export { RendererModeUtil, clientRendererModeUtil, serializeComputedStyles } from './utils/canvas.js';
30
+ export { analyzeMultipleSpecs, analyzeUsedComponents, getComponentUsageStats, specUsesComponent } from './utils/spec-analyzer.js';
29
31
  export { loadGoogleFont } from './design/fonts/index.js';
30
32
  export { GOOGLE_FONT_API } from './design/fonts/fonts.constant.js';
31
33
  export { createClassNameUid } from './design/create-class-name-uid.js';
@@ -38,6 +40,12 @@ export { closeHiddenElementNotification, hiddenElementNotificationEventEmitter,
38
40
  export { getNodeScreenshotEvent } from './get-active-node-screenshot/get-node-screenshot-event.js';
39
41
  export { ExpressionResolver } from './query/expression-resolver.js';
40
42
  export { QueryExecutor } from './query/query-executor.js';
43
+ export { buildTemplateQuery, buildUrlMetadataQueryObject, resolveByUrlSource } from './url-metadata/build-template-query.js';
44
+ export { parseUrlMetadata, shouldExtractTaxonomies } from './url-metadata/parse-url-metadata.js';
45
+ export { rankUrlMatches } from './url-metadata/rank-url-matches.js';
46
+ export { shouldUseUrlMetadataPath } from './url-metadata/shouldUseUrlMetadataPath.js';
47
+ export { COMPOSITION_PREVIEW_URL_SOURCES, COMPOSITION_PREVIEW_URL_SOURCES_VALUES, DEFAULT_COMPOSITION_PREVIEW_URL_SOURCE, URL_PATTERN_DATE_VARIABLES, URL_PATTERN_METADATA_FIELDS, URL_PATTERN_METADATA_FIELDS_VALUES, URL_PATTERN_VARIABLE_TYPES } from './url-metadata/types.js';
48
+ export { compileUrlPattern, computePatternSpecificity, matchCompositionUrl, matchUrlPattern } from './url-metadata/url-pattern-matcher.js';
41
49
  export { IS_BROWSER } from '@contentstack/studio-messenger';
42
50
 
43
51
  // STUDIO SDK
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;"}