New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@samvera/nectar-iiif

Package Overview
Dependencies
Maintainers
4
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@samvera/nectar-iiif - npm Package Compare versions

Comparing version 0.0.6-alpha.6 to 0.0.6-alpha.7

2

dist/hooks/useGetLabel.d.ts
import { InternationalString } from "@iiif/presentation-3";
export declare const useGetLabel: (label: InternationalString, language?: string) => string | never[] | null | undefined;
export declare const useGetLabel: (label: InternationalString, lang?: string) => string | never[] | null | undefined;

@@ -1,2 +0,2 @@

var B=Object.create;var p=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,K=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var v=(t,e,r)=>e in t?p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,l=(t,e)=>{for(var r in e||(e={}))L.call(e,r)&&v(t,r,e[r]);if(h)for(var r of h(e))Q.call(e,r)&&v(t,r,e[r]);return t};var U=(t,e)=>{for(var r in e)p(t,r,{get:e[r],enumerable:!0})},F=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of J(e))!L.call(t,a)&&a!==r&&p(t,a,{get:()=>e[a],enumerable:!(o=D(e,a))||o.enumerable});return t};var n=(t,e,r)=>(r=t!=null?B(K(t)):{},F(e||!t||!t.__esModule?p(r,"default",{value:t,enumerable:!0}):r,t)),X=t=>F(p({},"__esModule",{value:!0}),t);var ct={};U(ct,{Homepage:()=>R,Label:()=>u,Metadata:()=>$,RequiredStatement:()=>j,Summary:()=>H,Thumbnail:()=>P,Value:()=>S});module.exports=X(ct);var b=n(require("react")),N=require("@stitches/react");var c=(t,e="none")=>{var o;if(!t)return null;if(typeof t=="string")return[t];if(!t[e]){let a=Object.getOwnPropertyNames(t);if(a.length>0)return(o=t[a[0]])==null?void 0:o.join(", ")}return!t[e]||!Array.isArray(t[e])?null:t[e].join(", ")};var Y=(0,N.styled)("div",{}),Z=(0,N.styled)("span",{}),_=({as:t="div",children:e,homepage:r,language:o="none"})=>{let a="span";return t!=="div"&&(a="li"),b.default.createElement(Y,{as:t,"data-testid":"nectar-homepage"},r.map(i=>{let s=c(i.label,o);return b.default.createElement(Z,{as:a,key:i.id},b.default.createElement("a",{href:i.id,"aria-label":s},e||s))}))},R=_;var M=n(require("react")),A=require("@stitches/react");var tt=(0,A.styled)("span",{}),et=t=>{let{as:e,label:r,language:o}=t;return M.default.createElement(tt,l({as:e},t),c(r,o))},u=et;var d=n(require("react")),E=require("@stitches/react");var I=n(require("react"));var C=n(require("react"));var rt=({as:t="dd",language:e,value:r})=>C.default.createElement(u,{label:r,as:t,language:e}),S=rt;var at=t=>{let{item:e,language:r}=t,{label:o,value:a}=e;return I.default.createElement("div",{role:"group"},I.default.createElement(u,{as:"dt",label:o,language:r}),I.default.createElement(S,{as:"dd",value:a,language:r}))},x=at;var ot=(0,E.styled)("dl",{}),it=t=>{let{as:e,metadata:r,language:o}=t;if(!Array.isArray(r))return d.default.createElement(d.default.Fragment,null);let a=t;return d.default.createElement(d.default.Fragment,null,r.length>0&&d.default.createElement(ot,l({as:e},a),r.map((i,s)=>d.default.createElement(x,{item:i,key:s,language:o}))))},$=it;var g=n(require("react")),W=require("@stitches/react");var mt=(0,W.styled)("dl",{}),nt=t=>{let{as:e,language:r,requiredStatement:o}=t;return o?g.default.createElement(mt,l({as:e},t),g.default.createElement(x,{item:o,language:r})):g.default.createElement(g.default.Fragment,null)},j=nt;var q=n(require("react"));var st=t=>{let{as:e,summary:r,language:o}=t;return q.default.createElement(u,l({as:e,label:r,language:o},t))},H=st;var y=n(require("react")),O=require("@stitches/react");var m=n(require("react")),w=n(require("clsx")),G=require("@stitches/react");var T=(t,e="200,",r="full")=>{Array.isArray(t)&&(t=t[0]);let{id:o,service:a}=t,i;if(!a)return o;if(Array.isArray(t.service)&&t.service.length>0&&(i=a[0]),i){if(i["@id"])return`${i["@id"]}/${r}/${e}/0/default.jpg`;if(i.id)return`${i.id}/${r}/${e}/0/default.jpg`}};var k=(0,G.styled)("img",{width:"100%",height:"100%",transition:"all 1s cubic-bezier(0.16, 1, 0.3, 1)",opacity:0,["&.loaded"]:{opacity:1}}),lt=({alt:t,resource:e,objectFit:r})=>{let[o,a]=(0,m.useState)(!1),i=(0,m.useRef)(null);(0,m.useEffect)(()=>{i&&i.current&&i.current.complete&&a(!0)},[]);let{type:s,id:f}=e;switch(s){case"Image":let z=T(e);return m.default.createElement(k,{alt:t,src:z,ref:i,as:"img",key:f,style:{objectFit:r},onLoad:()=>a(!0),className:(0,w.default)("source",o&&"loaded")});case"Sound":return m.default.createElement(k,{src:f,as:"video",key:f});default:return console.warn(`Resource type: ${s} is not valid or not yet supported in Nectar.`),m.default.createElement(m.default.Fragment,null)}},V=lt;var ut=(0,O.styled)("div",{}),dt=({altAsLabel:t,language:e,objectFit:r="cover",thumbnail:o})=>{let a=c(t,e);return y.default.createElement(y.default.Fragment,null,o.map(i=>{let{width:s="200",height:f}=i;return y.default.createElement(ut,{key:i.id,style:{width:`${s}px`,height:`${f}px`,backgroundColor:"#c1c8cd"}},y.default.createElement(V,{alt:a,resource:i,objectFit:r}))}))},P=dt;
var B=Object.create;var p=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,K=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var v=(t,e,r)=>e in t?p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,s=(t,e)=>{for(var r in e||(e={}))L.call(e,r)&&v(t,r,e[r]);if(h)for(var r of h(e))Q.call(e,r)&&v(t,r,e[r]);return t};var U=(t,e)=>{for(var r in e)p(t,r,{get:e[r],enumerable:!0})},F=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of J(e))!L.call(t,o)&&o!==r&&p(t,o,{get:()=>e[o],enumerable:!(a=D(e,o))||a.enumerable});return t};var n=(t,e,r)=>(r=t!=null?B(K(t)):{},F(e||!t||!t.__esModule?p(r,"default",{value:t,enumerable:!0}):r,t)),X=t=>F(p({},"__esModule",{value:!0}),t);var ct={};U(ct,{Homepage:()=>R,Label:()=>l,Metadata:()=>$,RequiredStatement:()=>j,Summary:()=>H,Thumbnail:()=>P,Value:()=>S});module.exports=X(ct);var b=n(require("react")),N=require("@stitches/react");var c=(t,e="none")=>{var a;if(!t)return null;if(typeof t=="string")return[t];if(!t[e]){let o=Object.getOwnPropertyNames(t);if(o.length>0)return(a=t[o[0]])==null?void 0:a.join(", ")}return!t[e]||!Array.isArray(t[e])?null:t[e].join(", ")};var Y=(0,N.styled)("div",{}),Z=(0,N.styled)("span",{}),_=({as:t="div",children:e,homepage:r,lang:a="none"})=>{let o="span";return t!=="div"&&(o="li"),b.default.createElement(Y,{as:t,"data-testid":"nectar-homepage"},r.map(i=>{let u=c(i.label,a);return b.default.createElement(Z,{as:o,key:i.id},b.default.createElement("a",{href:i.id,"aria-label":u},e||u))}))},R=_;var M=n(require("react")),A=require("@stitches/react");var tt=(0,A.styled)("span",{}),et=t=>{let{as:e,label:r}=t,a=t;return M.default.createElement(tt,s({as:e},a),c(r,a.lang))},l=et;var d=n(require("react")),E=require("@stitches/react");var I=n(require("react"));var C=n(require("react"));var rt=({as:t="dd",lang:e,value:r})=>C.default.createElement(l,{label:r,as:t,lang:e}),S=rt;var at=t=>{let{item:e,lang:r}=t,{label:a,value:o}=e;return I.default.createElement("div",{role:"group"},I.default.createElement(l,{as:"dt",label:a,lang:r}),I.default.createElement(S,{as:"dd",value:o,lang:r}))},x=at;var ot=(0,E.styled)("dl",{}),it=t=>{let{as:e,metadata:r}=t;if(!Array.isArray(r))return d.default.createElement(d.default.Fragment,null);let a=t;return d.default.createElement(d.default.Fragment,null,r.length>0&&d.default.createElement(ot,s({as:e},a),r.map((o,i)=>d.default.createElement(x,{item:o,key:i,lang:a.lang}))))},$=it;var y=n(require("react")),W=require("@stitches/react");var mt=(0,W.styled)("dl",{}),nt=t=>{let{as:e,requiredStatement:r}=t;if(!r)return y.default.createElement(y.default.Fragment,null);let a=t;return y.default.createElement(mt,s({as:e},a),y.default.createElement(x,{item:r,lang:a.lang}))},j=nt;var q=n(require("react"));var st=t=>{let{as:e,summary:r}=t;return q.default.createElement(l,s({as:e,label:r},t))},H=st;var g=n(require("react")),O=require("@stitches/react");var m=n(require("react")),w=n(require("clsx")),G=require("@stitches/react");var T=(t,e="200,",r="full")=>{Array.isArray(t)&&(t=t[0]);let{id:a,service:o}=t,i;if(!o)return a;if(Array.isArray(t.service)&&t.service.length>0&&(i=o[0]),i){if(i["@id"])return`${i["@id"]}/${r}/${e}/0/default.jpg`;if(i.id)return`${i.id}/${r}/${e}/0/default.jpg`}};var k=(0,G.styled)("img",{width:"100%",height:"100%",transition:"all 1s cubic-bezier(0.16, 1, 0.3, 1)",opacity:0,["&.loaded"]:{opacity:1}}),lt=({alt:t,resource:e,objectFit:r})=>{let[a,o]=(0,m.useState)(!1),i=(0,m.useRef)(null);(0,m.useEffect)(()=>{i&&i.current&&i.current.complete&&o(!0)},[]);let{type:u,id:f}=e;switch(u){case"Image":let z=T(e);return m.default.createElement(k,{alt:t,src:z,ref:i,as:"img",key:f,style:{objectFit:r},onLoad:()=>o(!0),className:(0,w.default)("source",a&&"loaded")});case"Sound":return m.default.createElement(k,{src:f,as:"video",key:f});default:return console.warn(`Resource type: ${u} is not valid or not yet supported in Nectar.`),m.default.createElement(m.default.Fragment,null)}},V=lt;var ut=(0,O.styled)("div",{}),dt=({altAsLabel:t,lang:e,objectFit:r="cover",thumbnail:a})=>{let o=c(t,e);return g.default.createElement(g.default.Fragment,null,a.map(i=>{let{width:u="200",height:f}=i;return g.default.createElement(ut,{key:i.id,style:{width:`${u}px`,height:`${f}px`,backgroundColor:"#c1c8cd"}},g.default.createElement(V,{alt:o,resource:i,objectFit:r}))}))},P=dt;
//# sourceMappingURL=index.cjs.js.map

