@liiift-studio/sanity-font-manager 2.7.0 → 2.8.0

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.
Files changed (62) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +695 -437
  3. package/dist/index.js +2330 -7084
  4. package/dist/index.mjs +2331 -7085
  5. package/package.json +84 -83
  6. package/src/components/BatchUploadFonts.jsx +655 -655
  7. package/src/components/BulkActions.jsx +99 -99
  8. package/src/components/ExistingDocumentResolver.jsx +152 -152
  9. package/src/components/FontReviewCard.jsx +455 -455
  10. package/src/components/FontScriptUploaderComponent.jsx +463 -463
  11. package/src/components/GenerateCollectionsPairsComponent.jsx +259 -259
  12. package/src/components/KeyValueInput.jsx +95 -95
  13. package/src/components/KeyValueReferenceInput.jsx +267 -267
  14. package/src/components/NestedObjectArraySelector.jsx +146 -146
  15. package/src/components/PriceInput.jsx +26 -26
  16. package/src/components/PrimaryCollectionGeneratorTypeface.jsx +116 -116
  17. package/src/components/RegenerateSubfamiliesComponent.jsx +185 -185
  18. package/src/components/SetOTF.jsx +87 -87
  19. package/src/components/SingleUploaderTool.jsx +674 -674
  20. package/src/components/StatusDisplay.jsx +26 -26
  21. package/src/components/StyleCountInput.jsx +16 -16
  22. package/src/components/UpdateScriptsComponent.jsx +76 -76
  23. package/src/components/UploadButton.jsx +43 -43
  24. package/src/components/UploadModal.jsx +309 -309
  25. package/src/components/UploadScriptsComponent.jsx +539 -539
  26. package/src/components/UploadStep1Settings.jsx +272 -272
  27. package/src/components/UploadStep2Review.jsx +478 -478
  28. package/src/components/UploadStep3Execute.jsx +234 -234
  29. package/src/components/UploadStep3bInstances.jsx +396 -396
  30. package/src/components/UploadSummary.jsx +196 -196
  31. package/src/components/VariableInstanceReferencesInput.jsx +190 -190
  32. package/src/hooks/useNestedObjects.js +92 -92
  33. package/src/hooks/useSanityClient.js +9 -9
  34. package/src/index.js +120 -120
  35. package/src/schema/openTypeField.js +1995 -1995
  36. package/src/schema/styleCountField.js +12 -12
  37. package/src/schema/stylesField.js +302 -302
  38. package/src/schema/stylisticSetField.js +301 -301
  39. package/src/utils/buildUploadPlan.js +326 -326
  40. package/src/utils/executeUploadPlan.js +430 -430
  41. package/src/utils/executionReducer.js +56 -56
  42. package/src/utils/fontHelpers.js +281 -281
  43. package/src/utils/generateCssFile.js +207 -207
  44. package/src/utils/generateFontData.js +98 -98
  45. package/src/utils/generateFontFile.js +38 -38
  46. package/src/utils/generateKeywords.js +185 -185
  47. package/src/utils/generateSubset.js +45 -45
  48. package/src/utils/getEmptyFontKit.js +101 -101
  49. package/src/utils/parseFont.js +56 -56
  50. package/src/utils/parseVariableFontInstances.js +301 -301
  51. package/src/utils/planReducer.js +531 -531
  52. package/src/utils/planTypes.js +183 -183
  53. package/src/utils/processFontFiles.js +530 -530
  54. package/src/utils/regenerateFontData.js +146 -146
  55. package/src/utils/resolveExistingFont.js +87 -87
  56. package/src/utils/retitleFontEntries.js +154 -154
  57. package/src/utils/sanitizeForSanityId.js +65 -65
  58. package/src/utils/setupDecompressors.js +27 -27
  59. package/src/utils/updateFontPrices.js +94 -94
  60. package/src/utils/updateTypefaceDocument.js +162 -162
  61. package/src/utils/uploadFontFiles.js +405 -405
  62. package/src/utils/utils.js +24 -24
@@ -1,301 +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
- };
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
+ };