smbls 2.10.49 → 2.10.60
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.cjs.js +27 -23
- package/dist/index.cjs.js.map +2 -2
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -434,7 +434,7 @@ var require_index_cjs = __commonJS({
|
|
|
434
434
|
h1Matches: 6,
|
|
435
435
|
lineHeight: 1.5,
|
|
436
436
|
unit: "em",
|
|
437
|
-
|
|
437
|
+
templates: {},
|
|
438
438
|
sequence: {},
|
|
439
439
|
scales: {},
|
|
440
440
|
vars: {}
|
|
@@ -866,6 +866,9 @@ var require_index_cjs = __commonJS({
|
|
|
866
866
|
return sprite;
|
|
867
867
|
};
|
|
868
868
|
var parseRootAttributes = (htmlString) => {
|
|
869
|
+
if (!isString(htmlString)) {
|
|
870
|
+
return console.warn(`parseRootAttributes: ${htmlString} is not a string`);
|
|
871
|
+
}
|
|
869
872
|
let match2 = htmlString.match(/<svg\s+(.*?)>/);
|
|
870
873
|
if (!match2 || !match2[1]) {
|
|
871
874
|
return {};
|
|
@@ -1391,14 +1394,14 @@ var require_index_cjs = __commonJS({
|
|
|
1391
1394
|
unit,
|
|
1392
1395
|
sequence: {},
|
|
1393
1396
|
scales: {},
|
|
1394
|
-
|
|
1397
|
+
templates: {},
|
|
1395
1398
|
vars: {}
|
|
1396
1399
|
});
|
|
1397
1400
|
generateSequence(mediaProps);
|
|
1398
1401
|
const mediaName = prop2.slice(1);
|
|
1399
1402
|
applySequenceVars(mediaProps, mediaName);
|
|
1400
1403
|
const query = MEDIA2[mediaName];
|
|
1401
|
-
TYPOGRAPHY22.
|
|
1404
|
+
TYPOGRAPHY22.templates[`@media screen and ${query}`] = {
|
|
1402
1405
|
fontSize: mediaProps.base / TYPOGRAPHY22.browserDefault + unit
|
|
1403
1406
|
};
|
|
1404
1407
|
}
|
|
@@ -1409,11 +1412,11 @@ var require_index_cjs = __commonJS({
|
|
|
1409
1412
|
if (props3.h1Matches) {
|
|
1410
1413
|
const unit = props3.unit;
|
|
1411
1414
|
const HEADINGS = findHeadings(props3);
|
|
1412
|
-
const {
|
|
1415
|
+
const { templates } = props3;
|
|
1413
1416
|
for (const k in HEADINGS) {
|
|
1414
1417
|
const headerName = `h${parseInt(k) + 1}`;
|
|
1415
|
-
const headerStyle =
|
|
1416
|
-
|
|
1418
|
+
const headerStyle = templates[headerName];
|
|
1419
|
+
templates[headerName] = {
|
|
1417
1420
|
fontSize: CONFIG22.useVariable ? `var(${HEADINGS[k].variable})` : `${HEADINGS[k].scaling}${unit}`,
|
|
1418
1421
|
margin: headerStyle ? headerStyle.margin : 0,
|
|
1419
1422
|
lineHeight: headerStyle ? headerStyle.lineHeight : props3.lineHeight,
|
|
@@ -1455,7 +1458,7 @@ var require_index_cjs = __commonJS({
|
|
|
1455
1458
|
unit,
|
|
1456
1459
|
sequence: {},
|
|
1457
1460
|
scales: {},
|
|
1458
|
-
|
|
1461
|
+
templates: {},
|
|
1459
1462
|
vars: {}
|
|
1460
1463
|
});
|
|
1461
1464
|
generateSequence(mediaProps);
|
|
@@ -1526,7 +1529,7 @@ var require_index_cjs = __commonJS({
|
|
|
1526
1529
|
unit,
|
|
1527
1530
|
sequence: {},
|
|
1528
1531
|
scales: {},
|
|
1529
|
-
|
|
1532
|
+
templates: {},
|
|
1530
1533
|
vars: {}
|
|
1531
1534
|
}, {
|
|
1532
1535
|
base,
|
|
@@ -1616,19 +1619,19 @@ var require_index_cjs = __commonJS({
|
|
|
1616
1619
|
if (RESET2) {
|
|
1617
1620
|
if (RESET2[":root"]) {
|
|
1618
1621
|
const configReset = RESET2;
|
|
1619
|
-
const
|
|
1622
|
+
const configTemplates = TYPOGRAPHY22.templates;
|
|
1620
1623
|
configReset.body = {
|
|
1621
1624
|
...getMediaTheme("document", `@${CONFIG22.globalTheme}`),
|
|
1622
|
-
...
|
|
1625
|
+
...configTemplates.body
|
|
1623
1626
|
};
|
|
1624
|
-
configReset.h1 =
|
|
1625
|
-
configReset.h2 =
|
|
1626
|
-
configReset.h3 =
|
|
1627
|
-
configReset.h4 =
|
|
1628
|
-
configReset.h5 =
|
|
1629
|
-
configReset.h6 =
|
|
1630
|
-
}
|
|
1631
|
-
const { body, ...
|
|
1627
|
+
configReset.h1 = configTemplates.h1;
|
|
1628
|
+
configReset.h2 = configTemplates.h2;
|
|
1629
|
+
configReset.h3 = configTemplates.h3;
|
|
1630
|
+
configReset.h4 = configTemplates.h4;
|
|
1631
|
+
configReset.h5 = configTemplates.h5;
|
|
1632
|
+
configReset.h6 = configTemplates.h6;
|
|
1633
|
+
}
|
|
1634
|
+
const { body, ...templates } = TYPOGRAPHY22.templates;
|
|
1632
1635
|
return deepMerge(merge(RESET2, reset), {
|
|
1633
1636
|
html: {
|
|
1634
1637
|
position: "absolute",
|
|
@@ -1652,7 +1655,7 @@ var require_index_cjs = __commonJS({
|
|
|
1652
1655
|
fontFamily: DOCUMENT2.fontFamily,
|
|
1653
1656
|
fontSize: TYPOGRAPHY22.base / TYPOGRAPHY22.browserDefault + CONFIG22.UNIT.default,
|
|
1654
1657
|
...CONFIG22.useDocumentTheme ? getMediaTheme("document", `@${CONFIG22.globalTheme}`) : {},
|
|
1655
|
-
...
|
|
1658
|
+
...templates,
|
|
1656
1659
|
...body
|
|
1657
1660
|
},
|
|
1658
1661
|
// form elements
|
|
@@ -6866,7 +6869,7 @@ var THEME2 = {
|
|
|
6866
6869
|
var TYPOGRAPHY2 = {
|
|
6867
6870
|
base: 16,
|
|
6868
6871
|
ratio: 1.125,
|
|
6869
|
-
|
|
6872
|
+
templates: {}
|
|
6870
6873
|
};
|
|
6871
6874
|
|
|
6872
6875
|
// ../default-config/src/spacing.js
|
|
@@ -12976,11 +12979,12 @@ var fetchProject = async (key, options) => {
|
|
|
12976
12979
|
return options;
|
|
12977
12980
|
};
|
|
12978
12981
|
var fetchStateAsync = async (key, options, app) => {
|
|
12979
|
-
const { editor
|
|
12982
|
+
const { editor } = options;
|
|
12980
12983
|
if (editor && editor.remote) {
|
|
12981
12984
|
const data = await fetchRemote(key, editor);
|
|
12982
|
-
|
|
12983
|
-
|
|
12985
|
+
const state = editor.serviceRoute === "state" ? data : data.state;
|
|
12986
|
+
if (isObject3(state)) {
|
|
12987
|
+
app.state.update(state);
|
|
12984
12988
|
}
|
|
12985
12989
|
}
|
|
12986
12990
|
};
|