@liiift-studio/sanity-font-manager 2.3.18 → 2.4.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 (42) hide show
  1. package/README.md +437 -437
  2. package/dist/index.js +103 -48
  3. package/dist/index.mjs +103 -48
  4. package/package.json +85 -85
  5. package/src/components/BatchUploadFonts.jsx +640 -639
  6. package/src/components/FontScriptUploaderComponent.jsx +463 -463
  7. package/src/components/GenerateCollectionsPairsComponent.jsx +259 -259
  8. package/src/components/KeyValueInput.jsx +95 -95
  9. package/src/components/KeyValueReferenceInput.jsx +254 -254
  10. package/src/components/NestedObjectArraySelector.jsx +146 -146
  11. package/src/components/PriceInput.jsx +26 -26
  12. package/src/components/PrimaryCollectionGeneratorTypeface.jsx +116 -116
  13. package/src/components/RegenerateSubfamiliesComponent.jsx +185 -185
  14. package/src/components/SetOTF.jsx +87 -87
  15. package/src/components/SingleUploaderTool.jsx +673 -673
  16. package/src/components/StatusDisplay.jsx +26 -26
  17. package/src/components/StyleCountInput.jsx +16 -16
  18. package/src/components/UpdateScriptsComponent.jsx +76 -76
  19. package/src/components/UploadButton.jsx +43 -43
  20. package/src/components/UploadScriptsComponent.jsx +537 -537
  21. package/src/components/VariableInstanceReferencesInput.jsx +190 -190
  22. package/src/hooks/useNestedObjects.js +92 -92
  23. package/src/hooks/useSanityClient.js +9 -9
  24. package/src/index.js +70 -70
  25. package/src/schema/openTypeField.js +1945 -1945
  26. package/src/schema/styleCountField.js +12 -12
  27. package/src/schema/stylesField.js +268 -268
  28. package/src/schema/stylisticSetField.js +301 -301
  29. package/src/utils/generateCssFile.js +205 -205
  30. package/src/utils/generateFontData.js +145 -145
  31. package/src/utils/generateFontFile.js +38 -38
  32. package/src/utils/generateKeywords.js +185 -185
  33. package/src/utils/generateSubset.js +45 -45
  34. package/src/utils/getEmptyFontKit.js +99 -99
  35. package/src/utils/parseVariableFontInstances.js +211 -211
  36. package/src/utils/processFontFiles.js +487 -477
  37. package/src/utils/regenerateFontData.js +146 -146
  38. package/src/utils/sanitizeForSanityId.js +65 -65
  39. package/src/utils/updateFontPrices.js +94 -94
  40. package/src/utils/updateTypefaceDocument.js +149 -160
  41. package/src/utils/uploadFontFiles.js +115 -26
  42. package/src/utils/utils.js +24 -24
