@jhb.software/payload-alt-text-plugin 0.4.3 → 0.4.4

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.
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { Button, toast, useSelection, useTranslation } from '@payloadcms/ui';
4
4
  import { useRouter } from 'next/navigation.js';
5
5
  import { useTransition } from 'react';
@@ -63,18 +63,14 @@ export function BulkGenerateAltTextsButton({ collectionSlug }) {
63
63
  display: 'flex',
64
64
  justifyContent: 'right'
65
65
  },
66
- children: /*#__PURE__*/ _jsxs(Button, {
66
+ children: /*#__PURE__*/ _jsx(Button, {
67
67
  className: "m-0",
68
68
  disabled: isPending || selectedIds.length === 0,
69
69
  icon: isPending ? /*#__PURE__*/ _jsx(Spinner, {}) : /*#__PURE__*/ _jsx(Lightning, {}),
70
70
  onClick: handleGenerateAltTexts,
71
- children: [
72
- t('@jhb.software/payload-alt-text-plugin:generateAltTextFor'),
73
- " ",
74
- selectedIds.length,
75
- ' ',
76
- selectedIds.length === 1 ? t('@jhb.software/payload-alt-text-plugin:image') : t('@jhb.software/payload-alt-text-plugin:images')
77
- ]
71
+ children: t('@jhb.software/payload-alt-text-plugin:generateAltTextFor', {
72
+ count: selectedIds.length
73
+ })
78
74
  })
79
75
  });
