@contentstack/studio-registry 1.5.0 → 1.6.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.
- package/dist/cjs/index.cjs +374 -29
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/common/global-store.js +49 -0
- package/dist/esm/common/global-store.js.map +1 -0
- package/dist/esm/component-registry/registry-options-processor.js +36 -0
- package/dist/esm/component-registry/registry-options-processor.js.map +1 -1
- package/dist/esm/component-registry/registry.constant.js +6 -0
- package/dist/esm/component-registry/registry.constant.js.map +1 -1
- package/dist/esm/component-registry/registry.js +54 -6
- package/dist/esm/component-registry/registry.js.map +1 -1
- package/dist/esm/component-registry/singleton.js +17 -25
- package/dist/esm/component-registry/singleton.js.map +1 -1
- package/dist/esm/data-binder/retrieve-data.js +164 -2
- package/dist/esm/data-binder/retrieve-data.js.map +1 -1
- package/dist/esm/data-binder/retrieve-data.util.js +7 -1
- package/dist/esm/data-binder/retrieve-data.util.js.map +1 -1
- package/dist/esm/design-registry/singleton.js +37 -0
- package/dist/esm/design-registry/singleton.js.map +1 -0
- package/dist/esm/index.d.ts +207 -16
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/sections.js +13 -0
- package/dist/esm/utils/sections.js.map +1 -0
- package/package.json +7 -10
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-runtime singleton storage for SDK-owned registries.
|
|
3
|
+
*
|
|
4
|
+
* Why globalThis: a module-scoped `let instance` only exists within whichever
|
|
5
|
+
* module-graph evaluates the file. Next.js maintains two graphs (RSC server +
|
|
6
|
+
* client); Webpack/Turbopack treat them as independent realms. A registry
|
|
7
|
+
* populated in one graph is invisible to the other. Prod build workers don't
|
|
8
|
+
* share JS heap either — each worker has its own module-scoped state.
|
|
9
|
+
*
|
|
10
|
+
* globalThis is uniformly available across Node, browser, Edge runtime,
|
|
11
|
+
* Cloudflare/Vercel workers, Deno, Bun, and Web Workers, and is shared by RSC
|
|
12
|
+
* + client graphs within a single process. Storing SDK runtime singletons here
|
|
13
|
+
* makes them visible to every consumer regardless of bundler or graph.
|
|
14
|
+
*
|
|
15
|
+
* The key is versioned (`_v1`) so future shape changes can land under `_v2`
|
|
16
|
+
* without colliding with older SDK copies during a partial upgrade.
|
|
17
|
+
*/
|
|
18
|
+
const GLOBAL_STORE_KEY = "__contentstack_studio_registry_v1";
|
|
19
|
+
/**
|
|
20
|
+
* Returns the SDK's versioned slot on globalThis, creating it on first call.
|
|
21
|
+
* Always returns the same object reference within a single JS runtime.
|
|
22
|
+
*
|
|
23
|
+
* Type-erased on purpose: each registry singleton casts to its own type on
|
|
24
|
+
* read/write so the public API of `studio-registry` stays free of cross-
|
|
25
|
+
* package import dependencies (e.g. `BreakpointManager` lives in
|
|
26
|
+
* `studio-client`).
|
|
27
|
+
*/
|
|
28
|
+
function getGlobalStudioStore() {
|
|
29
|
+
const g = globalThis;
|
|
30
|
+
if (!g[GLOBAL_STORE_KEY]) {
|
|
31
|
+
g[GLOBAL_STORE_KEY] = {
|
|
32
|
+
componentRegistry: null,
|
|
33
|
+
designRegistry: null,
|
|
34
|
+
breakpointManager: null,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return g[GLOBAL_STORE_KEY];
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Clears the entire store. For tests only. Production code should never call
|
|
41
|
+
* this — it would orphan every existing reference to the previous instances.
|
|
42
|
+
*/
|
|
43
|
+
function resetGlobalStudioStore() {
|
|
44
|
+
const g = globalThis;
|
|
45
|
+
delete g[GLOBAL_STORE_KEY];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { getGlobalStudioStore, resetGlobalStudioStore };
|
|
49
|
+
//# sourceMappingURL=global-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-store.js","sources":["../../../src/common/global-store.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;AAgBG;AACH,MAAM,gBAAgB,GAAG,mCAA4C;AAarE;;;;;;;;AAQG;SACa,oBAAoB,GAAA;IAClC,MAAM,CAAC,GAAG,UAAqC;AAC/C,IAAA,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,EAAE;QACxB,CAAC,CAAC,gBAAgB,CAAC,GAAG;AACpB,YAAA,iBAAiB,EAAE,IAAI;AACvB,YAAA,cAAc,EAAE,IAAI;AACpB,YAAA,iBAAiB,EAAE,IAAI;SACI;IAC/B;AACA,IAAA,OAAO,CAAC,CAAC,gBAAgB,CAAsB;AACjD;AAEA;;;AAGG;SACa,sBAAsB,GAAA;IACpC,MAAM,CAAC,GAAG,UAAqC;AAC/C,IAAA,OAAO,CAAC,CAAC,gBAAgB,CAAC;AAC5B;;;;"}
|
|
@@ -14,6 +14,7 @@ function getDefaultComponentSchemaInput(options) {
|
|
|
14
14
|
hideFromComponentList: false,
|
|
15
15
|
registry: "user-defined",
|
|
16
16
|
icon: "",
|
|
17
|
+
layerIcon: "",
|
|
17
18
|
metadata: {},
|
|
18
19
|
styles: {
|
|
19
20
|
default: {
|
|
@@ -76,6 +77,16 @@ function processRegistryOptions(userConfig, options) {
|
|
|
76
77
|
if ("icon" in userConfig && userConfig.icon) {
|
|
77
78
|
defaultOptions.icon = userConfig.icon;
|
|
78
79
|
}
|
|
80
|
+
if (userConfig.layerIcon) {
|
|
81
|
+
if (isValidLayerIcon(userConfig.layerIcon)) {
|
|
82
|
+
defaultOptions.layerIcon = userConfig.layerIcon;
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
// Don't break registration over a bad icon — drop it and fall back to the default glyph.
|
|
86
|
+
console.warn(`[studio] Ignoring invalid \`layerIcon\` for component "${userConfig.type}". ` +
|
|
87
|
+
`Expected an inline SVG string, an absolute http(s)/data:image URL, or a servable relative path.`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
79
90
|
if (userConfig.metadata) {
|
|
80
91
|
defaultOptions.metadata = userConfig.metadata;
|
|
81
92
|
}
|
|
@@ -84,6 +95,31 @@ function processRegistryOptions(userConfig, options) {
|
|
|
84
95
|
propValidators,
|
|
85
96
|
};
|
|
86
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Light, render-agnostic check that a `layerIcon` value is plausibly an inline SVG,
|
|
100
|
+
* an image URL, or a servable path. This is developer feedback only — the Studio
|
|
101
|
+
* builder still sanitizes/validates authoritatively at render time, since the value
|
|
102
|
+
* crosses the postMessage boundary untrusted.
|
|
103
|
+
*/
|
|
104
|
+
function isValidLayerIcon(value) {
|
|
105
|
+
if (typeof value !== "string")
|
|
106
|
+
return false;
|
|
107
|
+
const v = value.trim();
|
|
108
|
+
if (!v)
|
|
109
|
+
return false;
|
|
110
|
+
// Inline SVG markup (with or without an xml prolog).
|
|
111
|
+
if (v.startsWith("<"))
|
|
112
|
+
return v.includes("<svg");
|
|
113
|
+
// Absolute http(s) URL.
|
|
114
|
+
if (/^https?:\/\//i.test(v))
|
|
115
|
+
return true;
|
|
116
|
+
// A data URI must be an image.
|
|
117
|
+
if (/^data:/i.test(v))
|
|
118
|
+
return /^data:image\//i.test(v);
|
|
119
|
+
// A relative/root-relative asset path. Must be explicitly path-shaped — a bare token
|
|
120
|
+
// (e.g. a built-in icon NAME like "ComponentBox") is NOT a valid layerIcon.
|
|
121
|
+
return v.startsWith("/") || v.startsWith("./") || v.startsWith("../");
|
|
122
|
+
}
|
|
87
123
|
function processStylesOptionsStyleSections(styleSections, defaultStyleSections) {
|
|
88
124
|
if (typeof styleSections === "undefined" || styleSections === "all") {
|
|
89
125
|
return defaultStyleSections;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry-options-processor.js","sources":["../../../src/component-registry/registry-options-processor.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAuBA,SAAS,8BAA8B,CAAI,OAG1C,EAAA;IACC,OAAO;QACL,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,IAA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IAAI;IACvC;
|
|
1
|
+
{"version":3,"file":"registry-options-processor.js","sources":["../../../src/component-registry/registry-options-processor.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAuBA,SAAS,8BAA8B,CAAI,OAG1C,EAAA;IACC,OAAO;QACL,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,IAAI,EAAE,OAAO,CAAC,IAAI;AAClB,QAAA,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,OAAO,CAAC,IAAI;AACzB,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,IAAI,EAAE,IAAI;AACV,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,uBAAuB,EAAE,KAAK;AAC9B,QAAA,qBAAqB,EAAE,KAAK;AAC5B,QAAA,QAAQ,EAAE,cAAc;AACxB,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,SAAS,EAAE,EAAE;AACb,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,MAAM,EAAE;AACN,YAAA,OAAO,EAAE;AACP,gBAAA,cAAc,EAAE,EAAE;AAClB,gBAAA,aAAa,EAAE,EAAE;gBACjB,aAAa,EAAE,eAAe,EAAE;AAChC,gBAAA,WAAW,EAAE,SAAS;AACvB,aAAA;AACF,SAAA;AACD,QAAA,KAAK,EAAE,EAAE;KACV;AACH;AAEM,SAAU,sBAAsB,CACpC,UAE4C,EAC5C,OAEC,EAAA;IAKD,IAAI,cAAc,GAAG,EAAE;AAEvB,IAAA,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;AACpB,QAAA,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC;IAChD;IAEA,IAAI,UAAU,CAAC,SAAS,KAAK,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE;AAC1D,QAAA,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC;IAC3C;IAEA,MAAM,cAAc,GAAG,8BAA8B,CAAC;QACpD,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,SAAS,EAAE,UAAU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AACH;;;;"}
|
|
@@ -17,6 +17,7 @@ const INTERNAL_COMPONENT_SECTIONS = {
|
|
|
17
17
|
REGISTERED_COMPONENTS: "Registered Components",
|
|
18
18
|
HTML_ELEMENT: "HTML Elements",
|
|
19
19
|
SYMBOL: "Symbols",
|
|
20
|
+
SECTION_COMPOSITION: "Sections",
|
|
20
21
|
};
|
|
21
22
|
const INTERNAL_SECTIONS = Object.values(INTERNAL_COMPONENT_SECTIONS);
|
|
22
23
|
const STYLE_SECTIONS_OPTIONS = [
|
|
@@ -71,6 +72,7 @@ const INTERNAL_COMPONENTS_NAMES = {
|
|
|
71
72
|
JSON_RTE: "json-rte",
|
|
72
73
|
COLLAPSIBLE_TEXT: "collapsible-text",
|
|
73
74
|
PLAIN_TEXT: "plain-text",
|
|
75
|
+
RICH_TEXT: "rich-text",
|
|
74
76
|
// * Media
|
|
75
77
|
VIDEO: "video",
|
|
76
78
|
EMBED: "embed",
|
|
@@ -84,6 +86,10 @@ const INTERNAL_COMPONENTS_NAMES = {
|
|
|
84
86
|
CONDITION_BLOCK: "condition-block",
|
|
85
87
|
SYMBOL: "symbol",
|
|
86
88
|
FRAGMENT: "fragment",
|
|
89
|
+
// Exposed-slot placeholder authored inside a section composition. When the
|
|
90
|
+
// section is dropped into a page, each section-slot becomes a fill point
|
|
91
|
+
// the page composer can drop arbitrary components into.
|
|
92
|
+
SECTION_SLOT: "section-slot",
|
|
87
93
|
// * HTML Elements
|
|
88
94
|
HTML_ELEMENT: "html-element",
|
|
89
95
|
STYLE_SHEET: "style-sheet",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.constant.js","sources":["../../../src/component-registry/registry.constant.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEO,MAAM,mBAAmB,GAAG;AAE5B,MAAM,YAAY,GAAG;AAC1B,IAAA,eAAe,EAAE,iBAAiB;AAClC,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,KAAK,EAAE,sBAAsB;AAC7B,IAAA,YAAY,EAAE,cAAc;;AAGvB,MAAM,2BAA2B,GAAG;AACzC,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,SAAS,EAAE,WAAW;AACtB,IAAA,eAAe,EAAE,kBAAkB;AACnC,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,qBAAqB,EAAE,uBAAuB;AAC9C,IAAA,YAAY,EAAE,eAAe;AAC7B,IAAA,MAAM,EAAE,SAAS;;
|
|
1
|
+
{"version":3,"file":"registry.constant.js","sources":["../../../src/component-registry/registry.constant.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEO,MAAM,mBAAmB,GAAG;AAE5B,MAAM,YAAY,GAAG;AAC1B,IAAA,eAAe,EAAE,iBAAiB;AAClC,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,KAAK,EAAE,sBAAsB;AAC7B,IAAA,YAAY,EAAE,cAAc;;AAGvB,MAAM,2BAA2B,GAAG;AACzC,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,SAAS,EAAE,WAAW;AACtB,IAAA,eAAe,EAAE,kBAAkB;AACnC,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,qBAAqB,EAAE,uBAAuB;AAC9C,IAAA,YAAY,EAAE,eAAe;AAC7B,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,mBAAmB,EAAE,UAAU;;AAG1B,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,2BAA2B;AAEnE,MAAM,sBAAsB,GAAG;IACpC,OAAO;IACP,MAAM;IACN,SAAS;IACT,UAAU;IACV,YAAY;IACZ,QAAQ;IACR,YA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AAC,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;AAGjD;;;;AAIG;AACI,MAAM,mBAAmB,GAAG;;AAEjC,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,cAAc,EAAE,gBAAgB;AAChC,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,gBAAgB,EAAE,kBAAkB;;AAGpC,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,KAAK,EAAE,OAAO;;AAGd,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,OAAO,EAAE,QAAQ;AACjB,IAAA,IAAI,EAAE,QAAQ;;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getRegistryErrorMessage } from '../utils/registry-error-messages.js';
|
|
2
2
|
import { getSymbolUIDFromUID, getSymbolUIDFromNode } from '../utils/symbols.js';
|
|
3
|
+
import { getSectionUIDFromNode } from '../utils/sections.js';
|
|
3
4
|
import { getDefaultComponentRegistryOptions, processRegistryOptions } from './registry-options-processor.js';
|
|
4
5
|
import { BUILT_IN_COMPONENTS, SYSTEM_COMPONENTS, INTERNAL_COMPONENT_SECTIONS } from './registry.constant.js';
|
|
5
6
|
import { RegistryErrorMessageKey } from '../utils/registry-error-messages.default.js';
|
|
@@ -71,7 +72,9 @@ class ComponentRegistry {
|
|
|
71
72
|
// sync unregistered components (never remove system / built-in entries)
|
|
72
73
|
this.componentRegistry.forEach((componentConfig) => {
|
|
73
74
|
if (!updatedConfig.some((c) => c.type === componentConfig.type)) {
|
|
74
|
-
if (SYSTEM_COMPONENTS.has(componentConfig.type)
|
|
75
|
+
if (SYSTEM_COMPONENTS.has(componentConfig.type) ||
|
|
76
|
+
componentConfig.metadata?.type === "symbol" ||
|
|
77
|
+
componentConfig.metadata?.type === "section-composition") {
|
|
75
78
|
return;
|
|
76
79
|
}
|
|
77
80
|
this.unregisterComponent(componentConfig.type);
|
|
@@ -145,23 +148,64 @@ class ComponentRegistry {
|
|
|
145
148
|
this.componentRegistry.set(type, processedOptions);
|
|
146
149
|
});
|
|
147
150
|
}
|
|
151
|
+
registerSectionComponent(componentsConfigs) {
|
|
152
|
+
componentsConfigs.forEach((componentConfig) => {
|
|
153
|
+
const { type } = componentConfig;
|
|
154
|
+
componentConfig["sections"] = [
|
|
155
|
+
INTERNAL_COMPONENT_SECTIONS.SECTION_COMPOSITION,
|
|
156
|
+
];
|
|
157
|
+
componentConfig["hideFromComponentList"] = true;
|
|
158
|
+
const { processedOptions } = processRegistryOptions(componentConfig, {
|
|
159
|
+
registry: "symbols",
|
|
160
|
+
});
|
|
161
|
+
this.componentRegistry.set(type, processedOptions);
|
|
162
|
+
});
|
|
163
|
+
}
|
|
148
164
|
/**
|
|
149
165
|
* Registers one or more components in the component registry.
|
|
166
|
+
*
|
|
167
|
+
* By default, duplicate registrations (same `type` registered twice) are
|
|
168
|
+
* silently skipped — making the call **idempotent**. This is the desired
|
|
169
|
+
* behaviour under:
|
|
170
|
+
* - HMR re-evaluation (the same module runs twice in dev),
|
|
171
|
+
* - dual-bundle scenarios (RSC + client both pull in the registration
|
|
172
|
+
* module),
|
|
173
|
+
* - prod build workers (each worker may re-import the module),
|
|
174
|
+
* - test setup re-runs.
|
|
175
|
+
*
|
|
176
|
+
* The previous default — throwing on duplicate — forced every consumer to
|
|
177
|
+
* wrap the call in `try/catch` to absorb the throw, which had the side
|
|
178
|
+
* effect of masking real registration errors (typos in `type`, malformed
|
|
179
|
+
* schemas). Real errors now surface on the first call; duplicates no longer
|
|
180
|
+
* trip them up.
|
|
181
|
+
*
|
|
182
|
+
* Pass `{ strict: true }` to opt back into the old behaviour (throw on any
|
|
183
|
+
* duplicate). This is useful in tests that want to assert a clean
|
|
184
|
+
* registration boundary. `overrideDefaultComponents` on the registry config
|
|
185
|
+
* still wins over both — it lets a duplicate replace the existing entry.
|
|
186
|
+
*
|
|
150
187
|
* @param components - An array of component options to register.
|
|
188
|
+
* @param options - Per-call registration options. `strict: true` reinstates
|
|
189
|
+
* the throw on duplicate.
|
|
151
190
|
*/
|
|
152
|
-
registerComponents(components) {
|
|
191
|
+
registerComponents(components, options) {
|
|
153
192
|
components.forEach((componentOption) => {
|
|
154
193
|
const { type } = componentOption;
|
|
155
194
|
if (!type) {
|
|
156
195
|
throw new Error("Component type is required.");
|
|
157
196
|
}
|
|
158
|
-
if (this.componentRegistry.has(type) &&
|
|
159
|
-
!this.config.overrideDefaultComponents) {
|
|
160
|
-
throw new Error(`Component with type '${type}' is already registered.`);
|
|
161
|
-
}
|
|
162
197
|
if (SYSTEM_COMPONENTS.has(type)) {
|
|
163
198
|
throw new Error(`Component with type '${type}' is a system component and cannot be overridden.`);
|
|
164
199
|
}
|
|
200
|
+
if (this.componentRegistry.has(type) &&
|
|
201
|
+
!this.config.overrideDefaultComponents) {
|
|
202
|
+
if (options?.strict) {
|
|
203
|
+
throw new Error(`Component with type '${type}' is already registered.`);
|
|
204
|
+
}
|
|
205
|
+
// Idempotent default: silently skip duplicates so HMR/dual-graph/
|
|
206
|
+
// worker re-evaluation does not break a working integration.
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
165
209
|
const { processedOptions, propValidators } = processRegistryOptions(componentOption, {
|
|
166
210
|
registry: "user-defined",
|
|
167
211
|
});
|
|
@@ -278,6 +322,10 @@ class ComponentRegistry {
|
|
|
278
322
|
}
|
|
279
323
|
return getSymbolUIDFromNode(node);
|
|
280
324
|
}
|
|
325
|
+
if (type === "section-composition") {
|
|
326
|
+
const resolvedName = getSectionUIDFromNode(node) || type;
|
|
327
|
+
return resolvedName;
|
|
328
|
+
}
|
|
281
329
|
return type;
|
|
282
330
|
}
|
|
283
331
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry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AC;IACjD;AAEA;;;;;AAKG;AACH,IAAA,iBAAiB,CAAC,aAAqB,EAAA;QACrC,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,aAAa,CAAC;IACjD;AAEA;;;;;;AAMG;AACH,IAAA,kBAAkB,CAAC,aAAqB,EAAA;QACtC,QACE,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,aAAa,CAAC;YACxC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,aAAa,CAAC;IAE7C;AAEA;;;;;AAKG;IACH,qBAAqB,GAAA;QACnB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;IACjD;AAEA;;;;;AAKG;IACH,oBAAoB,GAAA;QAClB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;IAClD;AACD;;;;"}
|
|
@@ -1,34 +1,26 @@
|
|
|
1
|
+
import { getGlobalStudioStore } from '../common/global-store.js';
|
|
1
2
|
import { ComponentRegistry } from './registry.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
|
-
* Singleton
|
|
5
|
-
* This ensures all packages (studio-client, studio-react, etc.) use the same registry instance.
|
|
5
|
+
* Singleton ComponentRegistry, backed by a versioned slot on `globalThis`.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Gets the singleton ComponentRegistry instance.
|
|
15
|
-
* Creates it if it doesn't exist yet.
|
|
7
|
+
* The previous module-scoped `let instance` only existed within whichever
|
|
8
|
+
* module-graph evaluated this file. Under Next.js's dual RSC/client graph or
|
|
9
|
+
* across prod build workers, that meant two registries with no sharing —
|
|
10
|
+
* `fetchCompositionData` (server) could see an empty registry while
|
|
11
|
+
* `<StudioComponent>` (client) saw a populated one. See `common/global-store.ts`
|
|
12
|
+
* for the full reasoning.
|
|
16
13
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* ```typescript
|
|
21
|
-
* import { getComponentRegistryInstance } from '@contentstack/studio-registry';
|
|
22
|
-
*
|
|
23
|
-
* const registry = getComponentRegistryInstance();
|
|
24
|
-
* await registry.loadComponent('my-component');
|
|
25
|
-
* ```
|
|
14
|
+
* After this change, all callers of `getComponentRegistryInstance()` resolve
|
|
15
|
+
* to the same `ComponentRegistry` instance within a single JS runtime,
|
|
16
|
+
* regardless of which graph or worker they were evaluated in.
|
|
26
17
|
*/
|
|
27
18
|
function getComponentRegistryInstance() {
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
const store = getGlobalStudioStore();
|
|
20
|
+
if (!store.componentRegistry) {
|
|
21
|
+
store.componentRegistry = new ComponentRegistry();
|
|
30
22
|
}
|
|
31
|
-
return
|
|
23
|
+
return store.componentRegistry;
|
|
32
24
|
}
|
|
33
25
|
/**
|
|
34
26
|
* Resets the singleton instance.
|
|
@@ -44,7 +36,7 @@ function getComponentRegistryInstance() {
|
|
|
44
36
|
* ```
|
|
45
37
|
*/
|
|
46
38
|
function resetComponentRegistryInstance() {
|
|
47
|
-
|
|
39
|
+
getGlobalStudioStore().componentRegistry = null;
|
|
48
40
|
}
|
|
49
41
|
/**
|
|
50
42
|
* Checks if the singleton instance has been created.
|
|
@@ -52,7 +44,7 @@ function resetComponentRegistryInstance() {
|
|
|
52
44
|
* @returns true if the instance exists, false otherwise
|
|
53
45
|
*/
|
|
54
46
|
function hasComponentRegistryInstance() {
|
|
55
|
-
return
|
|
47
|
+
return getGlobalStudioStore().componentRegistry !== null;
|
|
56
48
|
}
|
|
57
49
|
|
|
58
50
|
export { getComponentRegistryInstance, hasComponentRegistryInstance, resetComponentRegistryInstance };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"singleton.js","sources":["../../../src/component-registry/singleton.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"singleton.js","sources":["../../../src/component-registry/singleton.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAGA;;;;;;;;;;;;;AAaG;SACa,4BAA4B,GAAA;AAC1C,IAAA,MAAM,KAAK,GAAG,oBAAoB,EAAE;AACpC,IAAA,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE;AAC5B,QAAA,KAAK,CAAC,iBAAiB,GAAG,IAAI,iBAAiB,EAAE;IACnD;IACA,OAAO,KAAK,CAAC,iBAA2C;AAC1D;AAEA;;;;;;;;;;;;AAYG;SACa,8BAA8B,GAAA;AAC5C,IAAA,oBAAoB,EAAE,CAAC,iBAAiB,GAAG,IAAI;AACjD;AAEA;;;;AAIG;SACa,4BAA4B,GAAA;AAC1C,IAAA,OAAO,oBAAoB,EAAE,CAAC,iBAAiB,KAAK,IAAI;AAC1D;;;;"}
|
|
@@ -7,6 +7,48 @@ import { dataSourceCapabilities } from './strategies/dataSourceCapabilities.js';
|
|
|
7
7
|
import { getRegistryErrorMessage } from '../utils/registry-error-messages.js';
|
|
8
8
|
import { RegistryErrorMessageKey } from '../utils/registry-error-messages.default.js';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Prop keys (`<nodeUid>-<field>`) for which a binding-type-mismatch error has
|
|
12
|
+
* been reported to the editor and not yet retracted.
|
|
13
|
+
*
|
|
14
|
+
* The editor's "Data Mismatch Found" badge is driven entirely by the
|
|
15
|
+
* UPDATE_BINDING_ERRORS messages we send from here — it has no other source of
|
|
16
|
+
* truth. Previously we only ever SENT errors and never retracted them, so a
|
|
17
|
+
* transient mismatch (e.g. a section repeater bound to scope-root that briefly
|
|
18
|
+
* sees the whole entry OBJECT while a freshly-swapped schema re-scopes) left a
|
|
19
|
+
* sticky error that survived even after the data resolved correctly. Tracking
|
|
20
|
+
* what we've reported lets us emit a one-shot retraction the moment the data
|
|
21
|
+
* matches again, so the badge reflects the live render instead of latching.
|
|
22
|
+
*/
|
|
23
|
+
const reportedBindingErrors = new Set();
|
|
24
|
+
/**
|
|
25
|
+
* Retract every binding-mismatch error previously reported for `nodeUid`'s
|
|
26
|
+
* props and forget them.
|
|
27
|
+
*
|
|
28
|
+
* The in-render retraction in `retrievePropValue` only clears the editor badge
|
|
29
|
+
* when the SAME node re-renders with matching data — which never happens once
|
|
30
|
+
* the node disappears (e.g. a repeater item removed, or a section swapped for a
|
|
31
|
+
* different schema). Without this, such a node's badge would latch and its
|
|
32
|
+
* entry would leak in `reportedBindingErrors` forever. Call this from the
|
|
33
|
+
* node's unmount path so the badge reflects the live tree.
|
|
34
|
+
*
|
|
35
|
+
* Keys are `${nodeUid}-${field}`; the trailing `-` (and fixed-length uids)
|
|
36
|
+
* makes the prefix match exact, so one node's uid can't match another's.
|
|
37
|
+
*/
|
|
38
|
+
function clearReportedBindingErrorsForNode(nodeUid) {
|
|
39
|
+
if (reportedBindingErrors.size === 0)
|
|
40
|
+
return;
|
|
41
|
+
const prefix = `${nodeUid}-`;
|
|
42
|
+
for (const propKey of reportedBindingErrors) {
|
|
43
|
+
if (!propKey.startsWith(prefix))
|
|
44
|
+
continue;
|
|
45
|
+
reportedBindingErrors.delete(propKey);
|
|
46
|
+
composableStudioEventManager?.send(POST_MESSAGE_EVENTS.UPDATE_BINDING_ERRORS, {
|
|
47
|
+
propKey,
|
|
48
|
+
errorMessage: "",
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
10
52
|
// Responsible for resolving props to values
|
|
11
53
|
function retrievePropValue(args) {
|
|
12
54
|
const { data, componentOptions, node, cslp, placeholders = {}, getSlots, jsonRTE, isCompositionBeingEdited, } = args;
|
|
@@ -35,6 +77,11 @@ function retrievePropValue(args) {
|
|
|
35
77
|
return;
|
|
36
78
|
}
|
|
37
79
|
let resolvedData;
|
|
80
|
+
// When the value is resolved via the `dataSources.page.*` fallback below,
|
|
81
|
+
// the CSLP tag must come from the SAME page path (not the section-local
|
|
82
|
+
// binding, which missed). Holds that page path so the cslp block points the
|
|
83
|
+
// edit tag at the field the value actually came from.
|
|
84
|
+
let cslpPathOverride;
|
|
38
85
|
if (type === "slot") {
|
|
39
86
|
resolvedData = getSlotData({
|
|
40
87
|
nodeProps: nodeProps,
|
|
@@ -45,6 +92,32 @@ function retrievePropValue(args) {
|
|
|
45
92
|
mappedData[field] = resolvedData;
|
|
46
93
|
return;
|
|
47
94
|
}
|
|
95
|
+
// Section exposed-prop override: the page composer's exposed-prop binding is
|
|
96
|
+
// the SOLE source of truth for an exposed field — the internal node's own
|
|
97
|
+
// binding must never leak through on a page. SectionCompositionProvider emits
|
|
98
|
+
// an entry for EVERY exposed prop (even when the page value is cleared/empty),
|
|
99
|
+
// so we apply on key PRESENCE, not on a non-undefined value. A cleared prop
|
|
100
|
+
// therefore renders the page-resolved empty value instead of falling back to
|
|
101
|
+
// the section's authored binding.
|
|
102
|
+
const overridesForNode = data.dataSources?.section_exposed_overrides?.[node.uid];
|
|
103
|
+
if (overridesForNode && field in overridesForNode) {
|
|
104
|
+
mappedData[field] = overridesForNode[field];
|
|
105
|
+
// Carry the page-resolved CSLP tag for this exposed prop. This branch
|
|
106
|
+
// short-circuits BEFORE the cslp block (~L430), so without re-emitting
|
|
107
|
+
// here a page-overridden field (e.g. a section's root component bound via
|
|
108
|
+
// a non-repeater binding) renders with no `data-cslp` and loses its
|
|
109
|
+
// live-preview edit overlay — even though its value resolves fine. The
|
|
110
|
+
// SectionComposition wrappers stash the page node's resolved cslp object
|
|
111
|
+
// alongside the value under `$<propKey>`, so it points at the PAGE entry
|
|
112
|
+
// field (the override's source of truth). Repeater-context exposed props
|
|
113
|
+
// are never in this map (they fall through to their own binding + cslp).
|
|
114
|
+
if (cslp.appendTags) {
|
|
115
|
+
const overrideCslp = overridesForNode[`$${field}`];
|
|
116
|
+
if (overrideCslp)
|
|
117
|
+
mappedData[`$${field}`] = overrideCslp;
|
|
118
|
+
}
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
48
121
|
const nodePropConfig = nodeProps[field];
|
|
49
122
|
const { binding: bindedField, value: staticValue } = nodePropConfig || {};
|
|
50
123
|
//TODO: Get proper data for design
|
|
@@ -104,6 +177,40 @@ function retrievePropValue(args) {
|
|
|
104
177
|
else if (dataPath &&
|
|
105
178
|
!(type === "choice" && bindedField?.type === "static_value")) {
|
|
106
179
|
resolvedData = get(data, dataPath, fallbackValue);
|
|
180
|
+
// TEMP — slot-child page-context fallback (PHASE 8 will remove this).
|
|
181
|
+
//
|
|
182
|
+
// Section-slot wraps its children's data context so that:
|
|
183
|
+
// dataSources.template / .contentstack / .contentstack_queries / .repeater
|
|
184
|
+
// ALL refer to the section's LOCAL surrounding context — matching what
|
|
185
|
+
// the Data Picker currently writes when authoring a slot child against
|
|
186
|
+
// section-local fields.
|
|
187
|
+
//
|
|
188
|
+
// The page's outer entries live at `dataSources.page.template`, etc., as
|
|
189
|
+
// the explicit escape namespace. But until the Picker is slot-aware
|
|
190
|
+
// (Phase 8), it has no way to write `dataSources.page.X` paths — so a
|
|
191
|
+
// page-level binding authored on a slot child still produces a
|
|
192
|
+
// `dataSources.<source>.X` path that targets the section-local view and
|
|
193
|
+
// resolves to undefined.
|
|
194
|
+
//
|
|
195
|
+
// Bridge: if the local resolution is missing AND a `page` sibling
|
|
196
|
+
// namespace exists on dataSources, retry under `dataSources.page.X`. Remove
|
|
197
|
+
// this fallback when the Picker emits explicit `dataSources.page.X`
|
|
198
|
+
// paths.
|
|
199
|
+
if ((resolvedData === undefined ||
|
|
200
|
+
resolvedData === null ||
|
|
201
|
+
resolvedData === fallbackValue) &&
|
|
202
|
+
typeof dataPath === "string" &&
|
|
203
|
+
dataPath.startsWith("dataSources.") &&
|
|
204
|
+
!dataPath.startsWith("dataSources.page.") &&
|
|
205
|
+
data?.dataSources?.page) {
|
|
206
|
+
const pagePath = dataPath.replace(/^dataSources\./, "dataSources.page.");
|
|
207
|
+
const pageResolved = get(data, pagePath, undefined);
|
|
208
|
+
if (pageResolved !== undefined && pageResolved !== null) {
|
|
209
|
+
resolvedData = pageResolved;
|
|
210
|
+
// Mirror the value's source so the cslp block tags the page field.
|
|
211
|
+
cslpPathOverride = pagePath;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
107
214
|
// Handle primitive values in repeater context
|
|
108
215
|
// When the array contains primitives (strings, numbers, etc.) instead of objects,
|
|
109
216
|
// the binding path will be like: dataSources.repeater.{uid}.context.{fieldName}
|
|
@@ -208,6 +315,7 @@ function retrievePropValue(args) {
|
|
|
208
315
|
});
|
|
209
316
|
if (isCompositionBeingEdited) {
|
|
210
317
|
// In editor mode: Send to Visual Builder
|
|
318
|
+
reportedBindingErrors.add(`${node.uid}-${field}`);
|
|
211
319
|
composableStudioEventManager?.send(POST_MESSAGE_EVENTS.UPDATE_BINDING_ERRORS, {
|
|
212
320
|
propKey: `${node.uid}-${field}`,
|
|
213
321
|
errorMessage: getRegistryErrorMessage(RegistryErrorMessageKey.DATA_BINDING_TYPE_MISMATCH_EDITOR, { expectedType: type, receivedType }),
|
|
@@ -226,6 +334,21 @@ function retrievePropValue(args) {
|
|
|
226
334
|
});
|
|
227
335
|
}
|
|
228
336
|
}
|
|
337
|
+
else if (isCompositionBeingEdited) {
|
|
338
|
+
// Data now matches the prop type. If we previously reported a mismatch for
|
|
339
|
+
// this prop, retract it (empty errorMessage → the editor calls
|
|
340
|
+
// removeBindingError) so a stale "Data Mismatch Found" badge doesn't
|
|
341
|
+
// persist after the binding re-resolves — e.g. once a swapped section
|
|
342
|
+
// schema finishes re-scoping a repeater's items to its array field.
|
|
343
|
+
const propKey = `${node.uid}-${field}`;
|
|
344
|
+
if (reportedBindingErrors.has(propKey)) {
|
|
345
|
+
reportedBindingErrors.delete(propKey);
|
|
346
|
+
composableStudioEventManager?.send(POST_MESSAGE_EVENTS.UPDATE_BINDING_ERRORS, {
|
|
347
|
+
propKey,
|
|
348
|
+
errorMessage: "",
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
}
|
|
229
352
|
mappedData[field] = resolvedData;
|
|
230
353
|
if (type === "json_rte") {
|
|
231
354
|
mappedData["jsonConfig"] = jsonRTE;
|
|
@@ -233,7 +356,13 @@ function retrievePropValue(args) {
|
|
|
233
356
|
const isCSLPAbleType = bindedField?.type &&
|
|
234
357
|
dataSourceCapabilities[bindedField.type]?.supportsCslp;
|
|
235
358
|
if (cslp.appendTags && dataPath && isCSLPAbleType) {
|
|
236
|
-
|
|
359
|
+
// Use the page-fallback path when the value came from there (cross-section
|
|
360
|
+
// / slot-child page binding), so the edit tag points at the field that
|
|
361
|
+
// actually supplied the value; otherwise the section-local binding path.
|
|
362
|
+
const cslpValue = getCslpTag({
|
|
363
|
+
bindedField: cslpPathOverride ?? dataPath,
|
|
364
|
+
data,
|
|
365
|
+
});
|
|
237
366
|
if (cslpValue) {
|
|
238
367
|
mappedData[`$${field}`] = cslpValue;
|
|
239
368
|
}
|
|
@@ -243,6 +372,11 @@ function retrievePropValue(args) {
|
|
|
243
372
|
mappedData["_uid"] = node.uid;
|
|
244
373
|
mappedData["mode"] = node?.metadata?.mode;
|
|
245
374
|
}
|
|
375
|
+
if (node.type === "section-slot") {
|
|
376
|
+
// Section-slot needs its own node uid at render time so it can look up
|
|
377
|
+
// the page-side fill in SectionInstanceSlotsCtx.slotsMap[node.uid].
|
|
378
|
+
mappedData["_uid"] = node.uid;
|
|
379
|
+
}
|
|
246
380
|
if (node.type === "condition-block") {
|
|
247
381
|
mappedData["condition"] = node?.metadata?.condition;
|
|
248
382
|
mappedData["mode"] = node?.metadata?.mode;
|
|
@@ -260,9 +394,37 @@ function retrievePropValue(args) {
|
|
|
260
394
|
mappedData["symbol_props"][uid] = mappedData[field];
|
|
261
395
|
});
|
|
262
396
|
}
|
|
397
|
+
if (node.type === "section-composition") {
|
|
398
|
+
// Surface the page composer's LIVE binding type for each exposed prop so the
|
|
399
|
+
// SectionComposition renderer can tell an untouched seed from a real override.
|
|
400
|
+
// A repeater expose-time binding is only resolvable inside the section's own
|
|
401
|
+
// Repeater scope; at page level it resolves to a placeholder, not undefined —
|
|
402
|
+
// so the resolved VALUE can't distinguish "untouched" from "overridden". The
|
|
403
|
+
// live binding type can: still `repeater` (or absent) ⇒ untouched, fall
|
|
404
|
+
// through to the internal per-iteration binding; any page-resolvable type ⇒
|
|
405
|
+
// the composer rebound it and the override must win.
|
|
406
|
+
const bindingTypes = {};
|
|
407
|
+
const autoSeeded = {};
|
|
408
|
+
for (const field of Object.keys(nodeProps)) {
|
|
409
|
+
const binding = nodeProps[field]?.binding;
|
|
410
|
+
if (binding?.type)
|
|
411
|
+
bindingTypes[field] = binding.type;
|
|
412
|
+
// An auto-seeded binding means the page composer hasn't touched this exposed
|
|
413
|
+
// prop — the renderer skips its override so the section's internal binding
|
|
414
|
+
// resolves (re-scoped on schema switch / per repeater iteration).
|
|
415
|
+
if (binding?.autoSeeded)
|
|
416
|
+
autoSeeded[field] = true;
|
|
417
|
+
}
|
|
418
|
+
mappedData["section_exposed_binding_types"] = bindingTypes;
|
|
419
|
+
mappedData["section_exposed_auto_seeded"] = autoSeeded;
|
|
420
|
+
// Per-placement design/preview mode. The editor's SectionComposition uses
|
|
421
|
+
// this to derive/override the render mode of every repeater, condition-block,
|
|
422
|
+
// and section-slot inside the section. Ignored in production (renders live).
|
|
423
|
+
mappedData["mode"] = node?.metadata?.mode;
|
|
424
|
+
}
|
|
263
425
|
// TODO: Add support for useData Hook for studio
|
|
264
426
|
return mappedData;
|
|
265
427
|
}
|
|
266
428
|
|
|
267
|
-
export { retrievePropValue };
|
|
429
|
+
export { clearReportedBindingErrorsForNode, retrievePropValue };
|
|
268
430
|
//# sourceMappingURL=retrieve-data.js.map
|