@gem-sdk/core 1.44.0-dev.77 → 1.44.0-dev.89
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.
|
@@ -7,8 +7,8 @@ var zustand = require('zustand');
|
|
|
7
7
|
const ModalContext = /*#__PURE__*/ react.createContext(null);
|
|
8
8
|
const createModalProvider = (data)=>zustand.createStore((set)=>({
|
|
9
9
|
activeId: data,
|
|
10
|
-
setModalActive: (id)=>{
|
|
11
|
-
window?.parent?.postMessage?.(JSON.stringify({
|
|
10
|
+
setModalActive: (id, notPostMessage)=>{
|
|
11
|
+
!!notPostMessage && window?.parent?.postMessage?.(JSON.stringify({
|
|
12
12
|
type: 'active-element',
|
|
13
13
|
uid: id
|
|
14
14
|
}), '*');
|
|
@@ -27,16 +27,16 @@ const composeTypographyV2Css = (typography, isImportant)=>{
|
|
|
27
27
|
const { bold, italic, underline, transform } = typographyAttrs ?? {};
|
|
28
28
|
const composeImportant = isImportant ? '!important' : '';
|
|
29
29
|
return `
|
|
30
|
-
${fontFamily ? composeFontFamilyTypographyV2({
|
|
30
|
+
${fontFamily ? `font-family: ${composeFontFamilyTypographyV2({
|
|
31
31
|
fontFamily
|
|
32
|
-
}) : ''}
|
|
33
|
-
${fontSize?.desktop ? `font-size: ${fontSize?.desktop} ${composeImportant}
|
|
34
|
-
${bold ? `font-weight: bold ${composeImportant}
|
|
35
|
-
${letterSpacing ? `letter-spacing: ${letterSpacing} ${composeImportant}
|
|
36
|
-
${lineHeight?.desktop ? `line-height: ${lineHeight?.desktop} ${composeImportant}
|
|
37
|
-
${italic ? `font-style: italic ${composeImportant}
|
|
38
|
-
${underline ? `text-decoration-line: underline ${composeImportant}
|
|
39
|
-
${transform ? `text-transform: ${transform} ${composeImportant}
|
|
32
|
+
})} ${composeImportant}` : ''};
|
|
33
|
+
${fontSize?.desktop ? `font-size: ${fontSize?.desktop} ${composeImportant}` : ''};
|
|
34
|
+
${bold ? `font-weight: bold ${composeImportant}` : fontWeight ? `font-weight: ${fontWeight} ${composeImportant}` : ''};
|
|
35
|
+
${letterSpacing ? `letter-spacing: ${letterSpacing} ${composeImportant}` : ''};
|
|
36
|
+
${lineHeight?.desktop ? `line-height: ${lineHeight?.desktop} ${composeImportant}` : ''};
|
|
37
|
+
${italic ? `font-style: italic ${composeImportant}` : ''};
|
|
38
|
+
${underline ? `text-decoration-line: underline ${composeImportant}` : ''};
|
|
39
|
+
${transform ? `text-transform: ${transform} ${composeImportant}` : ''};
|
|
40
40
|
`;
|
|
41
41
|
};
|
|
42
42
|
function getCustomCSSByDevice(typography, device) {
|
|
@@ -5,8 +5,8 @@ import { useStore, createStore } from 'zustand';
|
|
|
5
5
|
const ModalContext = /*#__PURE__*/ createContext(null);
|
|
6
6
|
const createModalProvider = (data)=>createStore((set)=>({
|
|
7
7
|
activeId: data,
|
|
8
|
-
setModalActive: (id)=>{
|
|
9
|
-
window?.parent?.postMessage?.(JSON.stringify({
|
|
8
|
+
setModalActive: (id, notPostMessage)=>{
|
|
9
|
+
!!notPostMessage && window?.parent?.postMessage?.(JSON.stringify({
|
|
10
10
|
type: 'active-element',
|
|
11
11
|
uid: id
|
|
12
12
|
}), '*');
|
|
@@ -25,16 +25,16 @@ const composeTypographyV2Css = (typography, isImportant)=>{
|
|
|
25
25
|
const { bold, italic, underline, transform } = typographyAttrs ?? {};
|
|
26
26
|
const composeImportant = isImportant ? '!important' : '';
|
|
27
27
|
return `
|
|
28
|
-
${fontFamily ? composeFontFamilyTypographyV2({
|
|
28
|
+
${fontFamily ? `font-family: ${composeFontFamilyTypographyV2({
|
|
29
29
|
fontFamily
|
|
30
|
-
}) : ''}
|
|
31
|
-
${fontSize?.desktop ? `font-size: ${fontSize?.desktop} ${composeImportant}
|
|
32
|
-
${bold ? `font-weight: bold ${composeImportant}
|
|
33
|
-
${letterSpacing ? `letter-spacing: ${letterSpacing} ${composeImportant}
|
|
34
|
-
${lineHeight?.desktop ? `line-height: ${lineHeight?.desktop} ${composeImportant}
|
|
35
|
-
${italic ? `font-style: italic ${composeImportant}
|
|
36
|
-
${underline ? `text-decoration-line: underline ${composeImportant}
|
|
37
|
-
${transform ? `text-transform: ${transform} ${composeImportant}
|
|
30
|
+
})} ${composeImportant}` : ''};
|
|
31
|
+
${fontSize?.desktop ? `font-size: ${fontSize?.desktop} ${composeImportant}` : ''};
|
|
32
|
+
${bold ? `font-weight: bold ${composeImportant}` : fontWeight ? `font-weight: ${fontWeight} ${composeImportant}` : ''};
|
|
33
|
+
${letterSpacing ? `letter-spacing: ${letterSpacing} ${composeImportant}` : ''};
|
|
34
|
+
${lineHeight?.desktop ? `line-height: ${lineHeight?.desktop} ${composeImportant}` : ''};
|
|
35
|
+
${italic ? `font-style: italic ${composeImportant}` : ''};
|
|
36
|
+
${underline ? `text-decoration-line: underline ${composeImportant}` : ''};
|
|
37
|
+
${transform ? `text-transform: ${transform} ${composeImportant}` : ''};
|
|
38
38
|
`;
|
|
39
39
|
};
|
|
40
40
|
function getCustomCSSByDevice(typography, device) {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5429,6 +5429,9 @@ type PublishedThemePage$1 = {
|
|
|
5429
5429
|
themePageOnlineStoreData?: Maybe$1<Array<Maybe$1<PublishedThemePageOnlineStoreData$1>>>;
|
|
5430
5430
|
type: PublishedThemePageType$1;
|
|
5431
5431
|
updatedAt?: Maybe$1<Scalars$2['Time']>;
|
|
5432
|
+
publishedAt?: Maybe$1<Scalars$2['Time']>;
|
|
5433
|
+
isPlatformDefault?: boolean;
|
|
5434
|
+
platformOriginalTemplateContent?: string;
|
|
5432
5435
|
};
|
|
5433
5436
|
type PublishedThemePageCustomSection$1 = {
|
|
5434
5437
|
id: Scalars$2['ID'];
|
|
@@ -29009,7 +29012,7 @@ declare const useCollectionStore: <U>(selector: (state: ExtractState<StoreApi<Co
|
|
|
29009
29012
|
|
|
29010
29013
|
type ModalContextProps = {
|
|
29011
29014
|
activeId?: string;
|
|
29012
|
-
setModalActive: (id?: string) => void;
|
|
29015
|
+
setModalActive: (id?: string, notPostMessage?: boolean) => void;
|
|
29013
29016
|
clearModal: () => void;
|
|
29014
29017
|
};
|
|
29015
29018
|
type ModalProviderProps = Pick<ModalContextProps, 'activeId'> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/core",
|
|
3
|
-
"version": "1.44.0-dev.
|
|
3
|
+
"version": "1.44.0-dev.89",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"type-check": "yarn tsc --noEmit"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@gem-sdk/adapter-shopify": "1.44.0-dev.
|
|
31
|
-
"@gem-sdk/styles": "1.44.0-dev.
|
|
30
|
+
"@gem-sdk/adapter-shopify": "1.44.0-dev.78",
|
|
31
|
+
"@gem-sdk/styles": "1.44.0-dev.78",
|
|
32
32
|
"@types/classnames": "^2.3.1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|