@liiift-studio/sanity-font-manager 2.3.9 → 2.3.10

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
@@ -30,6 +30,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  var index_exports = {};
31
31
  __export(index_exports, {
32
32
  BatchUploadFonts: () => BatchUploadFonts,
33
+ DISCOUNT_REQUIREMENT_TYPES: () => DISCOUNT_REQUIREMENT_TYPES,
34
+ DISCOUNT_REQUIREMENT_TYPES_OBJECT: () => DISCOUNT_REQUIREMENT_TYPES_OBJECT,
33
35
  FontScriptUploaderComponent: () => FontScriptUploaderComponent,
34
36
  GenerateCollectionsPairsComponent: () => GenerateCollectionsPairsComponent,
35
37
  HtmlDescription: () => HtmlDescription,
@@ -2970,6 +2972,10 @@ var SCRIPTS = (process.env.SANITY_STUDIO_SCRIPTS || "").split(",").map((script)
2970
2972
  var SCRIPTS_OBJECT = SCRIPTS.map((script) => {
2971
2973
  return { title: script[0].toUpperCase() + script.slice(1), value: script };
2972
2974
  });
2975
+ var DISCOUNT_REQUIREMENT_TYPES = (process.env.SANITY_STUDIO_DISCOUNT_REQ_TYPES || "").split(",").map((type) => type.trim()).filter(Boolean);
2976
+ var DISCOUNT_REQUIREMENT_TYPES_OBJECT = DISCOUNT_REQUIREMENT_TYPES.map((type) => {
2977
+ return { title: type[0].toUpperCase() + type.slice(1), value: type };
2978
+ });
2973
2979
 
2974
2980
  // src/components/UploadScriptsComponent.jsx
2975
2981
  var UploadScriptsComponent = (props) => {
@@ -6877,6 +6883,8 @@ function createStylesField({
6877
6883
  // Annotate the CommonJS export names for ESM import in node:
6878
6884
  0 && (module.exports = {
6879
6885
  BatchUploadFonts,
6886
+ DISCOUNT_REQUIREMENT_TYPES,
6887
+ DISCOUNT_REQUIREMENT_TYPES_OBJECT,
6880
6888
  FontScriptUploaderComponent,
6881
6889
  GenerateCollectionsPairsComponent,
6882
6890
  HtmlDescription,
package/dist/index.mjs CHANGED
@@ -2884,6 +2884,10 @@ var SCRIPTS = (process.env.SANITY_STUDIO_SCRIPTS || "").split(",").map((script)
2884
2884
  var SCRIPTS_OBJECT = SCRIPTS.map((script) => {
2885
2885
  return { title: script[0].toUpperCase() + script.slice(1), value: script };
2886
2886
  });
2887
+ var DISCOUNT_REQUIREMENT_TYPES = (process.env.SANITY_STUDIO_DISCOUNT_REQ_TYPES || "").split(",").map((type) => type.trim()).filter(Boolean);
2888
+ var DISCOUNT_REQUIREMENT_TYPES_OBJECT = DISCOUNT_REQUIREMENT_TYPES.map((type) => {
2889
+ return { title: type[0].toUpperCase() + type.slice(1), value: type };
2890
+ });
2887
2891
 
2888
2892
  // src/components/UploadScriptsComponent.jsx
2889
2893
  var UploadScriptsComponent = (props) => {
@@ -6790,6 +6794,8 @@ function createStylesField({
6790
6794
  }
6791
6795
  export {
6792
6796
  BatchUploadFonts,
6797
+ DISCOUNT_REQUIREMENT_TYPES,
6798
+ DISCOUNT_REQUIREMENT_TYPES_OBJECT,
6793
6799
  FontScriptUploaderComponent,
6794
6800
  GenerateCollectionsPairsComponent,
6795
6801
  HtmlDescription,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liiift-studio/sanity-font-manager",
3
- "version": "2.3.9",
3
+ "version": "2.3.10",
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",
package/src/index.js CHANGED
@@ -28,7 +28,7 @@ export { default as generateFontFile } from './utils/generateFontFile.js';
28
28
  export { default as generateSubset } from './utils/generateSubset.js';
29
29
  export { default as parseVariableFontInstances } from './utils/parseVariableFontInstances.js';
30
30
  export { getEmptyFontKit } from './utils/getEmptyFontKit.js';
31
- export { SCRIPTS, SCRIPTS_OBJECT, HtmlDescription } from './utils/utils.js';
31
+ export { SCRIPTS, SCRIPTS_OBJECT, HtmlDescription, DISCOUNT_REQUIREMENT_TYPES, DISCOUNT_REQUIREMENT_TYPES_OBJECT } from './utils/utils.js';
32
32
 
33
33
  // Font processing utilities
34
34
  export {
@@ -14,3 +14,11 @@ export const SCRIPTS = (process.env.SANITY_STUDIO_SCRIPTS || '').split(',').map(
14
14
  export const SCRIPTS_OBJECT = SCRIPTS.map((script) => {
15
15
  return {title: script[0].toUpperCase() + script.slice(1), value: script}
16
16
  });
17
+
18
+ /** Discount requirement types — comma-separated SANITY_STUDIO_DISCOUNT_REQ_TYPES env var */
19
+ export const DISCOUNT_REQUIREMENT_TYPES = (process.env.SANITY_STUDIO_DISCOUNT_REQ_TYPES || '').split(',').map((type) => type.trim()).filter(Boolean);
20
+
21
+ /** DISCOUNT_REQUIREMENT_TYPES as Sanity select option objects */
22
+ export const DISCOUNT_REQUIREMENT_TYPES_OBJECT = DISCOUNT_REQUIREMENT_TYPES.map((type) => {
23
+ return {title: type[0].toUpperCase() + type.slice(1), value: type}
24
+ });