@contentstack/studio-core 1.1.4 → 1.1.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as _contentstack_studio_client from '@contentstack/studio-client';
3
- import { StudioSpec, FontVariants, UserConfig, LightConfig, StudioSdk, ComposableStudioLightSdk } from '@contentstack/studio-client';
3
+ import { StudioSpec, FontVariants, LightConfig, ComposableStudioLightSdk, StudioSdk, UserConfig } from '@contentstack/studio-client';
4
4
  import { NodeStyles } from '@contentstack/studio-internal';
5
5
 
6
6
  declare const Button: (props: React.ButtonHTMLAttributes<HTMLButtonElement>) => react_jsx_runtime.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/internal-components/Button.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,GACjB,OAAO,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,4CAKrD,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/internal-components/Button.tsx"],"names":[],"mappings":"AAgBA,eAAO,MAAM,MAAM,GACjB,OAAO,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,4CASrD,CAAC"}
@@ -2,8 +2,22 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { css } from 'goober';
3
3
  import { styleFactory } from './styles.js';
4
4
 
5
+ const INTER_FONT_ID = "cs-studio-inter-font";
6
+ function ensureInterFontLoaded() {
7
+ if (typeof document === "undefined")
8
+ return;
9
+ if (document.getElementById(INTER_FONT_ID))
10
+ return;
11
+ const link = document.createElement("link");
12
+ link.id = INTER_FONT_ID;
13
+ link.rel = "stylesheet";
14
+ link.href =
15
+ "https://fonts.googleapis.com/css2?family=Inter:wght@600&display=swap";
16
+ document.head.appendChild(link);
17
+ }
5
18
  const Button = (props) => {
6
- return (jsx("button", { className: styleFactory(css).openInStudioButton, ...props }));
19
+ ensureInterFontLoaded();
20
+ return (jsx("button", { ...props, className: `${styleFactory(css).openInStudioButton} ${props.className ?? ""}` }));
7
21
  };
8
22
 
