@liiift-studio/sanity-font-manager 2.5.0 → 2.5.2
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/UploadModal-2AAJXZJK.js +6 -0
- package/dist/{UploadModal-NME2W53V.mjs → UploadModal-DDTVJ2MA.mjs} +1 -1
- package/dist/{chunk-646WCBRR.mjs → chunk-FT7YTFZW.mjs} +617 -182
- package/dist/{chunk-FH4QKHOH.js → chunk-YMQEM4AO.js} +583 -148
- package/dist/index.js +109 -66
- package/dist/index.mjs +66 -23
- package/package.json +1 -1
- package/src/components/BatchUploadFonts.jsx +1 -1
- package/src/components/FontReviewCard.jsx +41 -1
- package/src/components/KeyValueReferenceInput.jsx +69 -61
- package/src/components/SingleUploaderTool.jsx +3 -3
- package/src/components/UploadModal.jsx +43 -7
- package/src/components/UploadStep1Settings.jsx +1 -1
- package/src/components/UploadStep2Review.jsx +2 -0
- package/src/components/UploadStep3Execute.jsx +1 -1
- package/src/components/UploadStep3bInstances.jsx +396 -0
- package/src/index.js +1 -0
- package/src/schema/stylesField.js +20 -0
- package/src/utils/buildUploadPlan.js +1 -0
- package/src/utils/executeUploadPlan.js +1 -8
- package/src/utils/parseVariableFontInstances.js +237 -147
- package/src/utils/processFontFiles.js +5 -4
- package/src/utils/updateTypefaceDocument.js +15 -2
- package/dist/UploadModal-6LIX7XOK.js +0 -6
package/dist/index.js
CHANGED
|
@@ -59,7 +59,8 @@
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
|
|
63
|
+
var _chunkYMQEM4AOjs = require('./chunk-YMQEM4AO.js');
|
|
63
64
|
|
|
64
65
|
// src/components/BatchUploadFonts.jsx
|
|
65
66
|
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
@@ -113,7 +114,7 @@ var uploadFontFiles = async (fontsObjects, subfamilies, client, inputPrice, styl
|
|
|
113
114
|
if (fileType === "woff2") {
|
|
114
115
|
console.log(`[${i + 1}/${fontObjectKeys.length}][${j + 1}/${files.length}] Generating CSS for: ${fontObject.title}`);
|
|
115
116
|
setStatus(`[${i + 1}/${fontObjectKeys.length}][${j + 1}/${files.length}] Generating CSS for: ${fontObject.title}`);
|
|
116
|
-
newFileInput = await
|
|
117
|
+
newFileInput = await _chunkYMQEM4AOjs.generateCssFile.call(void 0, {
|
|
117
118
|
woff2File: file,
|
|
118
119
|
fileInput: newFileInput,
|
|
119
120
|
fontName: fontObject.title,
|
|
@@ -127,7 +128,7 @@ var uploadFontFiles = async (fontsObjects, subfamilies, client, inputPrice, styl
|
|
|
127
128
|
if (fileType === "ttf") {
|
|
128
129
|
console.log(`[${i + 1}/${fontObjectKeys.length}][${j + 1}/${files.length}] Generating font data for: ${fontObject.title}`);
|
|
129
130
|
setStatus(`[${i + 1}/${fontObjectKeys.length}][${j + 1}/${files.length}] Generating font data for: ${fontObject.title}`);
|
|
130
|
-
const metadata = await
|
|
131
|
+
const metadata = await _chunkYMQEM4AOjs.generateFontData.call(void 0, {
|
|
131
132
|
fontId: fontObject._id,
|
|
132
133
|
url: baseAsset.url,
|
|
133
134
|
fontKit,
|
|
@@ -240,7 +241,7 @@ var createOrUpdateFontDocument = async (font, client, setError) => {
|
|
|
240
241
|
delete font.fontKit;
|
|
241
242
|
delete font.originalFilename;
|
|
242
243
|
if (font.variableFont && font.variableInstances) {
|
|
243
|
-
const instanceMappings = await
|
|
244
|
+
const instanceMappings = await _chunkYMQEM4AOjs.parseVariableFontInstances.call(void 0, font, client);
|
|
244
245
|
if (instanceMappings.length > 0) {
|
|
245
246
|
font.variableInstanceReferences = instanceMappings;
|
|
246
247
|
}
|
|
@@ -405,9 +406,9 @@ var renameFontDocuments = async ({
|
|
|
405
406
|
const res = await fetch(ttfAsset.url);
|
|
406
407
|
file = await res.blob();
|
|
407
408
|
}
|
|
408
|
-
const fontBuffer = await
|
|
409
|
-
const font = await
|
|
410
|
-
const { weightName, subfamilyName, fontTitle } =
|
|
409
|
+
const fontBuffer = await _chunkYMQEM4AOjs.readFontFile.call(void 0, file);
|
|
410
|
+
const font = await _chunkYMQEM4AOjs.parseFont.call(void 0, fontBuffer, `${fontDoc._id}.ttf`);
|
|
411
|
+
const { weightName, subfamilyName, fontTitle } = _chunkYMQEM4AOjs.extractFontMetadata.call(void 0,
|
|
411
412
|
font,
|
|
412
413
|
typefaceName,
|
|
413
414
|
weightKeywordList,
|
|
@@ -587,7 +588,7 @@ var groupFontsBySubfamily = (fonts) => {
|
|
|
587
588
|
if ((_a = font.title) == null ? void 0 : _a.includes("VF")) {
|
|
588
589
|
subfamilies[`VF_${font.title}`] = [font];
|
|
589
590
|
} else {
|
|
590
|
-
const subfamilyName = font.subfamily ?
|
|
591
|
+
const subfamilyName = font.subfamily ? _chunkYMQEM4AOjs.expandAbbreviations.call(void 0, font.subfamily) : "Regular";
|
|
591
592
|
if (!subfamilies[subfamilyName]) subfamilies[subfamilyName] = [];
|
|
592
593
|
subfamilies[subfamilyName].push(font);
|
|
593
594
|
}
|
|
@@ -635,7 +636,7 @@ var updateTypefaceSubfamilies = async (doc_id, stylesObject, newSubfamiliesArray
|
|
|
635
636
|
};
|
|
636
637
|
|
|
637
638
|
// src/components/BatchUploadFonts.jsx
|
|
638
|
-
var UploadModal2 = _react.lazy.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./UploadModal-
|
|
639
|
+
var UploadModal2 = _react.lazy.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./UploadModal-2AAJXZJK.js"))));
|
|
639
640
|
var ACCEPTED_EXTENSIONS = ["ttf", "otf", "woff", "woff2", "eot", "svg"];
|
|
640
641
|
var formatElapsed = (s) => {
|
|
641
642
|
const m = Math.floor(s / 60);
|
|
@@ -664,7 +665,7 @@ var BatchUploadFonts = () => {
|
|
|
664
665
|
const slug = _sanity.useFormValue.call(void 0, ["slug"]);
|
|
665
666
|
const stylesObject = _sanity.useFormValue.call(void 0, ["styles"]) || { fonts: [], variableFont: [] };
|
|
666
667
|
const subfamiliesArray = (stylesObject == null ? void 0 : stylesObject.subfamilies) || [];
|
|
667
|
-
const { weightKeywordList, italicKeywordList } = _react.useMemo.call(void 0, () =>
|
|
668
|
+
const { weightKeywordList, italicKeywordList } = _react.useMemo.call(void 0, () => _chunkYMQEM4AOjs.generateStyleKeywords.call(void 0, ), []);
|
|
668
669
|
_react.useEffect.call(void 0, () => {
|
|
669
670
|
if (ready !== true) {
|
|
670
671
|
setElapsedSeconds(0);
|
|
@@ -777,7 +778,7 @@ var BatchUploadFonts = () => {
|
|
|
777
778
|
}
|
|
778
779
|
const sortedFiles = sortFilesByType(pendingFiles);
|
|
779
780
|
setPendingFiles([]);
|
|
780
|
-
const { fontsObjects, subfamilies, uniqueSubfamilies, newPreferredStyle, failedFiles } = await
|
|
781
|
+
const { fontsObjects, subfamilies, uniqueSubfamilies, newPreferredStyle, failedFiles } = await _chunkYMQEM4AOjs.processFontFiles.call(void 0,
|
|
781
782
|
sortedFiles,
|
|
782
783
|
title,
|
|
783
784
|
weightKeywordList,
|
|
@@ -796,7 +797,7 @@ var BatchUploadFonts = () => {
|
|
|
796
797
|
setError,
|
|
797
798
|
preserveFileNames
|
|
798
799
|
);
|
|
799
|
-
await
|
|
800
|
+
await _chunkYMQEM4AOjs.updateTypefaceDocument.call(void 0,
|
|
800
801
|
doc_id,
|
|
801
802
|
fontRefs,
|
|
802
803
|
variableRefs,
|
|
@@ -913,7 +914,7 @@ var BatchUploadFonts = () => {
|
|
|
913
914
|
const woff2Blob = await woff2Response.blob();
|
|
914
915
|
const woff2File = new File([woff2Blob], `${fontDoc._id}.woff2`, { type: "font/woff2" });
|
|
915
916
|
setStatus(`Regenerating CSS for font ${i + 1}/${fontRefs.length}: ${fontDoc.title}`);
|
|
916
|
-
const updatedFileInput = await
|
|
917
|
+
const updatedFileInput = await _chunkYMQEM4AOjs.generateCssFile.call(void 0, {
|
|
917
918
|
woff2File,
|
|
918
919
|
fileInput: fontDoc.fileInput,
|
|
919
920
|
fileName: fontDoc._id,
|
|
@@ -1020,7 +1021,7 @@ var BatchUploadFonts = () => {
|
|
|
1020
1021
|
style: { fontFamily: "monospace", minWidth: "2.5rem", flexShrink: 0 }
|
|
1021
1022
|
},
|
|
1022
1023
|
ext
|
|
1023
|
-
), /* @__PURE__ */ _react2.default.createElement(_ui.Box, { style: { flex: 1, minWidth: 0
|
|
1024
|
+
), /* @__PURE__ */ _react2.default.createElement(_ui.Box, { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 1 }, file.name))), /* @__PURE__ */ _react2.default.createElement(
|
|
1024
1025
|
_ui.Button,
|
|
1025
1026
|
{
|
|
1026
1027
|
mode: "bleed",
|
|
@@ -1135,7 +1136,7 @@ var BatchUploadFonts = () => {
|
|
|
1135
1136
|
), renderTooltipLabel(
|
|
1136
1137
|
"Preserve shortened names",
|
|
1137
1138
|
'Abbreviations in font names are kept as-is (e.g. "XNarrow" stays "XNarrow", "Bd" stays "Bd").'
|
|
1138
|
-
)), ready === "rename" ? renderProcessing() : /* @__PURE__ */ _react2.default.createElement(_ui.Button, { mode: "ghost", tone: "primary", text: "Rename Existing Fonts", style: { width: "100%" }, onClick: handleRenameExistingFonts, disabled: ready !== true })), /* @__PURE__ */ _react2.default.createElement(_ui.Stack, { space: 3 }, /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 1, weight: "semibold", style: { lineHeight: 1.6 } }, "Update Font Prices"), ready === "price" ? renderProcessing() : /* @__PURE__ */ _react2.default.createElement(_ui.Stack, { space: 2 }, /* @__PURE__ */ _react2.default.createElement(
|
|
1139
|
+
)), ready === "rename" ? renderProcessing() : /* @__PURE__ */ _react2.default.createElement(_ui.Button, { mode: "ghost", tone: "primary", text: "Rename Existing Fonts", style: { width: "100%" }, onClick: handleRenameExistingFonts, disabled: ready !== true })), /* @__PURE__ */ _react2.default.createElement(_ui.Stack, { space: 3 }, /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 1, weight: "semibold", style: { lineHeight: 1.6 } }, "Update Font Prices"), ready === "price" ? renderProcessing() : /* @__PURE__ */ _react2.default.createElement(_ui.Stack, { space: 2 }, /* @__PURE__ */ _react2.default.createElement(_chunkYMQEM4AOjs.PriceInput_default, { inputPrice, handleInputChange }), /* @__PURE__ */ _react2.default.createElement(_ui.Button, { mode: "ghost", tone: "primary", text: "Update All Font Prices", style: { width: "100%" }, onClick: handleChangeFontPrice, disabled: ready !== true }))), /* @__PURE__ */ _react2.default.createElement(_ui.Stack, { space: 3 }, /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 1, weight: "semibold", style: { lineHeight: 1.6 } }, "Regenerate CSS"), /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 1, muted: true, style: { lineHeight: 1.6 } }, "Rebuilds the CSS @font-face files for all fonts in the typeface fonts list."), ready === "css" ? renderProcessing() : /* @__PURE__ */ _react2.default.createElement(_ui.Button, { mode: "ghost", tone: "primary", text: "Regenerate CSS Files", style: { width: "100%" }, onClick: handleRegenerateCssFiles, disabled: ready !== true }))))));
|
|
1139
1140
|
};
|
|
1140
1141
|
|
|
1141
1142
|
// src/components/GenerateCollectionsPairsComponent.jsx
|
|
@@ -1487,7 +1488,7 @@ var SingleUploaderTool = (props) => {
|
|
|
1487
1488
|
const doc_style = _sanity.useFormValue.call(void 0, ["style"]);
|
|
1488
1489
|
const doc_slug = _sanity.useFormValue.call(void 0, ["slug"]);
|
|
1489
1490
|
const doc_metaData = _sanity.useFormValue.call(void 0, ["metaData"]);
|
|
1490
|
-
const { weightKeywordList, italicKeywordList } = _react.useMemo.call(void 0, () =>
|
|
1491
|
+
const { weightKeywordList, italicKeywordList } = _react.useMemo.call(void 0, () => _chunkYMQEM4AOjs.generateStyleKeywords.call(void 0, ), []);
|
|
1491
1492
|
_react.useEffect.call(void 0, () => {
|
|
1492
1493
|
handleSetFilenames();
|
|
1493
1494
|
}, [fileInput]);
|
|
@@ -1541,7 +1542,7 @@ var SingleUploaderTool = (props) => {
|
|
|
1541
1542
|
{ id: woff2AssetRef }
|
|
1542
1543
|
);
|
|
1543
1544
|
const blob = await (await fetch(woff2Asset.url)).blob();
|
|
1544
|
-
const newFileInput = await
|
|
1545
|
+
const newFileInput = await _chunkYMQEM4AOjs.generateCssFile.call(void 0, {
|
|
1545
1546
|
woff2File: blob,
|
|
1546
1547
|
fileInput,
|
|
1547
1548
|
fontName: doc_title,
|
|
@@ -1632,16 +1633,16 @@ var SingleUploaderTool = (props) => {
|
|
|
1632
1633
|
);
|
|
1633
1634
|
if (!(ttfAsset == null ? void 0 : ttfAsset.url)) throw new Error("Could not fetch TTF file URL");
|
|
1634
1635
|
const arrayBuffer = await (await fetch(ttfAsset.url)).arrayBuffer();
|
|
1635
|
-
const font = await
|
|
1636
|
-
const { weightName, subfamilyName, style, variableFont } =
|
|
1636
|
+
const font = await _chunkYMQEM4AOjs.parseFont.call(void 0, arrayBuffer, `${doc_id}.ttf`);
|
|
1637
|
+
const { weightName, subfamilyName, style, variableFont } = _chunkYMQEM4AOjs.extractFontMetadata.call(void 0,
|
|
1637
1638
|
font,
|
|
1638
1639
|
doc_typefaceName,
|
|
1639
1640
|
weightKeywordList,
|
|
1640
1641
|
italicKeywordList
|
|
1641
1642
|
);
|
|
1642
|
-
const weight =
|
|
1643
|
+
const weight = _chunkYMQEM4AOjs.determineWeight.call(void 0, font, weightName);
|
|
1643
1644
|
await client.patch(doc_id).set({ weightName, subfamily: subfamilyName, style, variableFont, weight }).commit();
|
|
1644
|
-
const fontData = await
|
|
1645
|
+
const fontData = await _chunkYMQEM4AOjs.generateFontData.call(void 0, {
|
|
1645
1646
|
url: ttfAsset.url,
|
|
1646
1647
|
fontKit: font,
|
|
1647
1648
|
fontId: doc_id,
|
|
@@ -1655,7 +1656,7 @@ var SingleUploaderTool = (props) => {
|
|
|
1655
1656
|
variableFont,
|
|
1656
1657
|
variableInstances: fontData.variableInstances
|
|
1657
1658
|
};
|
|
1658
|
-
const instanceMappings = await
|
|
1659
|
+
const instanceMappings = await _chunkYMQEM4AOjs.parseVariableFontInstances.call(void 0, fontObj, client);
|
|
1659
1660
|
if (instanceMappings.length > 0) {
|
|
1660
1661
|
await client.patch(doc_id).set({ variableInstanceReferences: instanceMappings }).commit();
|
|
1661
1662
|
}
|
|
@@ -1774,7 +1775,7 @@ var SingleUploaderTool = (props) => {
|
|
|
1774
1775
|
if (code === "woff2") {
|
|
1775
1776
|
setMessage("Building CSS: " + doc_title + ".css");
|
|
1776
1777
|
setStatus("Building CSS file");
|
|
1777
|
-
newFileInput = await
|
|
1778
|
+
newFileInput = await _chunkYMQEM4AOjs.generateCssFile.call(void 0, {
|
|
1778
1779
|
woff2File: file,
|
|
1779
1780
|
fileInput: newFileInput,
|
|
1780
1781
|
fontName: doc_title,
|
|
@@ -1788,15 +1789,15 @@ var SingleUploaderTool = (props) => {
|
|
|
1788
1789
|
setStatus("CSS file built successfully");
|
|
1789
1790
|
}
|
|
1790
1791
|
if (code === "ttf") {
|
|
1791
|
-
const fontBuffer = await
|
|
1792
|
-
const font = await
|
|
1793
|
-
const { weightName, subfamilyName, style, variableFont } =
|
|
1792
|
+
const fontBuffer = await _chunkYMQEM4AOjs.readFontFile.call(void 0, file);
|
|
1793
|
+
const font = await _chunkYMQEM4AOjs.parseFont.call(void 0, fontBuffer, file.name);
|
|
1794
|
+
const { weightName, subfamilyName, style, variableFont } = _chunkYMQEM4AOjs.extractFontMetadata.call(void 0,
|
|
1794
1795
|
font,
|
|
1795
1796
|
doc_typefaceName,
|
|
1796
1797
|
weightKeywordList,
|
|
1797
1798
|
italicKeywordList
|
|
1798
1799
|
);
|
|
1799
|
-
const weight =
|
|
1800
|
+
const weight = _chunkYMQEM4AOjs.determineWeight.call(void 0, font, weightName);
|
|
1800
1801
|
const normalizedId = doc_id.startsWith("drafts.") ? doc_id.replace("drafts.", "") : doc_id;
|
|
1801
1802
|
await client.patch(normalizedId).set({ weightName, subfamily: subfamilyName, style, variableFont, weight }).commit();
|
|
1802
1803
|
}
|
|
@@ -1937,18 +1938,18 @@ var SingleUploaderTool = (props) => {
|
|
|
1937
1938
|
const formatUpper = format.toUpperCase();
|
|
1938
1939
|
const hasFile = !!((_b2 = (_a2 = fileInput == null ? void 0 : fileInput[format]) == null ? void 0 : _a2.asset) == null ? void 0 : _b2._ref);
|
|
1939
1940
|
const fileUrl = hasFile ? `https://cdn.sanity.io/files/${process.env.SANITY_STUDIO_PROJECT_ID}/${process.env.SANITY_STUDIO_DATASET}/${fileInput[format].asset._ref.replace("file-", "").replace("-", ".")}` : null;
|
|
1940
|
-
return /* @__PURE__ */ _react2.default.createElement(_ui.Card, { border: true, radius: 1, paddingX: 2, paddingY: 3 }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { justify: "space-between", align: "center", gap: 2 }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { gap: 3, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 0, style: { fontFamily: "monospace", minWidth: "2.5rem", flexShrink: 0, opacity: hasFile ? 1 : 0.5 } }, formatUpper), hasFile ? /* @__PURE__ */ _react2.default.createElement(_ui.Box, { style: { flex: 1, minWidth: 0
|
|
1941
|
+
return /* @__PURE__ */ _react2.default.createElement(_ui.Card, { border: true, radius: 1, paddingX: 2, paddingY: 3 }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { justify: "space-between", align: "center", gap: 2 }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { gap: 3, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 0, style: { fontFamily: "monospace", minWidth: "2.5rem", flexShrink: 0, opacity: hasFile ? 1 : 0.5 } }, formatUpper), hasFile ? /* @__PURE__ */ _react2.default.createElement(_ui.Box, { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ _react2.default.createElement("a", { href: fileUrl, target: "_blank", rel: "noreferrer" }, (filenames == null ? void 0 : filenames[format]) || "File")) : /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 1, muted: true }, "\u2014")), status === "ready" && /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { gap: 1, align: "center", style: { flexShrink: 0 } }, buildSource && (fileInput == null ? void 0 : fileInput[buildSource]) && /* @__PURE__ */ _react2.default.createElement(_ui.Button, { mode: "ghost", tone: "primary", fontSize: 1, padding: 2, onClick: () => handleGenerateFontFile(format, fileInput[buildSource]), text: "Build" }), /* @__PURE__ */ _react2.default.createElement(_ui.Button, { as: "label", mode: "ghost", tone: "primary", fontSize: 1, padding: 2, style: { cursor: "pointer" } }, /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 1 }, "Upload"), /* @__PURE__ */ _react2.default.createElement("input", { ref, type: "file", hidden: true, onChange: (e) => handleUpload(e, format) })), hasFile && /* @__PURE__ */ _react2.default.createElement(_ui.Button, { mode: "bleed", tone: "critical", icon: _icons.TrashIcon, padding: 2, onClick: () => handleDelete(format) }))));
|
|
1941
1942
|
};
|
|
1942
1943
|
const renderTopLevelAssetSection = (label, fieldName, assetRef, filename, onBuild) => {
|
|
1943
1944
|
const hasFile = !!assetRef;
|
|
1944
1945
|
const fileUrl = hasFile ? `https://cdn.sanity.io/files/${process.env.SANITY_STUDIO_PROJECT_ID}/${process.env.SANITY_STUDIO_DATASET}/${assetRef.replace("file-", "").replace("-", ".")}` : null;
|
|
1945
|
-
return /* @__PURE__ */ _react2.default.createElement(_ui.Card, { border: true, radius: 1, paddingX: 2, paddingY: 3 }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { justify: "space-between", align: "center", gap: 2 }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { gap: 3, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 0, style: { fontFamily: "monospace", minWidth: "2.5rem", flexShrink: 0, opacity: hasFile ? 1 : 0.5 } }, label), hasFile ? /* @__PURE__ */ _react2.default.createElement(_ui.Box, { style: { flex: 1, minWidth: 0
|
|
1946
|
+
return /* @__PURE__ */ _react2.default.createElement(_ui.Card, { border: true, radius: 1, paddingX: 2, paddingY: 3 }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { justify: "space-between", align: "center", gap: 2 }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { gap: 3, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 0, style: { fontFamily: "monospace", minWidth: "2.5rem", flexShrink: 0, opacity: hasFile ? 1 : 0.5 } }, label), hasFile ? /* @__PURE__ */ _react2.default.createElement(_ui.Box, { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ _react2.default.createElement("a", { href: fileUrl, target: "_blank", rel: "noreferrer" }, filename || "File")) : /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 1, muted: true }, "\u2014")), status === "ready" && /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { gap: 1, align: "center", style: { flexShrink: 0 } }, onBuild && (fileInput == null ? void 0 : fileInput.woff2) && /* @__PURE__ */ _react2.default.createElement(_ui.Button, { mode: "ghost", tone: "primary", fontSize: 1, padding: 2, onClick: onBuild, text: "Build" }), /* @__PURE__ */ _react2.default.createElement(_ui.Button, { as: "label", mode: "ghost", tone: "primary", fontSize: 1, padding: 2, style: { cursor: "pointer" } }, /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 1 }, "Upload"), /* @__PURE__ */ _react2.default.createElement("input", { type: "file", hidden: true, onChange: (e) => handleUploadTopLevelFile(e, fieldName) })), hasFile && /* @__PURE__ */ _react2.default.createElement(_ui.Button, { mode: "bleed", tone: "critical", icon: _icons.TrashIcon, padding: 2, onClick: () => handleDeleteTopLevel(fieldName) }))));
|
|
1946
1947
|
};
|
|
1947
1948
|
const renderCssSection = () => {
|
|
1948
1949
|
var _a2, _b2;
|
|
1949
1950
|
const hasFile = !!((_b2 = (_a2 = fileInput == null ? void 0 : fileInput.css) == null ? void 0 : _a2.asset) == null ? void 0 : _b2._ref);
|
|
1950
1951
|
const fileUrl = hasFile ? `https://cdn.sanity.io/files/${process.env.SANITY_STUDIO_PROJECT_ID}/${process.env.SANITY_STUDIO_DATASET}/${fileInput.css.asset._ref.replace("file-", "").replace("-", ".")}` : null;
|
|
1951
|
-
return /* @__PURE__ */ _react2.default.createElement(_ui.Card, { border: true, radius: 1, paddingX: 2, paddingY: 3 }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { justify: "space-between", align: "center", gap: 2 }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { gap: 3, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 0, style: { fontFamily: "monospace", minWidth: "2.5rem", flexShrink: 0, opacity: hasFile ? 1 : 0.5 } }, "CSS"), hasFile ? /* @__PURE__ */ _react2.default.createElement(_ui.Box, { style: { flex: 1, minWidth: 0
|
|
1952
|
+
return /* @__PURE__ */ _react2.default.createElement(_ui.Card, { border: true, radius: 1, paddingX: 2, paddingY: 3 }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { justify: "space-between", align: "center", gap: 2 }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { gap: 3, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 0, style: { fontFamily: "monospace", minWidth: "2.5rem", flexShrink: 0, opacity: hasFile ? 1 : 0.5 } }, "CSS"), hasFile ? /* @__PURE__ */ _react2.default.createElement(_ui.Box, { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ _react2.default.createElement("a", { href: fileUrl, target: "_blank", rel: "noreferrer" }, (filenames == null ? void 0 : filenames.css) || "File")) : /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 1, muted: true }, "\u2014")), status === "ready" && /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { gap: 1, align: "center", style: { flexShrink: 0 } }, (fileInput == null ? void 0 : fileInput.woff2) && /* @__PURE__ */ _react2.default.createElement(_ui.Button, { mode: "ghost", tone: "primary", fontSize: 1, padding: 2, onClick: () => handleGenerateCssFile(), text: "Build" }), hasFile && /* @__PURE__ */ _react2.default.createElement(_ui.Button, { mode: "bleed", tone: "critical", icon: _icons.TrashIcon, padding: 2, onClick: () => handleDelete("css") }))));
|
|
1952
1953
|
};
|
|
1953
1954
|
const renderDataSection = () => /* @__PURE__ */ _react2.default.createElement(_ui.Card, { border: true, radius: 1, paddingX: 2, paddingY: 3 }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { justify: "space-between", align: "center", gap: 2 }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { gap: 3, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 0, style: { fontFamily: "monospace", minWidth: "2.5rem", flexShrink: 0, opacity: (doc_metaData == null ? void 0 : doc_metaData.version) ? 1 : 0.5 } }, "DATA"), (doc_metaData == null ? void 0 : doc_metaData.version) ? /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 1 }, "v", doc_metaData.version, " ", /* @__PURE__ */ _react2.default.createElement(_ui.Text, { as: "span", size: 1, muted: true }, "(", doc_metaData.genDate, ")")) : /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 1, muted: true }, "\u2014")), status === "ready" && (fileInput == null ? void 0 : fileInput.ttf) && /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { gap: 1, align: "center", style: { flexShrink: 0 } }, /* @__PURE__ */ _react2.default.createElement(_ui.Button, { mode: "ghost", tone: "primary", fontSize: 1, padding: 2, onClick: () => handleGenerateFontData(), text: "Build" }))));
|
|
1954
1955
|
return /* @__PURE__ */ _react2.default.createElement(_ui.Stack, { space: 2 }, /* @__PURE__ */ _react2.default.createElement(
|
|
@@ -2035,7 +2036,7 @@ var UploadScriptsComponent = (props) => {
|
|
|
2035
2036
|
const stylesObject = _sanity.useFormValue.call(void 0, ["styles"]);
|
|
2036
2037
|
let subfamiliesArray = (stylesObject == null ? void 0 : stylesObject.subfamilies) || [];
|
|
2037
2038
|
const { weightKeywordList, italicKeywordList } = _react.useMemo.call(void 0,
|
|
2038
|
-
() =>
|
|
2039
|
+
() => _chunkYMQEM4AOjs.generateStyleKeywords.call(void 0, ),
|
|
2039
2040
|
[]
|
|
2040
2041
|
);
|
|
2041
2042
|
const readFontFile3 = (file) => {
|
|
@@ -2067,21 +2068,21 @@ var UploadScriptsComponent = (props) => {
|
|
|
2067
2068
|
for (var i = 0; i < event.target.files.length; i++) {
|
|
2068
2069
|
const file = event.target.files[i];
|
|
2069
2070
|
const fontBuffer = await readFontFile3(file);
|
|
2070
|
-
const font = await
|
|
2071
|
-
const fullName =
|
|
2072
|
-
const familyName =
|
|
2071
|
+
const font = await _chunkYMQEM4AOjs.parseFont.call(void 0, fontBuffer, file.name);
|
|
2072
|
+
const fullName = _chunkYMQEM4AOjs.getNameString.call(void 0, font, 4);
|
|
2073
|
+
const familyName = _chunkYMQEM4AOjs.getNameString.call(void 0, font, 1);
|
|
2073
2074
|
console.log("Reading font:", fullName, file.name);
|
|
2074
|
-
let weightName =
|
|
2075
|
+
let weightName = _chunkYMQEM4AOjs.getNameString.call(void 0, font, 17) || _chunkYMQEM4AOjs.getNameString.call(void 0, font, 2) || "";
|
|
2075
2076
|
weightName = weightName.replace("Italic", "").replace("It", "").trim();
|
|
2076
2077
|
if ((weightName == "" || weightName.toLowerCase() == "roman") && fullName) {
|
|
2077
2078
|
weightName = fullName.replace(title + " ", "").replace(title, "").trim();
|
|
2078
2079
|
weightName = weightName.replace("Italic", "").replace("It", "").trim();
|
|
2079
2080
|
}
|
|
2080
|
-
const axes =
|
|
2081
|
+
const axes = _chunkYMQEM4AOjs.getVariationAxes.call(void 0, font);
|
|
2081
2082
|
let variableFont = axes !== null;
|
|
2082
2083
|
let subfamilyName = familyName.toLowerCase().trim().replace(title.toLowerCase().trim(), "").trim();
|
|
2083
2084
|
let fontTitle = fullName;
|
|
2084
|
-
const italicAngle =
|
|
2085
|
+
const italicAngle = _chunkYMQEM4AOjs.getItalicAngle.call(void 0, font);
|
|
2085
2086
|
let style = italicAngle !== 0 || fullName.toLowerCase().includes("italic") ? "Italic" : "Regular";
|
|
2086
2087
|
if (fontTitle.toLowerCase().trim().includes(script)) {
|
|
2087
2088
|
fontTitle = fontTitle.toLowerCase().trim().replace(script, "").trim();
|
|
@@ -2117,7 +2118,7 @@ var UploadScriptsComponent = (props) => {
|
|
|
2117
2118
|
}
|
|
2118
2119
|
if (variableFont && !fontTitle.toLowerCase().trim().endsWith(" vf")) fontTitle = fontTitle + " VF";
|
|
2119
2120
|
if (italicKW.length > 0) {
|
|
2120
|
-
italicKW = italicKW.map((item) =>
|
|
2121
|
+
italicKW = italicKW.map((item) => _chunkYMQEM4AOjs.reverseSpellingLookup.call(void 0, item));
|
|
2121
2122
|
fontTitle = fontTitle + italicKW.join(" ");
|
|
2122
2123
|
style = "Italic";
|
|
2123
2124
|
}
|
|
@@ -2151,7 +2152,7 @@ var UploadScriptsComponent = (props) => {
|
|
|
2151
2152
|
variableFont,
|
|
2152
2153
|
weightName,
|
|
2153
2154
|
normalWeight: true,
|
|
2154
|
-
weight:
|
|
2155
|
+
weight: _chunkYMQEM4AOjs.getWeightClass.call(void 0, font) || (/hairline|extra thin|extrathin/.test(weightName == null ? void 0 : weightName.toLowerCase()) ? 100 : /thin|extra light|extralight/.test(weightName == null ? void 0 : weightName.toLowerCase()) ? 200 : /light|book/.test(weightName == null ? void 0 : weightName.toLowerCase()) ? 300 : /regular|normal/.test(weightName == null ? void 0 : weightName.toLowerCase()) ? 400 : /medium/.test(weightName == null ? void 0 : weightName.toLowerCase()) ? 500 : /semi bold|semibold/.test(weightName == null ? void 0 : weightName.toLowerCase()) ? 600 : /bold/.test(weightName == null ? void 0 : weightName.toLowerCase()) ? 700 : /extra bold|extrabold/.test(weightName == null ? void 0 : weightName.toLowerCase()) ? 800 : /black|ultra/.test(weightName == null ? void 0 : weightName.toLowerCase()) ? 900 : 400),
|
|
2155
2156
|
files: [file],
|
|
2156
2157
|
fontKit: font,
|
|
2157
2158
|
scriptFileInput: { [script]: {} }
|
|
@@ -2200,7 +2201,7 @@ var UploadScriptsComponent = (props) => {
|
|
|
2200
2201
|
if (file.name.endsWith(".woff2")) {
|
|
2201
2202
|
console.log("generating css file for: ", fontObject.title);
|
|
2202
2203
|
setStatus("generating css file for: " + fontObject.title);
|
|
2203
|
-
newFileInput = await
|
|
2204
|
+
newFileInput = await _chunkYMQEM4AOjs.generateCssFile.call(void 0, {
|
|
2204
2205
|
woff2File: file,
|
|
2205
2206
|
fileInput: newFileInput,
|
|
2206
2207
|
// script: script,
|
|
@@ -2452,7 +2453,7 @@ var FontScriptUploaderComponent = (props) => {
|
|
|
2452
2453
|
);
|
|
2453
2454
|
let blob = await fetch(woff2Buffer.url);
|
|
2454
2455
|
blob = await blob.blob();
|
|
2455
|
-
let newFileInput = await
|
|
2456
|
+
let newFileInput = await _chunkYMQEM4AOjs.generateCssFile.call(void 0, {
|
|
2456
2457
|
woff2File: blob,
|
|
2457
2458
|
fileInput: scriptFileInput,
|
|
2458
2459
|
language,
|
|
@@ -2537,7 +2538,7 @@ var FontScriptUploaderComponent = (props) => {
|
|
|
2537
2538
|
if (code === "woff2") {
|
|
2538
2539
|
console.log("woff2");
|
|
2539
2540
|
setMessage({ ...message, [language]: "Generating Css: " + doc_title + ".css" });
|
|
2540
|
-
newFileInput = await
|
|
2541
|
+
newFileInput = await _chunkYMQEM4AOjs.generateCssFile.call(void 0, {
|
|
2541
2542
|
woff2File: file,
|
|
2542
2543
|
fileInput: newFileInput,
|
|
2543
2544
|
language,
|
|
@@ -2810,21 +2811,36 @@ function KeyValueReferenceInput(props) {
|
|
|
2810
2811
|
const pickerLabel = referenceType || valueTitle.toLowerCase();
|
|
2811
2812
|
return /* @__PURE__ */ _react2.default.createElement(_ui.Stack, { space: 3 }, topActions && /* @__PURE__ */ _react2.default.createElement(_ui.Box, { paddingBottom: 2 }, topActions), /* @__PURE__ */ _react2.default.createElement(_ui.Box, null, /* @__PURE__ */ _react2.default.createElement(_ui.Stack, { space: 2 }, pairs.map((pair, index) => {
|
|
2812
2813
|
var _a2;
|
|
2813
|
-
return /* @__PURE__ */ _react2.default.createElement(_ui.
|
|
2814
|
+
return /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { key: index, gap: 1, align: "center" }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { direction: "column", style: { flexShrink: 0 } }, /* @__PURE__ */ _react2.default.createElement(
|
|
2815
|
+
_ui.Button,
|
|
2816
|
+
{
|
|
2817
|
+
mode: "bleed",
|
|
2818
|
+
icon: _icons.ArrowUpIcon,
|
|
2819
|
+
padding: 1,
|
|
2820
|
+
fontSize: 0,
|
|
2821
|
+
onClick: () => handleMoveUp(index),
|
|
2822
|
+
disabled: index === 0,
|
|
2823
|
+
style: { cursor: index === 0 ? "default" : "pointer" }
|
|
2824
|
+
}
|
|
2825
|
+
), /* @__PURE__ */ _react2.default.createElement(
|
|
2826
|
+
_ui.Button,
|
|
2827
|
+
{
|
|
2828
|
+
mode: "bleed",
|
|
2829
|
+
icon: _icons.ArrowDownIcon,
|
|
2830
|
+
padding: 1,
|
|
2831
|
+
fontSize: 0,
|
|
2832
|
+
onClick: () => handleMoveDown(index),
|
|
2833
|
+
disabled: index === pairs.length - 1,
|
|
2834
|
+
style: { cursor: index === pairs.length - 1 ? "default" : "pointer" }
|
|
2835
|
+
}
|
|
2836
|
+
)), /* @__PURE__ */ _react2.default.createElement(_ui.Box, { flex: 1 }, /* @__PURE__ */ _react2.default.createElement(
|
|
2814
2837
|
_ui.TextInput,
|
|
2815
2838
|
{
|
|
2816
2839
|
value: pair.key,
|
|
2817
2840
|
onChange: (e) => handlePairChange(index, "key", e.target.value),
|
|
2818
2841
|
placeholder: keyPlaceholder
|
|
2819
2842
|
}
|
|
2820
|
-
)), /* @__PURE__ */ _react2.default.createElement(_ui.Box, { flex: 1
|
|
2821
|
-
_ui.Text,
|
|
2822
|
-
{
|
|
2823
|
-
size: 2,
|
|
2824
|
-
style: { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", maxWidth: "90%" }
|
|
2825
|
-
},
|
|
2826
|
-
referenceData[pair.value._ref] || "Loading..."
|
|
2827
|
-
), /* @__PURE__ */ _react2.default.createElement(
|
|
2843
|
+
)), /* @__PURE__ */ _react2.default.createElement(_ui.Box, { flex: 1 }, ((_a2 = pair.value) == null ? void 0 : _a2._ref) ? /* @__PURE__ */ _react2.default.createElement(_ui.Card, { radius: 2, tone: "primary", style: { paddingLeft: "0.75rem", height: "fit-content" } }, /* @__PURE__ */ _react2.default.createElement(_ui.Flex, { align: "center", justify: "space-between" }, /* @__PURE__ */ _react2.default.createElement(_ui.Text, { size: 2, style: { whiteSpace: "nowrap" } }, referenceData[pair.value._ref] || "Loading..."), /* @__PURE__ */ _react2.default.createElement(
|
|
2828
2844
|
_ui.MenuButton,
|
|
2829
2845
|
{
|
|
2830
2846
|
button: /* @__PURE__ */ _react2.default.createElement(_ui.Button, { icon: _icons.EllipsisHorizontalIcon, mode: "bleed", title: "Options" }),
|
|
@@ -2836,18 +2852,20 @@ function KeyValueReferenceInput(props) {
|
|
|
2836
2852
|
_ui.Box,
|
|
2837
2853
|
{
|
|
2838
2854
|
padding: 2,
|
|
2839
|
-
style: {
|
|
2855
|
+
style: { border: "1px dashed #ccc", borderRadius: "4px", display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer" },
|
|
2840
2856
|
onClick: () => openReferenceSelector(index)
|
|
2841
2857
|
},
|
|
2842
2858
|
/* @__PURE__ */ _react2.default.createElement(_ui.Text, { muted: true, size: 2 }, "Click to select a ", pickerLabel)
|
|
2843
|
-
))
|
|
2844
|
-
|
|
2859
|
+
)), /* @__PURE__ */ _react2.default.createElement(
|
|
2860
|
+
_ui.Button,
|
|
2845
2861
|
{
|
|
2846
|
-
|
|
2862
|
+
mode: "bleed",
|
|
2863
|
+
tone: "critical",
|
|
2864
|
+
icon: _icons.TrashIcon,
|
|
2865
|
+
padding: 2,
|
|
2847
2866
|
onClick: () => handleRemovePair(index),
|
|
2848
|
-
style: {
|
|
2849
|
-
}
|
|
2850
|
-
/* @__PURE__ */ _react2.default.createElement(_icons.TrashIcon, null)
|
|
2867
|
+
style: { flexShrink: 0, cursor: "pointer" }
|
|
2868
|
+
}
|
|
2851
2869
|
));
|
|
2852
2870
|
}))), /* @__PURE__ */ _react2.default.createElement(_ui.Button, { tone: "primary", mode: "ghost", onClick: handleAddPair, icon: _icons.AddIcon, text: `Add ${keyTitle}` }), isDialogOpen && /* @__PURE__ */ _react2.default.createElement(
|
|
2853
2871
|
_ui.Dialog,
|
|
@@ -2909,7 +2927,7 @@ function VariableInstanceReferencesInput(props) {
|
|
|
2909
2927
|
console.warn("Cannot autofill: no variableInstances data on this document");
|
|
2910
2928
|
return;
|
|
2911
2929
|
}
|
|
2912
|
-
const mappings = await
|
|
2930
|
+
const mappings = await _chunkYMQEM4AOjs.parseVariableFontInstances.call(void 0, formDocument, sanityClient);
|
|
2913
2931
|
if (mappings.length === 0) {
|
|
2914
2932
|
console.warn("No variable instances could be parsed from this font");
|
|
2915
2933
|
return;
|
|
@@ -3323,12 +3341,12 @@ async function getEmptyFontKit({ title, files, weightKeywordList, italicKeywordL
|
|
|
3323
3341
|
for (var i = 0; i < files.length; i++) {
|
|
3324
3342
|
const file = files[i];
|
|
3325
3343
|
const fontBuffer = await readFontFile2(file);
|
|
3326
|
-
const font = await
|
|
3327
|
-
let weightName =
|
|
3328
|
-
const axes =
|
|
3344
|
+
const font = await _chunkYMQEM4AOjs.parseFont.call(void 0, fontBuffer, file.name);
|
|
3345
|
+
let weightName = _chunkYMQEM4AOjs.getNameString.call(void 0, font, 17) || _chunkYMQEM4AOjs.getNameString.call(void 0, font, 2) || "";
|
|
3346
|
+
const axes = _chunkYMQEM4AOjs.getVariationAxes.call(void 0, font);
|
|
3329
3347
|
let variableFont = axes !== null;
|
|
3330
|
-
const familyName =
|
|
3331
|
-
const fullName =
|
|
3348
|
+
const familyName = _chunkYMQEM4AOjs.getNameString.call(void 0, font, 1);
|
|
3349
|
+
const fullName = _chunkYMQEM4AOjs.getNameString.call(void 0, font, 4);
|
|
3332
3350
|
let subfamilyName = familyName.toLowerCase().trim().replace(title.toLowerCase().trim(), "").trim();
|
|
3333
3351
|
let fontTitle = fullName.toLowerCase().trim();
|
|
3334
3352
|
weightKeywordList.forEach((keyword) => {
|
|
@@ -5907,7 +5925,9 @@ function createStylesField({
|
|
|
5907
5925
|
subfamilyPreferredStyle = false,
|
|
5908
5926
|
subfamilyFontFilter = false,
|
|
5909
5927
|
subfamilyPreview = false,
|
|
5910
|
-
pairs = true
|
|
5928
|
+
pairs = true,
|
|
5929
|
+
generateCollections = false,
|
|
5930
|
+
generateFullFamilyCollection = false
|
|
5911
5931
|
} = {}) {
|
|
5912
5932
|
const subfamilyFields = [
|
|
5913
5933
|
{
|
|
@@ -6051,6 +6071,28 @@ function createStylesField({
|
|
|
6051
6071
|
type: "array",
|
|
6052
6072
|
of: [subfamilyItem]
|
|
6053
6073
|
},
|
|
6074
|
+
...field(generateCollections, {
|
|
6075
|
+
title: "Generate Collections and Pairs",
|
|
6076
|
+
name: "generateCollections",
|
|
6077
|
+
type: "string",
|
|
6078
|
+
description: "Generate Collections and Pairs from the typeface's fonts.",
|
|
6079
|
+
components: { input: GenerateCollectionsPairsComponent },
|
|
6080
|
+
hidden: ({ parent }) => {
|
|
6081
|
+
var _a;
|
|
6082
|
+
return !((_a = parent == null ? void 0 : parent.fonts) == null ? void 0 : _a.length);
|
|
6083
|
+
}
|
|
6084
|
+
}),
|
|
6085
|
+
...field(generateFullFamilyCollection, {
|
|
6086
|
+
title: "Generate Full Family Collection",
|
|
6087
|
+
name: "generateCollectionGroup",
|
|
6088
|
+
type: "string",
|
|
6089
|
+
description: "Generate a Collection that includes all styles from this typeface.",
|
|
6090
|
+
components: { input: PrimaryCollectionGeneratorTypeface },
|
|
6091
|
+
hidden: ({ parent }) => {
|
|
6092
|
+
var _a;
|
|
6093
|
+
return !((_a = parent == null ? void 0 : parent.fonts) == null ? void 0 : _a.length);
|
|
6094
|
+
}
|
|
6095
|
+
}),
|
|
6054
6096
|
{
|
|
6055
6097
|
title: "Collections",
|
|
6056
6098
|
name: "collections",
|
|
@@ -6173,4 +6215,5 @@ function createStylesField({
|
|
|
6173
6215
|
|
|
6174
6216
|
|
|
6175
6217
|
|
|
6176
|
-
|
|
6218
|
+
|
|
6219
|
+
exports.BatchUploadFonts = BatchUploadFonts; exports.BulkActions = _chunkYMQEM4AOjs.BulkActions; exports.DISCOUNT_REQUIREMENT_TYPES = DISCOUNT_REQUIREMENT_TYPES; exports.DISCOUNT_REQUIREMENT_TYPES_OBJECT = DISCOUNT_REQUIREMENT_TYPES_OBJECT; exports.EXECUTION_STATUS = _chunkYMQEM4AOjs.EXECUTION_STATUS; exports.ExistingDocumentResolver = _chunkYMQEM4AOjs.ExistingDocumentResolver; exports.FONT_STATUS = _chunkYMQEM4AOjs.FONT_STATUS; exports.FontReviewCard = _chunkYMQEM4AOjs.FontReviewCard_default; exports.FontScriptUploaderComponent = FontScriptUploaderComponent; exports.GenerateCollectionsPairsComponent = GenerateCollectionsPairsComponent; exports.HtmlDescription = HtmlDescription; exports.KeyValueInput = KeyValueInput; exports.KeyValueReferenceInput = KeyValueReferenceInput; exports.NestedObjectArraySelector = NestedObjectArraySelector; exports.PLAN_PHASE = _chunkYMQEM4AOjs.PLAN_PHASE; exports.PLAN_VERSION = _chunkYMQEM4AOjs.PLAN_VERSION; exports.PriceInput = _chunkYMQEM4AOjs.PriceInput_default; exports.PrimaryCollectionGeneratorTypeface = PrimaryCollectionGeneratorTypeface; exports.RECOMMENDATION = _chunkYMQEM4AOjs.RECOMMENDATION; exports.RegenerateSubfamiliesComponent = RegenerateSubfamiliesComponent; exports.SCRIPTS = SCRIPTS; exports.SCRIPTS_OBJECT = SCRIPTS_OBJECT; exports.SetOTF = SetOTF; exports.SingleUploaderTool = SingleUploaderTool; exports.StatusDisplay = StatusDisplay_default; exports.StyleCountInput = StyleCountInput; exports.UpdateScriptsComponent = UpdateScriptsComponent; exports.UploadButton = UploadButton_default; exports.UploadModal = _chunkYMQEM4AOjs.UploadModal; exports.UploadScriptsComponent = UploadScriptsComponent; exports.UploadStep1Settings = _chunkYMQEM4AOjs.UploadStep1Settings; exports.UploadStep2Review = _chunkYMQEM4AOjs.UploadStep2Review; exports.UploadStep3Execute = _chunkYMQEM4AOjs.UploadStep3Execute; exports.UploadStep3bInstances = _chunkYMQEM4AOjs.UploadStep3bInstances; exports.UploadSummary = _chunkYMQEM4AOjs.UploadSummary; exports.VariableInstanceReferencesInput = VariableInstanceReferencesInput; exports.addItalicToFontTitle = _chunkYMQEM4AOjs.addItalicToFontTitle; exports.buildUploadPlan = _chunkYMQEM4AOjs.buildUploadPlan; exports.createEmptyPlan = _chunkYMQEM4AOjs.createEmptyPlan; exports.createFontDecisions = _chunkYMQEM4AOjs.createFontDecisions; exports.createFontObject = _chunkYMQEM4AOjs.createFontObject; exports.createInitialExecutionState = _chunkYMQEM4AOjs.createInitialExecutionState; exports.createStylesField = createStylesField; exports.determineWeight = _chunkYMQEM4AOjs.determineWeight; exports.escapeCssFontName = _chunkYMQEM4AOjs.escapeCssFontName; exports.executeUploadPlan = _chunkYMQEM4AOjs.executeUploadPlan; exports.executionReducer = _chunkYMQEM4AOjs.executionReducer; exports.expandAbbreviations = _chunkYMQEM4AOjs.expandAbbreviations; exports.extractFontMetadata = _chunkYMQEM4AOjs.extractFontMetadata; exports.extractWeightFromFullName = _chunkYMQEM4AOjs.extractWeightFromFullName; exports.extractWeightName = _chunkYMQEM4AOjs.extractWeightName; exports.formatFontTitle = _chunkYMQEM4AOjs.formatFontTitle; exports.generateCssFile = _chunkYMQEM4AOjs.generateCssFile; exports.generateFontData = _chunkYMQEM4AOjs.generateFontData; exports.generateFontFile = generateFontFile; exports.generateStyleKeywords = _chunkYMQEM4AOjs.generateStyleKeywords; exports.generateSubset = generateSubset; exports.getAllFeatureTags = _chunkYMQEM4AOjs.getAllFeatureTags; exports.getCharacterSet = _chunkYMQEM4AOjs.getCharacterSet; exports.getEmptyFontKit = getEmptyFontKit; exports.getFamilyClass = _chunkYMQEM4AOjs.getFamilyClass; exports.getFontMetadata = _chunkYMQEM4AOjs.getFontMetadata; exports.getFontMetrics = _chunkYMQEM4AOjs.getFontMetrics; exports.getFsSelection = _chunkYMQEM4AOjs.getFsSelection; exports.getGlyphCount = _chunkYMQEM4AOjs.getGlyphCount; exports.getItalicAngle = _chunkYMQEM4AOjs.getItalicAngle; exports.getMacStyle = _chunkYMQEM4AOjs.getMacStyle; exports.getNameString = _chunkYMQEM4AOjs.getNameString; exports.getNamedInstances = _chunkYMQEM4AOjs.getNamedInstances; exports.getVariationAxes = _chunkYMQEM4AOjs.getVariationAxes; exports.getWeightClass = _chunkYMQEM4AOjs.getWeightClass; exports.logFontInfo = _chunkYMQEM4AOjs.logFontInfo; exports.openTypeField = openTypeField; exports.parseFont = _chunkYMQEM4AOjs.parseFont; exports.parseVariableFontInstances = _chunkYMQEM4AOjs.parseVariableFontInstances_default; exports.planReducer = _chunkYMQEM4AOjs.planReducer; exports.processFontFiles = _chunkYMQEM4AOjs.processFontFiles; exports.processItalicKeywords = _chunkYMQEM4AOjs.processItalicKeywords; exports.processSubfamilyName = _chunkYMQEM4AOjs.processSubfamilyName; exports.readFontFile = _chunkYMQEM4AOjs.readFontFile; exports.removeWeightNames = _chunkYMQEM4AOjs.removeWeightNames; exports.renameFontDocuments = renameFontDocuments; exports.resolveExistingFont = _chunkYMQEM4AOjs.resolveExistingFont; exports.reverseSpellingLookup = _chunkYMQEM4AOjs.reverseSpellingLookup; exports.sanitizeForSanityId = _chunkYMQEM4AOjs.sanitizeForSanityId; exports.sortFontObjects = _chunkYMQEM4AOjs.sortFontObjects; exports.styleCountField = styleCountField; exports.stylisticSetField = stylisticSetField; exports.updateFontPrices = updateFontPrices; exports.updateTypefaceDocument = _chunkYMQEM4AOjs.updateTypefaceDocument; exports.uploadFontFiles = uploadFontFiles; exports.useNestedObjects = useNestedObjects; exports.useSanityClient = useSanityClient;
|