@liiift-studio/sanity-font-manager 2.3.12 → 2.3.13

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
@@ -6806,6 +6806,7 @@ var stylisticSetField = {
6806
6806
  };
6807
6807
 
6808
6808
  // src/schema/stylesField.js
6809
+ var import_sanity_advanced_reference_array = require("sanity-advanced-reference-array");
6809
6810
  var field = (condition, def) => condition ? [def] : [];
6810
6811
  var fontsFilter = async ({ getClient, document, parent }) => {
6811
6812
  const client = getClient({ apiVersion: "2022-11-09" });
@@ -6880,6 +6881,7 @@ function createStylesField({
6880
6881
  title: "Fonts",
6881
6882
  name: "fonts",
6882
6883
  type: "array",
6884
+ components: { input: import_sanity_advanced_reference_array.AdvancedRefArray },
6883
6885
  of: [{ type: "reference", weak: true, to: [{ type: "font" }] }],
6884
6886
  options: {
6885
6887
  sortable: true,
@@ -6956,6 +6958,7 @@ function createStylesField({
6956
6958
  title: "Fonts",
6957
6959
  name: "fonts",
6958
6960
  type: "array",
6961
+ components: { input: import_sanity_advanced_reference_array.AdvancedRefArray },
6959
6962
  of: [{
6960
6963
  type: "reference",
6961
6964
  weak: true,
@@ -6968,6 +6971,7 @@ function createStylesField({
6968
6971
  title: "Variable Fonts",
6969
6972
  name: "variableFont",
6970
6973
  type: "array",
6974
+ components: { input: import_sanity_advanced_reference_array.AdvancedRefArray },
6971
6975
  of: [{
6972
6976
  type: "reference",
6973
6977
  weak: true,
@@ -6998,6 +7002,7 @@ function createStylesField({
6998
7002
  title: "Collections",
6999
7003
  name: "collections",
7000
7004
  type: "array",
7005
+ components: { input: import_sanity_advanced_reference_array.AdvancedRefArray },
7001
7006
  of: [{ type: "reference", weak: true, to: [{ type: "collection" }] }],
7002
7007
  options: { sortable: true },
7003
7008
  validation: (Rule) => Rule.unique()
@@ -7006,6 +7011,7 @@ function createStylesField({
7006
7011
  title: "Pairs",
7007
7012
  name: "pairs",
7008
7013
  type: "array",
7014
+ components: { input: import_sanity_advanced_reference_array.AdvancedRefArray },
7009
7015
  of: [{ type: "reference", weak: true, to: [{ type: "pair" }] }],
7010
7016
  options: { sortable: true },
7011
7017
  validation: (Rule) => Rule.unique(),
package/dist/index.mjs CHANGED
@@ -6716,6 +6716,7 @@ var stylisticSetField = {
6716
6716
  };
6717
6717
 
6718
6718
  // src/schema/stylesField.js
6719
+ import { AdvancedRefArray } from "sanity-advanced-reference-array";
6719
6720
  var field = (condition, def) => condition ? [def] : [];
6720
6721
  var fontsFilter = async ({ getClient, document, parent }) => {
6721
6722
  const client = getClient({ apiVersion: "2022-11-09" });
@@ -6790,6 +6791,7 @@ function createStylesField({
6790
6791
  title: "Fonts",
6791
6792
  name: "fonts",
6792
6793
  type: "array",
6794
+ components: { input: AdvancedRefArray },
6793
6795
  of: [{ type: "reference", weak: true, to: [{ type: "font" }] }],
6794
6796
  options: {
6795
6797
  sortable: true,
@@ -6866,6 +6868,7 @@ function createStylesField({
6866
6868
  title: "Fonts",
6867
6869
  name: "fonts",
6868
6870
  type: "array",
6871
+ components: { input: AdvancedRefArray },
6869
6872
  of: [{
6870
6873
  type: "reference",
6871
6874
  weak: true,
@@ -6878,6 +6881,7 @@ function createStylesField({
6878
6881
  title: "Variable Fonts",
6879
6882
  name: "variableFont",
6880
6883
  type: "array",
6884
+ components: { input: AdvancedRefArray },
6881
6885
  of: [{
6882
6886
  type: "reference",
6883
6887
  weak: true,
@@ -6908,6 +6912,7 @@ function createStylesField({
6908
6912
  title: "Collections",
6909
6913
  name: "collections",
6910
6914
  type: "array",
6915
+ components: { input: AdvancedRefArray },
6911
6916
  of: [{ type: "reference", weak: true, to: [{ type: "collection" }] }],
6912
6917
  options: { sortable: true },
6913
6918
  validation: (Rule) => Rule.unique()
@@ -6916,6 +6921,7 @@ function createStylesField({
6916
6921
  title: "Pairs",
6917
6922
  name: "pairs",
6918
6923
  type: "array",
6924
+ components: { input: AdvancedRefArray },
6919
6925
  of: [{ type: "reference", weak: true, to: [{ type: "pair" }] }],
6920
6926
  options: { sortable: true },
6921
6927
  validation: (Rule) => Rule.unique(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liiift-studio/sanity-font-manager",
3
- "version": "2.3.12",
3
+ "version": "2.3.13",
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",
@@ -59,7 +59,13 @@
59
59
  "@sanity/icons": ">=3",
60
60
  "@sanity/ui": ">=3",
61
61
  "react": ">=18",
62
- "sanity": ">=3"
62
+ "sanity": ">=3",
63
+ "sanity-advanced-reference-array": ">=1"
64
+ },
65
+ "peerDependenciesMeta": {
66
+ "sanity-advanced-reference-array": {
67
+ "optional": true
68
+ }
63
69
  },
64
70
  "devDependencies": {
65
71
  "@sanity/icons": "^3",
@@ -1,4 +1,5 @@
1
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';
2
3
  import { RegenerateSubfamiliesComponent } from '../components/RegenerateSubfamiliesComponent.jsx';
3
4
 
4
5
  // Conditionally includes a field definition in an array
@@ -101,6 +102,7 @@ export function createStylesField({
101
102
  title: 'Fonts',
102
103
  name: 'fonts',
103
104
  type: 'array',
105
+ components: { input: AdvancedRefArray },
104
106
  of: [{ type: 'reference', weak: true, to: [{ type: 'font' }] }],
105
107
  options: {
106
108
  sortable: true,
@@ -179,6 +181,7 @@ export function createStylesField({
179
181
  title: 'Fonts',
180
182
  name: 'fonts',
181
183
  type: 'array',
184
+ components: { input: AdvancedRefArray },
182
185
  of: [{
183
186
  type: 'reference',
184
187
  weak: true,
@@ -191,6 +194,7 @@ export function createStylesField({
191
194
  title: 'Variable Fonts',
192
195
  name: 'variableFont',
193
196
  type: 'array',
197
+ components: { input: AdvancedRefArray },
194
198
  of: [{
195
199
  type: 'reference',
196
200
  weak: true,
@@ -218,6 +222,7 @@ export function createStylesField({
218
222
  title: 'Collections',
219
223
  name: 'collections',
220
224
  type: 'array',
225
+ components: { input: AdvancedRefArray },
221
226
  of: [{ type: 'reference', weak: true, to: [{ type: 'collection' }] }],
222
227
  options: { sortable: true },
223
228
  validation: Rule => Rule.unique(),
@@ -226,6 +231,7 @@ export function createStylesField({
226
231
  title: 'Pairs',
227
232
  name: 'pairs',
228
233
  type: 'array',
234
+ components: { input: AdvancedRefArray },
229
235
  of: [{ type: 'reference', weak: true, to: [{ type: 'pair' }] }],
230
236
  options: { sortable: true },
231
237
  validation: Rule => Rule.unique(),