@liiift-studio/sanity-font-manager 2.3.6 → 2.3.7
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.js +26 -26
- package/dist/index.mjs +26 -26
- package/package.json +1 -1
- package/src/schema/stylesField.js +39 -39
package/dist/index.js
CHANGED
|
@@ -6677,19 +6677,19 @@ var variableFontsFilter = async ({ getClient, document, parent }) => {
|
|
|
6677
6677
|
};
|
|
6678
6678
|
};
|
|
6679
6679
|
function createStylesField({
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6680
|
+
free = false,
|
|
6681
|
+
displayStyles = true,
|
|
6682
|
+
sortHeaviestFirst = false,
|
|
6683
|
+
buySectionColumns = false,
|
|
6684
|
+
fontSizeMultiplier = false,
|
|
6685
|
+
serif = false,
|
|
6686
|
+
regenerateSubfamilies: regenerateSubfamilies2 = false,
|
|
6687
|
+
subfamilyFontSizeMultiplier = false,
|
|
6688
|
+
subfamilyListOrder = false,
|
|
6689
|
+
subfamilyPreferredStyle = false,
|
|
6690
|
+
subfamilyFontFilter = false,
|
|
6691
|
+
subfamilyPreview = false,
|
|
6692
|
+
pairs = true
|
|
6693
6693
|
} = {}) {
|
|
6694
6694
|
const subfamilyFields = [
|
|
6695
6695
|
{
|
|
@@ -6697,7 +6697,7 @@ function createStylesField({
|
|
|
6697
6697
|
name: "title",
|
|
6698
6698
|
type: "string"
|
|
6699
6699
|
},
|
|
6700
|
-
...
|
|
6700
|
+
...subfamilyFontSizeMultiplier ? [{
|
|
6701
6701
|
title: "Subfamily Font Size Multiplier",
|
|
6702
6702
|
name: "fontSizeMultiplier",
|
|
6703
6703
|
type: "number",
|
|
@@ -6705,7 +6705,7 @@ function createStylesField({
|
|
|
6705
6705
|
description: "Adjust font size for this subfamily in the Family Overview (Design Space). Default is 1.0 (100%). Range: 0.5 to 2.0",
|
|
6706
6706
|
validation: (Rule) => Rule.min(0.5).max(2).precision(2)
|
|
6707
6707
|
}] : [],
|
|
6708
|
-
...
|
|
6708
|
+
...subfamilyListOrder ? [{
|
|
6709
6709
|
title: "Use List Order",
|
|
6710
6710
|
name: "useListOrder",
|
|
6711
6711
|
type: "boolean",
|
|
@@ -6720,10 +6720,10 @@ function createStylesField({
|
|
|
6720
6720
|
of: [{ type: "reference", weak: true, to: [{ type: "font" }] }],
|
|
6721
6721
|
options: {
|
|
6722
6722
|
sortable: true,
|
|
6723
|
-
...
|
|
6723
|
+
...subfamilyFontFilter ? { filter: fontsFilter } : {}
|
|
6724
6724
|
}
|
|
6725
6725
|
},
|
|
6726
|
-
...
|
|
6726
|
+
...subfamilyPreferredStyle ? [{
|
|
6727
6727
|
title: "SubFamily Preferred Style",
|
|
6728
6728
|
name: "preferredStyle",
|
|
6729
6729
|
type: "reference",
|
|
@@ -6747,7 +6747,7 @@ function createStylesField({
|
|
|
6747
6747
|
const subfamilyItem = {
|
|
6748
6748
|
type: "object",
|
|
6749
6749
|
fields: subfamilyFields,
|
|
6750
|
-
...
|
|
6750
|
+
...subfamilyPreview ? {
|
|
6751
6751
|
preview: {
|
|
6752
6752
|
select: { title: "title", fonts: "fonts" },
|
|
6753
6753
|
prepare(props) {
|
|
@@ -6758,7 +6758,7 @@ function createStylesField({
|
|
|
6758
6758
|
} : {}
|
|
6759
6759
|
};
|
|
6760
6760
|
const fields = [
|
|
6761
|
-
...
|
|
6761
|
+
...free ? [{
|
|
6762
6762
|
title: "Free Typeface",
|
|
6763
6763
|
name: "free",
|
|
6764
6764
|
type: "boolean",
|
|
@@ -6770,24 +6770,24 @@ function createStylesField({
|
|
|
6770
6770
|
name: "displayStyles",
|
|
6771
6771
|
type: "boolean",
|
|
6772
6772
|
initialValue: true,
|
|
6773
|
-
hidden:
|
|
6773
|
+
hidden: !displayStyles,
|
|
6774
6774
|
description: "Show all Font Styles below collections in Buy Section"
|
|
6775
6775
|
},
|
|
6776
|
-
...
|
|
6776
|
+
...sortHeaviestFirst ? [{
|
|
6777
6777
|
title: "Sort Fonts Heaviest to Lightest",
|
|
6778
6778
|
name: "sortHeaviestFirst",
|
|
6779
6779
|
type: "boolean",
|
|
6780
6780
|
initialValue: false,
|
|
6781
6781
|
description: "Sort fonts by weight from heaviest (900) to lightest (100). Default is lightest to heaviest (industry standard)."
|
|
6782
6782
|
}] : [],
|
|
6783
|
-
...
|
|
6783
|
+
...buySectionColumns ? [{
|
|
6784
6784
|
title: "Multi Column Buy Section",
|
|
6785
6785
|
name: "buySectionColumns",
|
|
6786
6786
|
type: "boolean",
|
|
6787
6787
|
initialValue: true,
|
|
6788
6788
|
description: "Choose Single Column or Multi Column for the Buy Section, Default is Multi Column"
|
|
6789
6789
|
}] : [],
|
|
6790
|
-
...
|
|
6790
|
+
...fontSizeMultiplier ? [{
|
|
6791
6791
|
title: "Style Grid Font Size Multiplier",
|
|
6792
6792
|
name: "fontSizeMultiplier",
|
|
6793
6793
|
type: "number",
|
|
@@ -6795,7 +6795,7 @@ function createStylesField({
|
|
|
6795
6795
|
description: "Adjust font size in the buy section style grid. Default is 1.0 (100%). Range: 0.5 to 2.0",
|
|
6796
6796
|
validation: (Rule) => Rule.min(0.5).max(2).precision(2)
|
|
6797
6797
|
}] : [],
|
|
6798
|
-
...
|
|
6798
|
+
...serif ? [{
|
|
6799
6799
|
title: "Includes Serifs",
|
|
6800
6800
|
name: "serif",
|
|
6801
6801
|
type: "boolean",
|
|
@@ -6829,7 +6829,7 @@ function createStylesField({
|
|
|
6829
6829
|
description: "Variable fonts are automatically included as a bonus when customers purchase all non-variable styles of this typeface.",
|
|
6830
6830
|
options: { sortable: true }
|
|
6831
6831
|
},
|
|
6832
|
-
...
|
|
6832
|
+
...regenerateSubfamilies2 ? [{
|
|
6833
6833
|
title: "Regenerate Subfamilies",
|
|
6834
6834
|
name: "regenerateSubfamilies",
|
|
6835
6835
|
type: "string",
|
|
@@ -6863,7 +6863,7 @@ function createStylesField({
|
|
|
6863
6863
|
of: [{ type: "reference", weak: true, to: [{ type: "pair" }] }],
|
|
6864
6864
|
options: { sortable: true },
|
|
6865
6865
|
validation: (Rule) => Rule.unique(),
|
|
6866
|
-
hidden:
|
|
6866
|
+
hidden: !pairs
|
|
6867
6867
|
}
|
|
6868
6868
|
];
|
|
6869
6869
|
return {
|
package/dist/index.mjs
CHANGED
|
@@ -6591,19 +6591,19 @@ var variableFontsFilter = async ({ getClient, document, parent }) => {
|
|
|
6591
6591
|
};
|
|
6592
6592
|
};
|
|
6593
6593
|
function createStylesField({
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6594
|
+
free = false,
|
|
6595
|
+
displayStyles = true,
|
|
6596
|
+
sortHeaviestFirst = false,
|
|
6597
|
+
buySectionColumns = false,
|
|
6598
|
+
fontSizeMultiplier = false,
|
|
6599
|
+
serif = false,
|
|
6600
|
+
regenerateSubfamilies: regenerateSubfamilies2 = false,
|
|
6601
|
+
subfamilyFontSizeMultiplier = false,
|
|
6602
|
+
subfamilyListOrder = false,
|
|
6603
|
+
subfamilyPreferredStyle = false,
|
|
6604
|
+
subfamilyFontFilter = false,
|
|
6605
|
+
subfamilyPreview = false,
|
|
6606
|
+
pairs = true
|
|
6607
6607
|
} = {}) {
|
|
6608
6608
|
const subfamilyFields = [
|
|
6609
6609
|
{
|
|
@@ -6611,7 +6611,7 @@ function createStylesField({
|
|
|
6611
6611
|
name: "title",
|
|
6612
6612
|
type: "string"
|
|
6613
6613
|
},
|
|
6614
|
-
...
|
|
6614
|
+
...subfamilyFontSizeMultiplier ? [{
|
|
6615
6615
|
title: "Subfamily Font Size Multiplier",
|
|
6616
6616
|
name: "fontSizeMultiplier",
|
|
6617
6617
|
type: "number",
|
|
@@ -6619,7 +6619,7 @@ function createStylesField({
|
|
|
6619
6619
|
description: "Adjust font size for this subfamily in the Family Overview (Design Space). Default is 1.0 (100%). Range: 0.5 to 2.0",
|
|
6620
6620
|
validation: (Rule) => Rule.min(0.5).max(2).precision(2)
|
|
6621
6621
|
}] : [],
|
|
6622
|
-
...
|
|
6622
|
+
...subfamilyListOrder ? [{
|
|
6623
6623
|
title: "Use List Order",
|
|
6624
6624
|
name: "useListOrder",
|
|
6625
6625
|
type: "boolean",
|
|
@@ -6634,10 +6634,10 @@ function createStylesField({
|
|
|
6634
6634
|
of: [{ type: "reference", weak: true, to: [{ type: "font" }] }],
|
|
6635
6635
|
options: {
|
|
6636
6636
|
sortable: true,
|
|
6637
|
-
...
|
|
6637
|
+
...subfamilyFontFilter ? { filter: fontsFilter } : {}
|
|
6638
6638
|
}
|
|
6639
6639
|
},
|
|
6640
|
-
...
|
|
6640
|
+
...subfamilyPreferredStyle ? [{
|
|
6641
6641
|
title: "SubFamily Preferred Style",
|
|
6642
6642
|
name: "preferredStyle",
|
|
6643
6643
|
type: "reference",
|
|
@@ -6661,7 +6661,7 @@ function createStylesField({
|
|
|
6661
6661
|
const subfamilyItem = {
|
|
6662
6662
|
type: "object",
|
|
6663
6663
|
fields: subfamilyFields,
|
|
6664
|
-
...
|
|
6664
|
+
...subfamilyPreview ? {
|
|
6665
6665
|
preview: {
|
|
6666
6666
|
select: { title: "title", fonts: "fonts" },
|
|
6667
6667
|
prepare(props) {
|
|
@@ -6672,7 +6672,7 @@ function createStylesField({
|
|
|
6672
6672
|
} : {}
|
|
6673
6673
|
};
|
|
6674
6674
|
const fields = [
|
|
6675
|
-
...
|
|
6675
|
+
...free ? [{
|
|
6676
6676
|
title: "Free Typeface",
|
|
6677
6677
|
name: "free",
|
|
6678
6678
|
type: "boolean",
|
|
@@ -6684,24 +6684,24 @@ function createStylesField({
|
|
|
6684
6684
|
name: "displayStyles",
|
|
6685
6685
|
type: "boolean",
|
|
6686
6686
|
initialValue: true,
|
|
6687
|
-
hidden:
|
|
6687
|
+
hidden: !displayStyles,
|
|
6688
6688
|
description: "Show all Font Styles below collections in Buy Section"
|
|
6689
6689
|
},
|
|
6690
|
-
...
|
|
6690
|
+
...sortHeaviestFirst ? [{
|
|
6691
6691
|
title: "Sort Fonts Heaviest to Lightest",
|
|
6692
6692
|
name: "sortHeaviestFirst",
|
|
6693
6693
|
type: "boolean",
|
|
6694
6694
|
initialValue: false,
|
|
6695
6695
|
description: "Sort fonts by weight from heaviest (900) to lightest (100). Default is lightest to heaviest (industry standard)."
|
|
6696
6696
|
}] : [],
|
|
6697
|
-
...
|
|
6697
|
+
...buySectionColumns ? [{
|
|
6698
6698
|
title: "Multi Column Buy Section",
|
|
6699
6699
|
name: "buySectionColumns",
|
|
6700
6700
|
type: "boolean",
|
|
6701
6701
|
initialValue: true,
|
|
6702
6702
|
description: "Choose Single Column or Multi Column for the Buy Section, Default is Multi Column"
|
|
6703
6703
|
}] : [],
|
|
6704
|
-
...
|
|
6704
|
+
...fontSizeMultiplier ? [{
|
|
6705
6705
|
title: "Style Grid Font Size Multiplier",
|
|
6706
6706
|
name: "fontSizeMultiplier",
|
|
6707
6707
|
type: "number",
|
|
@@ -6709,7 +6709,7 @@ function createStylesField({
|
|
|
6709
6709
|
description: "Adjust font size in the buy section style grid. Default is 1.0 (100%). Range: 0.5 to 2.0",
|
|
6710
6710
|
validation: (Rule) => Rule.min(0.5).max(2).precision(2)
|
|
6711
6711
|
}] : [],
|
|
6712
|
-
...
|
|
6712
|
+
...serif ? [{
|
|
6713
6713
|
title: "Includes Serifs",
|
|
6714
6714
|
name: "serif",
|
|
6715
6715
|
type: "boolean",
|
|
@@ -6743,7 +6743,7 @@ function createStylesField({
|
|
|
6743
6743
|
description: "Variable fonts are automatically included as a bonus when customers purchase all non-variable styles of this typeface.",
|
|
6744
6744
|
options: { sortable: true }
|
|
6745
6745
|
},
|
|
6746
|
-
...
|
|
6746
|
+
...regenerateSubfamilies2 ? [{
|
|
6747
6747
|
title: "Regenerate Subfamilies",
|
|
6748
6748
|
name: "regenerateSubfamilies",
|
|
6749
6749
|
type: "string",
|
|
@@ -6777,7 +6777,7 @@ function createStylesField({
|
|
|
6777
6777
|
of: [{ type: "reference", weak: true, to: [{ type: "pair" }] }],
|
|
6778
6778
|
options: { sortable: true },
|
|
6779
6779
|
validation: (Rule) => Rule.unique(),
|
|
6780
|
-
hidden:
|
|
6780
|
+
hidden: !pairs
|
|
6781
6781
|
}
|
|
6782
6782
|
];
|
|
6783
6783
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liiift-studio/sanity-font-manager",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.7",
|
|
4
4
|
"description": "Sanity Studio plugin — full font management suite with batch upload, format conversion, metadata extraction, CSS generation, collection/pair generation, and script variant support. Supports Sanity v3, v4, and v5.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Liiift Studio",
|
|
@@ -31,34 +31,34 @@ const variableFontsFilter = async ({ getClient, document, parent }) => {
|
|
|
31
31
|
/**
|
|
32
32
|
* Generates the Styles object field for a typeface document with configurable per-site options.
|
|
33
33
|
* @param {Object} options
|
|
34
|
-
* @param {boolean} [options.
|
|
35
|
-
* @param {boolean} [options.
|
|
36
|
-
* @param {boolean} [options.
|
|
37
|
-
* @param {boolean} [options.
|
|
38
|
-
* @param {boolean} [options.
|
|
39
|
-
* @param {boolean} [options.
|
|
40
|
-
* @param {boolean} [options.
|
|
41
|
-
* @param {boolean} [options.
|
|
42
|
-
* @param {boolean} [options.
|
|
43
|
-
* @param {boolean} [options.
|
|
44
|
-
* @param {boolean} [options.
|
|
45
|
-
* @param {boolean} [options.
|
|
46
|
-
* @param {boolean} [options.
|
|
34
|
+
* @param {boolean} [options.free=false] - Add a "Free Typeface" boolean field
|
|
35
|
+
* @param {boolean} [options.displayStyles=true] - Show the "Display All Styles" toggle to editors (false = hidden)
|
|
36
|
+
* @param {boolean} [options.sortHeaviestFirst=false] - Add sort order toggle (heaviest to lightest)
|
|
37
|
+
* @param {boolean} [options.buySectionColumns=false] - Add multi-column buy section toggle
|
|
38
|
+
* @param {boolean} [options.fontSizeMultiplier=false] - Add style grid font size multiplier
|
|
39
|
+
* @param {boolean} [options.serif=false] - Add serif/sans classification flag
|
|
40
|
+
* @param {boolean} [options.regenerateSubfamilies=false] - Add the RegenerateSubfamilies action field
|
|
41
|
+
* @param {boolean} [options.subfamilyFontSizeMultiplier=false] - Add per-subfamily font size multiplier
|
|
42
|
+
* @param {boolean} [options.subfamilyListOrder=false] - Add per-subfamily manual order toggle
|
|
43
|
+
* @param {boolean} [options.subfamilyPreferredStyle=false] - Add per-subfamily preferred style reference
|
|
44
|
+
* @param {boolean} [options.subfamilyFontFilter=false] - Filter subfamily font picker to typeface fonts only
|
|
45
|
+
* @param {boolean} [options.subfamilyPreview=false] - Add preview to subfamily array items showing font count
|
|
46
|
+
* @param {boolean} [options.pairs=true] - Show the pairs array to editors (false = hidden)
|
|
47
47
|
*/
|
|
48
48
|
export function createStylesField({
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
free = false,
|
|
50
|
+
displayStyles = true,
|
|
51
|
+
sortHeaviestFirst = false,
|
|
52
|
+
buySectionColumns = false,
|
|
53
|
+
fontSizeMultiplier = false,
|
|
54
|
+
serif = false,
|
|
55
|
+
regenerateSubfamilies = false,
|
|
56
|
+
subfamilyFontSizeMultiplier = false,
|
|
57
|
+
subfamilyListOrder = false,
|
|
58
|
+
subfamilyPreferredStyle = false,
|
|
59
|
+
subfamilyFontFilter = false,
|
|
60
|
+
subfamilyPreview = false,
|
|
61
|
+
pairs = true,
|
|
62
62
|
} = {}) {
|
|
63
63
|
|
|
64
64
|
// Build the subfamily object item fields conditionally
|
|
@@ -68,7 +68,7 @@ export function createStylesField({
|
|
|
68
68
|
name: 'title',
|
|
69
69
|
type: 'string',
|
|
70
70
|
},
|
|
71
|
-
...(
|
|
71
|
+
...(subfamilyFontSizeMultiplier ? [{
|
|
72
72
|
title: 'Subfamily Font Size Multiplier',
|
|
73
73
|
name: 'fontSizeMultiplier',
|
|
74
74
|
type: 'number',
|
|
@@ -76,7 +76,7 @@ export function createStylesField({
|
|
|
76
76
|
description: 'Adjust font size for this subfamily in the Family Overview (Design Space). Default is 1.0 (100%). Range: 0.5 to 2.0',
|
|
77
77
|
validation: Rule => Rule.min(0.5).max(2.0).precision(2),
|
|
78
78
|
}] : []),
|
|
79
|
-
...(
|
|
79
|
+
...(subfamilyListOrder ? [{
|
|
80
80
|
title: 'Use List Order',
|
|
81
81
|
name: 'useListOrder',
|
|
82
82
|
type: 'boolean',
|
|
@@ -91,10 +91,10 @@ export function createStylesField({
|
|
|
91
91
|
of: [{ type: 'reference', weak: true, to: [{ type: 'font' }] }],
|
|
92
92
|
options: {
|
|
93
93
|
sortable: true,
|
|
94
|
-
...(
|
|
94
|
+
...(subfamilyFontFilter ? { filter: fontsFilter } : {}),
|
|
95
95
|
},
|
|
96
96
|
},
|
|
97
|
-
...(
|
|
97
|
+
...(subfamilyPreferredStyle ? [{
|
|
98
98
|
title: 'SubFamily Preferred Style',
|
|
99
99
|
name: 'preferredStyle',
|
|
100
100
|
type: 'reference',
|
|
@@ -119,7 +119,7 @@ export function createStylesField({
|
|
|
119
119
|
const subfamilyItem = {
|
|
120
120
|
type: 'object',
|
|
121
121
|
fields: subfamilyFields,
|
|
122
|
-
...(
|
|
122
|
+
...(subfamilyPreview ? {
|
|
123
123
|
preview: {
|
|
124
124
|
select: { title: 'title', fonts: 'fonts' },
|
|
125
125
|
prepare(props) {
|
|
@@ -131,7 +131,7 @@ export function createStylesField({
|
|
|
131
131
|
};
|
|
132
132
|
|
|
133
133
|
const fields = [
|
|
134
|
-
...(
|
|
134
|
+
...(free ? [{
|
|
135
135
|
title: 'Free Typeface',
|
|
136
136
|
name: 'free',
|
|
137
137
|
type: 'boolean',
|
|
@@ -143,24 +143,24 @@ export function createStylesField({
|
|
|
143
143
|
name: 'displayStyles',
|
|
144
144
|
type: 'boolean',
|
|
145
145
|
initialValue: true,
|
|
146
|
-
hidden:
|
|
146
|
+
hidden: !displayStyles,
|
|
147
147
|
description: 'Show all Font Styles below collections in Buy Section',
|
|
148
148
|
},
|
|
149
|
-
...(
|
|
149
|
+
...(sortHeaviestFirst ? [{
|
|
150
150
|
title: 'Sort Fonts Heaviest to Lightest',
|
|
151
151
|
name: 'sortHeaviestFirst',
|
|
152
152
|
type: 'boolean',
|
|
153
153
|
initialValue: false,
|
|
154
154
|
description: 'Sort fonts by weight from heaviest (900) to lightest (100). Default is lightest to heaviest (industry standard).',
|
|
155
155
|
}] : []),
|
|
156
|
-
...(
|
|
156
|
+
...(buySectionColumns ? [{
|
|
157
157
|
title: 'Multi Column Buy Section',
|
|
158
158
|
name: 'buySectionColumns',
|
|
159
159
|
type: 'boolean',
|
|
160
160
|
initialValue: true,
|
|
161
161
|
description: 'Choose Single Column or Multi Column for the Buy Section, Default is Multi Column',
|
|
162
162
|
}] : []),
|
|
163
|
-
...(
|
|
163
|
+
...(fontSizeMultiplier ? [{
|
|
164
164
|
title: 'Style Grid Font Size Multiplier',
|
|
165
165
|
name: 'fontSizeMultiplier',
|
|
166
166
|
type: 'number',
|
|
@@ -168,7 +168,7 @@ export function createStylesField({
|
|
|
168
168
|
description: 'Adjust font size in the buy section style grid. Default is 1.0 (100%). Range: 0.5 to 2.0',
|
|
169
169
|
validation: Rule => Rule.min(0.5).max(2.0).precision(2),
|
|
170
170
|
}] : []),
|
|
171
|
-
...(
|
|
171
|
+
...(serif ? [{
|
|
172
172
|
title: 'Includes Serifs',
|
|
173
173
|
name: 'serif',
|
|
174
174
|
type: 'boolean',
|
|
@@ -202,7 +202,7 @@ export function createStylesField({
|
|
|
202
202
|
description: 'Variable fonts are automatically included as a bonus when customers purchase all non-variable styles of this typeface.',
|
|
203
203
|
options: { sortable: true },
|
|
204
204
|
},
|
|
205
|
-
...(
|
|
205
|
+
...(regenerateSubfamilies ? [{
|
|
206
206
|
title: 'Regenerate Subfamilies',
|
|
207
207
|
name: 'regenerateSubfamilies',
|
|
208
208
|
type: 'string',
|
|
@@ -235,7 +235,7 @@ export function createStylesField({
|
|
|
235
235
|
of: [{ type: 'reference', weak: true, to: [{ type: 'pair' }] }],
|
|
236
236
|
options: { sortable: true },
|
|
237
237
|
validation: Rule => Rule.unique(),
|
|
238
|
-
hidden:
|
|
238
|
+
hidden: !pairs,
|
|
239
239
|
},
|
|
240
240
|
];
|
|
241
241
|
|