@@ -1,2 +0,2 @@

var R=Object.defineProperty;var I=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var x=(t,e,r)=>e in t?R(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,n=(t,e)=>{for(var r in e||(e={}))M.call(e,r)&&x(t,r,e[r]);if(I)for(var r of I(e))A.call(e,r)&&x(t,r,e[r]);return t};import y from"react";import{styled as N}from"@stitches/react";var l=(t,e="none")=>{var a;if(!t)return null;if(typeof t=="string")return[t];if(!t[e]){let i=Object.getOwnPropertyNames(t);if(i.length>0)return(a=t[i[0]])==null?void 0:a.join(", ")}return!t[e]||!Array.isArray(t[e])?null:t[e].join(", ")};var C=N("div",{}),E=N("span",{}),$=({as:t="div",children:e,homepage:r,language:a="none"})=>{let i="span";return t!=="div"&&(i="li"),y.createElement(C,{as:t,"data-testid":"nectar-homepage"},r.map(o=>{let m=l(o.label,a);return y.createElement(E,{as:i,key:o.id},y.createElement("a",{href:o.id,"aria-label":m},e||m))}))},W=$;import j from"react";import{styled as q}from"@stitches/react";var H=q("span",{}),T=t=>{let{as:e,label:r,language:a}=t;return j.createElement(H,n({as:e},t),l(r,a))},s=T;import u from"react";import{styled as V}from"@stitches/react";import S from"react";import k from"react";var w=({as:t="dd",language:e,value:r})=>k.createElement(s,{label:r,as:t,language:e}),b=w;var G=t=>{let{item:e,language:r}=t,{label:a,value:i}=e;return S.createElement("div",{role:"group"},S.createElement(s,{as:"dt",label:a,language:r}),S.createElement(b,{as:"dd",value:i,language:r}))},c=G;var O=V("dl",{}),P=t=>{let{as:e,metadata:r,language:a}=t;if(!Array.isArray(r))return u.createElement(u.Fragment,null);let i=t;return u.createElement(u.Fragment,null,r.length>0&&u.createElement(O,n({as:e},i),r.map((o,m)=>u.createElement(c,{item:o,key:m,language:a}))))},z=P;import f from"react";import{styled as B}from"@stitches/react";var D=B("dl",{}),J=t=>{let{as:e,language:r,requiredStatement:a}=t;return a?f.createElement(D,n({as:e},t),f.createElement(c,{item:a,language:r})):f.createElement(f.Fragment,null)},K=J;import Q from"react";var U=t=>{let{as:e,summary:r,language:a}=t;return Q.createElement(s,n({as:e,label:r,language:a},t))},X=U;import g from"react";import{styled as at}from"@stitches/react";import p,{useEffect as Y,useRef as Z,useState as _}from"react";import tt from"clsx";import{styled as et}from"@stitches/react";var h=(t,e="200,",r="full")=>{Array.isArray(t)&&(t=t[0]);let{id:a,service:i}=t,o;if(!i)return a;if(Array.isArray(t.service)&&t.service.length>0&&(o=i[0]),o){if(o["@id"])return`${o["@id"]}/${r}/${e}/0/default.jpg`;if(o.id)return`${o.id}/${r}/${e}/0/default.jpg`}};var v=et("img",{width:"100%",height:"100%",transition:"all 1s cubic-bezier(0.16, 1, 0.3, 1)",opacity:0,["&.loaded"]:{opacity:1}}),rt=({alt:t,resource:e,objectFit:r})=>{let[a,i]=_(!1),o=Z(null);Y(()=>{o&&o.current&&o.current.complete&&i(!0)},[]);let{type:m,id:d}=e;switch(m){case"Image":let F=h(e);return p.createElement(v,{alt:t,src:F,ref:o,as:"img",key:d,style:{objectFit:r},onLoad:()=>i(!0),className:tt("source",a&&"loaded")});case"Sound":return p.createElement(v,{src:d,as:"video",key:d});default:return console.warn(`Resource type: ${m} is not valid or not yet supported in Nectar.`),p.createElement(p.Fragment,null)}},L=rt;var ot=at("div",{}),it=({altAsLabel:t,language:e,objectFit:r="cover",thumbnail:a})=>{let i=l(t,e);return g.createElement(g.Fragment,null,a.map(o=>{let{width:m="200",height:d}=o;return g.createElement(ot,{key:o.id,style:{width:`${m}px`,height:`${d}px`,backgroundColor:"#c1c8cd"}},g.createElement(L,{alt:i,resource:o,objectFit:r}))}))},mt=it;export{W as Homepage,s as Label,z as Metadata,K as RequiredStatement,X as Summary,mt as Thumbnail,b as Value};
var R=Object.defineProperty;var I=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var x=(t,e,r)=>e in t?R(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,m=(t,e)=>{for(var r in e||(e={}))M.call(e,r)&&x(t,r,e[r]);if(I)for(var r of I(e))A.call(e,r)&&x(t,r,e[r]);return t};import g from"react";import{styled as N}from"@stitches/react";var l=(t,e="none")=>{var a;if(!t)return null;if(typeof t=="string")return[t];if(!t[e]){let i=Object.getOwnPropertyNames(t);if(i.length>0)return(a=t[i[0]])==null?void 0:a.join(", ")}return!t[e]||!Array.isArray(t[e])?null:t[e].join(", ")};var C=N("div",{}),E=N("span",{}),$=({as:t="div",children:e,homepage:r,lang:a="none"})=>{let i="span";return t!=="div"&&(i="li"),g.createElement(C,{as:t,"data-testid":"nectar-homepage"},r.map(o=>{let n=l(o.label,a);return g.createElement(E,{as:i,key:o.id},g.createElement("a",{href:o.id,"aria-label":n},e||n))}))},W=$;import j from"react";import{styled as q}from"@stitches/react";var H=q("span",{}),T=t=>{let{as:e,label:r}=t,a=t;return j.createElement(H,m({as:e},a),l(r,a.lang))},s=T;import u from"react";import{styled as V}from"@stitches/react";import S from"react";import k from"react";var w=({as:t="dd",lang:e,value:r})=>k.createElement(s,{label:r,as:t,lang:e}),b=w;var G=t=>{let{item:e,lang:r}=t,{label:a,value:i}=e;return S.createElement("div",{role:"group"},S.createElement(s,{as:"dt",label:a,lang:r}),S.createElement(b,{as:"dd",value:i,lang:r}))},c=G;var O=V("dl",{}),P=t=>{let{as:e,metadata:r}=t;if(!Array.isArray(r))return u.createElement(u.Fragment,null);let a=t;return u.createElement(u.Fragment,null,r.length>0&&u.createElement(O,m({as:e},a),r.map((i,o)=>u.createElement(c,{item:i,key:o,lang:a.lang}))))},z=P;import f from"react";import{styled as B}from"@stitches/react";var D=B("dl",{}),J=t=>{let{as:e,requiredStatement:r}=t;if(!r)return f.createElement(f.Fragment,null);let a=t;return f.createElement(D,m({as:e},a),f.createElement(c,{item:r,lang:a.lang}))},K=J;import Q from"react";var U=t=>{let{as:e,summary:r}=t;return Q.createElement(s,m({as:e,label:r},t))},X=U;import y from"react";import{styled as at}from"@stitches/react";import p,{useEffect as Y,useRef as Z,useState as _}from"react";import tt from"clsx";import{styled as et}from"@stitches/react";var h=(t,e="200,",r="full")=>{Array.isArray(t)&&(t=t[0]);let{id:a,service:i}=t,o;if(!i)return a;if(Array.isArray(t.service)&&t.service.length>0&&(o=i[0]),o){if(o["@id"])return`${o["@id"]}/${r}/${e}/0/default.jpg`;if(o.id)return`${o.id}/${r}/${e}/0/default.jpg`}};var v=et("img",{width:"100%",height:"100%",transition:"all 1s cubic-bezier(0.16, 1, 0.3, 1)",opacity:0,["&.loaded"]:{opacity:1}}),rt=({alt:t,resource:e,objectFit:r})=>{let[a,i]=_(!1),o=Z(null);Y(()=>{o&&o.current&&o.current.complete&&i(!0)},[]);let{type:n,id:d}=e;switch(n){case"Image":let F=h(e);return p.createElement(v,{alt:t,src:F,ref:o,as:"img",key:d,style:{objectFit:r},onLoad:()=>i(!0),className:tt("source",a&&"loaded")});case"Sound":return p.createElement(v,{src:d,as:"video",key:d});default:return console.warn(`Resource type: ${n} is not valid or not yet supported in Nectar.`),p.createElement(p.Fragment,null)}},L=rt;var ot=at("div",{}),it=({altAsLabel:t,lang:e,objectFit:r="cover",thumbnail:a})=>{let i=l(t,e);return y.createElement(y.Fragment,null,a.map(o=>{let{width:n="200",height:d}=o;return y.createElement(ot,{key:o.id,style:{width:`${n}px`,height:`${d}px`,backgroundColor:"#c1c8cd"}},y.createElement(L,{alt:i,resource:o,objectFit:r}))}))},mt=it;export{W as Homepage,s as Label,z as Metadata,K as RequiredStatement,X as Summary,mt as Thumbnail,b as Value};
//# sourceMappingURL=index.esm.js.map

@@ -12,3 +12,2 @@ import { IIIFExternalWebResource, InternationalString, MetadataItem } from "@iiif/presentation-3";

item: MetadataItem;
language?: string;
}

@@ -19,3 +18,2 @@ export interface NectarHomepage extends NectarPrimitive {

homepage: Array<NectarResource>;
language?: string;
}

@@ -27,3 +25,2 @@ export interface NectarResource extends NectarPrimitive {

label: InternationalString;
language?: string[];
type: string;

@@ -34,7 +31,5 @@ }

label: InternationalString;
language?: string;
}
export interface NectarMetadata extends NectarPrimitive {
as?: "dl";
language?: string;
metadata: MetadataItem[];

@@ -44,3 +39,2 @@ }

as?: "dl";
language?: string;
requiredStatement: MetadataItem;

@@ -50,3 +44,2 @@ }

altAsLabel: InternationalString;
language: string;
thumbnail: IIIFExternalWebResource[];

@@ -57,3 +50,2 @@ objectFit?: "contain" | "cover" | "fill" | "none" | "scale-down";

as?: "span" | "p" | "label" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
language?: string;
summary: InternationalString;

@@ -63,4 +55,3 @@ }

as?: "span" | "dd";
language?: string;
value: InternationalString;
}
{
"name": "@samvera/nectar-iiif",
"version": "0.0.6-alpha.6",
"version": "0.0.6-alpha.7",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc