@manifest-editor/specifications 2.0.3-next.0.3782be7
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/LICENSE +21 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +19 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 digirati-co-uk
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,`__esModule`,{value:!0});let e=require(`@manifest-editor/components`),t=require(`@manifest-editor/shell`),n=require(`react`),r=require(`react/jsx-runtime`);var i={id:`@manifest-editor/specifications`,label:`Specifications`,description:`Review project specifications and required Manifest work.`,author:`Digirati`,official:!0,defaultEnabled:!1,tags:[`specifications`,`guidance`,`validation`],supports:{projectTypes:[`Manifest`]}};const a=[{id:`manifest-specifications`,label:`Specifications`,icon:(0,r.jsx)(o,{}),render:()=>(0,r.jsx)(s,{})}];function o(e){return(0,r.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:(0,r.jsx)(`path`,{fill:`currentColor`,d:`M6 22q-.825 0-1.412-.587T4 20V4q0-.825.588-1.412T6 2h9l5 5v13q0 .825-.587 1.413T18 22zm8-14V4H6v16h12V8zm-6 4h8v-2H8zm0 4h8v-2H8zm0-8h4V6H8z`})})}function s(){let i=(0,t.useSpecifications)(),a=(0,t.useSpecificationReport)(),o=(0,t.useLayoutActions)(),s=(0,t.useAppResource)(),c=u(s),[l,f]=(0,n.useState)(`current`),[S,C]=(0,n.useState)(`all`),[w,T]=(0,n.useState)(`all`),[E,D]=(0,n.useState)(!1),O=(0,n.useMemo)(()=>a.results.filter(e=>d(e,c,s)),[a.results,c.id,c.type,s.id,s.type]),k=l===`current`?O:a.results,A=(0,n.useMemo)(()=>k.filter(e=>p(e,{ruleTypeFilter:S,statusFilter:w,hideCompleted:E})),[k,S,w,E]),j=(0,n.useMemo)(()=>h(k),[k]),M=k.filter(m).length,N=(0,n.useMemo)(()=>g(k),[k]),P=(0,n.useMemo)(()=>_(k,w),[k,w]),F=S!==`all`||w!==`all`||E,I=[{key:`current`,label:`Current resource`,count:O.length,title:`Current ${c.type.toLowerCase()}`},{key:`all`,label:`All rules`,count:a.results.length}];function L(){C(`all`),T(`all`),D(!1)}function R(e){let t=e.editorTarget,n=t?.resource||e.target;n&&(n.type===`Canvas`&&o.open(`current-canvas`),o.edit(n,void 0,{forceOpen:!0,selectedTab:t?.selectedTab,property:t?.propertyPath?.[0]}))}return(0,r.jsxs)(e.Sidebar,{children:[(0,r.jsx)(e.SidebarHeader,{title:`Specifications`}),(0,r.jsx)(e.SidebarContent,{className:`flex min-h-0 flex-col gap-0 p-0`,children:i.length?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(`div`,{className:`flex flex-col gap-3 border-b border-zinc-100 p-3`,children:[(0,r.jsxs)(`div`,{className:`grid grid-cols-3 gap-2 text-center`,children:[(0,r.jsx)(b,{label:`Done`,value:j.satisfied,tone:`success`}),(0,r.jsx)(b,{label:`Open`,value:M,tone:M?`warning`:`success`}),(0,r.jsx)(b,{label:`Skipped`,value:j[`not-applicable`],tone:`neutral`})]}),(0,r.jsxs)(`div`,{className:`rounded border border-gray-200 bg-white p-3 text-sm text-gray-700`,children:[(0,r.jsxs)(`div`,{className:`font-medium text-gray-900`,children:[i.length,` specification`,i.length===1?``:`s`]}),(0,r.jsxs)(`div`,{className:`mt-1`,children:[a.results.length,` rule result`,a.results.length===1?``:`s`,` checked in order.`]})]}),(0,r.jsx)(`div`,{className:`flex flex-col gap-2`,children:i.map(e=>(0,r.jsxs)(`div`,{className:`rounded border border-gray-200 bg-white p-3 text-sm text-gray-700`,children:[(0,r.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,r.jsx)(`div`,{className:`font-medium text-gray-900`,children:e.label}),e.version?(0,r.jsxs)(`span`,{className:`rounded bg-gray-100 px-1.5 py-0.5 text-[11px] text-gray-600`,children:[`v`,e.version]}):null]}),e.description?(0,r.jsx)(`div`,{className:`mt-1 text-gray-600`,children:e.description}):null,(0,r.jsxs)(`div`,{className:`mt-2 text-[11px] text-gray-400`,children:[e.rules.length,` rule`,e.rules.length===1?``:`s`]})]},e.id))}),(0,r.jsxs)(`div`,{className:`grid gap-2`,children:[(0,r.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,r.jsx)(y,{label:`Rule`,value:S,options:N,onChange:e=>C(e)}),(0,r.jsx)(y,{label:`Status`,value:w,options:P,onChange:e=>T(e)})]}),(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,r.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 text-xs text-zinc-600`,children:[(0,r.jsx)(`input`,{className:`h-4 w-4 rounded border-zinc-300 text-me-primary-500 focus:ring-me-primary-500`,type:`checkbox`,checked:E,onChange:e=>D(e.currentTarget.checked)}),`Hide completed items`]}),F?(0,r.jsx)(`button`,{className:`text-xs font-medium text-me-primary-600 hover:underline`,type:`button`,onClick:L,children:`Clear filters`}):null]})]})]}),(0,r.jsx)(`div`,{className:`flex shrink-0 overflow-x-auto border-b border-zinc-100 bg-zinc-50/50`,children:I.map(e=>(0,r.jsxs)(`button`,{type:`button`,className:`flex shrink-0 items-center gap-1 whitespace-nowrap px-3 py-2 text-xs font-medium transition-colors ${l===e.key?`-mb-px border-b-2 border-me-primary-500 text-me-primary-600`:`text-zinc-500 hover:text-zinc-700`}`,title:e.title,onClick:()=>f(e.key),children:[e.label,(0,r.jsx)(`span`,{className:`text-[10px] ${l===e.key?`text-me-primary-400`:`text-zinc-400`}`,children:e.count})]},e.key))}),(0,r.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-3`,children:A.length?(0,r.jsx)(`div`,{className:`flex flex-col gap-2`,children:A.map(e=>(0,r.jsx)(x,{result:e,onOpen:()=>R(e)},e.id))}):(0,r.jsx)(`div`,{className:`px-4 py-8 text-center text-xs text-zinc-400`,children:v({activeScope:l,currentResource:c,scopedResults:k,filtersActive:F})})})]}):(0,r.jsx)(`div`,{className:`m-4 rounded border border-gray-200 bg-white p-3 text-sm text-gray-600`,children:`No specifications are configured for this editor instance. Use the Specification selector in the editor header to choose one.`})})]})}const c={satisfied:0,missing:0,invalid:0,disallowed:0,"not-applicable":0},l={"disallow-property":`Disallowed properties`,"require-non-empty":`Required fields`,"fixed-value":`Fixed values`,"iiif:canvas-with-image-service":`Image service canvas`,"iiif:thumbnail-from-body-service":`Thumbnail source`,"iiif:valid-rights":`Rights`,"iiif:required-statement":`Required statement`,"iiif:metadata-template":`Metadata template`};function u(e){let r=(0,t.useEditingResource)(),i=(0,t.useEditingResourceStack)();return(0,n.useMemo)(()=>{let t=[r,...i].map(e=>e?.resource?.source).filter(e=>!!e?.id&&!!e.type),n=t.find(e=>e.type===`Canvas`),a=t.find(e=>e.type===`Manifest`),o=n||a||e;return{id:o.id,type:o.type}},[r,i,e])}function d(e,t,n){return f(e.target,t)||f(e.editorTarget?.resource,t)?!0:!(e.target||e.editorTarget?.resource)&&f(t,n)}function f(e,t){return!!e&&!!t&&e.id===t.id&&e.type===t.type}function p(e,t){return t.hideCompleted&&e.status===`satisfied`||t.ruleTypeFilter!==`all`&&e.ruleType!==t.ruleTypeFilter?!1:t.statusFilter===`all`?!0:t.statusFilter===`attention`?m(e):e.status===t.statusFilter}function m(e){return e.status!==`satisfied`&&e.status!==`not-applicable`}function h(e){let t={...c};for(let n of e)t[n.status]+=1;return t}function g(e){let t=new Map;for(let n of e)t.set(n.ruleType,(t.get(n.ruleType)||0)+1);return[{value:`all`,label:`All rule types`,count:e.length},...Object.entries(l).map(([e,n])=>({value:e,label:n,count:t.get(e)||0})).filter(e=>e.count>0)]}function _(e,t){let n=h(e);return[{value:`all`,label:`All statuses`,count:e.length},{value:`attention`,label:`Needs work`,count:e.filter(m).length},{value:`missing`,label:`Missing`,count:n.missing},{value:`invalid`,label:`Invalid`,count:n.invalid},{value:`disallowed`,label:`Disallowed`,count:n.disallowed},{value:`satisfied`,label:`Done`,count:n.satisfied},{value:`not-applicable`,label:`Skipped`,count:n[`not-applicable`]}].filter(e=>e.value===`all`||e.value===t||e.count>0)}function v({activeScope:e,currentResource:t,scopedResults:n,filtersActive:r}){return r?`No rules match these filters.`:n.length===0&&e===`current`?`No rules target the current ${t.type.toLowerCase()}.`:`No rule results found.`}function y({label:e,value:t,options:n,onChange:i}){return(0,r.jsxs)(`label`,{className:`grid gap-1`,children:[(0,r.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-wide text-zinc-400`,children:e}),(0,r.jsx)(`select`,{className:`min-w-0 rounded border border-zinc-200 bg-white px-2 py-[5px] text-xs text-zinc-700 focus:border-me-primary-500 focus:outline-none focus:ring-2 focus:ring-me-primary-500/20`,value:t,onChange:e=>i(e.target.value),children:n.map(e=>(0,r.jsxs)(`option`,{value:e.value,children:[e.label,` (`,e.count,`)`]},e.value))})]})}function b({label:e,value:t,tone:n}){return(0,r.jsxs)(`div`,{className:`rounded border p-2 ${n===`success`?`border-green-200 bg-green-50 text-green-900`:n===`warning`?`border-amber-200 bg-amber-50 text-amber-900`:`border-gray-200 bg-gray-50 text-gray-800`}`,children:[(0,r.jsx)(`div`,{className:`text-lg font-semibold`,children:t}),(0,r.jsx)(`div`,{className:`text-xs`,children:e})]})}function x({result:e,onOpen:t}){return(0,r.jsxs)(`div`,{className:`rounded border border-gray-200 bg-white p-3 text-sm`,children:[(0,r.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,r.jsx)(`span`,{className:`rounded px-2 py-0.5 text-xs font-medium capitalize ${S(e.status)}`,children:e.status.replace(`-`,` `)}),(0,r.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,r.jsx)(`div`,{className:`font-medium text-gray-900`,children:e.ruleLabel}),(0,r.jsx)(`div`,{className:`mt-1 text-gray-600`,children:e.message}),(0,r.jsx)(`div`,{className:`mt-1 truncate text-[11px] text-gray-400`,children:e.specificationLabel})]})]}),e.editorTarget||e.target?(0,r.jsx)(`button`,{className:`mt-3 text-sm font-medium text-me-primary-600 hover:underline`,type:`button`,onClick:t,children:`Open field`}):null]})}function S(e){switch(e){case`satisfied`:return`bg-green-100 text-green-800`;case`missing`:return`bg-amber-100 text-amber-800`;case`invalid`:case`disallowed`:return`bg-red-100 text-red-800`;case`not-applicable`:return`bg-gray-100 text-gray-700`}}exports.default=i,exports.leftPanels=a;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LayoutPanel } from "@manifest-editor/shell";
|
|
2
|
+
|
|
3
|
+
//#region src/index.d.ts
|
|
4
|
+
declare const _default: {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
description: string;
|
|
8
|
+
author: string;
|
|
9
|
+
official: true;
|
|
10
|
+
defaultEnabled: false;
|
|
11
|
+
tags: string[];
|
|
12
|
+
supports: {
|
|
13
|
+
projectTypes: "Manifest"[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
declare const leftPanels: LayoutPanel[];
|
|
17
|
+
//#endregion
|
|
18
|
+
export { _default as default, leftPanels };
|
|
19
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;cAgBgC;;EAAA,KAAA,EAAA,MAAA;EAgBnB,WAAA,EAOZ,MAAA;;;;;;;;;cAPY,YAAY"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LayoutPanel } from "@manifest-editor/shell";
|
|
2
|
+
|
|
3
|
+
//#region src/index.d.ts
|
|
4
|
+
declare const _default: {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
description: string;
|
|
8
|
+
author: string;
|
|
9
|
+
official: true;
|
|
10
|
+
defaultEnabled: false;
|
|
11
|
+
tags: string[];
|
|
12
|
+
supports: {
|
|
13
|
+
projectTypes: "Manifest"[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
declare const leftPanels: LayoutPanel[];
|
|
17
|
+
//#endregion
|
|
18
|
+
export { _default as default, leftPanels };
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;cAgBgC;;EAAA,KAAA,EAAA,MAAA;EAgBnB,WAAA,EAOZ,MAAA;;;;;;;;;cAPY,YAAY"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Sidebar as e,SidebarContent as t,SidebarHeader as n}from"@manifest-editor/components";import{useAppResource as r,useEditingResource as i,useEditingResourceStack as a,useLayoutActions as o,useSpecificationReport as s,useSpecifications as c}from"@manifest-editor/shell";import{useMemo as l,useState as u}from"react";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";var m={id:`@manifest-editor/specifications`,label:`Specifications`,description:`Review project specifications and required Manifest work.`,author:`Digirati`,official:!0,defaultEnabled:!1,tags:[`specifications`,`guidance`,`validation`],supports:{projectTypes:[`Manifest`]}};const h=[{id:`manifest-specifications`,label:`Specifications`,icon:f(g,{}),render:()=>f(_,{})}];function g(e){return f(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:f(`path`,{fill:`currentColor`,d:`M6 22q-.825 0-1.412-.587T4 20V4q0-.825.588-1.412T6 2h9l5 5v13q0 .825-.587 1.413T18 22zm8-14V4H6v16h12V8zm-6 4h8v-2H8zm0 4h8v-2H8zm0-8h4V6H8z`})})}function _(){let i=c(),a=s(),m=o(),h=r(),g=b(h),[_,v]=u(`current`),[y,S]=u(`all`),[M,N]=u(`all`),[P,F]=u(!1),I=l(()=>a.results.filter(e=>x(e,g,h)),[a.results,g.id,g.type,h.id,h.type]),L=_===`current`?I:a.results,R=l(()=>L.filter(e=>C(e,{ruleTypeFilter:y,statusFilter:M,hideCompleted:P})),[L,y,M,P]),z=l(()=>T(L),[L]),B=L.filter(w).length,V=l(()=>E(L),[L]),H=l(()=>D(L,M),[L,M]),U=y!==`all`||M!==`all`||P,W=[{key:`current`,label:`Current resource`,count:I.length,title:`Current ${g.type.toLowerCase()}`},{key:`all`,label:`All rules`,count:a.results.length}];function G(){S(`all`),N(`all`),F(!1)}function K(e){let t=e.editorTarget,n=t?.resource||e.target;n&&(n.type===`Canvas`&&m.open(`current-canvas`),m.edit(n,void 0,{forceOpen:!0,selectedTab:t?.selectedTab,property:t?.propertyPath?.[0]}))}return p(e,{children:[f(n,{title:`Specifications`}),f(t,{className:`flex min-h-0 flex-col gap-0 p-0`,children:i.length?p(d,{children:[p(`div`,{className:`flex flex-col gap-3 border-b border-zinc-100 p-3`,children:[p(`div`,{className:`grid grid-cols-3 gap-2 text-center`,children:[f(A,{label:`Done`,value:z.satisfied,tone:`success`}),f(A,{label:`Open`,value:B,tone:B?`warning`:`success`}),f(A,{label:`Skipped`,value:z[`not-applicable`],tone:`neutral`})]}),p(`div`,{className:`rounded border border-gray-200 bg-white p-3 text-sm text-gray-700`,children:[p(`div`,{className:`font-medium text-gray-900`,children:[i.length,` specification`,i.length===1?``:`s`]}),p(`div`,{className:`mt-1`,children:[a.results.length,` rule result`,a.results.length===1?``:`s`,` checked in order.`]})]}),f(`div`,{className:`flex flex-col gap-2`,children:i.map(e=>p(`div`,{className:`rounded border border-gray-200 bg-white p-3 text-sm text-gray-700`,children:[p(`div`,{className:`flex items-start justify-between gap-3`,children:[f(`div`,{className:`font-medium text-gray-900`,children:e.label}),e.version?p(`span`,{className:`rounded bg-gray-100 px-1.5 py-0.5 text-[11px] text-gray-600`,children:[`v`,e.version]}):null]}),e.description?f(`div`,{className:`mt-1 text-gray-600`,children:e.description}):null,p(`div`,{className:`mt-2 text-[11px] text-gray-400`,children:[e.rules.length,` rule`,e.rules.length===1?``:`s`]})]},e.id))}),p(`div`,{className:`grid gap-2`,children:[p(`div`,{className:`grid grid-cols-2 gap-2`,children:[f(k,{label:`Rule`,value:y,options:V,onChange:e=>S(e)}),f(k,{label:`Status`,value:M,options:H,onChange:e=>N(e)})]}),p(`div`,{className:`flex items-center justify-between gap-2`,children:[p(`label`,{className:`flex cursor-pointer items-center gap-2 text-xs text-zinc-600`,children:[f(`input`,{className:`h-4 w-4 rounded border-zinc-300 text-me-primary-500 focus:ring-me-primary-500`,type:`checkbox`,checked:P,onChange:e=>F(e.currentTarget.checked)}),`Hide completed items`]}),U?f(`button`,{className:`text-xs font-medium text-me-primary-600 hover:underline`,type:`button`,onClick:G,children:`Clear filters`}):null]})]})]}),f(`div`,{className:`flex shrink-0 overflow-x-auto border-b border-zinc-100 bg-zinc-50/50`,children:W.map(e=>p(`button`,{type:`button`,className:`flex shrink-0 items-center gap-1 whitespace-nowrap px-3 py-2 text-xs font-medium transition-colors ${_===e.key?`-mb-px border-b-2 border-me-primary-500 text-me-primary-600`:`text-zinc-500 hover:text-zinc-700`}`,title:e.title,onClick:()=>v(e.key),children:[e.label,f(`span`,{className:`text-[10px] ${_===e.key?`text-me-primary-400`:`text-zinc-400`}`,children:e.count})]},e.key))}),f(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-3`,children:R.length?f(`div`,{className:`flex flex-col gap-2`,children:R.map(e=>f(j,{result:e,onOpen:()=>K(e)},e.id))}):f(`div`,{className:`px-4 py-8 text-center text-xs text-zinc-400`,children:O({activeScope:_,currentResource:g,scopedResults:L,filtersActive:U})})})]}):f(`div`,{className:`m-4 rounded border border-gray-200 bg-white p-3 text-sm text-gray-600`,children:`No specifications are configured for this editor instance. Use the Specification selector in the editor header to choose one.`})})]})}const v={satisfied:0,missing:0,invalid:0,disallowed:0,"not-applicable":0},y={"disallow-property":`Disallowed properties`,"require-non-empty":`Required fields`,"fixed-value":`Fixed values`,"iiif:canvas-with-image-service":`Image service canvas`,"iiif:thumbnail-from-body-service":`Thumbnail source`,"iiif:valid-rights":`Rights`,"iiif:required-statement":`Required statement`,"iiif:metadata-template":`Metadata template`};function b(e){let t=i(),n=a();return l(()=>{let r=[t,...n].map(e=>e?.resource?.source).filter(e=>!!e?.id&&!!e.type),i=r.find(e=>e.type===`Canvas`),a=r.find(e=>e.type===`Manifest`),o=i||a||e;return{id:o.id,type:o.type}},[t,n,e])}function x(e,t,n){return S(e.target,t)||S(e.editorTarget?.resource,t)?!0:!(e.target||e.editorTarget?.resource)&&S(t,n)}function S(e,t){return!!e&&!!t&&e.id===t.id&&e.type===t.type}function C(e,t){return t.hideCompleted&&e.status===`satisfied`||t.ruleTypeFilter!==`all`&&e.ruleType!==t.ruleTypeFilter?!1:t.statusFilter===`all`?!0:t.statusFilter===`attention`?w(e):e.status===t.statusFilter}function w(e){return e.status!==`satisfied`&&e.status!==`not-applicable`}function T(e){let t={...v};for(let n of e)t[n.status]+=1;return t}function E(e){let t=new Map;for(let n of e)t.set(n.ruleType,(t.get(n.ruleType)||0)+1);return[{value:`all`,label:`All rule types`,count:e.length},...Object.entries(y).map(([e,n])=>({value:e,label:n,count:t.get(e)||0})).filter(e=>e.count>0)]}function D(e,t){let n=T(e);return[{value:`all`,label:`All statuses`,count:e.length},{value:`attention`,label:`Needs work`,count:e.filter(w).length},{value:`missing`,label:`Missing`,count:n.missing},{value:`invalid`,label:`Invalid`,count:n.invalid},{value:`disallowed`,label:`Disallowed`,count:n.disallowed},{value:`satisfied`,label:`Done`,count:n.satisfied},{value:`not-applicable`,label:`Skipped`,count:n[`not-applicable`]}].filter(e=>e.value===`all`||e.value===t||e.count>0)}function O({activeScope:e,currentResource:t,scopedResults:n,filtersActive:r}){return r?`No rules match these filters.`:n.length===0&&e===`current`?`No rules target the current ${t.type.toLowerCase()}.`:`No rule results found.`}function k({label:e,value:t,options:n,onChange:r}){return p(`label`,{className:`grid gap-1`,children:[f(`span`,{className:`text-[10px] font-medium uppercase tracking-wide text-zinc-400`,children:e}),f(`select`,{className:`min-w-0 rounded border border-zinc-200 bg-white px-2 py-[5px] text-xs text-zinc-700 focus:border-me-primary-500 focus:outline-none focus:ring-2 focus:ring-me-primary-500/20`,value:t,onChange:e=>r(e.target.value),children:n.map(e=>p(`option`,{value:e.value,children:[e.label,` (`,e.count,`)`]},e.value))})]})}function A({label:e,value:t,tone:n}){return p(`div`,{className:`rounded border p-2 ${n===`success`?`border-green-200 bg-green-50 text-green-900`:n===`warning`?`border-amber-200 bg-amber-50 text-amber-900`:`border-gray-200 bg-gray-50 text-gray-800`}`,children:[f(`div`,{className:`text-lg font-semibold`,children:t}),f(`div`,{className:`text-xs`,children:e})]})}function j({result:e,onOpen:t}){return p(`div`,{className:`rounded border border-gray-200 bg-white p-3 text-sm`,children:[p(`div`,{className:`flex items-start gap-2`,children:[f(`span`,{className:`rounded px-2 py-0.5 text-xs font-medium capitalize ${M(e.status)}`,children:e.status.replace(`-`,` `)}),p(`div`,{className:`min-w-0 flex-1`,children:[f(`div`,{className:`font-medium text-gray-900`,children:e.ruleLabel}),f(`div`,{className:`mt-1 text-gray-600`,children:e.message}),f(`div`,{className:`mt-1 truncate text-[11px] text-gray-400`,children:e.specificationLabel})]})]}),e.editorTarget||e.target?f(`button`,{className:`mt-3 text-sm font-medium text-me-primary-600 hover:underline`,type:`button`,onClick:t,children:`Open field`}):null]})}function M(e){switch(e){case`satisfied`:return`bg-green-100 text-green-800`;case`missing`:return`bg-amber-100 text-amber-800`;case`invalid`:case`disallowed`:return`bg-red-100 text-red-800`;case`not-applicable`:return`bg-gray-100 text-gray-700`}}export{m as default,h as leftPanels};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["leftPanels: LayoutPanel[]","scopeTabs: Array<{\n key: ScopeFilter;\n label: string;\n count: number;\n title?: string;\n }>","emptyStatusCounts: Record<SpecificationReportStatus, number>","ruleTypeLabels: Record<SpecificationReportItem[\"ruleType\"], string>"],"sources":["../src/index.tsx"],"sourcesContent":["import {\n Sidebar,\n SidebarContent,\n SidebarHeader,\n} from \"@manifest-editor/components\";\nimport {\n type LayoutPanel,\n type PluginMetadata,\n type SpecificationReportItem,\n type SpecificationReportStatus,\n useAppResource,\n useEditingResource,\n useEditingResourceStack,\n useLayoutActions,\n useSpecificationReport,\n useSpecifications,\n} from \"@manifest-editor/shell\";\nimport { type SVGProps, useMemo, useState } from \"react\";\n\nexport default {\n id: \"@manifest-editor/specifications\",\n label: \"Specifications\",\n description: \"Review project specifications and required Manifest work.\",\n author: \"Digirati\",\n official: true,\n defaultEnabled: false,\n tags: [\"specifications\", \"guidance\", \"validation\"],\n supports: {\n projectTypes: [\"Manifest\"],\n },\n} satisfies PluginMetadata;\n\nexport const leftPanels: LayoutPanel[] = [\n {\n id: \"manifest-specifications\",\n label: \"Specifications\",\n icon: <SpecificationsIcon />,\n render: () => <SpecificationsPanel />,\n },\n];\n\nfunction SpecificationsIcon(props: SVGProps<SVGSVGElement>) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n d=\"M6 22q-.825 0-1.412-.587T4 20V4q0-.825.588-1.412T6 2h9l5 5v13q0 .825-.587 1.413T18 22zm8-14V4H6v16h12V8zm-6 4h8v-2H8zm0 4h8v-2H8zm0-8h4V6H8z\"\n />\n </svg>\n );\n}\n\nfunction SpecificationsPanel() {\n const specifications = useSpecifications();\n const report = useSpecificationReport();\n const actions = useLayoutActions();\n const rootResource = useAppResource() as ResourceReference;\n const currentResource = useCurrentSpecificationResource(rootResource);\n const [activeScope, setActiveScope] = useState<ScopeFilter>(\"current\");\n const [ruleTypeFilter, setRuleTypeFilter] = useState<RuleTypeFilter>(\"all\");\n const [statusFilter, setStatusFilter] = useState<StatusFilter>(\"all\");\n const [hideCompleted, setHideCompleted] = useState(false);\n const currentResourceResults = useMemo(\n () =>\n report.results.filter((result) =>\n resultAppliesToResource(result, currentResource, rootResource),\n ),\n [\n report.results,\n currentResource.id,\n currentResource.type,\n rootResource.id,\n rootResource.type,\n ],\n );\n const scopedResults =\n activeScope === \"current\" ? currentResourceResults : report.results;\n const filteredResults = useMemo(\n () =>\n scopedResults.filter((result) =>\n resultMatchesFilters(result, {\n ruleTypeFilter,\n statusFilter,\n hideCompleted,\n }),\n ),\n [scopedResults, ruleTypeFilter, statusFilter, hideCompleted],\n );\n const scopedCounts = useMemo(\n () => countStatuses(scopedResults),\n [scopedResults],\n );\n const totalActionable = scopedResults.filter(isActionable).length;\n const ruleTypeOptions = useMemo(\n () => createRuleTypeOptions(scopedResults),\n [scopedResults],\n );\n const statusOptions = useMemo(\n () => createStatusOptions(scopedResults, statusFilter),\n [scopedResults, statusFilter],\n );\n const filtersActive =\n ruleTypeFilter !== \"all\" || statusFilter !== \"all\" || hideCompleted;\n const scopeTabs: Array<{\n key: ScopeFilter;\n label: string;\n count: number;\n title?: string;\n }> = [\n {\n key: \"current\",\n label: \"Current resource\",\n count: currentResourceResults.length,\n title: `Current ${currentResource.type.toLowerCase()}`,\n },\n { key: \"all\", label: \"All rules\", count: report.results.length },\n ];\n\n function clearFilters() {\n setRuleTypeFilter(\"all\");\n setStatusFilter(\"all\");\n setHideCompleted(false);\n }\n\n function openResult(result: SpecificationReportItem) {\n const editorTarget = result.editorTarget;\n const resource = editorTarget?.resource || result.target;\n if (!resource) return;\n\n if (resource.type === \"Canvas\") {\n actions.open(\"current-canvas\");\n }\n\n actions.edit(resource, undefined, {\n forceOpen: true,\n selectedTab: editorTarget?.selectedTab,\n property: editorTarget?.propertyPath?.[0],\n });\n }\n\n return (\n <Sidebar>\n <SidebarHeader title=\"Specifications\" />\n <SidebarContent className=\"flex min-h-0 flex-col gap-0 p-0\">\n {!specifications.length ? (\n <div className=\"m-4 rounded border border-gray-200 bg-white p-3 text-sm text-gray-600\">\n No specifications are configured for this editor instance. Use the\n Specification selector in the editor header to choose one.\n </div>\n ) : (\n <>\n <div className=\"flex flex-col gap-3 border-b border-zinc-100 p-3\">\n <div className=\"grid grid-cols-3 gap-2 text-center\">\n <SummaryMetric\n label=\"Done\"\n value={scopedCounts.satisfied}\n tone=\"success\"\n />\n <SummaryMetric\n label=\"Open\"\n value={totalActionable}\n tone={totalActionable ? \"warning\" : \"success\"}\n />\n <SummaryMetric\n label=\"Skipped\"\n value={scopedCounts[\"not-applicable\"]}\n tone=\"neutral\"\n />\n </div>\n\n <div className=\"rounded border border-gray-200 bg-white p-3 text-sm text-gray-700\">\n <div className=\"font-medium text-gray-900\">\n {specifications.length} specification\n {specifications.length === 1 ? \"\" : \"s\"}\n </div>\n <div className=\"mt-1\">\n {report.results.length} rule result\n {report.results.length === 1 ? \"\" : \"s\"} checked in order.\n </div>\n </div>\n\n <div className=\"flex flex-col gap-2\">\n {specifications.map((specification) => (\n <div\n className=\"rounded border border-gray-200 bg-white p-3 text-sm text-gray-700\"\n key={specification.id}\n >\n <div className=\"flex items-start justify-between gap-3\">\n <div className=\"font-medium text-gray-900\">\n {specification.label}\n </div>\n {specification.version ? (\n <span className=\"rounded bg-gray-100 px-1.5 py-0.5 text-[11px] text-gray-600\">\n v{specification.version}\n </span>\n ) : null}\n </div>\n {specification.description ? (\n <div className=\"mt-1 text-gray-600\">\n {specification.description}\n </div>\n ) : null}\n <div className=\"mt-2 text-[11px] text-gray-400\">\n {specification.rules.length} rule\n {specification.rules.length === 1 ? \"\" : \"s\"}\n </div>\n </div>\n ))}\n </div>\n\n <div className=\"grid gap-2\">\n <div className=\"grid grid-cols-2 gap-2\">\n <CompactSelect\n label=\"Rule\"\n value={ruleTypeFilter}\n options={ruleTypeOptions}\n onChange={(value) =>\n setRuleTypeFilter(value as RuleTypeFilter)\n }\n />\n <CompactSelect\n label=\"Status\"\n value={statusFilter}\n options={statusOptions}\n onChange={(value) => setStatusFilter(value as StatusFilter)}\n />\n </div>\n <div className=\"flex items-center justify-between gap-2\">\n <label className=\"flex cursor-pointer items-center gap-2 text-xs text-zinc-600\">\n <input\n className=\"h-4 w-4 rounded border-zinc-300 text-me-primary-500 focus:ring-me-primary-500\"\n type=\"checkbox\"\n checked={hideCompleted}\n onChange={(event) =>\n setHideCompleted(event.currentTarget.checked)\n }\n />\n Hide completed items\n </label>\n {filtersActive ? (\n <button\n className=\"text-xs font-medium text-me-primary-600 hover:underline\"\n type=\"button\"\n onClick={clearFilters}\n >\n Clear filters\n </button>\n ) : null}\n </div>\n </div>\n </div>\n\n <div className=\"flex shrink-0 overflow-x-auto border-b border-zinc-100 bg-zinc-50/50\">\n {scopeTabs.map((tab) => (\n <button\n key={tab.key}\n type=\"button\"\n className={`flex shrink-0 items-center gap-1 whitespace-nowrap px-3 py-2 text-xs font-medium transition-colors ${\n activeScope === tab.key\n ? \"-mb-px border-b-2 border-me-primary-500 text-me-primary-600\"\n : \"text-zinc-500 hover:text-zinc-700\"\n }`}\n title={tab.title}\n onClick={() => setActiveScope(tab.key)}\n >\n {tab.label}\n <span\n className={`text-[10px] ${\n activeScope === tab.key\n ? \"text-me-primary-400\"\n : \"text-zinc-400\"\n }`}\n >\n {tab.count}\n </span>\n </button>\n ))}\n </div>\n\n <div className=\"min-h-0 flex-1 overflow-y-auto p-3\">\n {filteredResults.length ? (\n <div className=\"flex flex-col gap-2\">\n {filteredResults.map((result) => (\n <SpecificationResultCard\n key={result.id}\n result={result}\n onOpen={() => openResult(result)}\n />\n ))}\n </div>\n ) : (\n <div className=\"px-4 py-8 text-center text-xs text-zinc-400\">\n {getEmptyResultsMessage({\n activeScope,\n currentResource,\n scopedResults,\n filtersActive,\n })}\n </div>\n )}\n </div>\n </>\n )}\n </SidebarContent>\n </Sidebar>\n );\n}\n\ntype ScopeFilter = \"current\" | \"all\";\ntype ResourceReference = { id: string; type: string };\ntype RuleTypeFilter = \"all\" | SpecificationReportItem[\"ruleType\"];\ntype StatusFilter = \"all\" | \"attention\" | SpecificationReportStatus;\ntype SelectOption = {\n value: string;\n label: string;\n count: number;\n};\n\nconst emptyStatusCounts: Record<SpecificationReportStatus, number> = {\n satisfied: 0,\n missing: 0,\n invalid: 0,\n disallowed: 0,\n \"not-applicable\": 0,\n};\n\nconst ruleTypeLabels: Record<SpecificationReportItem[\"ruleType\"], string> = {\n \"disallow-property\": \"Disallowed properties\",\n \"require-non-empty\": \"Required fields\",\n \"fixed-value\": \"Fixed values\",\n \"iiif:canvas-with-image-service\": \"Image service canvas\",\n \"iiif:thumbnail-from-body-service\": \"Thumbnail source\",\n \"iiif:valid-rights\": \"Rights\",\n \"iiif:required-statement\": \"Required statement\",\n \"iiif:metadata-template\": \"Metadata template\",\n};\n\nfunction useCurrentSpecificationResource(\n rootResource: ResourceReference,\n): ResourceReference {\n const current = useEditingResource();\n const stack = useEditingResourceStack();\n\n return useMemo(() => {\n const resources = [current, ...stack]\n .map((item) => item?.resource?.source)\n .filter((resource): resource is ResourceReference => {\n return !!resource?.id && !!resource.type;\n });\n const canvas = resources.find((resource) => resource.type === \"Canvas\");\n const manifest = resources.find((resource) => resource.type === \"Manifest\");\n const selected = canvas || manifest || rootResource;\n\n return {\n id: selected.id,\n type: selected.type,\n } as ResourceReference;\n }, [current, stack, rootResource]);\n}\n\nfunction resultAppliesToResource(\n result: SpecificationReportItem,\n resource: ResourceReference,\n rootResource: ResourceReference,\n) {\n if (referencesEqual(result.target, resource)) return true;\n if (referencesEqual(result.editorTarget?.resource, resource)) return true;\n\n const hasSpecificResource = result.target || result.editorTarget?.resource;\n return !hasSpecificResource && referencesEqual(resource, rootResource);\n}\n\nfunction referencesEqual(\n a: ResourceReference | null | undefined,\n b: ResourceReference | null | undefined,\n) {\n return !!a && !!b && a.id === b.id && a.type === b.type;\n}\n\nfunction resultMatchesFilters(\n result: SpecificationReportItem,\n filters: {\n ruleTypeFilter: RuleTypeFilter;\n statusFilter: StatusFilter;\n hideCompleted: boolean;\n },\n) {\n if (filters.hideCompleted && result.status === \"satisfied\") return false;\n if (\n filters.ruleTypeFilter !== \"all\" &&\n result.ruleType !== filters.ruleTypeFilter\n ) {\n return false;\n }\n if (filters.statusFilter === \"all\") return true;\n if (filters.statusFilter === \"attention\") return isActionable(result);\n return result.status === filters.statusFilter;\n}\n\nfunction isActionable(result: SpecificationReportItem) {\n return result.status !== \"satisfied\" && result.status !== \"not-applicable\";\n}\n\nfunction countStatuses(results: SpecificationReportItem[]) {\n const counts = { ...emptyStatusCounts };\n for (const result of results) {\n counts[result.status] += 1;\n }\n return counts;\n}\n\nfunction createRuleTypeOptions(\n results: SpecificationReportItem[],\n): SelectOption[] {\n const counts = new Map<SpecificationReportItem[\"ruleType\"], number>();\n for (const result of results) {\n counts.set(result.ruleType, (counts.get(result.ruleType) || 0) + 1);\n }\n\n return [\n { value: \"all\", label: \"All rule types\", count: results.length },\n ...Object.entries(ruleTypeLabels)\n .map(([value, label]) => ({\n value,\n label,\n count: counts.get(value as SpecificationReportItem[\"ruleType\"]) || 0,\n }))\n .filter((option) => option.count > 0),\n ];\n}\n\nfunction createStatusOptions(\n results: SpecificationReportItem[],\n activeStatus: StatusFilter,\n): SelectOption[] {\n const counts = countStatuses(results);\n const options: SelectOption[] = [\n { value: \"all\", label: \"All statuses\", count: results.length },\n {\n value: \"attention\",\n label: \"Needs work\",\n count: results.filter(isActionable).length,\n },\n { value: \"missing\", label: \"Missing\", count: counts.missing },\n { value: \"invalid\", label: \"Invalid\", count: counts.invalid },\n { value: \"disallowed\", label: \"Disallowed\", count: counts.disallowed },\n { value: \"satisfied\", label: \"Done\", count: counts.satisfied },\n {\n value: \"not-applicable\",\n label: \"Skipped\",\n count: counts[\"not-applicable\"],\n },\n ];\n\n return options.filter(\n (option) =>\n option.value === \"all\" ||\n option.value === activeStatus ||\n option.count > 0,\n );\n}\n\nfunction getEmptyResultsMessage({\n activeScope,\n currentResource,\n scopedResults,\n filtersActive,\n}: {\n activeScope: ScopeFilter;\n currentResource: ResourceReference;\n scopedResults: SpecificationReportItem[];\n filtersActive: boolean;\n}) {\n if (filtersActive) return \"No rules match these filters.\";\n if (scopedResults.length === 0 && activeScope === \"current\") {\n return `No rules target the current ${currentResource.type.toLowerCase()}.`;\n }\n return \"No rule results found.\";\n}\n\nfunction CompactSelect({\n label,\n value,\n options,\n onChange,\n}: {\n label: string;\n value: string;\n options: SelectOption[];\n onChange: (value: string) => void;\n}) {\n return (\n <label className=\"grid gap-1\">\n <span className=\"text-[10px] font-medium uppercase tracking-wide text-zinc-400\">\n {label}\n </span>\n <select\n className=\"min-w-0 rounded border border-zinc-200 bg-white px-2 py-[5px] text-xs text-zinc-700 focus:border-me-primary-500 focus:outline-none focus:ring-2 focus:ring-me-primary-500/20\"\n value={value}\n onChange={(event) => onChange(event.target.value)}\n >\n {options.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label} ({option.count})\n </option>\n ))}\n </select>\n </label>\n );\n}\n\nfunction SummaryMetric({\n label,\n value,\n tone,\n}: {\n label: string;\n value: number;\n tone: \"success\" | \"warning\" | \"neutral\";\n}) {\n const className =\n tone === \"success\"\n ? \"border-green-200 bg-green-50 text-green-900\"\n : tone === \"warning\"\n ? \"border-amber-200 bg-amber-50 text-amber-900\"\n : \"border-gray-200 bg-gray-50 text-gray-800\";\n\n return (\n <div className={`rounded border p-2 ${className}`}>\n <div className=\"text-lg font-semibold\">{value}</div>\n <div className=\"text-xs\">{label}</div>\n </div>\n );\n}\n\nfunction SpecificationResultCard({\n result,\n onOpen,\n}: {\n result: SpecificationReportItem;\n onOpen: () => void;\n}) {\n const badgeClass = getBadgeClass(result.status);\n\n return (\n <div className=\"rounded border border-gray-200 bg-white p-3 text-sm\">\n <div className=\"flex items-start gap-2\">\n <span\n className={`rounded px-2 py-0.5 text-xs font-medium capitalize ${badgeClass}`}\n >\n {result.status.replace(\"-\", \" \")}\n </span>\n <div className=\"min-w-0 flex-1\">\n <div className=\"font-medium text-gray-900\">{result.ruleLabel}</div>\n <div className=\"mt-1 text-gray-600\">{result.message}</div>\n <div className=\"mt-1 truncate text-[11px] text-gray-400\">\n {result.specificationLabel}\n </div>\n </div>\n </div>\n\n {result.editorTarget || result.target ? (\n <button\n className=\"mt-3 text-sm font-medium text-me-primary-600 hover:underline\"\n type=\"button\"\n onClick={onOpen}\n >\n Open field\n </button>\n ) : null}\n </div>\n );\n}\n\nfunction getBadgeClass(status: SpecificationReportItem[\"status\"]) {\n switch (status) {\n case \"satisfied\":\n return \"bg-green-100 text-green-800\";\n case \"missing\":\n return \"bg-amber-100 text-amber-800\";\n case \"invalid\":\n case \"disallowed\":\n return \"bg-red-100 text-red-800\";\n case \"not-applicable\":\n return \"bg-gray-100 text-gray-700\";\n }\n}\n"],"mappings":"iYAmBA,IAAA,EAAe,CACb,GAAI,kCACJ,MAAO,iBACP,YAAa,4DACb,OAAQ,WACR,SAAU,GACV,eAAgB,GAChB,KAAM,CAAC,iBAAkB,WAAY,aAAa,CAClD,SAAU,CACR,aAAc,CAAC,WAAW,CAC3B,CACF,CAED,MAAaA,EAA4B,CACvC,CACE,GAAI,0BACJ,MAAO,iBACP,KAAM,EAAC,EAAA,EAAA,CAAqB,CAC5B,WAAc,EAAC,EAAA,EAAA,CAAsB,CACtC,CACF,CAED,SAAS,EAAmB,EAAgC,CAC1D,OACE,EAAC,MAAA,CACC,MAAM,6BACN,MAAM,MACN,OAAO,MACP,QAAQ,YACR,GAAI,WAEJ,EAAC,OAAA,CACC,KAAK,eACL,EAAE,gJACF,EACE,CAIV,SAAS,GAAsB,CAC7B,IAAM,EAAiB,GAAmB,CACpC,EAAS,GAAwB,CACjC,EAAU,GAAkB,CAC5B,EAAe,GAAgB,CAC/B,EAAkB,EAAgC,EAAa,CAC/D,CAAC,EAAa,GAAkB,EAAsB,UAAU,CAChE,CAAC,EAAgB,GAAqB,EAAyB,MAAM,CACrE,CAAC,EAAc,GAAmB,EAAuB,MAAM,CAC/D,CAAC,EAAe,GAAoB,EAAS,GAAM,CACnD,EAAyB,MAE3B,EAAO,QAAQ,OAAQ,GACrB,EAAwB,EAAQ,EAAiB,EAAa,CAC/D,CACH,CACE,EAAO,QACP,EAAgB,GAChB,EAAgB,KAChB,EAAa,GACb,EAAa,KACd,CACF,CACK,EACJ,IAAgB,UAAY,EAAyB,EAAO,QACxD,EAAkB,MAEpB,EAAc,OAAQ,GACpB,EAAqB,EAAQ,CAC3B,iBACA,eACA,gBACD,CAAC,CACH,CACH,CAAC,EAAe,EAAgB,EAAc,EAAc,CAC7D,CACK,EAAe,MAC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ACP,EAAC,MAAA,CAAI,UAAU,2BACb,EAAC,MAAA,CAAI,UAAU,qCAA6B,EAAO,WAAgB,CACnE,EAAC,MAAA,CAAI,UAAU,8BAAsB,EAAO,SAAc,CAC1D,EAAC,MAAA,CAAI,UAAU,mDACZ,EAAO,oBACJ,GACF,CAAA,EACF,CAEL,EAAO,cAAgB,EAAO,OAC7B,EAAC,SAAA,CACC,UAAU,+DACV,KAAK,SACL,QAAS,WACV,cAEQ,CACP,KAAA,EACA,CAIV,SAAS,EAAc,EAA2C,CAChE,OAAQ,EAAR,CACE,IAAK,YACH,MAAO,8BACT,IAAK,UACH,MAAO,8BACT,IAAK,UACL,IAAK,aACH,MAAO,0BACT,IAAK,iBACH,MAAO"}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@manifest-editor/specifications",
|
|
3
|
+
"version": "2.0.3-next.0.3782be7",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"bugs": "https://github.com/digirati-co-uk/iiif-manifest-editor/issues",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/digirati-co-uk/iiif-manifest-editor.git",
|
|
9
|
+
"directory": "plugins/specifications"
|
|
10
|
+
},
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=18.14.1"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"iiif",
|
|
16
|
+
"editor",
|
|
17
|
+
"specifications"
|
|
18
|
+
],
|
|
19
|
+
"main": "./dist/index.cjs",
|
|
20
|
+
"module": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.cts",
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"import": "./dist/index.js",
|
|
28
|
+
"require": "./dist/index.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./package.json": "./package.json"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsdown",
|
|
34
|
+
"dev": "tsdown --watch",
|
|
35
|
+
"test": "vitest run",
|
|
36
|
+
"typecheck": "tsc --noEmit",
|
|
37
|
+
"prepack": "tsdown --clean"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@manifest-editor/components": "2.0.3-next.0.3782be7",
|
|
41
|
+
"@manifest-editor/shell": "2.0.3-next.0.3782be7",
|
|
42
|
+
"react": "19.2.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@repo/eslint-config": "",
|
|
46
|
+
"@types/react": "^18.3.3",
|
|
47
|
+
"tsdown": "0.16.4",
|
|
48
|
+
"vitest": "v3.0.9"
|
|
49
|
+
},
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public"
|
|
52
|
+
},
|
|
53
|
+
"gitHead": "3782be7716029dff3aa926c572edb251cc35a7f2"
|
|
54
|
+
}
|