@liiift-studio/sanity-font-manager 2.6.0 → 2.7.1
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/LICENSE +21 -0
- package/README.md +695 -437
- package/dist/index.js +1628 -17701
- package/dist/index.mjs +1537 -17599
- package/package.json +83 -83
- package/src/components/BatchUploadFonts.jsx +655 -653
- package/src/components/BulkActions.jsx +99 -99
- package/src/components/ExistingDocumentResolver.jsx +152 -152
- package/src/components/FontReviewCard.jsx +455 -455
- package/src/components/FontScriptUploaderComponent.jsx +463 -463
- package/src/components/GenerateCollectionsPairsComponent.jsx +259 -259
- package/src/components/KeyValueInput.jsx +95 -95
- package/src/components/KeyValueReferenceInput.jsx +267 -267
- package/src/components/NestedObjectArraySelector.jsx +146 -146
- package/src/components/PriceInput.jsx +26 -26
- package/src/components/PrimaryCollectionGeneratorTypeface.jsx +116 -116
- package/src/components/RegenerateSubfamiliesComponent.jsx +185 -185
- package/src/components/SetOTF.jsx +87 -87
- package/src/components/SingleUploaderTool.jsx +674 -674
- package/src/components/StatusDisplay.jsx +26 -26
- package/src/components/StyleCountInput.jsx +16 -16
- package/src/components/UpdateScriptsComponent.jsx +76 -76
- package/src/components/UploadButton.jsx +43 -43
- package/src/components/UploadModal.jsx +309 -304
- package/src/components/UploadScriptsComponent.jsx +539 -539
- package/src/components/UploadStep1Settings.jsx +272 -272
- package/src/components/UploadStep2Review.jsx +478 -474
- package/src/components/UploadStep3Execute.jsx +234 -234
- package/src/components/UploadStep3bInstances.jsx +396 -396
- package/src/components/UploadSummary.jsx +196 -196
- package/src/components/VariableInstanceReferencesInput.jsx +190 -190
- package/src/hooks/useNestedObjects.js +92 -92
- package/src/hooks/useSanityClient.js +9 -9
- package/src/index.js +120 -120
- package/src/schema/openTypeField.js +1995 -1995
- package/src/schema/styleCountField.js +12 -12
- package/src/schema/stylesField.js +302 -302
- package/src/schema/stylisticSetField.js +301 -301
- package/src/utils/buildUploadPlan.js +326 -326
- package/src/utils/executeUploadPlan.js +430 -430
- package/src/utils/executionReducer.js +56 -56
- package/src/utils/fontHelpers.js +281 -267
- package/src/utils/generateCssFile.js +207 -207
- package/src/utils/generateFontData.js +98 -98
- package/src/utils/generateFontFile.js +38 -38
- package/src/utils/generateKeywords.js +185 -185
- package/src/utils/generateSubset.js +45 -45
- package/src/utils/getEmptyFontKit.js +101 -101
- package/src/utils/parseFont.js +56 -56
- package/src/utils/parseVariableFontInstances.js +301 -301
- package/src/utils/planReducer.js +531 -517
- package/src/utils/planTypes.js +183 -183
- package/src/utils/processFontFiles.js +530 -530
- package/src/utils/regenerateFontData.js +146 -146
- package/src/utils/resolveExistingFont.js +87 -87
- package/src/utils/retitleFontEntries.js +154 -0
- package/src/utils/sanitizeForSanityId.js +65 -65
- package/src/utils/setupDecompressors.js +27 -27
- package/src/utils/updateFontPrices.js +94 -94
- package/src/utils/updateTypefaceDocument.js +162 -162
- package/src/utils/uploadFontFiles.js +405 -405
- package/src/utils/utils.js +24 -24
package/src/index.js
CHANGED
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
// Entry point for @liiift-studio/sanity-font-manager — exports all font manager components, hooks, and utilities
|
|
2
|
-
|
|
3
|
-
// Bootstrap decompressors FIRST — sets globalThis.pako and globalThis.unbrotli
|
|
4
|
-
// before lib-font can be evaluated by any bundler. This must be the first import.
|
|
5
|
-
import './utils/setupDecompressors.js';
|
|
6
|
-
|
|
7
|
-
// Components
|
|
8
|
-
export { BatchUploadFonts } from './components/BatchUploadFonts.jsx';
|
|
9
|
-
export { GenerateCollectionsPairsComponent } from './components/GenerateCollectionsPairsComponent.jsx';
|
|
10
|
-
export { UpdateScriptsComponent } from './components/UpdateScriptsComponent.jsx';
|
|
11
|
-
export { SingleUploaderTool } from './components/SingleUploaderTool.jsx';
|
|
12
|
-
export { RegenerateSubfamiliesComponent } from './components/RegenerateSubfamiliesComponent.jsx';
|
|
13
|
-
export { UploadScriptsComponent } from './components/UploadScriptsComponent.jsx';
|
|
14
|
-
export { FontScriptUploaderComponent } from './components/FontScriptUploaderComponent.jsx';
|
|
15
|
-
export { default as StatusDisplay } from './components/StatusDisplay.jsx';
|
|
16
|
-
export { default as PriceInput } from './components/PriceInput.jsx';
|
|
17
|
-
export { default as UploadButton } from './components/UploadButton.jsx';
|
|
18
|
-
export { KeyValueInput } from './components/KeyValueInput.jsx';
|
|
19
|
-
export { KeyValueReferenceInput } from './components/KeyValueReferenceInput.jsx';
|
|
20
|
-
export { VariableInstanceReferencesInput } from './components/VariableInstanceReferencesInput.jsx';
|
|
21
|
-
export { PrimaryCollectionGeneratorTypeface } from './components/PrimaryCollectionGeneratorTypeface.jsx';
|
|
22
|
-
export { SetOTF } from './components/SetOTF.jsx';
|
|
23
|
-
export { StyleCountInput } from './components/StyleCountInput.jsx';
|
|
24
|
-
export { NestedObjectArraySelector } from './components/NestedObjectArraySelector.jsx';
|
|
25
|
-
|
|
26
|
-
// Hooks
|
|
27
|
-
export { useSanityClient } from './hooks/useSanityClient.js';
|
|
28
|
-
export { useNestedObjects } from './hooks/useNestedObjects.js';
|
|
29
|
-
|
|
30
|
-
// Core utilities
|
|
31
|
-
export { default as generateCssFile } from './utils/generateCssFile.js';
|
|
32
|
-
export { default as generateFontData } from './utils/generateFontData.js';
|
|
33
|
-
export { default as generateFontFile } from './utils/generateFontFile.js';
|
|
34
|
-
export { default as generateSubset } from './utils/generateSubset.js';
|
|
35
|
-
export { default as parseVariableFontInstances } from './utils/parseVariableFontInstances.js';
|
|
36
|
-
export { getEmptyFontKit } from './utils/getEmptyFontKit.js';
|
|
37
|
-
export { SCRIPTS, SCRIPTS_OBJECT, HtmlDescription, DISCOUNT_REQUIREMENT_TYPES, DISCOUNT_REQUIREMENT_TYPES_OBJECT } from './utils/utils.js';
|
|
38
|
-
|
|
39
|
-
// Font processing utilities
|
|
40
|
-
export {
|
|
41
|
-
processFontFiles,
|
|
42
|
-
readFontFile,
|
|
43
|
-
extractFontMetadata,
|
|
44
|
-
extractWeightName,
|
|
45
|
-
extractWeightFromFullName,
|
|
46
|
-
processSubfamilyName,
|
|
47
|
-
processItalicKeywords,
|
|
48
|
-
formatFontTitle,
|
|
49
|
-
addItalicToFontTitle,
|
|
50
|
-
createFontObject,
|
|
51
|
-
determineWeight,
|
|
52
|
-
sortFontObjects,
|
|
53
|
-
logFontInfo,
|
|
54
|
-
} from './utils/processFontFiles.js';
|
|
55
|
-
|
|
56
|
-
export { uploadFontFiles } from './utils/uploadFontFiles.js';
|
|
57
|
-
export { updateTypefaceDocument } from './utils/updateTypefaceDocument.js';
|
|
58
|
-
export { renameFontDocuments } from './utils/regenerateFontData.js';
|
|
59
|
-
export { updateFontPrices } from './utils/updateFontPrices.js';
|
|
60
|
-
export { sanitizeForSanityId } from './utils/sanitizeForSanityId.js';
|
|
61
|
-
|
|
62
|
-
// Plan/Execute split — v3.0 upload modal architecture
|
|
63
|
-
export { buildUploadPlan } from './utils/buildUploadPlan.js';
|
|
64
|
-
export { executeUploadPlan } from './utils/executeUploadPlan.js';
|
|
65
|
-
export { resolveExistingFont } from './utils/resolveExistingFont.js';
|
|
66
|
-
export {
|
|
67
|
-
FONT_STATUS,
|
|
68
|
-
PLAN_PHASE,
|
|
69
|
-
RECOMMENDATION,
|
|
70
|
-
EXECUTION_STATUS,
|
|
71
|
-
PLAN_VERSION,
|
|
72
|
-
createFontDecisions,
|
|
73
|
-
createEmptyPlan,
|
|
74
|
-
} from './utils/planTypes.js';
|
|
75
|
-
export { planReducer } from './utils/planReducer.js';
|
|
76
|
-
export { executionReducer, createInitialExecutionState } from './utils/executionReducer.js';
|
|
77
|
-
|
|
78
|
-
// Upload modal components
|
|
79
|
-
export { default as UploadModal } from './components/UploadModal.jsx';
|
|
80
|
-
export { default as UploadStep1Settings } from './components/UploadStep1Settings.jsx';
|
|
81
|
-
export { default as UploadStep2Review } from './components/UploadStep2Review.jsx';
|
|
82
|
-
export { default as UploadStep3Execute } from './components/UploadStep3Execute.jsx';
|
|
83
|
-
export { default as UploadStep3bInstances } from './components/UploadStep3bInstances.jsx';
|
|
84
|
-
export { default as UploadSummary } from './components/UploadSummary.jsx';
|
|
85
|
-
export { default as FontReviewCard } from './components/FontReviewCard.jsx';
|
|
86
|
-
export { default as ExistingDocumentResolver } from './components/ExistingDocumentResolver.jsx';
|
|
87
|
-
export { default as BulkActions } from './components/BulkActions.jsx';
|
|
88
|
-
|
|
89
|
-
// Font parsing (lib-font wrappers)
|
|
90
|
-
export { parseFont } from './utils/parseFont.js';
|
|
91
|
-
export {
|
|
92
|
-
getNameString,
|
|
93
|
-
getAllFeatureTags,
|
|
94
|
-
getCharacterSet,
|
|
95
|
-
getVariationAxes,
|
|
96
|
-
getNamedInstances,
|
|
97
|
-
getFontMetrics,
|
|
98
|
-
getFontMetadata,
|
|
99
|
-
getWeightClass,
|
|
100
|
-
getFsSelection,
|
|
101
|
-
getMacStyle,
|
|
102
|
-
getItalicAngle,
|
|
103
|
-
getGlyphCount,
|
|
104
|
-
getFamilyClass,
|
|
105
|
-
escapeCssFontName,
|
|
106
|
-
} from './utils/fontHelpers.js';
|
|
107
|
-
|
|
108
|
-
// Schema field definitions
|
|
109
|
-
export { openTypeField, createOpenTypeField } from './schema/openTypeField.js';
|
|
110
|
-
export { styleCountField } from './schema/styleCountField.js';
|
|
111
|
-
export { stylisticSetField } from './schema/stylisticSetField.js';
|
|
112
|
-
export { createStylesField } from './schema/stylesField.js';
|
|
113
|
-
|
|
114
|
-
// Keyword utilities
|
|
115
|
-
export {
|
|
116
|
-
generateStyleKeywords,
|
|
117
|
-
reverseSpellingLookup,
|
|
118
|
-
expandAbbreviations,
|
|
119
|
-
removeWeightNames,
|
|
120
|
-
} from './utils/generateKeywords.js';
|
|
1
|
+
// Entry point for @liiift-studio/sanity-font-manager — exports all font manager components, hooks, and utilities
|
|
2
|
+
|
|
3
|
+
// Bootstrap decompressors FIRST — sets globalThis.pako and globalThis.unbrotli
|
|
4
|
+
// before lib-font can be evaluated by any bundler. This must be the first import.
|
|
5
|
+
import './utils/setupDecompressors.js';
|
|
6
|
+
|
|
7
|
+
// Components
|
|
8
|
+
export { BatchUploadFonts } from './components/BatchUploadFonts.jsx';
|
|
9
|
+
export { GenerateCollectionsPairsComponent } from './components/GenerateCollectionsPairsComponent.jsx';
|
|
10
|
+
export { UpdateScriptsComponent } from './components/UpdateScriptsComponent.jsx';
|
|
11
|
+
export { SingleUploaderTool } from './components/SingleUploaderTool.jsx';
|
|
12
|
+
export { RegenerateSubfamiliesComponent } from './components/RegenerateSubfamiliesComponent.jsx';
|
|
13
|
+
export { UploadScriptsComponent } from './components/UploadScriptsComponent.jsx';
|
|
14
|
+
export { FontScriptUploaderComponent } from './components/FontScriptUploaderComponent.jsx';
|
|
15
|
+
export { default as StatusDisplay } from './components/StatusDisplay.jsx';
|
|
16
|
+
export { default as PriceInput } from './components/PriceInput.jsx';
|
|
17
|
+
export { default as UploadButton } from './components/UploadButton.jsx';
|
|
18
|
+
export { KeyValueInput } from './components/KeyValueInput.jsx';
|
|
19
|
+
export { KeyValueReferenceInput } from './components/KeyValueReferenceInput.jsx';
|
|
20
|
+
export { VariableInstanceReferencesInput } from './components/VariableInstanceReferencesInput.jsx';
|
|
21
|
+
export { PrimaryCollectionGeneratorTypeface } from './components/PrimaryCollectionGeneratorTypeface.jsx';
|
|
22
|
+
export { SetOTF } from './components/SetOTF.jsx';
|
|
23
|
+
export { StyleCountInput } from './components/StyleCountInput.jsx';
|
|
24
|
+
export { NestedObjectArraySelector } from './components/NestedObjectArraySelector.jsx';
|
|
25
|
+
|
|
26
|
+
// Hooks
|
|
27
|
+
export { useSanityClient } from './hooks/useSanityClient.js';
|
|
28
|
+
export { useNestedObjects } from './hooks/useNestedObjects.js';
|
|
29
|
+
|
|
30
|
+
// Core utilities
|
|
31
|
+
export { default as generateCssFile } from './utils/generateCssFile.js';
|
|
32
|
+
export { default as generateFontData } from './utils/generateFontData.js';
|
|
33
|
+
export { default as generateFontFile } from './utils/generateFontFile.js';
|
|
34
|
+
export { default as generateSubset } from './utils/generateSubset.js';
|
|
35
|
+
export { default as parseVariableFontInstances } from './utils/parseVariableFontInstances.js';
|
|
36
|
+
export { getEmptyFontKit } from './utils/getEmptyFontKit.js';
|
|
37
|
+
export { SCRIPTS, SCRIPTS_OBJECT, HtmlDescription, DISCOUNT_REQUIREMENT_TYPES, DISCOUNT_REQUIREMENT_TYPES_OBJECT } from './utils/utils.js';
|
|
38
|
+
|
|
39
|
+
// Font processing utilities
|
|
40
|
+
export {
|
|
41
|
+
processFontFiles,
|
|
42
|
+
readFontFile,
|
|
43
|
+
extractFontMetadata,
|
|
44
|
+
extractWeightName,
|
|
45
|
+
extractWeightFromFullName,
|
|
46
|
+
processSubfamilyName,
|
|
47
|
+
processItalicKeywords,
|
|
48
|
+
formatFontTitle,
|
|
49
|
+
addItalicToFontTitle,
|
|
50
|
+
createFontObject,
|
|
51
|
+
determineWeight,
|
|
52
|
+
sortFontObjects,
|
|
53
|
+
logFontInfo,
|
|
54
|
+
} from './utils/processFontFiles.js';
|
|
55
|
+
|
|
56
|
+
export { uploadFontFiles } from './utils/uploadFontFiles.js';
|
|
57
|
+
export { updateTypefaceDocument } from './utils/updateTypefaceDocument.js';
|
|
58
|
+
export { renameFontDocuments } from './utils/regenerateFontData.js';
|
|
59
|
+
export { updateFontPrices } from './utils/updateFontPrices.js';
|
|
60
|
+
export { sanitizeForSanityId } from './utils/sanitizeForSanityId.js';
|
|
61
|
+
|
|
62
|
+
// Plan/Execute split — v3.0 upload modal architecture
|
|
63
|
+
export { buildUploadPlan } from './utils/buildUploadPlan.js';
|
|
64
|
+
export { executeUploadPlan } from './utils/executeUploadPlan.js';
|
|
65
|
+
export { resolveExistingFont } from './utils/resolveExistingFont.js';
|
|
66
|
+
export {
|
|
67
|
+
FONT_STATUS,
|
|
68
|
+
PLAN_PHASE,
|
|
69
|
+
RECOMMENDATION,
|
|
70
|
+
EXECUTION_STATUS,
|
|
71
|
+
PLAN_VERSION,
|
|
72
|
+
createFontDecisions,
|
|
73
|
+
createEmptyPlan,
|
|
74
|
+
} from './utils/planTypes.js';
|
|
75
|
+
export { planReducer } from './utils/planReducer.js';
|
|
76
|
+
export { executionReducer, createInitialExecutionState } from './utils/executionReducer.js';
|
|
77
|
+
|
|
78
|
+
// Upload modal components
|
|
79
|
+
export { default as UploadModal } from './components/UploadModal.jsx';
|
|
80
|
+
export { default as UploadStep1Settings } from './components/UploadStep1Settings.jsx';
|
|
81
|
+
export { default as UploadStep2Review } from './components/UploadStep2Review.jsx';
|
|
82
|
+
export { default as UploadStep3Execute } from './components/UploadStep3Execute.jsx';
|
|
83
|
+
export { default as UploadStep3bInstances } from './components/UploadStep3bInstances.jsx';
|
|
84
|
+
export { default as UploadSummary } from './components/UploadSummary.jsx';
|
|
85
|
+
export { default as FontReviewCard } from './components/FontReviewCard.jsx';
|
|
86
|
+
export { default as ExistingDocumentResolver } from './components/ExistingDocumentResolver.jsx';
|
|
87
|
+
export { default as BulkActions } from './components/BulkActions.jsx';
|
|
88
|
+
|
|
89
|
+
// Font parsing (lib-font wrappers)
|
|
90
|
+
export { parseFont } from './utils/parseFont.js';
|
|
91
|
+
export {
|
|
92
|
+
getNameString,
|
|
93
|
+
getAllFeatureTags,
|
|
94
|
+
getCharacterSet,
|
|
95
|
+
getVariationAxes,
|
|
96
|
+
getNamedInstances,
|
|
97
|
+
getFontMetrics,
|
|
98
|
+
getFontMetadata,
|
|
99
|
+
getWeightClass,
|
|
100
|
+
getFsSelection,
|
|
101
|
+
getMacStyle,
|
|
102
|
+
getItalicAngle,
|
|
103
|
+
getGlyphCount,
|
|
104
|
+
getFamilyClass,
|
|
105
|
+
escapeCssFontName,
|
|
106
|
+
} from './utils/fontHelpers.js';
|
|
107
|
+
|
|
108
|
+
// Schema field definitions
|
|
109
|
+
export { openTypeField, createOpenTypeField } from './schema/openTypeField.js';
|
|
110
|
+
export { styleCountField } from './schema/styleCountField.js';
|
|
111
|
+
export { stylisticSetField } from './schema/stylisticSetField.js';
|
|
112
|
+
export { createStylesField } from './schema/stylesField.js';
|
|
113
|
+
|
|
114
|
+
// Keyword utilities
|
|
115
|
+
export {
|
|
116
|
+
generateStyleKeywords,
|
|
117
|
+
reverseSpellingLookup,
|
|
118
|
+
expandAbbreviations,
|
|
119
|
+
removeWeightNames,
|
|
120
|
+
} from './utils/generateKeywords.js';
|