@contentstack/studio-core 1.1.8 → 1.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.
- package/dist/index.d.ts +13 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/sdk/index.d.ts +9 -3
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +9 -3
- package/dist/sdk/index.js.map +1 -1
- package/package.json +4 -7
package/dist/index.d.ts
CHANGED
|
@@ -56,9 +56,12 @@ declare let lightSdk: ComposableStudioLightSdk | null;
|
|
|
56
56
|
*
|
|
57
57
|
* const sdk = studioSdk.init({ stackSdk: stack });
|
|
58
58
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
59
|
+
* // Server-side fetch — note: method is `fetchCompositionData` (not
|
|
60
|
+
* // `fetchComposition`), and it returns the resolved spec options object
|
|
61
|
+
* // directly (NOT wrapped in `{ specOptions }`).
|
|
62
|
+
* async function MyServerPage() {
|
|
63
|
+
* const specOptions = await sdk.fetchCompositionData({
|
|
64
|
+
* compositionUid: 'your-composition-uid',
|
|
62
65
|
* searchQuery: window.location.search,
|
|
63
66
|
* });
|
|
64
67
|
*
|
|
@@ -67,6 +70,9 @@ declare let lightSdk: ComposableStudioLightSdk | null;
|
|
|
67
70
|
* ```
|
|
68
71
|
*
|
|
69
72
|
* @returns {StudioSdk['public']} The public SDK interface for interacting with Studio.
|
|
73
|
+
* Note: this is the public interface DIRECTLY — there is no `.public`
|
|
74
|
+
* namespace on the returned object. Call `sdk.fetchCompositionData(...)`,
|
|
75
|
+
* not `sdk.public.fetchCompositionData(...)`.
|
|
70
76
|
*/
|
|
71
77
|
declare const studioSdk: {
|
|
72
78
|
init(userConfig: UserConfig): {
|
|
@@ -80,4 +86,7 @@ declare function lightInit(userConfig?: LightConfig): {
|
|
|
80
86
|
};
|
|
81
87
|
} | null;
|
|
82
88
|
|
|
83
|
-
|
|
89
|
+
declare const EDIT_COMPOSITION_LABEL = "Edit Composition";
|
|
90
|
+
declare const EDIT_SECTIONS_LABEL = "Edit Sections";
|
|
91
|
+
|
|
92
|
+
export { Button, EDIT_COMPOSITION_LABEL, EDIT_SECTIONS_LABEL, extractStyles, handleNodeStyles, lightInit, lightSdk, sdk, studioSdk };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,4 +2,9 @@ export { Button } from './internal-components/Button.js';
|
|
|
2
2
|
export { extractStyles } from './style-extractor/extract-styles.js';
|
|
3
3
|
export { handleNodeStyles } from './utils/handle-responsive-styles.util.js';
|
|
4
4
|
export { lightInit, lightSdk, sdk, studioSdk } from './sdk/index.js';
|
|
5
|
+
|
|
6
|
+
const EDIT_COMPOSITION_LABEL = "Edit Composition";
|
|
7
|
+
const EDIT_SECTIONS_LABEL = "Edit Sections";
|
|
8
|
+
|
|
9
|
+
export { EDIT_COMPOSITION_LABEL, EDIT_SECTIONS_LABEL };
|
|
5
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AACO,MAAM,sBAAsB,GAAG;AAC/B,MAAM,mBAAmB,GAAG;;;;"}
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -33,9 +33,12 @@ export declare let lightSdk: ComposableStudioLightSdk | null;
|
|
|
33
33
|
*
|
|
34
34
|
* const sdk = studioSdk.init({ stackSdk: stack });
|
|
35
35
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
36
|
+
* // Server-side fetch — note: method is `fetchCompositionData` (not
|
|
37
|
+
* // `fetchComposition`), and it returns the resolved spec options object
|
|
38
|
+
* // directly (NOT wrapped in `{ specOptions }`).
|
|
39
|
+
* async function MyServerPage() {
|
|
40
|
+
* const specOptions = await sdk.fetchCompositionData({
|
|
41
|
+
* compositionUid: 'your-composition-uid',
|
|
39
42
|
* searchQuery: window.location.search,
|
|
40
43
|
* });
|
|
41
44
|
*
|
|
@@ -44,6 +47,9 @@ export declare let lightSdk: ComposableStudioLightSdk | null;
|
|
|
44
47
|
* ```
|
|
45
48
|
*
|
|
46
49
|
* @returns {StudioSdk['public']} The public SDK interface for interacting with Studio.
|
|
50
|
+
* Note: this is the public interface DIRECTLY — there is no `.public`
|
|
51
|
+
* namespace on the returned object. Call `sdk.fetchCompositionData(...)`,
|
|
52
|
+
* not `sdk.public.fetchCompositionData(...)`.
|
|
47
53
|
*/
|
|
48
54
|
export declare const studioSdk: {
|
|
49
55
|
init(userConfig: UserConfig): {
|
package/dist/sdk/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,OAAkC,EAChC,UAAU,EACV,SAAS,EACT,WAAW,EACX,wBAAwB,EACzB,MAAM,6BAA6B,CAAC;AAErC,eAAO,IAAI,GAAG,EAAE,SAAS,GAAG,IAAW,CAAC;AACxC,eAAO,IAAI,QAAQ,EAAE,wBAAwB,GAAG,IAAW,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,OAAkC,EAChC,UAAU,EACV,SAAS,EACT,WAAW,EACX,wBAAwB,EACzB,MAAM,6BAA6B,CAAC;AAErC,eAAO,IAAI,GAAG,EAAE,SAAS,GAAG,IAAW,CAAC;AACxC,eAAO,IAAI,QAAQ,EAAE,wBAAwB,GAAG,IAAW,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,eAAO,MAAM,SAAS;qBACH,UAAU;uHAgBwyxB,CAAC;;;CAPr0xB,CAAC;AAEF,wBAAgB,SAAS,CAAC,UAAU,CAAC,EAAE,WAAW;;;;SAIjD"}
|
package/dist/sdk/index.js
CHANGED
|
@@ -34,9 +34,12 @@ let lightSdk = null;
|
|
|
34
34
|
*
|
|
35
35
|
* const sdk = studioSdk.init({ stackSdk: stack });
|
|
36
36
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* // Server-side fetch — note: method is `fetchCompositionData` (not
|
|
38
|
+
* // `fetchComposition`), and it returns the resolved spec options object
|
|
39
|
+
* // directly (NOT wrapped in `{ specOptions }`).
|
|
40
|
+
* async function MyServerPage() {
|
|
41
|
+
* const specOptions = await sdk.fetchCompositionData({
|
|
42
|
+
* compositionUid: 'your-composition-uid',
|
|
40
43
|
* searchQuery: window.location.search,
|
|
41
44
|
* });
|
|
42
45
|
*
|
|
@@ -45,6 +48,9 @@ let lightSdk = null;
|
|
|
45
48
|
* ```
|
|
46
49
|
*
|
|
47
50
|
* @returns {StudioSdk['public']} The public SDK interface for interacting with Studio.
|
|
51
|
+
* Note: this is the public interface DIRECTLY — there is no `.public`
|
|
52
|
+
* namespace on the returned object. Call `sdk.fetchCompositionData(...)`,
|
|
53
|
+
* not `sdk.public.fetchCompositionData(...)`.
|
|
48
54
|
*/
|
|
49
55
|
const studioSdk = {
|
|
50
56
|
init(userConfig) {
|
package/dist/sdk/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/sdk/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAOO,IAAI,GAAG,GAAqB;AAC5B,IAAI,QAAQ,GAAoC;AAEvD
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/sdk/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAOO,IAAI,GAAG,GAAqB;AAC5B,IAAI,QAAQ,GAAoC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDG;AACI,MAAM,SAAS,GAAG;AACvB,IAAA,IAAI,CAAC,UAAsB,EAAA;QACzB,IAAI,GAAG,EAAE;AACP,YAAA,OAAO,CAAC,IAAI,CAAC,gCAAgC,CAAC;YAC9C,OAAO,GAAG,CAAC,MAAM;QACnB;AAEA,QAAA,GAAG,GAAG,yBAAyB,CAAC,IAAI,CAAC,UAAU,CAAC;QAChD,OAAO,GAAG,CAAC,MAAM;IACnB,CAAC;;AAGG,SAAU,SAAS,CAAC,UAAwB,EAAA;AAChD,IAAA,IAAI,CAAC,UAAU;AAAE,QAAA,OAAO,IAAI;AAC5B,IAAA,QAAQ,GAAG,yBAAyB,CAAC,SAAS,CAAC,UAAU,CAAC;AAC1D,IAAA,OAAO,QAAQ;AACjB;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/studio-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Provides utility to fetch spec for composable component",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"tsup": "^8.5.0"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@contentstack/studio-client": "^1.
|
|
44
|
-
"@contentstack/studio-registry": "^1.
|
|
43
|
+
"@contentstack/studio-client": "^1.7.0",
|
|
44
|
+
"@contentstack/studio-registry": "^1.6.0",
|
|
45
45
|
"classnames": "^2.5.1",
|
|
46
46
|
"goober": "^2.1.16"
|
|
47
47
|
},
|
|
@@ -49,8 +49,5 @@
|
|
|
49
49
|
"react": ">=16.0.0",
|
|
50
50
|
"react-dom": ">=16.0.0"
|
|
51
51
|
},
|
|
52
|
-
"
|
|
53
|
-
"access": "public"
|
|
54
|
-
},
|
|
55
|
-
"gitHead": "1877b45f4a73ffb0c570ea06c197ba95504c014a"
|
|
52
|
+
"gitHead": "8ac2eaeeeab2403708cf075475d8553832fb7866"
|
|
56
53
|
}
|