@liiift-studio/sanity-font-manager 2.5.9 → 2.6.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.
package/dist/index.js CHANGED
@@ -22805,6 +22805,14 @@ var stylisticSetField = {
22805
22805
  // src/schema/stylesField.js
22806
22806
  var import_react30 = __toESM(require("react"));
22807
22807
  var import_sanity_advanced_reference_array = require("@liiift-studio/sanity-advanced-reference-array");
22808
+ var inlineStyleCountField = {
22809
+ name: "styleCount",
22810
+ type: "number",
22811
+ components: {
22812
+ input: StyleCountInput
22813
+ },
22814
+ readOnly: true
22815
+ };
22808
22816
  var typefaceParams = (doc) => ({ typefaceName: (doc == null ? void 0 : doc.title) || "" });
22809
22817
  var FontsRefArray = (props) => import_react30.default.createElement(import_sanity_advanced_reference_array.AdvancedRefArray, {
22810
22818
  ...props,
@@ -22865,7 +22873,8 @@ function createStylesField({
22865
22873
  subfamilyPreview = false,
22866
22874
  pairs = true,
22867
22875
  generateCollections = false,
22868
- generateFullFamilyCollection = false
22876
+ generateFullFamilyCollection = false,
22877
+ styleCount = false
22869
22878
  } = {}) {
22870
22879
  const subfamilyFields = [
22871
22880
  {
@@ -22965,6 +22974,7 @@ function createStylesField({
22965
22974
  initialValue: false,
22966
22975
  description: "Check if this typeface includes serif letterforms. Used for typeface overview serif/sans filters. Frontend automatically treats non-serif typefaces as sans serif."
22967
22976
  }),
22977
+ ...field(styleCount, inlineStyleCountField),
22968
22978
  {
22969
22979
  title: "Fonts",
22970
22980
  name: "fonts",
package/dist/index.mjs CHANGED
@@ -22704,6 +22704,14 @@ var stylisticSetField = {
22704
22704
  // src/schema/stylesField.js
22705
22705
  import React28 from "react";
22706
22706
  import { AdvancedRefArray } from "@liiift-studio/sanity-advanced-reference-array";
22707
+ var inlineStyleCountField = {
22708
+ name: "styleCount",
22709
+ type: "number",
22710
+ components: {
22711
+ input: StyleCountInput
22712
+ },
22713
+ readOnly: true
22714
+ };
22707
22715
  var typefaceParams = (doc) => ({ typefaceName: (doc == null ? void 0 : doc.title) || "" });
22708
22716
  var FontsRefArray = (props) => React28.createElement(AdvancedRefArray, {
22709
22717
  ...props,
@@ -22764,7 +22772,8 @@ function createStylesField({
22764
22772
  subfamilyPreview = false,
22765
22773
  pairs = true,
22766
22774
  generateCollections = false,
22767
- generateFullFamilyCollection = false
22775
+ generateFullFamilyCollection = false,
22776
+ styleCount = false
22768
22777
  } = {}) {
22769
22778
  const subfamilyFields = [
22770
22779
  {
@@ -22864,6 +22873,7 @@ function createStylesField({
22864
22873
  initialValue: false,
22865
22874
  description: "Check if this typeface includes serif letterforms. Used for typeface overview serif/sans filters. Frontend automatically treats non-serif typefaces as sans serif."
22866
22875
  }),
22876
+ ...field(styleCount, inlineStyleCountField),
22867
22877
  {
22868
22878
  title: "Fonts",
22869
22879
  name: "fonts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liiift-studio/sanity-font-manager",
3
- "version": "2.5.9",
3
+ "version": "2.6.0",
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",
@@ -4,6 +4,17 @@ import { AdvancedRefArray } from '@liiift-studio/sanity-advanced-reference-array
4
4
  import { RegenerateSubfamiliesComponent } from '../components/RegenerateSubfamiliesComponent.jsx';
5
5
  import { GenerateCollectionsPairsComponent } from '../components/GenerateCollectionsPairsComponent.jsx';
6
6
  import { PrimaryCollectionGeneratorTypeface } from '../components/PrimaryCollectionGeneratorTypeface.jsx';
7
+ import { StyleCountInput } from '../components/StyleCountInput.jsx';
8
+
9
+ // Inline style count field — injected into the styles object when styleCount option is true
10
+ const inlineStyleCountField = {
11
+ name: 'styleCount',
12
+ type: 'number',
13
+ components: {
14
+ input: StyleCountInput,
15
+ },
16
+ readOnly: true,
17
+ };
7
18
 
8
19
  // Returns extra GROQ params scoped to the current typeface document
9
20
  const typefaceParams = (doc) => ({ typefaceName: doc?.title || '' });
@@ -80,6 +91,7 @@ const subfamilyPreferredStyleFilter = async ({ getClient, document, parent }) =>
80
91
  * @param {boolean} [options.subfamilyFontFilter=false] - Filter subfamily font picker to typeface fonts only
81
92
  * @param {boolean} [options.subfamilyPreview=false] - Include preview on subfamily array items
82
93
  * @param {boolean} [options.pairs=true] - Show pairs array to editors
94
+ * @param {boolean} [options.styleCount=false] - Include style count display above fonts array
83
95
  */
84
96
  export function createStylesField({
85
97
  free = false,
@@ -97,6 +109,7 @@ export function createStylesField({
97
109
  pairs = true,
98
110
  generateCollections = false,
99
111
  generateFullFamilyCollection = false,
112
+ styleCount = false,
100
113
  } = {}) {
101
114
 
102
115
  const subfamilyFields = [
@@ -199,6 +212,7 @@ export function createStylesField({
199
212
  initialValue: false,
200
213
  description: 'Check if this typeface includes serif letterforms. Used for typeface overview serif/sans filters. Frontend automatically treats non-serif typefaces as sans serif.',
201
214
  }),
215
+ ...field(styleCount, inlineStyleCountField),
202
216
  {
203
217
  title: 'Fonts',
204
218
  name: 'fonts',