@liiift-studio/sanity-font-manager 2.3.4 → 2.3.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.
@@ -0,0 +1,250 @@
1
+ // Sanity schema factory function for the Styles object field — call createStylesField(options) to generate the field definition for a typeface document
2
+ import { AdvancedRefArray } from 'sanity-advanced-reference-array';
3
+ import { RegenerateSubfamiliesComponent } from '../components/RegenerateSubfamiliesComponent.jsx';
4
+
5
+ // Shared GROQ filter — returns fonts from the same typeface, excluding items already in the array
6
+ const fontsFilter = async ({ getClient, document, parent }) => {
7
+ const client = getClient({ apiVersion: '2022-11-09' });
8
+ const typefaceName = document.title;
9
+ const fonts = await client.fetch('*[_type == "font" && lower(typefaceName) == lower($typefaceName)]', { typefaceName });
10
+ const relatedItemsFiltered = fonts.map(f => f._id).filter(Boolean);
11
+ const existingItems = parent.map(f => f._ref).filter(Boolean);
12
+ return {
13
+ filter: '!(_id in $existingItems) && (_id in $relatedItemsFiltered)',
14
+ params: { existingItems, relatedItemsFiltered },
15
+ };
16
+ };
17
+
18
+ // Shared GROQ filter — returns variable fonts from the same typeface, excluding items already in the array
19
+ const variableFontsFilter = async ({ getClient, document, parent }) => {
20
+ const client = getClient({ apiVersion: '2022-11-09' });
21
+ const typefaceName = document.title;
22
+ const existingItems = parent.map(f => f._ref).filter(Boolean);
23
+ const fonts = await client.fetch('*[_type == "font" && typefaceName == $typefaceName && variableFont == true]', { typefaceName });
24
+ const relatedItemsFiltered = fonts.map(f => f._id).filter(Boolean);
25
+ return {
26
+ filter: '!(_id in $existingItems) && (_id in $relatedItemsFiltered)',
27
+ params: { existingItems, relatedItemsFiltered },
28
+ };
29
+ };
30
+
31
+ /**
32
+ * Generates the Styles object field for a typeface document with configurable per-site options.
33
+ * @param {Object} options
34
+ * @param {boolean} [options.hasFreeFlag=false] - Add a "Free Typeface" boolean field (MCKL)
35
+ * @param {boolean} [options.displayStylesHidden=false] - Hide the displayStyles boolean from editors (Darden, MCKL)
36
+ * @param {boolean} [options.hasSortHeaviestFirst=false] - Add sort order toggle (TDF)
37
+ * @param {boolean} [options.hasBuySectionColumns=false] - Add multi-column buy section toggle (TDF)
38
+ * @param {boolean} [options.hasFontSizeMultiplier=false] - Add style grid font size multiplier (TDF)
39
+ * @param {boolean} [options.hasSerifFlag=false] - Add serif/sans classification flag (TDF)
40
+ * @param {boolean} [options.hasRegenerateSubfamilies=false] - Add the RegenerateSubfamilies action field (TDF, MCKL)
41
+ * @param {boolean} [options.hasSubfamilyFontSizeMultiplier=false] - Add per-subfamily font size multiplier (TDF)
42
+ * @param {boolean} [options.hasSubfamilyUseListOrder=false] - Add per-subfamily manual order toggle (TDF)
43
+ * @param {boolean} [options.hasSubfamilyPreferredStyle=false] - Add per-subfamily preferred style reference (TDF)
44
+ * @param {boolean} [options.hasSubfamilyFontFilter=false] - Filter subfamily font picker to typeface fonts only (TDF)
45
+ * @param {boolean} [options.hasSubfamilyPreview=false] - Add preview to subfamily array items showing font count (MCKL)
46
+ * @param {boolean} [options.pairsHidden=false] - Hide the pairs array from editors (Darden)
47
+ */
48
+ export function createStylesField({
49
+ hasFreeFlag = false,
50
+ displayStylesHidden = false,
51
+ hasSortHeaviestFirst = false,
52
+ hasBuySectionColumns = false,
53
+ hasFontSizeMultiplier = false,
54
+ hasSerifFlag = false,
55
+ hasRegenerateSubfamilies = false,
56
+ hasSubfamilyFontSizeMultiplier = false,
57
+ hasSubfamilyUseListOrder = false,
58
+ hasSubfamilyPreferredStyle = false,
59
+ hasSubfamilyFontFilter = false,
60
+ hasSubfamilyPreview = false,
61
+ pairsHidden = false,
62
+ } = {}) {
63
+
64
+ // Build the subfamily object item fields conditionally
65
+ const subfamilyFields = [
66
+ {
67
+ title: 'Title',
68
+ name: 'title',
69
+ type: 'string',
70
+ },
71
+ ...(hasSubfamilyFontSizeMultiplier ? [{
72
+ title: 'Subfamily Font Size Multiplier',
73
+ name: 'fontSizeMultiplier',
74
+ type: 'number',
75
+ initialValue: 1.0,
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
+ validation: Rule => Rule.min(0.5).max(2.0).precision(2),
78
+ }] : []),
79
+ ...(hasSubfamilyUseListOrder ? [{
80
+ title: 'Use List Order',
81
+ name: 'useListOrder',
82
+ type: 'boolean',
83
+ initialValue: false,
84
+ description: 'Display fonts in the manual order listed below, bypassing programmatic weight-based sorting in the Family Overview.',
85
+ }] : []),
86
+ {
87
+ title: 'Fonts',
88
+ name: 'fonts',
89
+ type: 'array',
90
+ components: { input: AdvancedRefArray },
91
+ of: [{ type: 'reference', weak: true, to: [{ type: 'font' }] }],
92
+ options: {
93
+ sortable: true,
94
+ ...(hasSubfamilyFontFilter ? { filter: fontsFilter } : {}),
95
+ },
96
+ },
97
+ ...(hasSubfamilyPreferredStyle ? [{
98
+ title: 'SubFamily Preferred Style',
99
+ name: 'preferredStyle',
100
+ type: 'reference',
101
+ weak: true,
102
+ to: [{ type: 'font' }],
103
+ options: {
104
+ filter: async ({ getClient, document, parent }) => {
105
+ const client = getClient({ apiVersion: '2022-11-09' });
106
+ const typefaceName = document.title;
107
+ const fonts = await client.fetch('*[_type == "font" && typefaceName == $typefaceName && variableFont == false]', { typefaceName });
108
+ const relatedItemsFiltered = fonts.map(f => f._id).filter(Boolean);
109
+ const existingItems = parent.fonts.map(f => f._ref).filter(Boolean);
110
+ return {
111
+ filter: '(_id in $existingItems) && (_id in $relatedItemsFiltered)',
112
+ params: { existingItems, relatedItemsFiltered },
113
+ };
114
+ },
115
+ },
116
+ }] : []),
117
+ ];
118
+
119
+ const subfamilyItem = {
120
+ type: 'object',
121
+ fields: subfamilyFields,
122
+ ...(hasSubfamilyPreview ? {
123
+ preview: {
124
+ select: { title: 'title', fonts: 'fonts' },
125
+ prepare(props) {
126
+ const numFonts = Object.keys(props.fonts || {}).length;
127
+ return { title: props.title, subtitle: `${numFonts} fonts` };
128
+ },
129
+ },
130
+ } : {}),
131
+ };
132
+
133
+ const fields = [
134
+ ...(hasFreeFlag ? [{
135
+ title: 'Free Typeface',
136
+ name: 'free',
137
+ type: 'boolean',
138
+ description: 'This typeface is free to download and use. This will alter the "Buy" button and checkout experience.',
139
+ initialValue: false,
140
+ }] : []),
141
+ {
142
+ title: 'Display All Styles',
143
+ name: 'displayStyles',
144
+ type: 'boolean',
145
+ initialValue: true,
146
+ hidden: displayStylesHidden,
147
+ description: 'Show all Font Styles below collections in Buy Section',
148
+ },
149
+ ...(hasSortHeaviestFirst ? [{
150
+ title: 'Sort Fonts Heaviest to Lightest',
151
+ name: 'sortHeaviestFirst',
152
+ type: 'boolean',
153
+ initialValue: false,
154
+ description: 'Sort fonts by weight from heaviest (900) to lightest (100). Default is lightest to heaviest (industry standard).',
155
+ }] : []),
156
+ ...(hasBuySectionColumns ? [{
157
+ title: 'Multi Column Buy Section',
158
+ name: 'buySectionColumns',
159
+ type: 'boolean',
160
+ initialValue: true,
161
+ description: 'Choose Single Column or Multi Column for the Buy Section, Default is Multi Column',
162
+ }] : []),
163
+ ...(hasFontSizeMultiplier ? [{
164
+ title: 'Style Grid Font Size Multiplier',
165
+ name: 'fontSizeMultiplier',
166
+ type: 'number',
167
+ initialValue: 1.0,
168
+ description: 'Adjust font size in the buy section style grid. Default is 1.0 (100%). Range: 0.5 to 2.0',
169
+ validation: Rule => Rule.min(0.5).max(2.0).precision(2),
170
+ }] : []),
171
+ ...(hasSerifFlag ? [{
172
+ title: 'Includes Serifs',
173
+ name: 'serif',
174
+ type: 'boolean',
175
+ initialValue: false,
176
+ description: 'Check if this typeface includes serif letterforms. Used for typeface overview serif/sans filters. Frontend automatically treats non-serif typefaces as sans serif.',
177
+ }] : []),
178
+ {
179
+ title: 'Fonts',
180
+ name: 'fonts',
181
+ type: 'array',
182
+ components: { input: AdvancedRefArray },
183
+ of: [{
184
+ type: 'reference',
185
+ weak: true,
186
+ to: [{ type: 'font' }],
187
+ options: { filter: fontsFilter },
188
+ }],
189
+ options: { sortable: true },
190
+ },
191
+ {
192
+ title: 'Variable Fonts',
193
+ name: 'variableFont',
194
+ type: 'array',
195
+ components: { input: AdvancedRefArray },
196
+ of: [{
197
+ type: 'reference',
198
+ weak: true,
199
+ to: [{ type: 'font' }],
200
+ options: { filter: variableFontsFilter },
201
+ }],
202
+ description: 'Variable fonts are automatically included as a bonus when customers purchase all non-variable styles of this typeface.',
203
+ options: { sortable: true },
204
+ },
205
+ ...(hasRegenerateSubfamilies ? [{
206
+ title: 'Regenerate Subfamilies',
207
+ name: 'regenerateSubfamilies',
208
+ type: 'string',
209
+ hidden: ({ parent }) => {
210
+ return parent?.styles?.subfamilies?.length === 0 || parent?.styles?.fonts?.length === 0;
211
+ },
212
+ description: 'Regenerates subfamily groups based on the fonts in this typeface.',
213
+ components: { input: RegenerateSubfamiliesComponent },
214
+ }] : []),
215
+ {
216
+ title: 'Sub Families',
217
+ name: 'subfamilies',
218
+ type: 'array',
219
+ of: [subfamilyItem],
220
+ },
221
+ {
222
+ title: 'Collections',
223
+ name: 'collections',
224
+ type: 'array',
225
+ components: { input: AdvancedRefArray },
226
+ of: [{ type: 'reference', weak: true, to: [{ type: 'collection' }] }],
227
+ options: { sortable: true },
228
+ validation: Rule => Rule.unique(),
229
+ },
230
+ {
231
+ title: 'Pairs',
232
+ name: 'pairs',
233
+ type: 'array',
234
+ components: { input: AdvancedRefArray },
235
+ of: [{ type: 'reference', weak: true, to: [{ type: 'pair' }] }],
236
+ options: { sortable: true },
237
+ validation: Rule => Rule.unique(),
238
+ hidden: pairsHidden,
239
+ },
240
+ ];
241
+
242
+ return {
243
+ title: 'Styles',
244
+ name: 'styles',
245
+ type: 'object',
246
+ group: 'styles',
247
+ fields,
248
+ options: { collapsible: true },
249
+ };
250
+ }
@@ -0,0 +1,301 @@
1
+ // Sanity schema field definition for the Stylistic Features section — featured words and full feature set
2
+ import { StringIcon } from '@sanity/icons';
3
+
4
+ export const stylisticSetField = {
5
+ title: 'Stylistic Features Section',
6
+ name: 'stylisticSet',
7
+ group: 'stylisticSets',
8
+ type: 'object',
9
+ fields: [
10
+ {
11
+ name:'featured',
12
+ title: 'Featured Stylistic Feature Words & Phrases',
13
+ description: 'Write a single letter, word or several words. Wrap the portion of the word that you want to use the stylistic set in ` characters. For example, writing "L`if`t" will make the "if" apply a stylistic set.',
14
+ type:'array',
15
+ of: [
16
+ {
17
+ name:'featuredWord',
18
+ title: 'Words or Phrase',
19
+ type:'object',
20
+ icon: StringIcon,
21
+ fields: [
22
+ {
23
+ type: 'text',
24
+ title: 'Content',
25
+ name: 'content'
26
+ },
27
+ {
28
+ type: 'string',
29
+ title: 'Label',
30
+ name: 'label'
31
+ },
32
+
33
+ {
34
+ title: "Stylistic Feature",
35
+ name: "stylisticFeature",
36
+ type: "string",
37
+ // description: '[This will be autopopulated with the list of stylistic features when ready.]',
38
+ options: {
39
+ list: [
40
+ { title: "All Alternates", value: "'aalt' 1" },
41
+ { title: "All Caps", value: "'c2sc' 1" },
42
+ { title: "Alternate Annotation", value: "'nalt' 1" },
43
+ { title: "Alternative Fractions", value: "'afrc' 1" },
44
+ { title: "Capitals To Small Caps", value: "'c2sc' 1, 'smcp' 1" },
45
+ { title: "Capitals to Petite Caps", value: "'c2pc' 1" },
46
+ { title: "Case Sensitive Forms", value: "'case' 1" },
47
+ { title: "Contextual Alternates", value: "'calt' 1" },
48
+ { title: "Contextual Ligatures", value: "'clig' 1" },
49
+ { title: "Contextual Swash", value: "'cswh' 1" },
50
+ { title: "Denominator", value: "'dnom' 1" },
51
+ { title: "Discretionary Ligatures", value: "'dlig' 1" },
52
+ { title: "Fractions", value: "'frac' 1" },
53
+ { title: "Glyph Decomposition", value: "'ccmp' 1" },
54
+ { title: "Historical Forms", value: "'hist' 1" },
55
+ { title: "Historical Ligatures", value: "'hlig' 1" },
56
+ { title: "Initial Form", value: "'init' 1" },
57
+ { title: "Isolated Form", value: "'isol' 1" },
58
+ { title: "Justified Alternates", value: "'jalt' 1" },
59
+ { title: "Localized Forms", value: "'locl' 1" },
60
+ { title: "Mark Positioning", value: "'mark' 1" },
61
+ { title: "Mark Positioning via Subs", value: "'mset' 1" },
62
+ { title: "Mark to Mark Positioning", value: "'mkmk' 1" },
63
+ { title: "Mathematical Greek", value: "'mgrk' 1" },
64
+ { title: "Medial Form", value: "'medi' 1" },
65
+ { title: "Numerator", value: "'numr' 1" },
66
+ { title: "Ordinals", value: "'ordn' 1" },
67
+ { title: "Ornaments", value: "'ornm' 1" },
68
+ { title: "Petite Caps", value: "'pcap' 1" },
69
+ { title: "Proportional Lining", value: "'pnum' 1" },
70
+ { title: "Proportional Oldstyle", value: "'onum' 1" },
71
+ { title: "Required Ligatures", value: "'rlig' 1" },
72
+ { title: "Scientific Inferiors", value: "'sinf' 1" },
73
+ { title: "Slashed Zero", value: "'zero' 1" },
74
+ { title: "Small Caps", value: "'smcp' 1" },
75
+ { title: "Standard Ligatures", value: "'liga' 1" },
76
+ { title: "Stylistic Alternates", value: "'salt' 1" },
77
+ { title: "Subscript", value: "'subs' 1" },
78
+ { title: "Superscript", value: "'sups' 1" },
79
+ { title: "Swash", value: "'swsh' 1" },
80
+ { title: "Tabular Lining", value: "'tnum' 1" },
81
+ { title: "Tabular Oldstyle", value: "'onum' 1" },
82
+ { title: "Terminal Form", value: "'fina' 1" },
83
+ { title: "Titling Alternates", value: "'titl' 1" },
84
+ { title: "Unicase", value: "'unic' 1" },
85
+ { title: "All Stylistic Sets", value: "'ss01' 1, 'ss02' 1, 'ss03' 1, 'ss04' 1, 'ss05' 1, 'ss06' 1, 'ss07' 1, 'ss08' 1, 'ss09' 1, 'ss10' 1, 'ss11' 1, 'ss12' 1, 'ss13' 1, 'ss14' 1, 'ss15' 1, 'ss16' 1, 'ss17' 1, 'ss18' 1, 'ss19' 1, 'ss20' 1" },
86
+ { title: "Stylistic Set 1", value: "'ss01' 1" },
87
+ { title: "Stylistic Set 2", value: "'ss02' 1" },
88
+ { title: "Stylistic Set 3", value: "'ss03' 1" },
89
+ { title: "Stylistic Set 4", value: "'ss04' 1" },
90
+ { title: "Stylistic Set 5", value: "'ss05' 1" },
91
+ { title: "Stylistic Set 6", value: "'ss06' 1" },
92
+ { title: "Stylistic Set 7", value: "'ss07' 1" },
93
+ { title: "Stylistic Set 8", value: "'ss08' 1" },
94
+ { title: "Stylistic Set 9", value: "'ss09' 1" },
95
+ { title: "Stylistic Set 10", value: "'ss10' 1" },
96
+ { title: "Stylistic Set 11", value: "'ss11' 1" },
97
+ { title: "Stylistic Set 12", value: "'ss12' 1" },
98
+ { title: "Stylistic Set 13", value: "'ss13' 1" },
99
+ { title: "Stylistic Set 14", value: "'ss14' 1" },
100
+ { title: "Stylistic Set 15", value: "'ss15' 1" },
101
+ { title: "Stylistic Set 16", value: "'ss16' 1" },
102
+ { title: "Stylistic Set 17", value: "'ss17' 1" },
103
+ { title: "Stylistic Set 18", value: "'ss18' 1" },
104
+ { title: "Stylistic Set 19", value: "'ss19' 1" },
105
+ { title: "Stylistic Set 20", value: "'ss20' 1" }
106
+ ]
107
+ }
108
+ },
109
+ {
110
+ type: 'string',
111
+ title: 'Specialty CSS Implementation (for multi OT feautes)',
112
+ name: 'specialtyCss',
113
+ placeholder: "'c2sc' 1, 'ss02' 1"
114
+ },
115
+ {
116
+ type: 'boolean',
117
+ title: 'Disable Ligatures on default',
118
+ name: 'ligatures',
119
+ },
120
+ {
121
+ type: 'boolean',
122
+ title: 'Disable Contextual Alternates on default',
123
+ name: 'calt',
124
+ },
125
+ {
126
+ type: 'boolean',
127
+ title: 'Only Applies to Italics',
128
+ name: 'italics',
129
+ },
130
+ {
131
+ title: "Font Size",
132
+ name: "size",
133
+ type: "string",
134
+ description: 'Recommendation: Use "XLarge" for single glyphs; \nuse "Large" for 2–5 glyphs on one line, or 2 short lines of text; use "Medium" for 2–3 lines of text; use "Small" for 3–4 lines of text.',
135
+ options: {
136
+ list: [
137
+ { title: "XLarge", value: "xl", description: "Recommended for single glyphs." },
138
+ { title: "Large", value: "lg", description: "Recommended for 2–5 glyphs on one line, or 2 short lines of text." },
139
+ { title: "Medium", value: "md", description: "Recommended for 2–3 lines of text." },
140
+ { title: "Small", value: "sm", description: "Recommended for 3–4 lines of text." }
141
+ ],
142
+ layout: "radio",
143
+ // direction: "horizontal"
144
+ }
145
+ },
146
+ ],
147
+ preview: {
148
+ select: {
149
+ title: 'content',
150
+ subtitle: 'label'
151
+ },
152
+ prepare(selection) {
153
+ const {title, subtitle} = selection;
154
+ return {
155
+ title: title,
156
+ subtitle: subtitle
157
+ };
158
+ }
159
+ }
160
+ }
161
+ ]
162
+ },
163
+ {
164
+ name: 'sets',
165
+ title: 'Full list of stylistic features & their corresponding glyphs',
166
+ type: 'array',
167
+ of: [
168
+ {
169
+ name: 'set',
170
+ type: 'object',
171
+ title: 'Stylistic Feature',
172
+ icon: StringIcon,
173
+ fields: [
174
+ {
175
+ name: 'title',
176
+ title: 'Label for Stylistic Feature',
177
+ description: 'e.g. "ss01", "Lining Numerals',
178
+ type: 'string'
179
+ },
180
+ {
181
+ name: 'content',
182
+ title: 'Corresponding glyphs',
183
+ type: 'text',
184
+ description: 'For stylistic features that apply to multiple of the same base character, recommended to create a new line for each base character.'
185
+ },
186
+ {
187
+ title: "Stylistic Feature",
188
+ name: "stylisticFeature",
189
+ type: "string",
190
+ // description: '[This will be autopopulated with the list of stylistic features when ready.]',
191
+ options: {
192
+ list: [
193
+ { title: "All Alternates", value: "'aalt' 1" },
194
+ { title: "All Caps", value: "'c2sc' 1" },
195
+ { title: "Alternate Annotation", value: "'nalt' 1" },
196
+ { title: "Alternative Fractions", value: "'afrc' 1" },
197
+ { title: "Capitals To Small Caps", value: "'c2sc' 1, 'smcp' 1" },
198
+ { title: "Capitals to Petite Caps", value: "'c2pc' 1" },
199
+ { title: "Case Sensitive Forms", value: "'case' 1" },
200
+ { title: "Contextual Alternates", value: "'calt' 1" },
201
+ { title: "Contextual Ligatures", value: "'clig' 1" },
202
+ { title: "Contextual Swash", value: "'cswh' 1" },
203
+ { title: "Denominator", value: "'dnom' 1" },
204
+ { title: "Discretionary Ligatures", value: "'dlig' 1" },
205
+ { title: "Fractions", value: "'frac' 1" },
206
+ { title: "Glyph Decomposition", value: "'ccmp' 1" },
207
+ { title: "Historical Forms", value: "'hist' 1" },
208
+ { title: "Historical Ligatures", value: "'hlig' 1" },
209
+ { title: "Initial Form", value: "'init' 1" },
210
+ { title: "Isolated Form", value: "'isol' 1" },
211
+ { title: "Justified Alternates", value: "'jalt' 1" },
212
+ { title: "Localized Forms", value: "'locl' 1" },
213
+ { title: "Mark Positioning", value: "'mark' 1" },
214
+ { title: "Mark Positioning via Subs", value: "'mset' 1" },
215
+ { title: "Mark to Mark Positioning", value: "'mkmk' 1" },
216
+ { title: "Mathematical Greek", value: "'mgrk' 1" },
217
+ { title: "Medial Form", value: "'medi' 1" },
218
+ { title: "Numerator", value: "'numr' 1" },
219
+ { title: "Ordinals", value: "'ordn' 1" },
220
+ { title: "Ornaments", value: "'ornm' 1" },
221
+ { title: "Petite Caps", value: "'pcap' 1" },
222
+ { title: "Proportional Lining", value: "'pnum' 1" },
223
+ { title: "Proportional Oldstyle", value: "'onum' 1" },
224
+ { title: "Required Ligatures", value: "'rlig' 1" },
225
+ { title: "Scientific Inferiors", value: "'sinf' 1" },
226
+ { title: "Slashed Zero", value: "'zero' 1" },
227
+ { title: "Small Caps", value: "'smcp' 1" },
228
+ { title: "Standard Ligatures", value: "'liga' 1" },
229
+ { title: "Stylistic Alternates", value: "'salt' 1" },
230
+ { title: "Subscript", value: "'subs' 1" },
231
+ { title: "Superscript", value: "'sups' 1" },
232
+ { title: "Swash", value: "'swsh' 1" },
233
+ { title: "Tabular Lining", value: "'tnum' 1" },
234
+ { title: "Tabular Oldstyle", value: "'onum' 1" },
235
+ { title: "Terminal Form", value: "'fina' 1" },
236
+ { title: "Titling Alternates", value: "'titl' 1" },
237
+ { title: "Unicase", value: "'unic' 1" },
238
+ { title: "All Stylistic Sets", value: "'ss01' 1, 'ss02' 1, 'ss03' 1, 'ss04' 1, 'ss05' 1, 'ss06' 1, 'ss07' 1, 'ss08' 1, 'ss09' 1, 'ss10' 1, 'ss11' 1, 'ss12' 1, 'ss13' 1, 'ss14' 1, 'ss15' 1, 'ss16' 1, 'ss17' 1, 'ss18' 1, 'ss19' 1, 'ss20' 1" },
239
+ { title: "Stylistic Set 1", value: "'ss01' 1" },
240
+ { title: "Stylistic Set 2", value: "'ss02' 1" },
241
+ { title: "Stylistic Set 3", value: "'ss03' 1" },
242
+ { title: "Stylistic Set 4", value: "'ss04' 1" },
243
+ { title: "Stylistic Set 5", value: "'ss05' 1" },
244
+ { title: "Stylistic Set 6", value: "'ss06' 1" },
245
+ { title: "Stylistic Set 7", value: "'ss07' 1" },
246
+ { title: "Stylistic Set 8", value: "'ss08' 1" },
247
+ { title: "Stylistic Set 9", value: "'ss09' 1" },
248
+ { title: "Stylistic Set 10", value: "'ss10' 1" },
249
+ { title: "Stylistic Set 11", value: "'ss11' 1" },
250
+ { title: "Stylistic Set 12", value: "'ss12' 1" },
251
+ { title: "Stylistic Set 13", value: "'ss13' 1" },
252
+ { title: "Stylistic Set 14", value: "'ss14' 1" },
253
+ { title: "Stylistic Set 15", value: "'ss15' 1" },
254
+ { title: "Stylistic Set 16", value: "'ss16' 1" },
255
+ { title: "Stylistic Set 17", value: "'ss17' 1" },
256
+ { title: "Stylistic Set 18", value: "'ss18' 1" },
257
+ { title: "Stylistic Set 19", value: "'ss19' 1" },
258
+ { title: "Stylistic Set 20", value: "'ss20' 1" }
259
+ ]
260
+ }
261
+ },
262
+ {
263
+ type: 'string',
264
+ title: 'Specialty CSS Implementation (for multi OT feautes)',
265
+ name: 'specialtyCss',
266
+ placeholder: "'c2sc' 1, 'ss02' 1"
267
+ },
268
+ {
269
+ type: 'boolean',
270
+ title: 'Disable Ligatures on default',
271
+ name: 'ligatures',
272
+ },
273
+ {
274
+ type: 'boolean',
275
+ title: 'Disable Contextual Alternates on default',
276
+ name: 'calt',
277
+ },
278
+ {
279
+ type: 'boolean',
280
+ title: 'Only Applies to Italics',
281
+ name: 'italics',
282
+ },
283
+ ],
284
+ preview: {
285
+ select: {
286
+ title: 'title',
287
+ subtitle: 'content'
288
+ },
289
+ prepare(selection) {
290
+ const {title, subtitle} = selection;
291
+ return {
292
+ subtitle: subtitle,
293
+ title: title
294
+ };
295
+ }
296
+ }
297
+ }
298
+ ]
299
+ }
300
+ ]
301
+ };