package/package.json CHANGED
@@ -1,85 +1,85 @@
1
- {
2
- "name": "@liiift-studio/sanity-font-manager",
3
- "version": "2.3.18",
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
- "license": "MIT",
6
- "author": "Liiift Studio",
7
- "keywords": [
8
- "sanity",
9
- "sanity-plugin",
10
- "sanity-studio",
11
- "font",
12
- "font-management",
13
- "font-manager",
14
- "font-upload",
15
- "typeface",
16
- "woff2",
17
- "font-conversion",
18
- "css-generation",
19
- "collections",
20
- "variable-font"
21
- ],
22
- "main": "./dist/index.js",
23
- "module": "./dist/index.mjs",
24
- "exports": {
25
- ".": {
26
- "source": "./src/index.js",
27
- "import": "./dist/index.mjs",
28
- "require": "./dist/index.js",
29
- "default": "./dist/index.mjs"
30
- },
31
- "./package.json": "./package.json"
32
- },
33
- "files": [
34
- "dist",
35
- "src/components",
36
- "src/hooks",
37
- "src/utils",
38
- "src/schema",
39
- "src/index.js"
40
- ],
41
- "scripts": {
42
- "test": "vitest run",
43
- "test:watch": "vitest",
44
- "build": "npm run test && tsup",
45
- "dev": "tsup --watch",
46
- "prepublishOnly": "npm run build",
47
- "link:darden": "npm link && cd ../../../sites/darden/sanity && npm link @liiift-studio/sanity-font-manager",
48
- "link:tdf": "npm link && cd ../../../sites/tdf/sanity && npm link @liiift-studio/sanity-font-manager",
49
- "link:mckl": "npm link && cd ../../../sites/mckl/cms && npm link @liiift-studio/sanity-font-manager",
50
- "link:all": "npm link && cd ../../../sites/darden/sanity && npm link @liiift-studio/sanity-font-manager && cd ../../tdf/sanity && npm link @liiift-studio/sanity-font-manager && cd ../../mckl/cms && npm link @liiift-studio/sanity-font-manager"
51
- },
52
- "dependencies": {
53
- "base-64": "^1.0.0",
54
- "buffer": "^6.0.3",
55
- "fontkit": "^2.0.2",
56
- "nanoid": "^5.0.0",
57
- "slugify": "^1.6.6"
58
- },
59
- "peerDependencies": {
60
- "@sanity/icons": ">=3",
61
- "@sanity/ui": ">=3",
62
- "react": ">=18",
63
- "sanity": ">=3",
64
- "@liiift-studio/sanity-advanced-reference-array": ">=1"
65
- },
66
- "peerDependenciesMeta": {
67
- "@liiift-studio/sanity-advanced-reference-array": {
68
- "optional": true
69
- }
70
- },
71
- "devDependencies": {
72
- "@sanity/icons": "^3",
73
- "@sanity/ui": "^3",
74
- "@types/react": "^19",
75
- "react": "^19",
76
- "sanity": "^5",
77
- "tsup": "^8",
78
- "typescript": "^5",
79
- "vitest": "^4.1.5"
80
- },
81
- "repository": {
82
- "type": "git",
83
- "url": "git+https://github.com/Liiift-Studio/sanity-tools.git"
84
- }
85
- }
1
+ {
2
+ "name": "@liiift-studio/sanity-font-manager",
3
+ "version": "2.4.0",
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
+ "license": "MIT",
6
+ "author": "Liiift Studio",
7
+ "keywords": [
8
+ "sanity",
9
+ "sanity-plugin",
10
+ "sanity-studio",
11
+ "font",
12
+ "font-management",
13
+ "font-manager",
14
+ "font-upload",
15
+ "typeface",
16
+ "woff2",
17
+ "font-conversion",
18
+ "css-generation",
19
+ "collections",
20
+ "variable-font"
21
+ ],
22
+ "main": "./dist/index.js",
23
+ "module": "./dist/index.mjs",
24
+ "exports": {
25
+ ".": {
26
+ "source": "./src/index.js",
27
+ "import": "./dist/index.mjs",
28
+ "require": "./dist/index.js",
29
+ "default": "./dist/index.mjs"
30
+ },
31
+ "./package.json": "./package.json"
32
+ },
33
+ "files": [
34
+ "dist",
35
+ "src/components",
36
+ "src/hooks",
37
+ "src/utils",
38
+ "src/schema",
39
+ "src/index.js"
40
+ ],
41
+ "scripts": {
42
+ "test": "vitest run",
43
+ "test:watch": "vitest",
44
+ "build": "npm run test && tsup",
45
+ "dev": "tsup --watch",
46
+ "prepublishOnly": "npm run build",
47
+ "link:darden": "npm link && cd ../../../sites/darden/sanity && npm link @liiift-studio/sanity-font-manager",
48
+ "link:tdf": "npm link && cd ../../../sites/tdf/sanity && npm link @liiift-studio/sanity-font-manager",
49
+ "link:mckl": "npm link && cd ../../../sites/mckl/cms && npm link @liiift-studio/sanity-font-manager",
50
+ "link:all": "npm link && cd ../../../sites/darden/sanity && npm link @liiift-studio/sanity-font-manager && cd ../../tdf/sanity && npm link @liiift-studio/sanity-font-manager && cd ../../mckl/cms && npm link @liiift-studio/sanity-font-manager"
51
+ },
52
+ "dependencies": {
53
+ "base-64": "^1.0.0",
54
+ "buffer": "^6.0.3",
55
+ "fontkit": "^2.0.2",
56
+ "nanoid": "^5.0.0",
57
+ "slugify": "^1.6.6"
58
+ },
59
+ "peerDependencies": {
60
+ "@sanity/icons": ">=3",
61
+ "@sanity/ui": ">=3",
62
+ "react": ">=18",
63
+ "sanity": ">=3",
64
+ "@liiift-studio/sanity-advanced-reference-array": ">=1"
65
+ },
66
+ "peerDependenciesMeta": {
67
+ "@liiift-studio/sanity-advanced-reference-array": {
68
+ "optional": true
69
+ }
70
+ },
71
+ "devDependencies": {
72
+ "@sanity/icons": "^3",
73
+ "@sanity/ui": "^3",
74
+ "@types/react": "^19",
75
+ "react": "^19",
76
+ "sanity": "^5",
77
+ "tsup": "^8",
78
+ "typescript": "^5",
79
+ "vitest": "^4.1.5"
80
+ },
81
+ "repository": {
82
+ "type": "git",
83
+ "url": "git+https://github.com/Liiift-Studio/sanity-font-manager.git"
84
+ }
85
+ }