9
23
  export { Button };
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../src/internal-components/Button.tsx"],"sourcesContent":[null],"names":["_jsx","gooberCss"],"mappings":";;;;AAGO,MAAM,MAAM,GAAG,CACpB,KAAoD,KAClD;AACF,IAAA,QACEA,GAAA,CAAA,QAAA,EAAA,EAAQ,SAAS,EAAE,YAAY,CAACC,GAAS,CAAC,CAAC,kBAAkB,EAAA,GAAM,KAAK,EAAA,CAAI;AAEhF;;;;"}
1
+ {"version":3,"file":"Button.js","sources":["../../src/internal-components/Button.tsx"],"sourcesContent":[null],"names":["_jsx","gooberCss"],"mappings":";;;;AAGA,MAAM,aAAa,GAAG,sBAAsB;AAE5C,SAAS,qBAAqB,GAAA;IAC5B,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE;AACrC,IAAA,IAAI,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAC;QAAE;IAC5C,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC;AAC3C,IAAA,IAAI,CAAC,EAAE,GAAG,aAAa;AACvB,IAAA,IAAI,CAAC,GAAG,GAAG,YAAY;AACvB,IAAA,IAAI,CAAC,IAAI;AACP,QAAA,sEAAsE;AACxE,IAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;AACjC;AAEO,MAAM,MAAM,GAAG,CACpB,KAAoD,KAClD;AACF,IAAA,qBAAqB,EAAE;IACvB,QACEA,mBACM,KAAK,EACT,SAAS,EAAE,CAAA,EAAG,YAAY,CAACC,GAAS,CAAC,CAAC,kBAAkB,CAAA,CAAA,EAAI,KAAK,CAAC,SAAS,IAAI,EAAE,CAAA,CAAE,EAAA,CACnF;AAEN;;;;"}
@@ -9,7 +9,7 @@ const styleFactory = (css) => ({
9
9
  border: "1px solid #6c5ce7",
10
10
  color: "#6c5ce7",
11
11
  borderRadius: "4px",
12
- fontFamily: "Inter",
12
+ fontFamily: "'Inter', sans-serif",
13
13
  textAlign: "center",
14
14
  verticalAlign: "middle",
15
15
  fontWeight: "600",
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../src/internal-components/styles.ts"],"sourcesContent":[null],"names":[],"mappings":"MAEa,YAAY,GAAG,CAAC,GAAqB,MAAM;IACtD,kBAAkB,EAAE,GAAG,CAAC;AACtB,QAAA,MAAM,EAAE,SAAS;AACjB,QAAA,QAAQ,EAAE,SAAS;AACnB,QAAA,SAAS,EAAE,MAAM;AACjB,QAAA,SAAS,EAAE,MAAM;AACjB,QAAA,OAAO,EAAE,gBAAgB;AACzB,QAAA,eAAe,EAAE,SAAS;AAC1B,QAAA,MAAM,EAAE,mBAAmB;AAC3B,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,YAAY,EAAE,KAAK;AACnB,QAAA,UAAU,EAAE,OAAO;AACnB,QAAA,SAAS,EAAE,QAAQ;AACnB,QAAA,aAAa,EAAE,QAAQ;AACvB,QAAA,UAAU,EAAE,KAAK;AACjB,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,UAAU,EAAE,QAAQ;AACpB,QAAA,cAAc,EAAE,QAAQ;AACxB,QAAA,GAAG,EAAE,OAAO;AACZ,QAAA,SAAS,EAAE;AACT,YAAA,SAAS,EAAE,mBAAmB;AAC9B,YAAA,OAAO,EAAE,MAAM;AAChB,SAAA;KACF,CAAC;AACH,CAAA;;;;"}
1
+ {"version":3,"file":"styles.js","sources":["../../src/internal-components/styles.ts"],"sourcesContent":[null],"names":[],"mappings":"MAEa,YAAY,GAAG,CAAC,GAAqB,MAAM;IACtD,kBAAkB,EAAE,GAAG,CAAC;AACtB,QAAA,MAAM,EAAE,SAAS;AACjB,QAAA,QAAQ,EAAE,SAAS;AACnB,QAAA,SAAS,EAAE,MAAM;AACjB,QAAA,SAAS,EAAE,MAAM;AACjB,QAAA,OAAO,EAAE,gBAAgB;AACzB,QAAA,eAAe,EAAE,SAAS;AAC1B,QAAA,MAAM,EAAE,mBAAmB;AAC3B,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,YAAY,EAAE,KAAK;AACnB,QAAA,UAAU,EAAE,qBAAqB;AACjC,QAAA,SAAS,EAAE,QAAQ;AACnB,QAAA,aAAa,EAAE,QAAQ;AACvB,QAAA,UAAU,EAAE,KAAK;AACjB,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,UAAU,EAAE,QAAQ;AACpB,QAAA,cAAc,EAAE,QAAQ;AACxB,QAAA,GAAG,EAAE,OAAO;AACZ,QAAA,SAAS,EAAE;AACT,YAAA,SAAS,EAAE,mBAAmB;AAC9B,YAAA,OAAO,EAAE,MAAM;AAChB,SAAA;KACF,CAAC;AACH,CAAA;;;;"}
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,eAAO,MAAM,SAAS;qBACH,UAAU;uHAgBiiT,CAAC;;;CAP9jT,CAAC;AAEF,wBAAgB,SAAS,CAAC,UAAU,CAAC,EAAE,WAAW;;;;SAIjD"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,eAAO,MAAM,SAAS;qBACH,UAAU;uHAgBg3c,CAAC;;;CAP74c,CAAC;AAEF,wBAAgB,SAAS,CAAC,UAAU,CAAC,EAAE,WAAW;;;;SAIjD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentstack/studio-core",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "Provides utility to fetch spec for composable component",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,7 +30,7 @@
30
30
  "devDependencies": {
31
31
  "@rollup/plugin-commonjs": "^28.0.6",
32
32
  "@rollup/plugin-node-resolve": "^16.0.1",
33
- "@rollup/plugin-terser": "^0.4.4",
33
+ "@rollup/plugin-terser": "^1.0.0",
34
34
  "@rollup/plugin-typescript": "^12.1.4",
35
35
  "@types/react": "^19.1.10",
36
36
  "@types/react-dom": "^19.1.7",
@@ -40,8 +40,8 @@
40
40
  "tsup": "^8.5.0"
41
41
  },
42
42
  "dependencies": {
43
- "@contentstack/studio-client": "^1.3.0",
44
- "@contentstack/studio-registry": "^1.2.1",
43
+ "@contentstack/studio-client": "^1.5.0",
44
+ "@contentstack/studio-registry": "^1.4.0",
45
45
  "classnames": "^2.5.1",
46
46
  "goober": "^2.1.16"
47
47
  },
@@ -49,5 +49,5 @@
49
49
  "react": ">=16.0.0",
50
50
  "react-dom": ">=16.0.0"
51
51
  },
52
- "gitHead": "a8df12b115d554e3c69b5fcd5972197d92b1f558"
52
+ "gitHead": "9ff4f8381cb17d0e06ad91be106e1f4628de55fd"
53
53
  }