80
76
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/BulkGenerateAltTextsButton.tsx"],"sourcesContent":["'use client'\n\nimport { Button, toast, useSelection, useTranslation } from '@payloadcms/ui'\nimport { useRouter } from 'next/navigation.js'\nimport { useTransition } from 'react'\n\nimport type {\n PluginAltTextTranslationKeys,\n PluginAltTextTranslations,\n} from '../translations/index.js'\n\nimport { Lightning } from './icons/Lightning.js'\nimport { Spinner } from './icons/Spinner.js'\n\nexport function BulkGenerateAltTextsButton({ collectionSlug }: { collectionSlug: string }) {\n const { t } = useTranslation<PluginAltTextTranslations, PluginAltTextTranslationKeys>()\n const [isPending, startTransition] = useTransition()\n const { selected, setSelection } = useSelection()\n\n const selectedIds = Array.from(selected.entries())\n .filter(([, isSelected]) => isSelected)\n .map(([id]) => id) as string[]\n\n const router = useRouter()\n\n const handleGenerateAltTexts = () => {\n startTransition(async () => {\n if (!collectionSlug) {\n throw new Error('Collection slug is required')\n }\n\n try {\n const response = await fetch('/api/alt-text-plugin/generate/bulk', {\n body: JSON.stringify({\n collection: collectionSlug,\n ids: selectedIds,\n }),\n method: 'POST',\n })\n\n if (!response.ok) {\n toast.error(t('@jhb.software/payload-alt-text-plugin:failedToGenerate'))\n return\n }\n\n const data = (await response.json()) as {\n erroredDocs: string[]\n totalDocs: number\n updatedDocs: number\n }\n\n if (data.erroredDocs.length > 0) {\n toast.error(\n t('@jhb.software/payload-alt-text-plugin:failedToGenerateForXImages', {\n count: data.erroredDocs.length,\n }),\n )\n }\n\n // in case not all images were updated, show a warning instead of a success message:\n if (data.updatedDocs === data.totalDocs) {\n toast.success(\n t('@jhb.software/payload-alt-text-plugin:xOfYImagesUpdated', {\n total: data.totalDocs,\n updated: data.updatedDocs,\n }),\n )\n } else {\n toast.warning(\n t('@jhb.software/payload-alt-text-plugin:xOfYImagesUpdated', {\n total: data.totalDocs,\n updated: data.updatedDocs,\n }),\n )\n }\n\n // deselect all previously selected images\n for (const id of selectedIds) {\n setSelection(id)\n }\n\n router.refresh()\n } catch (error) {\n console.error('Error generating alt text:', error)\n toast.error(t('@jhb.software/payload-alt-text-plugin:errorGeneratingAltText'))\n }\n })\n }\n\n return (\n selectedIds.length > 0 && (\n <div className=\"m-0\" style={{ display: 'flex', justifyContent: 'right' }}>\n <Button\n className=\"m-0\"\n disabled={isPending || selectedIds.length === 0}\n icon={isPending ? <Spinner /> : <Lightning />}\n onClick={handleGenerateAltTexts}\n >\n {t('@jhb.software/payload-alt-text-plugin:generateAltTextFor')} {selectedIds.length}{' '}\n {selectedIds.length === 1\n ? t('@jhb.software/payload-alt-text-plugin:image')\n : t('@jhb.software/payload-alt-text-plugin:images')}\n </Button>\n </div>\n )\n )\n}\n"],"names":["Button","toast","useSelection","useTranslation","useRouter","useTransition","Lightning","Spinner","BulkGenerateAltTextsButton","collectionSlug","t","isPending","startTransition","selected","setSelection","selectedIds","Array","from","entries","filter","isSelected","map","id","router","handleGenerateAltTexts","Error","response","fetch","body","JSON","stringify","collection","ids","method","ok","error","data","json","erroredDocs","length","count","updatedDocs","totalDocs","success","total","updated","warning","refresh","console","div","className","style","display","justifyContent","disabled","icon","onClick"],"mappings":"AAAA;;AAEA,SAASA,MAAM,EAAEC,KAAK,EAAEC,YAAY,EAAEC,cAAc,QAAQ,iBAAgB;AAC5E,SAASC,SAAS,QAAQ,qBAAoB;AAC9C,SAASC,aAAa,QAAQ,QAAO;AAOrC,SAASC,SAAS,QAAQ,uBAAsB;AAChD,SAASC,OAAO,QAAQ,qBAAoB;AAE5C,OAAO,SAASC,2BAA2B,EAAEC,cAAc,EAA8B;IACvF,MAAM,EAAEC,CAAC,EAAE,GAAGP;IACd,MAAM,CAACQ,WAAWC,gBAAgB,GAAGP;IACrC,MAAM,EAAEQ,QAAQ,EAAEC,YAAY,EAAE,GAAGZ;IAEnC,MAAMa,cAAcC,MAAMC,IAAI,CAACJ,SAASK,OAAO,IAC5CC,MAAM,CAAC,CAAC,GAAGC,WAAW,GAAKA,YAC3BC,GAAG,CAAC,CAAC,CAACC,GAAG,GAAKA;IAEjB,MAAMC,SAASnB;IAEf,MAAMoB,yBAAyB;QAC7BZ,gBAAgB;YACd,IAAI,CAACH,gBAAgB;gBACnB,MAAM,IAAIgB,MAAM;YAClB;YAEA,IAAI;gBACF,MAAMC,WAAW,MAAMC,MAAM,sCAAsC;oBACjEC,MAAMC,KAAKC,SAAS,CAAC;wBACnBC,YAAYtB;wBACZuB,KAAKjB;oBACP;oBACAkB,QAAQ;gBACV;gBAEA,IAAI,CAACP,SAASQ,EAAE,EAAE;oBAChBjC,MAAMkC,KAAK,CAACzB,EAAE;oBACd;gBACF;gBAEA,MAAM0B,OAAQ,MAAMV,SAASW,IAAI;gBAMjC,IAAID,KAAKE,WAAW,CAACC,MAAM,GAAG,GAAG;oBAC/BtC,MAAMkC,KAAK,CACTzB,EAAE,oEAAoE;wBACpE8B,OAAOJ,KAAKE,WAAW,CAACC,MAAM;oBAChC;gBAEJ;gBAEA,oFAAoF;gBACpF,IAAIH,KAAKK,WAAW,KAAKL,KAAKM,SAAS,EAAE;oBACvCzC,MAAM0C,OAAO,CACXjC,EAAE,2DAA2D;wBAC3DkC,OAAOR,KAAKM,SAAS;wBACrBG,SAAST,KAAKK,WAAW;oBAC3B;gBAEJ,OAAO;oBACLxC,MAAM6C,OAAO,CACXpC,EAAE,2DAA2D;wBAC3DkC,OAAOR,KAAKM,SAAS;wBACrBG,SAAST,KAAKK,WAAW;oBAC3B;gBAEJ;gBAEA,0CAA0C;gBAC1C,KAAK,MAAMnB,MAAMP,YAAa;oBAC5BD,aAAaQ;gBACf;gBAEAC,OAAOwB,OAAO;YAChB,EAAE,OAAOZ,OAAO;gBACda,QAAQb,KAAK,CAAC,8BAA8BA;gBAC5ClC,MAAMkC,KAAK,CAACzB,EAAE;YAChB;QACF;IACF;IAEA,OACEK,YAAYwB,MAAM,GAAG,mBACnB,KAACU;QAAIC,WAAU;QAAMC,OAAO;YAAEC,SAAS;YAAQC,gBAAgB;QAAQ;kBACrE,cAAA,MAACrD;YACCkD,WAAU;YACVI,UAAU3C,aAAaI,YAAYwB,MAAM,KAAK;YAC9CgB,MAAM5C,0BAAY,KAACJ,6BAAa,KAACD;YACjCkD,SAAShC;;gBAERd,EAAE;gBAA4D;gBAAEK,YAAYwB,MAAM;gBAAE;gBACpFxB,YAAYwB,MAAM,KAAK,IACpB7B,EAAE,iDACFA,EAAE;;;;AAKhB"}
1
+ {"version":3,"sources":["../../src/components/BulkGenerateAltTextsButton.tsx"],"sourcesContent":["'use client'\n\nimport { Button, toast, useSelection, useTranslation } from '@payloadcms/ui'\nimport { useRouter } from 'next/navigation.js'\nimport { useTransition } from 'react'\n\nimport type {\n PluginAltTextTranslationKeys,\n PluginAltTextTranslations,\n} from '../translations/index.js'\n\nimport { Lightning } from './icons/Lightning.js'\nimport { Spinner } from './icons/Spinner.js'\n\nexport function BulkGenerateAltTextsButton({ collectionSlug }: { collectionSlug: string }) {\n const { t } = useTranslation<PluginAltTextTranslations, PluginAltTextTranslationKeys>()\n const [isPending, startTransition] = useTransition()\n const { selected, setSelection } = useSelection()\n\n const selectedIds = Array.from(selected.entries())\n .filter(([, isSelected]) => isSelected)\n .map(([id]) => id) as string[]\n\n const router = useRouter()\n\n const handleGenerateAltTexts = () => {\n startTransition(async () => {\n if (!collectionSlug) {\n throw new Error('Collection slug is required')\n }\n\n try {\n const response = await fetch('/api/alt-text-plugin/generate/bulk', {\n body: JSON.stringify({\n collection: collectionSlug,\n ids: selectedIds,\n }),\n method: 'POST',\n })\n\n if (!response.ok) {\n toast.error(t('@jhb.software/payload-alt-text-plugin:failedToGenerate'))\n return\n }\n\n const data = (await response.json()) as {\n erroredDocs: string[]\n totalDocs: number\n updatedDocs: number\n }\n\n if (data.erroredDocs.length > 0) {\n toast.error(\n t('@jhb.software/payload-alt-text-plugin:failedToGenerateForXImages', {\n count: data.erroredDocs.length,\n }),\n )\n }\n\n // in case not all images were updated, show a warning instead of a success message:\n if (data.updatedDocs === data.totalDocs) {\n toast.success(\n t('@jhb.software/payload-alt-text-plugin:xOfYImagesUpdated', {\n total: data.totalDocs,\n updated: data.updatedDocs,\n }),\n )\n } else {\n toast.warning(\n t('@jhb.software/payload-alt-text-plugin:xOfYImagesUpdated', {\n total: data.totalDocs,\n updated: data.updatedDocs,\n }),\n )\n }\n\n // deselect all previously selected images\n for (const id of selectedIds) {\n setSelection(id)\n }\n\n router.refresh()\n } catch (error) {\n console.error('Error generating alt text:', error)\n toast.error(t('@jhb.software/payload-alt-text-plugin:errorGeneratingAltText'))\n }\n })\n }\n\n return (\n selectedIds.length > 0 && (\n <div className=\"m-0\" style={{ display: 'flex', justifyContent: 'right' }}>\n <Button\n className=\"m-0\"\n disabled={isPending || selectedIds.length === 0}\n icon={isPending ? <Spinner /> : <Lightning />}\n onClick={handleGenerateAltTexts}\n >\n {t('@jhb.software/payload-alt-text-plugin:generateAltTextFor', {\n count: selectedIds.length,\n })}\n </Button>\n </div>\n )\n )\n}\n"],"names":["Button","toast","useSelection","useTranslation","useRouter","useTransition","Lightning","Spinner","BulkGenerateAltTextsButton","collectionSlug","t","isPending","startTransition","selected","setSelection","selectedIds","Array","from","entries","filter","isSelected","map","id","router","handleGenerateAltTexts","Error","response","fetch","body","JSON","stringify","collection","ids","method","ok","error","data","json","erroredDocs","length","count","updatedDocs","totalDocs","success","total","updated","warning","refresh","console","div","className","style","display","justifyContent","disabled","icon","onClick"],"mappings":"AAAA;;AAEA,SAASA,MAAM,EAAEC,KAAK,EAAEC,YAAY,EAAEC,cAAc,QAAQ,iBAAgB;AAC5E,SAASC,SAAS,QAAQ,qBAAoB;AAC9C,SAASC,aAAa,QAAQ,QAAO;AAOrC,SAASC,SAAS,QAAQ,uBAAsB;AAChD,SAASC,OAAO,QAAQ,qBAAoB;AAE5C,OAAO,SAASC,2BAA2B,EAAEC,cAAc,EAA8B;IACvF,MAAM,EAAEC,CAAC,EAAE,GAAGP;IACd,MAAM,CAACQ,WAAWC,gBAAgB,GAAGP;IACrC,MAAM,EAAEQ,QAAQ,EAAEC,YAAY,EAAE,GAAGZ;IAEnC,MAAMa,cAAcC,MAAMC,IAAI,CAACJ,SAASK,OAAO,IAC5CC,MAAM,CAAC,CAAC,GAAGC,WAAW,GAAKA,YAC3BC,GAAG,CAAC,CAAC,CAACC,GAAG,GAAKA;IAEjB,MAAMC,SAASnB;IAEf,MAAMoB,yBAAyB;QAC7BZ,gBAAgB;YACd,IAAI,CAACH,gBAAgB;gBACnB,MAAM,IAAIgB,MAAM;YAClB;YAEA,IAAI;gBACF,MAAMC,WAAW,MAAMC,MAAM,sCAAsC;oBACjEC,MAAMC,KAAKC,SAAS,CAAC;wBACnBC,YAAYtB;wBACZuB,KAAKjB;oBACP;oBACAkB,QAAQ;gBACV;gBAEA,IAAI,CAACP,SAASQ,EAAE,EAAE;oBAChBjC,MAAMkC,KAAK,CAACzB,EAAE;oBACd;gBACF;gBAEA,MAAM0B,OAAQ,MAAMV,SAASW,IAAI;gBAMjC,IAAID,KAAKE,WAAW,CAACC,MAAM,GAAG,GAAG;oBAC/BtC,MAAMkC,KAAK,CACTzB,EAAE,oEAAoE;wBACpE8B,OAAOJ,KAAKE,WAAW,CAACC,MAAM;oBAChC;gBAEJ;gBAEA,oFAAoF;gBACpF,IAAIH,KAAKK,WAAW,KAAKL,KAAKM,SAAS,EAAE;oBACvCzC,MAAM0C,OAAO,CACXjC,EAAE,2DAA2D;wBAC3DkC,OAAOR,KAAKM,SAAS;wBACrBG,SAAST,KAAKK,WAAW;oBAC3B;gBAEJ,OAAO;oBACLxC,MAAM6C,OAAO,CACXpC,EAAE,2DAA2D;wBAC3DkC,OAAOR,KAAKM,SAAS;wBACrBG,SAAST,KAAKK,WAAW;oBAC3B;gBAEJ;gBAEA,0CAA0C;gBAC1C,KAAK,MAAMnB,MAAMP,YAAa;oBAC5BD,aAAaQ;gBACf;gBAEAC,OAAOwB,OAAO;YAChB,EAAE,OAAOZ,OAAO;gBACda,QAAQb,KAAK,CAAC,8BAA8BA;gBAC5ClC,MAAMkC,KAAK,CAACzB,EAAE;YAChB;QACF;IACF;IAEA,OACEK,YAAYwB,MAAM,GAAG,mBACnB,KAACU;QAAIC,WAAU;QAAMC,OAAO;YAAEC,SAAS;YAAQC,gBAAgB;QAAQ;kBACrE,cAAA,KAACrD;YACCkD,WAAU;YACVI,UAAU3C,aAAaI,YAAYwB,MAAM,KAAK;YAC9CgB,MAAM5C,0BAAY,KAACJ,6BAAa,KAACD;YACjCkD,SAAShC;sBAERd,EAAE,4DAA4D;gBAC7D8B,OAAOzB,YAAYwB,MAAM;YAC3B;;;AAKV"}
@@ -1,21 +1,20 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  export const ArrowRightIcon = (props)=>/*#__PURE__*/ _jsx("svg", {
4
- fill: "none",
4
+ "data-testid": "geist-icon",
5
5
  height: "16",
6
- shapeRendering: "geometricPrecision",
7
- stroke: "currentColor",
8
- strokeLinecap: "round",
9
6
  strokeLinejoin: "round",
10
- strokeWidth: "1.5",
11
7
  style: {
12
8
  color: 'currentcolor'
13
9
  },
14
- viewBox: "0 0 24 24",
10
+ viewBox: "0 0 16 16",
15
11
  width: "16",
16
12
  ...props,
17
13
  children: /*#__PURE__*/ _jsx("path", {
18
- d: "M5 12h14M12 5l7 7-7 7"
14
+ clipRule: "evenodd",
15
+ d: "M9.53 2.22L9 1.69 7.94 2.75l.53.53 3.97 3.97H1v1.5h11.44l-3.97 3.97-.53.53L9 14.31l.53-.53 5.074-5.073a1 1 0 000-1.414L9.53 2.22z",
16
+ fill: "currentColor",
17
+ fillRule: "evenodd"
19
18
  })
20
19
  });
21
20
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/icons/ArrowRightIcon.tsx"],"sourcesContent":["import React from 'react'\n\nexport const ArrowRightIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (\n <svg\n fill=\"none\"\n height=\"16\"\n shapeRendering=\"geometricPrecision\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"1.5\"\n style={{ color: 'currentcolor' }}\n viewBox=\"0 0 24 24\"\n width=\"16\"\n {...props}\n >\n <path d=\"M5 12h14M12 5l7 7-7 7\" />\n </svg>\n)\n"],"names":["React","ArrowRightIcon","props","svg","fill","height","shapeRendering","stroke","strokeLinecap","strokeLinejoin","strokeWidth","style","color","viewBox","width","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,iBAA0D,CAACC,sBACtE,KAACC;QACCC,MAAK;QACLC,QAAO;QACPC,gBAAe;QACfC,QAAO;QACPC,eAAc;QACdC,gBAAe;QACfC,aAAY;QACZC,OAAO;YAAEC,OAAO;QAAe;QAC/BC,SAAQ;QACRC,OAAM;QACL,GAAGZ,KAAK;kBAET,cAAA,KAACa;YAAKC,GAAE;;OAEX"}
1
+ {"version":3,"sources":["../../../src/components/icons/ArrowRightIcon.tsx"],"sourcesContent":["import React from 'react'\n\nexport const ArrowRightIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (\n <svg\n data-testid=\"geist-icon\"\n height=\"16\"\n strokeLinejoin=\"round\"\n style={{ color: 'currentcolor' }}\n viewBox=\"0 0 16 16\"\n width=\"16\"\n {...props}\n >\n <path\n clipRule=\"evenodd\"\n d=\"M9.53 2.22L9 1.69 7.94 2.75l.53.53 3.97 3.97H1v1.5h11.44l-3.97 3.97-.53.53L9 14.31l.53-.53 5.074-5.073a1 1 0 000-1.414L9.53 2.22z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n)\n"],"names":["React","ArrowRightIcon","props","svg","data-testid","height","strokeLinejoin","style","color","viewBox","width","path","clipRule","d","fill","fillRule"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,iBAA0D,CAACC,sBACtE,KAACC;QACCC,eAAY;QACZC,QAAO;QACPC,gBAAe;QACfC,OAAO;YAAEC,OAAO;QAAe;QAC/BC,SAAQ;QACRC,OAAM;QACL,GAAGR,KAAK;kBAET,cAAA,KAACS;YACCC,UAAS;YACTC,GAAE;YACFC,MAAK;YACLC,UAAS;;OAGd"}
@@ -1,21 +1,20 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  export const CheckIcon = (props)=>/*#__PURE__*/ _jsx("svg", {
4
- fill: "none",
4
+ "data-testid": "geist-icon",
5
5
  height: "16",
6
- shapeRendering: "geometricPrecision",
7
- stroke: "currentColor",
8
- strokeLinecap: "round",
9
6
  strokeLinejoin: "round",
10
- strokeWidth: "1.5",
11
7
  style: {
12
8
  color: 'currentcolor'
13
9
  },
14
- viewBox: "0 0 24 24",
10
+ viewBox: "0 0 16 16",
15
11
  width: "16",
16
12
  ...props,
17
13
  children: /*#__PURE__*/ _jsx("path", {
18
- d: "M20 6L9 17l-5-5"
14
+ clipRule: "evenodd",
15
+ d: "M15.56 4l-.53.53-8.793 8.793a1.75 1.75 0 01-2.474 0l.53-.53-.53.53L.97 10.53.44 10 1.5 8.94l.53.53 2.793 2.793a.25.25 0 00.354 0L13.97 3.47l.53-.53L15.56 4z",
16
+ fill: "currentColor",
17
+ fillRule: "evenodd"
19
18
  })
20
19
  });
21
20
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/icons/CheckIcon.tsx"],"sourcesContent":["import React from 'react'\n\nexport const CheckIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (\n <svg\n fill=\"none\"\n height=\"16\"\n shapeRendering=\"geometricPrecision\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"1.5\"\n style={{ color: 'currentcolor' }}\n viewBox=\"0 0 24 24\"\n width=\"16\"\n {...props}\n >\n <path d=\"M20 6L9 17l-5-5\" />\n </svg>\n)\n"],"names":["React","CheckIcon","props","svg","fill","height","shapeRendering","stroke","strokeLinecap","strokeLinejoin","strokeWidth","style","color","viewBox","width","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,YAAqD,CAACC,sBACjE,KAACC;QACCC,MAAK;QACLC,QAAO;QACPC,gBAAe;QACfC,QAAO;QACPC,eAAc;QACdC,gBAAe;QACfC,aAAY;QACZC,OAAO;YAAEC,OAAO;QAAe;QAC/BC,SAAQ;QACRC,OAAM;QACL,GAAGZ,KAAK;kBAET,cAAA,KAACa;YAAKC,GAAE;;OAEX"}
1
+ {"version":3,"sources":["../../../src/components/icons/CheckIcon.tsx"],"sourcesContent":["import React from 'react'\n\nexport const CheckIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (\n <svg\n data-testid=\"geist-icon\"\n height=\"16\"\n strokeLinejoin=\"round\"\n style={{ color: 'currentcolor' }}\n viewBox=\"0 0 16 16\"\n width=\"16\"\n {...props}\n >\n <path\n clipRule=\"evenodd\"\n d=\"M15.56 4l-.53.53-8.793 8.793a1.75 1.75 0 01-2.474 0l.53-.53-.53.53L.97 10.53.44 10 1.5 8.94l.53.53 2.793 2.793a.25.25 0 00.354 0L13.97 3.47l.53-.53L15.56 4z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n)\n"],"names":["React","CheckIcon","props","svg","data-testid","height","strokeLinejoin","style","color","viewBox","width","path","clipRule","d","fill","fillRule"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,YAAqD,CAACC,sBACjE,KAACC;QACCC,eAAY;QACZC,QAAO;QACPC,gBAAe;QACfC,OAAO;YAAEC,OAAO;QAAe;QAC/BC,SAAQ;QACRC,OAAM;QACL,GAAGR,KAAK;kBAET,cAAA,KAACS;YACCC,UAAS;YACTC,GAAE;YACFC,MAAK;YACLC,UAAS;;OAGd"}
@@ -1,38 +1,21 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- export const ImageIcon = (props)=>/*#__PURE__*/ _jsxs("svg", {
3
+ export const ImageIcon = (props)=>/*#__PURE__*/ _jsx("svg", {
4
4
  "data-testid": "geist-icon",
5
- fill: "none",
6
5
  height: "16",
7
- shapeRendering: "geometricPrecision",
8
- stroke: "currentColor",
9
- strokeLinecap: "round",
10
6
  strokeLinejoin: "round",
11
- strokeWidth: "1.5",
12
7
  style: {
13
8
  color: 'currentcolor'
14
9
  },
15
- viewBox: "0 0 24 24",
10
+ viewBox: "0 0 16 16",
16
11
  width: "16",
17
12
  ...props,
18
- children: [
19
- /*#__PURE__*/ _jsx("rect", {
20
- height: "18",
21
- rx: "2",
22
- ry: "2",
23
- width: "18",
24
- x: "3",
25
- y: "3"
26
- }),
27
- /*#__PURE__*/ _jsx("circle", {
28
- cx: "8.5",
29
- cy: "8.5",
30
- r: "1.5"
31
- }),
32
- /*#__PURE__*/ _jsx("path", {
33
- d: "M21 15l-5-5L5 21"
34
- })
35
- ]
13
+ children: /*#__PURE__*/ _jsx("path", {
14
+ clipRule: "evenodd",
15
+ d: "M14.5 2.5h-13v6.69l1.47-1.47.22-.22h3.75l.03-.03 3.5-3.5h1.06l2.97 2.97V2.5zM8 8.56l1.53 1.53.53.53L9 11.68l-.53-.53L6.32 9H3.81l-2.28 2.28-.03.03v1.19a1 1 0 001 1h11a1 1 0 001-1V9.06L11 5.56 8.03 8.53 8 8.56zm-8 2.25v1.69A2.5 2.5 0 002.5 15h11a2.5 2.5 0 002.5-2.5V9.56l.56-.56-.53-.53-.03-.03V1H0v9.69l-.06.06.06.06z",
16
+ fill: "currentColor",
17
+ fillRule: "evenodd"
18
+ })
36
19
  });
37
20
 
38
21
  //# sourceMappingURL=ImageIcon.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/icons/ImageIcon.tsx"],"sourcesContent":["import React from 'react'\n\nexport const ImageIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (\n <svg\n data-testid=\"geist-icon\"\n fill=\"none\"\n height=\"16\"\n shapeRendering=\"geometricPrecision\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"1.5\"\n style={{ color: 'currentcolor' }}\n viewBox=\"0 0 24 24\"\n width=\"16\"\n {...props}\n >\n <rect height=\"18\" rx=\"2\" ry=\"2\" width=\"18\" x=\"3\" y=\"3\" />\n <circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\" />\n <path d=\"M21 15l-5-5L5 21\" />\n </svg>\n)\n"],"names":["React","ImageIcon","props","svg","data-testid","fill","height","shapeRendering","stroke","strokeLinecap","strokeLinejoin","strokeWidth","style","color","viewBox","width","rect","rx","ry","x","y","circle","cx","cy","r","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,YAAqD,CAACC,sBACjE,MAACC;QACCC,eAAY;QACZC,MAAK;QACLC,QAAO;QACPC,gBAAe;QACfC,QAAO;QACPC,eAAc;QACdC,gBAAe;QACfC,aAAY;QACZC,OAAO;YAAEC,OAAO;QAAe;QAC/BC,SAAQ;QACRC,OAAM;QACL,GAAGb,KAAK;;0BAET,KAACc;gBAAKV,QAAO;gBAAKW,IAAG;gBAAIC,IAAG;gBAAIH,OAAM;gBAAKI,GAAE;gBAAIC,GAAE;;0BACnD,KAACC;gBAAOC,IAAG;gBAAMC,IAAG;gBAAMC,GAAE;;0BAC5B,KAACC;gBAAKC,GAAE;;;OAEX"}
1
+ {"version":3,"sources":["../../../src/components/icons/ImageIcon.tsx"],"sourcesContent":["import React from 'react'\n\nexport const ImageIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (\n <svg\n data-testid=\"geist-icon\"\n height=\"16\"\n strokeLinejoin=\"round\"\n style={{ color: 'currentcolor' }}\n viewBox=\"0 0 16 16\"\n width=\"16\"\n {...props}\n >\n <path\n clipRule=\"evenodd\"\n d=\"M14.5 2.5h-13v6.69l1.47-1.47.22-.22h3.75l.03-.03 3.5-3.5h1.06l2.97 2.97V2.5zM8 8.56l1.53 1.53.53.53L9 11.68l-.53-.53L6.32 9H3.81l-2.28 2.28-.03.03v1.19a1 1 0 001 1h11a1 1 0 001-1V9.06L11 5.56 8.03 8.53 8 8.56zm-8 2.25v1.69A2.5 2.5 0 002.5 15h11a2.5 2.5 0 002.5-2.5V9.56l.56-.56-.53-.53-.03-.03V1H0v9.69l-.06.06.06.06z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n)\n"],"names":["React","ImageIcon","props","svg","data-testid","height","strokeLinejoin","style","color","viewBox","width","path","clipRule","d","fill","fillRule"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,YAAqD,CAACC,sBACjE,KAACC;QACCC,eAAY;QACZC,QAAO;QACPC,gBAAe;QACfC,OAAO;YAAEC,OAAO;QAAe;QAC/BC,SAAQ;QACRC,OAAM;QACL,GAAGR,KAAK;kBAET,cAAA,KAACS;YACCC,UAAS;YACTC,GAAE;YACFC,MAAK;YACLC,UAAS;;OAGd"}
@@ -1,16 +1,20 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  export function Lightning() {
3
3
  return /*#__PURE__*/ _jsx("svg", {
4
- fill: "currentColor",
4
+ "data-testid": "geist-icon",
5
+ height: "16",
6
+ strokeLinejoin: "round",
5
7
  style: {
8
+ color: 'currentcolor',
6
9
  height: '1rem',
7
10
  width: '1rem'
8
11
  },
9
- viewBox: "0 0 20 20",
10
- xmlns: "http://www.w3.org/2000/svg",
12
+ viewBox: "0 0 16 16",
13
+ width: "16",
11
14
  children: /*#__PURE__*/ _jsx("path", {
12
15
  clipRule: "evenodd",
13
- d: "M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z",
16
+ d: "M7.157 0L2.333 9.408l-.56 1.092H7a.25.25 0 01.25.25V16h1.593l4.824-9.408.56-1.092H9a.25.25 0 01-.25-.25V0H7.157zM7 9H4.227L7.25 3.106V5.25C7.25 6.216 8.034 7 9 7h2.773L8.75 12.894V10.75A1.75 1.75 0 007 9z",
17
+ fill: "currentColor",
14
18
  fillRule: "evenodd"
15
19
  })
16
20
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/icons/Lightning.tsx"],"sourcesContent":["export function Lightning() {\n return (\n <svg\n fill=\"currentColor\"\n style={{\n height: '1rem',\n width: '1rem',\n }}\n viewBox=\"0 0 20 20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z\"\n fillRule=\"evenodd\"\n />\n </svg>\n )\n}\n"],"names":["Lightning","svg","fill","style","height","width","viewBox","xmlns","path","clipRule","d","fillRule"],"mappings":";AAAA,OAAO,SAASA;IACd,qBACE,KAACC;QACCC,MAAK;QACLC,OAAO;YACLC,QAAQ;YACRC,OAAO;QACT;QACAC,SAAQ;QACRC,OAAM;kBAEN,cAAA,KAACC;YACCC,UAAS;YACTC,GAAE;YACFC,UAAS;;;AAIjB"}
1
+ {"version":3,"sources":["../../../src/components/icons/Lightning.tsx"],"sourcesContent":["export function Lightning() {\n return (\n <svg\n data-testid=\"geist-icon\"\n height=\"16\"\n strokeLinejoin=\"round\"\n style={{ color: 'currentcolor', height: '1rem', width: '1rem' }}\n viewBox=\"0 0 16 16\"\n width=\"16\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M7.157 0L2.333 9.408l-.56 1.092H7a.25.25 0 01.25.25V16h1.593l4.824-9.408.56-1.092H9a.25.25 0 01-.25-.25V0H7.157zM7 9H4.227L7.25 3.106V5.25C7.25 6.216 8.034 7 9 7h2.773L8.75 12.894V10.75A1.75 1.75 0 007 9z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n )\n}\n"],"names":["Lightning","svg","data-testid","height","strokeLinejoin","style","color","width","viewBox","path","clipRule","d","fill","fillRule"],"mappings":";AAAA,OAAO,SAASA;IACd,qBACE,KAACC;QACCC,eAAY;QACZC,QAAO;QACPC,gBAAe;QACfC,OAAO;YAAEC,OAAO;YAAgBH,QAAQ;YAAQI,OAAO;QAAO;QAC9DC,SAAQ;QACRD,OAAM;kBAEN,cAAA,KAACE;YACCC,UAAS;YACTC,GAAE;YACFC,MAAK;YACLC,UAAS;;;AAIjB"}
@@ -7,9 +7,8 @@ export const de = {
7
7
  keywordsDescription: 'Schlüsselwörter, die das Bild beschreiben. Wird bei der Suche nach dem Bild verwendet.',
8
8
  // Button labels
9
9
  generateAltText: 'Alternativtext generieren',
10
- generateAltTextFor: 'Alternativtext generieren für',
11
- image: 'Bild',
12
- images: 'Bilder',
10
+ generateAltTextFor_one: 'Alternativtext für {{count}} Bild generieren',
11
+ generateAltTextFor_other: 'Alternativtext für {{count}} Bilder generieren',
13
12
  // Toast messages
14
13
  altTextGeneratedSuccess: 'Alternativtext erfolgreich generiert. Bitte überprüfen und speichern Sie das Dokument.',
15
14
  cannotGenerateMissingFields: 'Alternativtext kann nicht generiert werden. Erforderliche Felder fehlen.',
@@ -29,8 +28,8 @@ export const de = {
29
28
  // Validation messages
30
29
  theAlternateTextIsRequired: 'Der Alternativtext ist erforderlich.',
31
30
  // Dashboard widget
32
- altTextHealthDescription: 'Alternativtext-Abdeckung über alle Upload-Sammlungen.',
33
- altTextHealthWidget: 'Alternativtext',
31
+ altTextHealthDescription: 'Alternativtext Abdeckung in allen Upload-Sammlungen.',
32
+ altTextHealthWidget: 'Alternativtexte',
34
33
  collectionCheckFailed: 'Status nicht verfügbar',
35
34
  healthCheckPartialWarning: 'Einige Sammlungen konnten gerade nicht geprüft werden.',
36
35
  localeCount: '{{count}} Sprachen',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/translations/de.ts"],"sourcesContent":["import type { GenericTranslationsObject } from './index.js'\n\nexport const de: GenericTranslationsObject = {\n $schema: './translation-schema.json',\n '@jhb.software/payload-alt-text-plugin': {\n // Field labels\n alternateText: 'Alternativtext',\n keywords: 'Schlüsselwörter',\n keywordsDescription:\n 'Schlüsselwörter, die das Bild beschreiben. Wird bei der Suche nach dem Bild verwendet.',\n\n // Button labels\n generateAltText: 'Alternativtext generieren',\n generateAltTextFor: 'Alternativtext generieren für',\n image: 'Bild',\n images: 'Bilder',\n\n // Toast messages\n altTextGeneratedSuccess:\n 'Alternativtext erfolgreich generiert. Bitte überprüfen und speichern Sie das Dokument.',\n cannotGenerateMissingFields:\n 'Alternativtext kann nicht generiert werden. Erforderliche Felder fehlen.',\n errorGeneratingAltText:\n 'Fehler beim Generieren des Alternativtextes. Bitte versuchen Sie es erneut.',\n failedToGenerate:\n 'Generierung des Alternativtextes fehlgeschlagen. Bitte versuchen Sie es erneut.',\n failedToGenerateForXImages:\n 'Generierung des Alternativtextes für {{count}} Bilder fehlgeschlagen.',\n noAltTextGenerated: 'Kein Alternativtext generiert. Bitte versuchen Sie es erneut.',\n xOfYImagesUpdated: '{{updated}} von {{total}} Bildern aktualisiert.',\n\n // Help text\n altTextDescription:\n 'Alternativtext für das Bild. Dieser wird für Screenreader und SEO verwendet. Er sollte die folgenden Anforderungen erfüllen:',\n altTextRequirement1: 'Beschreibt in 1-2 Sätzen, was auf dem Bild zu sehen ist.',\n altTextRequirement2:\n 'Sollte möglichst die gleichen Informationen oder den gleichen Zweck wie das Bild vermitteln.',\n altTextRequirement3:\n 'Phrasen wie \"Bild von\" oder \"Foto von\" sind überflüssig, da Screenreader bereits anzeigen, dass es sich um ein Bild handelt.',\n\n // Tooltips\n pleaseSaveDocumentFirst: 'Bitte speichern Sie zuerst das Dokument',\n unsupportedMimeType:\n 'Alternativtext-Generierung wird für {{mimeType}}-Dateien nicht unterstützt',\n\n // Validation messages\n theAlternateTextIsRequired: 'Der Alternativtext ist erforderlich.',\n\n // Dashboard widget\n altTextHealthDescription: 'Alternativtext-Abdeckung über alle Upload-Sammlungen.',\n altTextHealthWidget: 'Alternativtext',\n collectionCheckFailed: 'Status nicht verfügbar',\n healthCheckPartialWarning: 'Einige Sammlungen konnten gerade nicht geprüft werden.',\n localeCount: '{{count}} Sprachen',\n noImagesFound: 'In den konfigurierten Sammlungen wurden noch keine Bilder gefunden.',\n statusHealthy: 'Alle vorhanden',\n statusUnhealthy: '{{count}} fehlend',\n totalImageCount: '{{count}} Bilder',\n },\n}\n"],"names":["de","$schema","alternateText","keywords","keywordsDescription","generateAltText","generateAltTextFor","image","images","altTextGeneratedSuccess","cannotGenerateMissingFields","errorGeneratingAltText","failedToGenerate","failedToGenerateForXImages","noAltTextGenerated","xOfYImagesUpdated","altTextDescription","altTextRequirement1","altTextRequirement2","altTextRequirement3","pleaseSaveDocumentFirst","unsupportedMimeType","theAlternateTextIsRequired","altTextHealthDescription","altTextHealthWidget","collectionCheckFailed","healthCheckPartialWarning","localeCount","noImagesFound","statusHealthy","statusUnhealthy","totalImageCount"],"mappings":"AAEA,OAAO,MAAMA,KAAgC;IAC3CC,SAAS;IACT,yCAAyC;QACvC,eAAe;QACfC,eAAe;QACfC,UAAU;QACVC,qBACE;QAEF,gBAAgB;QAChBC,iBAAiB;QACjBC,oBAAoB;QACpBC,OAAO;QACPC,QAAQ;QAER,iBAAiB;QACjBC,yBACE;QACFC,6BACE;QACFC,wBACE;QACFC,kBACE;QACFC,4BACE;QACFC,oBAAoB;QACpBC,mBAAmB;QAEnB,YAAY;QACZC,oBACE;QACFC,qBAAqB;QACrBC,qBACE;QACFC,qBACE;QAEF,WAAW;QACXC,yBAAyB;QACzBC,qBACE;QAEF,sBAAsB;QACtBC,4BAA4B;QAE5B,mBAAmB;QACnBC,0BAA0B;QAC1BC,qBAAqB;QACrBC,uBAAuB;QACvBC,2BAA2B;QAC3BC,aAAa;QACbC,eAAe;QACfC,eAAe;QACfC,iBAAiB;QACjBC,iBAAiB;IACnB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../src/translations/de.ts"],"sourcesContent":["import type { GenericTranslationsObject } from './index.js'\n\nexport const de: GenericTranslationsObject = {\n $schema: './translation-schema.json',\n '@jhb.software/payload-alt-text-plugin': {\n // Field labels\n alternateText: 'Alternativtext',\n keywords: 'Schlüsselwörter',\n keywordsDescription:\n 'Schlüsselwörter, die das Bild beschreiben. Wird bei der Suche nach dem Bild verwendet.',\n\n // Button labels\n generateAltText: 'Alternativtext generieren',\n generateAltTextFor_one: 'Alternativtext für {{count}} Bild generieren',\n generateAltTextFor_other: 'Alternativtext für {{count}} Bilder generieren',\n\n // Toast messages\n altTextGeneratedSuccess:\n 'Alternativtext erfolgreich generiert. Bitte überprüfen und speichern Sie das Dokument.',\n cannotGenerateMissingFields:\n 'Alternativtext kann nicht generiert werden. Erforderliche Felder fehlen.',\n errorGeneratingAltText:\n 'Fehler beim Generieren des Alternativtextes. Bitte versuchen Sie es erneut.',\n failedToGenerate:\n 'Generierung des Alternativtextes fehlgeschlagen. Bitte versuchen Sie es erneut.',\n failedToGenerateForXImages:\n 'Generierung des Alternativtextes für {{count}} Bilder fehlgeschlagen.',\n noAltTextGenerated: 'Kein Alternativtext generiert. Bitte versuchen Sie es erneut.',\n xOfYImagesUpdated: '{{updated}} von {{total}} Bildern aktualisiert.',\n\n // Help text\n altTextDescription:\n 'Alternativtext für das Bild. Dieser wird für Screenreader und SEO verwendet. Er sollte die folgenden Anforderungen erfüllen:',\n altTextRequirement1: 'Beschreibt in 1-2 Sätzen, was auf dem Bild zu sehen ist.',\n altTextRequirement2:\n 'Sollte möglichst die gleichen Informationen oder den gleichen Zweck wie das Bild vermitteln.',\n altTextRequirement3:\n 'Phrasen wie \"Bild von\" oder \"Foto von\" sind überflüssig, da Screenreader bereits anzeigen, dass es sich um ein Bild handelt.',\n\n // Tooltips\n pleaseSaveDocumentFirst: 'Bitte speichern Sie zuerst das Dokument',\n unsupportedMimeType:\n 'Alternativtext-Generierung wird für {{mimeType}}-Dateien nicht unterstützt',\n\n // Validation messages\n theAlternateTextIsRequired: 'Der Alternativtext ist erforderlich.',\n\n // Dashboard widget\n altTextHealthDescription: 'Alternativtext Abdeckung in allen Upload-Sammlungen.',\n altTextHealthWidget: 'Alternativtexte',\n collectionCheckFailed: 'Status nicht verfügbar',\n healthCheckPartialWarning: 'Einige Sammlungen konnten gerade nicht geprüft werden.',\n localeCount: '{{count}} Sprachen',\n noImagesFound: 'In den konfigurierten Sammlungen wurden noch keine Bilder gefunden.',\n statusHealthy: 'Alle vorhanden',\n statusUnhealthy: '{{count}} fehlend',\n totalImageCount: '{{count}} Bilder',\n },\n}\n"],"names":["de","$schema","alternateText","keywords","keywordsDescription","generateAltText","generateAltTextFor_one","generateAltTextFor_other","altTextGeneratedSuccess","cannotGenerateMissingFields","errorGeneratingAltText","failedToGenerate","failedToGenerateForXImages","noAltTextGenerated","xOfYImagesUpdated","altTextDescription","altTextRequirement1","altTextRequirement2","altTextRequirement3","pleaseSaveDocumentFirst","unsupportedMimeType","theAlternateTextIsRequired","altTextHealthDescription","altTextHealthWidget","collectionCheckFailed","healthCheckPartialWarning","localeCount","noImagesFound","statusHealthy","statusUnhealthy","totalImageCount"],"mappings":"AAEA,OAAO,MAAMA,KAAgC;IAC3CC,SAAS;IACT,yCAAyC;QACvC,eAAe;QACfC,eAAe;QACfC,UAAU;QACVC,qBACE;QAEF,gBAAgB;QAChBC,iBAAiB;QACjBC,wBAAwB;QACxBC,0BAA0B;QAE1B,iBAAiB;QACjBC,yBACE;QACFC,6BACE;QACFC,wBACE;QACFC,kBACE;QACFC,4BACE;QACFC,oBAAoB;QACpBC,mBAAmB;QAEnB,YAAY;QACZC,oBACE;QACFC,qBAAqB;QACrBC,qBACE;QACFC,qBACE;QAEF,WAAW;QACXC,yBAAyB;QACzBC,qBACE;QAEF,sBAAsB;QACtBC,4BAA4B;QAE5B,mBAAmB;QACnBC,0BAA0B;QAC1BC,qBAAqB;QACrBC,uBAAuB;QACvBC,2BAA2B;QAC3BC,aAAa;QACbC,eAAe;QACfC,eAAe;QACfC,iBAAiB;QACjBC,iBAAiB;IACnB;AACF,EAAC"}
@@ -7,9 +7,8 @@ export const en = {
7
7
  keywordsDescription: 'Keywords which describe the image. Used when searching for the image.',
8
8
  // Button labels
9
9
  generateAltText: 'Generate alt text',
10
- generateAltTextFor: 'Generate alt text for',
11
- image: 'image',
12
- images: 'images',
10
+ generateAltTextFor_one: 'Generate alt text for {{count}} image',
11
+ generateAltTextFor_other: 'Generate alt text for {{count}} images',
13
12
  // Toast messages
14
13
  altTextGeneratedSuccess: 'Alt text generated successfully. Please review and save the document.',
15
14
  cannotGenerateMissingFields: 'Cannot generate alt text. Missing required fields.',
@@ -30,7 +29,7 @@ export const en = {
30
29
  theAlternateTextIsRequired: 'An alternate text is required.',
31
30
  // Dashboard widget
32
31
  altTextHealthDescription: 'Alt text coverage across upload collections.',
33
- altTextHealthWidget: 'Alt Text',
32
+ altTextHealthWidget: 'Alt Texts',
34
33
  collectionCheckFailed: 'Status unavailable',
35
34
  healthCheckPartialWarning: 'Some collections could not be checked right now.',
36
35
  localeCount: '{{count}} locales',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/translations/en.ts"],"sourcesContent":["import type { GenericTranslationsObject } from './index.js'\n\nexport const en: GenericTranslationsObject = {\n $schema: './translation-schema.json',\n '@jhb.software/payload-alt-text-plugin': {\n // Field labels\n alternateText: 'Alternate text',\n keywords: 'Keywords',\n keywordsDescription: 'Keywords which describe the image. Used when searching for the image.',\n\n // Button labels\n generateAltText: 'Generate alt text',\n generateAltTextFor: 'Generate alt text for',\n image: 'image',\n images: 'images',\n\n // Toast messages\n altTextGeneratedSuccess:\n 'Alt text generated successfully. Please review and save the document.',\n cannotGenerateMissingFields: 'Cannot generate alt text. Missing required fields.',\n errorGeneratingAltText: 'Error generating alt text. Please try again.',\n failedToGenerate: 'Failed to generate alt text. Please try again.',\n failedToGenerateForXImages: 'Failed to generate alt text for {{count}} images.',\n noAltTextGenerated: 'No alt text generated. Please try again.',\n xOfYImagesUpdated: '{{updated}} of {{total}} images updated.',\n\n // Help text\n altTextDescription:\n 'Alternate text for the image. This will be used for screen readers and SEO. It should meet the following requirements:',\n altTextRequirement1: 'Describes in 1-2 sentences, what is visible in the image.',\n altTextRequirement2:\n 'Should convey the same information or purpose as the image, whenever possible.',\n altTextRequirement3:\n 'Phrases like \"image of\" or \"picture of\" are unnecessary, since screen readers already announce that it\\'s an image.',\n\n // Tooltips\n pleaseSaveDocumentFirst: 'Please save the document first',\n unsupportedMimeType: 'Alt text generation is not supported for {{mimeType}} files',\n\n // Validation messages\n theAlternateTextIsRequired: 'An alternate text is required.',\n\n // Dashboard widget\n altTextHealthDescription: 'Alt text coverage across upload collections.',\n altTextHealthWidget: 'Alt Text',\n collectionCheckFailed: 'Status unavailable',\n healthCheckPartialWarning: 'Some collections could not be checked right now.',\n localeCount: '{{count}} locales',\n noImagesFound: 'No images found in the configured collections yet.',\n statusHealthy: 'All set',\n statusUnhealthy: '{{count}} missing',\n totalImageCount: '{{count}} images',\n },\n}\n"],"names":["en","$schema","alternateText","keywords","keywordsDescription","generateAltText","generateAltTextFor","image","images","altTextGeneratedSuccess","cannotGenerateMissingFields","errorGeneratingAltText","failedToGenerate","failedToGenerateForXImages","noAltTextGenerated","xOfYImagesUpdated","altTextDescription","altTextRequirement1","altTextRequirement2","altTextRequirement3","pleaseSaveDocumentFirst","unsupportedMimeType","theAlternateTextIsRequired","altTextHealthDescription","altTextHealthWidget","collectionCheckFailed","healthCheckPartialWarning","localeCount","noImagesFound","statusHealthy","statusUnhealthy","totalImageCount"],"mappings":"AAEA,OAAO,MAAMA,KAAgC;IAC3CC,SAAS;IACT,yCAAyC;QACvC,eAAe;QACfC,eAAe;QACfC,UAAU;QACVC,qBAAqB;QAErB,gBAAgB;QAChBC,iBAAiB;QACjBC,oBAAoB;QACpBC,OAAO;QACPC,QAAQ;QAER,iBAAiB;QACjBC,yBACE;QACFC,6BAA6B;QAC7BC,wBAAwB;QACxBC,kBAAkB;QAClBC,4BAA4B;QAC5BC,oBAAoB;QACpBC,mBAAmB;QAEnB,YAAY;QACZC,oBACE;QACFC,qBAAqB;QACrBC,qBACE;QACFC,qBACE;QAEF,WAAW;QACXC,yBAAyB;QACzBC,qBAAqB;QAErB,sBAAsB;QACtBC,4BAA4B;QAE5B,mBAAmB;QACnBC,0BAA0B;QAC1BC,qBAAqB;QACrBC,uBAAuB;QACvBC,2BAA2B;QAC3BC,aAAa;QACbC,eAAe;QACfC,eAAe;QACfC,iBAAiB;QACjBC,iBAAiB;IACnB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../src/translations/en.ts"],"sourcesContent":["import type { GenericTranslationsObject } from './index.js'\n\nexport const en: GenericTranslationsObject = {\n $schema: './translation-schema.json',\n '@jhb.software/payload-alt-text-plugin': {\n // Field labels\n alternateText: 'Alternate text',\n keywords: 'Keywords',\n keywordsDescription: 'Keywords which describe the image. Used when searching for the image.',\n\n // Button labels\n generateAltText: 'Generate alt text',\n generateAltTextFor_one: 'Generate alt text for {{count}} image',\n generateAltTextFor_other: 'Generate alt text for {{count}} images',\n\n // Toast messages\n altTextGeneratedSuccess:\n 'Alt text generated successfully. Please review and save the document.',\n cannotGenerateMissingFields: 'Cannot generate alt text. Missing required fields.',\n errorGeneratingAltText: 'Error generating alt text. Please try again.',\n failedToGenerate: 'Failed to generate alt text. Please try again.',\n failedToGenerateForXImages: 'Failed to generate alt text for {{count}} images.',\n noAltTextGenerated: 'No alt text generated. Please try again.',\n xOfYImagesUpdated: '{{updated}} of {{total}} images updated.',\n\n // Help text\n altTextDescription:\n 'Alternate text for the image. This will be used for screen readers and SEO. It should meet the following requirements:',\n altTextRequirement1: 'Describes in 1-2 sentences, what is visible in the image.',\n altTextRequirement2:\n 'Should convey the same information or purpose as the image, whenever possible.',\n altTextRequirement3:\n 'Phrases like \"image of\" or \"picture of\" are unnecessary, since screen readers already announce that it\\'s an image.',\n\n // Tooltips\n pleaseSaveDocumentFirst: 'Please save the document first',\n unsupportedMimeType: 'Alt text generation is not supported for {{mimeType}} files',\n\n // Validation messages\n theAlternateTextIsRequired: 'An alternate text is required.',\n\n // Dashboard widget\n altTextHealthDescription: 'Alt text coverage across upload collections.',\n altTextHealthWidget: 'Alt Texts',\n collectionCheckFailed: 'Status unavailable',\n healthCheckPartialWarning: 'Some collections could not be checked right now.',\n localeCount: '{{count}} locales',\n noImagesFound: 'No images found in the configured collections yet.',\n statusHealthy: 'All set',\n statusUnhealthy: '{{count}} missing',\n totalImageCount: '{{count}} images',\n },\n}\n"],"names":["en","$schema","alternateText","keywords","keywordsDescription","generateAltText","generateAltTextFor_one","generateAltTextFor_other","altTextGeneratedSuccess","cannotGenerateMissingFields","errorGeneratingAltText","failedToGenerate","failedToGenerateForXImages","noAltTextGenerated","xOfYImagesUpdated","altTextDescription","altTextRequirement1","altTextRequirement2","altTextRequirement3","pleaseSaveDocumentFirst","unsupportedMimeType","theAlternateTextIsRequired","altTextHealthDescription","altTextHealthWidget","collectionCheckFailed","healthCheckPartialWarning","localeCount","noImagesFound","statusHealthy","statusUnhealthy","totalImageCount"],"mappings":"AAEA,OAAO,MAAMA,KAAgC;IAC3CC,SAAS;IACT,yCAAyC;QACvC,eAAe;QACfC,eAAe;QACfC,UAAU;QACVC,qBAAqB;QAErB,gBAAgB;QAChBC,iBAAiB;QACjBC,wBAAwB;QACxBC,0BAA0B;QAE1B,iBAAiB;QACjBC,yBACE;QACFC,6BAA6B;QAC7BC,wBAAwB;QACxBC,kBAAkB;QAClBC,4BAA4B;QAC5BC,oBAAoB;QACpBC,mBAAmB;QAEnB,YAAY;QACZC,oBACE;QACFC,qBAAqB;QACrBC,qBACE;QACFC,qBACE;QAEF,WAAW;QACXC,yBAAyB;QACzBC,qBAAqB;QAErB,sBAAsB;QACtBC,4BAA4B;QAE5B,mBAAmB;QACnBC,0BAA0B;QAC1BC,qBAAqB;QACrBC,uBAAuB;QACvBC,2BAA2B;QAC3BC,aAAa;QACbC,eAAe;QACfC,eAAe;QACfC,iBAAiB;QACjBC,iBAAiB;IACnB;AACF,EAAC"}
@@ -19,10 +19,9 @@
19
19
  "failedToGenerate": { "type": "string" },
20
20
  "failedToGenerateForXImages": { "type": "string" },
21
21
  "generateAltText": { "type": "string" },
22
- "generateAltTextFor": { "type": "string" },
22
+ "generateAltTextFor_one": { "type": "string" },
23
+ "generateAltTextFor_other": { "type": "string" },
23
24
  "healthCheckPartialWarning": { "type": "string" },
24
- "image": { "type": "string" },
25
- "images": { "type": "string" },
26
25
  "keywords": { "type": "string" },
27
26
  "localeCount": { "type": "string" },
28
27
  "keywordsDescription": { "type": "string" },
@@ -50,10 +49,9 @@
50
49
  "failedToGenerate",
51
50
  "failedToGenerateForXImages",
52
51
  "generateAltText",
53
- "generateAltTextFor",
52
+ "generateAltTextFor_one",
53
+ "generateAltTextFor_other",
54
54
  "healthCheckPartialWarning",
55
- "image",
56
- "images",
57
55
  "keywords",
58
56
  "keywordsDescription",
59
57
  "localeCount",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jhb.software/payload-alt-text-plugin",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "A Payload CMS plugin that adds AI-powered alt text generation for images.",
5
5
  "bugs": "https://github.com/jhb-software/payload-plugins/issues",
6
6
  "repository": "https://github.com/jhb-software/payload-plugins",