Browse Source

5.0.13

pull/497/head v5.0.13
Jānis Skarnelis 1 year ago
parent
commit
39f9c94e1b
  1. 11
      CHANGELOG.md
  2. 2
      dist/carousel/carousel.autoplay.esm.js
  3. 2
      dist/carousel/carousel.autoplay.umd.js
  4. 2
      dist/carousel/carousel.esm.js
  5. 2
      dist/carousel/carousel.thumbs.esm.js
  6. 2
      dist/carousel/carousel.thumbs.umd.js
  7. 2
      dist/carousel/carousel.umd.js
  8. 1
      dist/carousel/l10n/ja.esm.js
  9. 1
      dist/carousel/l10n/ja.umd.js
  10. 2
      dist/fancybox/fancybox.css
  11. 2
      dist/fancybox/fancybox.esm.js
  12. 2
      dist/fancybox/fancybox.umd.js
  13. 1
      dist/fancybox/l10n/ja.esm.js
  14. 1
      dist/fancybox/l10n/ja.umd.js
  15. 2
      dist/index.esm.js
  16. 2
      dist/index.umd.js
  17. 1
      dist/panzoom/l10n/ja.esm.js
  18. 1
      dist/panzoom/l10n/ja.umd.js
  19. 2
      dist/panzoom/panzoom.css
  20. 2
      dist/panzoom/panzoom.esm.js
  21. 2
      dist/panzoom/panzoom.pins.esm.js
  22. 2
      dist/panzoom/panzoom.pins.umd.js
  23. 2
      dist/panzoom/panzoom.toolbar.esm.js
  24. 2
      dist/panzoom/panzoom.toolbar.umd.js
  25. 2
      dist/panzoom/panzoom.umd.js
  26. 5
      l10n/Carousel/ja.ts
  27. 20
      l10n/Fancybox/ja.ts
  28. 26
      l10n/Panzoom/ja.ts
  29. 2
      package.json
  30. 2
      types/Carousel/Carousel.d.ts
  31. 7
      types/Fancybox/Fancybox.d.ts
  32. 42
      types/Fancybox/options.d.ts
  33. 1
      types/Fancybox/plugins/Html/Html.d.ts
  34. 6
      types/Fancybox/plugins/Images/Images.d.ts
  35. 11
      types/Panzoom/Panzoom.d.ts
  36. 2
      types/shared/utils/addClass.d.ts
  37. 2
      types/shared/utils/getScrollableParent.d.ts
  38. 2
      types/shared/utils/removeClass.d.ts

11
CHANGELOG.md

@ -1,3 +1,10 @@
# 5.0.13 (2023-03-27)
### Features
- Add Japanese translations
- **Fancybox** Add support for the `<picture>` element using a new `Images.source` option
# 5.0.12 (2023-03-24)
### Bug Fixes
@ -23,8 +30,8 @@
### Features
- Added Spanish translations
- Added French translations
- Add Spanish translations
- Add French translations
# 5.0.9 (2023-03-21)

2
dist/carousel/carousel.autoplay.esm.js

File diff suppressed because one or more lines are too long

2
dist/carousel/carousel.autoplay.umd.js

File diff suppressed because one or more lines are too long

2
dist/carousel/carousel.esm.js

File diff suppressed because one or more lines are too long

2
dist/carousel/carousel.thumbs.esm.js

File diff suppressed because one or more lines are too long

2
dist/carousel/carousel.thumbs.umd.js

File diff suppressed because one or more lines are too long

2
dist/carousel/carousel.umd.js

File diff suppressed because one or more lines are too long

1
dist/carousel/l10n/ja.esm.js

@ -0,0 +1 @@
const o={NEXT:"次のスライド",PREV:"前のスライド",GOTO:"スライド #%d に移動"};export{o as ja};

1
dist/carousel/l10n/ja.umd.js

@ -0,0 +1 @@
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o(((e="undefined"!=typeof globalThis?globalThis:e||self).Carousel=e.Carousel||{},e.Carousel.l10n=e.Carousel.l10n||{}))}(this,(function(e){"use strict";e.ja={NEXT:"次のスライド",PREV:"前のスライド",GOTO:"スライド #%d に移動"}}));

2
dist/fancybox/fancybox.css

File diff suppressed because one or more lines are too long

2
dist/fancybox/fancybox.esm.js

File diff suppressed because one or more lines are too long

2
dist/fancybox/fancybox.umd.js

File diff suppressed because one or more lines are too long

1
dist/fancybox/l10n/ja.esm.js

@ -0,0 +1 @@
const O={PANUP:"上に移動",PANDOWN:"下に移動",PANLEFT:"左に移動",PANRIGHT:"右に動く",ZOOMIN:"ズームイン",ZOOMOUT:"ズームアウトする",TOGGLEZOOM:"ズーム レベルの切り替え",TOGGLE1TO1:"ズーム レベルの切り替え",ITERATEZOOM:"ズーム レベルの切り替え",ROTATECCW:"反時計回りに回転",ROTATECW:"時計回りに回転します",FLIPX:"左右反転",FLIPY:"上下反転",FITX:"水平に合わせる",FITY:"縦に合わせる",RESET:"リセット",TOGGLEFS:"フルスクリーン切り替え",CLOSE:"近い",NEXT:"次",PREV:"前",MODAL:"このモーダル コンテンツは ESC キーで閉じることができます",ERROR:"何かが間違っています。後でもう一度試してください",IMAGE_ERROR:"画像が見つかりません",ELEMENT_NOT_FOUND:"HTML 要素が見つかりません",AJAX_NOT_FOUND:"AJAX の読み込みエラー: 見つかりません",AJAX_FORBIDDEN:"AJAX のロード中にエラーが発生しました: 禁止されています",IFRAME_ERROR:"ページ読み込みエラー",TOGGLE_ZOOM:"ズーム レベルの切り替え",TOGGLE_THUMBS:"サムネイルの切り替え",TOGGLE_SLIDESHOW:"スライドショーの切り替え",TOGGLE_FULLSCREEN:"全画面モードの切り替え",DOWNLOAD:"ダウンロード"};export{O as js};

1
dist/fancybox/l10n/ja.umd.js

@ -0,0 +1 @@
!function(O,E){"object"==typeof exports&&"undefined"!=typeof module?E(exports):"function"==typeof define&&define.amd?define(["exports"],E):E(((O="undefined"!=typeof globalThis?globalThis:O||self).Fancybox=O.Fancybox||{},O.Fancybox.l10n=O.Fancybox.l10n||{}))}(this,(function(O){"use strict";const E={PANUP:"上に移動",PANDOWN:"下に移動",PANLEFT:"左に移動",PANRIGHT:"右に動く",ZOOMIN:"ズームイン",ZOOMOUT:"ズームアウトする",TOGGLEZOOM:"ズーム レベルの切り替え",TOGGLE1TO1:"ズーム レベルの切り替え",ITERATEZOOM:"ズーム レベルの切り替え",ROTATECCW:"反時計回りに回転",ROTATECW:"時計回りに回転します",FLIPX:"左右反転",FLIPY:"上下反転",FITX:"水平に合わせる",FITY:"縦に合わせる",RESET:"リセット",TOGGLEFS:"フルスクリーン切り替え",CLOSE:"近い",NEXT:"次",PREV:"前",MODAL:"このモーダル コンテンツは ESC キーで閉じることができます",ERROR:"何かが間違っています。後でもう一度試してください",IMAGE_ERROR:"画像が見つかりません",ELEMENT_NOT_FOUND:"HTML 要素が見つかりません",AJAX_NOT_FOUND:"AJAX の読み込みエラー: 見つかりません",AJAX_FORBIDDEN:"AJAX のロード中にエラーが発生しました: 禁止されています",IFRAME_ERROR:"ページ読み込みエラー",TOGGLE_ZOOM:"ズーム レベルの切り替え",TOGGLE_THUMBS:"サムネイルの切り替え",TOGGLE_SLIDESHOW:"スライドショーの切り替え",TOGGLE_FULLSCREEN:"全画面モードの切り替え",DOWNLOAD:"ダウンロード"};O.js=E}));

2
dist/index.esm.js

File diff suppressed because one or more lines are too long

2
dist/index.umd.js

File diff suppressed because one or more lines are too long

1
dist/panzoom/l10n/ja.esm.js

@ -0,0 +1 @@
const O={PANUP:"上に移動",PANDOWN:"下に移動",PANLEFT:"左に移動",PANRIGHT:"右に動く",ZOOMIN:"ズームイン",ZOOMOUT:"ズームアウトする",TOGGLEZOOM:"ズーム レベルの切り替え",TOGGLE1TO1:"ズーム レベルの切り替え",ITERATEZOOM:"ズーム レベルの切り替え",ROTATECCW:"反時計回りに回転",ROTATECW:"時計回りに回転します",FLIPX:"左右反転",FLIPY:"上下反転",FITX:"水平に合わせる",FITY:"縦に合わせる",RESET:"リセット",TOGGLEFS:"フルスクリーン切り替え"};export{O as ja};

1
dist/panzoom/l10n/ja.umd.js

@ -0,0 +1 @@
!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((o="undefined"!=typeof globalThis?globalThis:o||self).Panzoom=o.Panzoom||{},o.Panzoom.l10n=o.Panzoom.l10n||{}))}(this,(function(o){"use strict";o.ja={PANUP:"上に移動",PANDOWN:"下に移動",PANLEFT:"左に移動",PANRIGHT:"右に動く",ZOOMIN:"ズームイン",ZOOMOUT:"ズームアウトする",TOGGLEZOOM:"ズーム レベルの切り替え",TOGGLE1TO1:"ズーム レベルの切り替え",ITERATEZOOM:"ズーム レベルの切り替え",ROTATECCW:"反時計回りに回転",ROTATECW:"時計回りに回転します",FLIPX:"左右反転",FLIPY:"上下反転",FITX:"水平に合わせる",FITY:"縦に合わせる",RESET:"リセット",TOGGLEFS:"フルスクリーン切り替え"}}));

2
dist/panzoom/panzoom.css

@ -1 +1 @@
:root{--f-spinner-width: 36px;--f-spinner-height: 36px;--f-spinner-color-1: rgba(0, 0, 0, 0.1);--f-spinner-color-2: rgba(17, 24, 28, 0.8);--f-spinner-stroke: 2.75}.f-spinner{margin:auto;padding:0;width:var(--f-spinner-width);height:var(--f-spinner-height)}.f-spinner svg{width:100%;height:100%;vertical-align:top;animation:f-spinner-rotate 2s linear infinite}.f-spinner svg *{stroke-width:var(--f-spinner-stroke);fill:none}.f-spinner svg *:first-child{stroke:var(--f-spinner-color-1)}.f-spinner svg *:last-child{stroke:var(--f-spinner-color-2);animation:f-spinner-dash 2s ease-in-out infinite}@keyframes f-spinner-rotate{100%{transform:rotate(360deg)}}@keyframes f-spinner-dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}.f-panzoom{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:center;align-items:center;transform:translate3d(0, 0, 0);background:#fff}.f-panzoom.is-draggable{cursor:move;cursor:grab}.f-panzoom.can-zoom_in{cursor:zoom-in}.f-panzoom.can-zoom_out{cursor:zoom-out}.f-panzoom.is-dragging{cursor:move;cursor:grabbing}.f-panzoom.in-fullscreen{position:fixed;top:0;left:0;margin:0 !important;width:100% !important;height:100% !important;max-width:none !important;max-height:none !important;aspect-ratio:unset !important;z-index:9999}.f-panzoom__content{display:block;margin:auto;position:relative;max-width:100%;max-height:100%;min-height:0;object-fit:contain;transform:translate3d(0, 0, 0) scale(1) rotate(0) skew(0);transform-origin:center center;transition:none;-webkit-user-select:none;user-select:none}.is-loading .f-panzoom__content{display:none}.is-scaling .f-panzoom__content{filter:blur(0px);will-change:transform,width,height;backface-visibility:hidden}picture.f-panzoom__content>img{width:100%;height:auto}.f-panzoom__content:not(:last-child){margin-bottom:0}.f-panzoom__viewport{margin:auto;position:relative;width:fit-content;height:fit-content;min-height:1px}.f-panzoom__viewport:not(:last-child){margin-bottom:0}.f-panzoom__caption:not(:first-child){margin-bottom:auto}html.with-panzoom-in-fullscreen{overflow:hidden}
:root{--f-spinner-width: 36px;--f-spinner-height: 36px;--f-spinner-color-1: rgba(0, 0, 0, 0.1);--f-spinner-color-2: rgba(17, 24, 28, 0.8);--f-spinner-stroke: 2.75}.f-spinner{margin:auto;padding:0;width:var(--f-spinner-width);height:var(--f-spinner-height)}.f-spinner svg{width:100%;height:100%;vertical-align:top;animation:f-spinner-rotate 2s linear infinite}.f-spinner svg *{stroke-width:var(--f-spinner-stroke);fill:none}.f-spinner svg *:first-child{stroke:var(--f-spinner-color-1)}.f-spinner svg *:last-child{stroke:var(--f-spinner-color-2);animation:f-spinner-dash 2s ease-in-out infinite}@keyframes f-spinner-rotate{100%{transform:rotate(360deg)}}@keyframes f-spinner-dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}.f-panzoom{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:center;align-items:center;transform:translate3d(0, 0, 0);background:#fff}.f-panzoom.is-draggable{cursor:move;cursor:grab}.f-panzoom.can-zoom_in{cursor:zoom-in}.f-panzoom.can-zoom_out{cursor:zoom-out}.f-panzoom.is-dragging{cursor:move;cursor:grabbing}.f-panzoom.in-fullscreen{position:fixed;top:0;left:0;margin:0 !important;width:100% !important;height:100% !important;max-width:none !important;max-height:none !important;aspect-ratio:unset !important;z-index:9999}.f-panzoom__content{display:block;margin:auto;position:relative;max-width:100%;max-height:100%;min-height:0;object-fit:contain;transform:translate3d(0, 0, 0) scale(1) rotate(0) skew(0);transform-origin:center center;transition:none;-webkit-user-select:none;user-select:none}.is-loading .f-panzoom__content{display:none}.is-scaling .f-panzoom__content{filter:blur(0px);will-change:transform,width,height;backface-visibility:hidden}picture.f-panzoom__content>img{width:100%;height:auto;max-height:100%}.f-panzoom__content:not(:last-child){margin-bottom:0}.f-panzoom__viewport{margin:auto;position:relative;width:fit-content;height:fit-content;min-height:1px}.f-panzoom__viewport:not(:last-child){margin-bottom:0}.f-panzoom__caption:not(:first-child){margin-bottom:auto}html.with-panzoom-in-fullscreen{overflow:hidden}

2
dist/panzoom/panzoom.esm.js

File diff suppressed because one or more lines are too long

2
dist/panzoom/panzoom.pins.esm.js

@ -1 +1 @@
const t=(e,...s)=>{const n=s.length;for(let i=0;i<n;i++){const n=s[i]||{};Object.entries(n).forEach((([s,n])=>{const i=Array.isArray(n)?[]:{};var r;e[s]||Object.assign(e,{[s]:i}),"object"==typeof(r=n)&&null!==r&&r.constructor===Object&&"[object Object]"===Object.prototype.toString.call(r)?Object.assign(e[s],t(i,n)):Array.isArray(n)?Object.assign(e,{[s]:[...n]}):Object.assign(e,{[s]:n})}))}return e},e=function(t,e){return t.split(".").reduce(((t,e)=>"object"==typeof t?t[e]:void 0),e)};class s{constructor(t={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(t);for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions(e){this.options=e?t({},this.constructor.defaults,e):{};for(const[t,e]of Object.entries(this.option("on")||{}))this.on(t,e)}option(t,...s){let n=e(t,this.options);return n&&"function"==typeof n&&(n=n.call(this,this,...s)),n}optionFor(t,s,n,...i){let r=e(s,t);var o;"string"!=typeof(o=r)||isNaN(o)||isNaN(parseFloat(o))||(r=parseFloat(r)),"true"===r&&(r=!0),"false"===r&&(r=!1),r&&"function"==typeof r&&(r=r.call(this,this,t,...i));let a=e(s,this.options);return a&&"function"==typeof a?r=a.call(this,this,t,...i,r):void 0===r&&(r=a),void 0===r?n:r}cn(t){const e=this.options.classes;return e&&e[t]||""}localize(t,e=[]){t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,((t,e,s)=>{let n="";return s?n=this.option(`${e[0]+e.toLowerCase().substring(1)}.l10n.${s}`):e&&(n=this.option(`l10n.${e}`)),n||(n=t),n}));for(let s=0;s<e.length;s++)t=t.split(e[s][0]).join(e[s][1]);return t=t.replace(/\{\{(.*?)\}\}/g,((t,e)=>e))}on(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),this.events||(this.events=new Map),s.forEach((t=>{let s=this.events.get(t);s||(this.events.set(t,[]),s=[]),s.includes(e)||s.push(e),this.events.set(t,s)}))}off(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),s.forEach((t=>{const s=this.events.get(t);if(Array.isArray(s)){const t=s.indexOf(e);t>-1&&s.splice(t,1)}}))}emit(t,...e){[...this.events.get(t)||[]].forEach((t=>t(this,...e))),"*"!==t&&this.emit("*",t,...e)}}Object.defineProperty(s,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.12"}),Object.defineProperty(s,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class n extends s{constructor(t,e){super(e),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:t})}attach(){}detach(){}}class i extends n{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pins",{enumerable:!0,configurable:!0,writable:!0,value:[]})}onTransform(t){for(const s of this.pins){if(!((e=s)&&null!==e&&e instanceof Element&&"nodeType"in e))continue;const{fitWidth:n,fitHeight:i,fullWidth:r,fullHeight:o}=t.contentRect,a=s.dataset.x||"",c=s.dataset.y||"";let l=0,f=0;l=a.includes("%")?n*(parseFloat(a)/100):parseFloat(a)/r*n,l-=.5*n,f=c.includes("%")?i*(parseFloat(c)/100):parseFloat(c)/o*i,f-=.5*i;const h=new DOMPoint(l,f).matrixTransform(t.getMatrix());s.style.transform=`translate3d(${h.x||0}px, ${h.y||0}px, 0)`}var e}attach(){this.pins=Array.from(this.instance.container.querySelectorAll("[data-panzoom-pin]")),this.pins.length&&(this.instance.container.classList.add("has-pins"),this.instance.on("afterTransform",this.onTransform))}detach(){this.pins=[],this.instance.container.classList.remove("has-pins"),this.instance.off("afterTransform",this.onTransform)}}Object.defineProperty(i,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});export{i as Pins};
const t=(e,...s)=>{const n=s.length;for(let i=0;i<n;i++){const n=s[i]||{};Object.entries(n).forEach((([s,n])=>{const i=Array.isArray(n)?[]:{};var r;e[s]||Object.assign(e,{[s]:i}),"object"==typeof(r=n)&&null!==r&&r.constructor===Object&&"[object Object]"===Object.prototype.toString.call(r)?Object.assign(e[s],t(i,n)):Array.isArray(n)?Object.assign(e,{[s]:[...n]}):Object.assign(e,{[s]:n})}))}return e},e=function(t,e){return t.split(".").reduce(((t,e)=>"object"==typeof t?t[e]:void 0),e)};class s{constructor(t={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(t);for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions(e){this.options=e?t({},this.constructor.defaults,e):{};for(const[t,e]of Object.entries(this.option("on")||{}))this.on(t,e)}option(t,...s){let n=e(t,this.options);return n&&"function"==typeof n&&(n=n.call(this,this,...s)),n}optionFor(t,s,n,...i){let r=e(s,t);var o;"string"!=typeof(o=r)||isNaN(o)||isNaN(parseFloat(o))||(r=parseFloat(r)),"true"===r&&(r=!0),"false"===r&&(r=!1),r&&"function"==typeof r&&(r=r.call(this,this,t,...i));let a=e(s,this.options);return a&&"function"==typeof a?r=a.call(this,this,t,...i,r):void 0===r&&(r=a),void 0===r?n:r}cn(t){const e=this.options.classes;return e&&e[t]||""}localize(t,e=[]){t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,((t,e,s)=>{let n="";return s?n=this.option(`${e[0]+e.toLowerCase().substring(1)}.l10n.${s}`):e&&(n=this.option(`l10n.${e}`)),n||(n=t),n}));for(let s=0;s<e.length;s++)t=t.split(e[s][0]).join(e[s][1]);return t=t.replace(/\{\{(.*?)\}\}/g,((t,e)=>e))}on(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),this.events||(this.events=new Map),s.forEach((t=>{let s=this.events.get(t);s||(this.events.set(t,[]),s=[]),s.includes(e)||s.push(e),this.events.set(t,s)}))}off(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),s.forEach((t=>{const s=this.events.get(t);if(Array.isArray(s)){const t=s.indexOf(e);t>-1&&s.splice(t,1)}}))}emit(t,...e){[...this.events.get(t)||[]].forEach((t=>t(this,...e))),"*"!==t&&this.emit("*",t,...e)}}Object.defineProperty(s,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.13"}),Object.defineProperty(s,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class n extends s{constructor(t,e){super(e),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:t})}attach(){}detach(){}}class i extends n{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pins",{enumerable:!0,configurable:!0,writable:!0,value:[]})}onTransform(t){for(const s of this.pins){if(!((e=s)&&null!==e&&e instanceof Element&&"nodeType"in e))continue;const{fitWidth:n,fitHeight:i,fullWidth:r,fullHeight:o}=t.contentRect,a=s.dataset.x||"",c=s.dataset.y||"";let l=0,f=0;l=a.includes("%")?n*(parseFloat(a)/100):parseFloat(a)/r*n,l-=.5*n,f=c.includes("%")?i*(parseFloat(c)/100):parseFloat(c)/o*i,f-=.5*i;const h=new DOMPoint(l,f).matrixTransform(t.getMatrix());s.style.transform=`translate3d(${h.x||0}px, ${h.y||0}px, 0)`}var e}attach(){this.pins=Array.from(this.instance.container.querySelectorAll("[data-panzoom-pin]")),this.pins.length&&(this.instance.container.classList.add("has-pins"),this.instance.on("afterTransform",this.onTransform))}detach(){this.pins=[],this.instance.container.classList.remove("has-pins"),this.instance.off("afterTransform",this.onTransform)}}Object.defineProperty(i,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});export{i as Pins};

2
dist/panzoom/panzoom.pins.umd.js

@ -1 +1 @@
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).window=t.window||{})}(this,(function(t){"use strict";const e=(t,...s)=>{const n=s.length;for(let i=0;i<n;i++){const n=s[i]||{};Object.entries(n).forEach((([s,n])=>{const i=Array.isArray(n)?[]:{};var o;t[s]||Object.assign(t,{[s]:i}),"object"==typeof(o=n)&&null!==o&&o.constructor===Object&&"[object Object]"===Object.prototype.toString.call(o)?Object.assign(t[s],e(i,n)):Array.isArray(n)?Object.assign(t,{[s]:[...n]}):Object.assign(t,{[s]:n})}))}return t},s=function(t,e){return t.split(".").reduce(((t,e)=>"object"==typeof t?t[e]:void 0),e)};class n{constructor(t={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(t);for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions(t){this.options=t?e({},this.constructor.defaults,t):{};for(const[t,e]of Object.entries(this.option("on")||{}))this.on(t,e)}option(t,...e){let n=s(t,this.options);return n&&"function"==typeof n&&(n=n.call(this,this,...e)),n}optionFor(t,e,n,...i){let o=s(e,t);var r;"string"!=typeof(r=o)||isNaN(r)||isNaN(parseFloat(r))||(o=parseFloat(o)),"true"===o&&(o=!0),"false"===o&&(o=!1),o&&"function"==typeof o&&(o=o.call(this,this,t,...i));let a=s(e,this.options);return a&&"function"==typeof a?o=a.call(this,this,t,...i,o):void 0===o&&(o=a),void 0===o?n:o}cn(t){const e=this.options.classes;return e&&e[t]||""}localize(t,e=[]){t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,((t,e,s)=>{let n="";return s?n=this.option(`${e[0]+e.toLowerCase().substring(1)}.l10n.${s}`):e&&(n=this.option(`l10n.${e}`)),n||(n=t),n}));for(let s=0;s<e.length;s++)t=t.split(e[s][0]).join(e[s][1]);return t=t.replace(/\{\{(.*?)\}\}/g,((t,e)=>e))}on(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),this.events||(this.events=new Map),s.forEach((t=>{let s=this.events.get(t);s||(this.events.set(t,[]),s=[]),s.includes(e)||s.push(e),this.events.set(t,s)}))}off(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),s.forEach((t=>{const s=this.events.get(t);if(Array.isArray(s)){const t=s.indexOf(e);t>-1&&s.splice(t,1)}}))}emit(t,...e){[...this.events.get(t)||[]].forEach((t=>t(this,...e))),"*"!==t&&this.emit("*",t,...e)}}Object.defineProperty(n,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.12"}),Object.defineProperty(n,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class i extends n{constructor(t,e){super(e),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:t})}attach(){}detach(){}}class o extends i{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pins",{enumerable:!0,configurable:!0,writable:!0,value:[]})}onTransform(t){for(const s of this.pins){if(!((e=s)&&null!==e&&e instanceof Element&&"nodeType"in e))continue;const{fitWidth:n,fitHeight:i,fullWidth:o,fullHeight:r}=t.contentRect,a=s.dataset.x||"",l=s.dataset.y||"";let c=0,f=0;c=a.includes("%")?n*(parseFloat(a)/100):parseFloat(a)/o*n,c-=.5*n,f=l.includes("%")?i*(parseFloat(l)/100):parseFloat(l)/r*i,f-=.5*i;const p=new DOMPoint(c,f).matrixTransform(t.getMatrix());s.style.transform=`translate3d(${p.x||0}px, ${p.y||0}px, 0)`}var e}attach(){this.pins=Array.from(this.instance.container.querySelectorAll("[data-panzoom-pin]")),this.pins.length&&(this.instance.container.classList.add("has-pins"),this.instance.on("afterTransform",this.onTransform))}detach(){this.pins=[],this.instance.container.classList.remove("has-pins"),this.instance.off("afterTransform",this.onTransform)}}Object.defineProperty(o,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}}),t.Pins=o}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).window=t.window||{})}(this,(function(t){"use strict";const e=(t,...s)=>{const n=s.length;for(let i=0;i<n;i++){const n=s[i]||{};Object.entries(n).forEach((([s,n])=>{const i=Array.isArray(n)?[]:{};var o;t[s]||Object.assign(t,{[s]:i}),"object"==typeof(o=n)&&null!==o&&o.constructor===Object&&"[object Object]"===Object.prototype.toString.call(o)?Object.assign(t[s],e(i,n)):Array.isArray(n)?Object.assign(t,{[s]:[...n]}):Object.assign(t,{[s]:n})}))}return t},s=function(t,e){return t.split(".").reduce(((t,e)=>"object"==typeof t?t[e]:void 0),e)};class n{constructor(t={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(t);for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions(t){this.options=t?e({},this.constructor.defaults,t):{};for(const[t,e]of Object.entries(this.option("on")||{}))this.on(t,e)}option(t,...e){let n=s(t,this.options);return n&&"function"==typeof n&&(n=n.call(this,this,...e)),n}optionFor(t,e,n,...i){let o=s(e,t);var r;"string"!=typeof(r=o)||isNaN(r)||isNaN(parseFloat(r))||(o=parseFloat(o)),"true"===o&&(o=!0),"false"===o&&(o=!1),o&&"function"==typeof o&&(o=o.call(this,this,t,...i));let a=s(e,this.options);return a&&"function"==typeof a?o=a.call(this,this,t,...i,o):void 0===o&&(o=a),void 0===o?n:o}cn(t){const e=this.options.classes;return e&&e[t]||""}localize(t,e=[]){t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,((t,e,s)=>{let n="";return s?n=this.option(`${e[0]+e.toLowerCase().substring(1)}.l10n.${s}`):e&&(n=this.option(`l10n.${e}`)),n||(n=t),n}));for(let s=0;s<e.length;s++)t=t.split(e[s][0]).join(e[s][1]);return t=t.replace(/\{\{(.*?)\}\}/g,((t,e)=>e))}on(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),this.events||(this.events=new Map),s.forEach((t=>{let s=this.events.get(t);s||(this.events.set(t,[]),s=[]),s.includes(e)||s.push(e),this.events.set(t,s)}))}off(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),s.forEach((t=>{const s=this.events.get(t);if(Array.isArray(s)){const t=s.indexOf(e);t>-1&&s.splice(t,1)}}))}emit(t,...e){[...this.events.get(t)||[]].forEach((t=>t(this,...e))),"*"!==t&&this.emit("*",t,...e)}}Object.defineProperty(n,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.13"}),Object.defineProperty(n,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class i extends n{constructor(t,e){super(e),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:t})}attach(){}detach(){}}class o extends i{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pins",{enumerable:!0,configurable:!0,writable:!0,value:[]})}onTransform(t){for(const s of this.pins){if(!((e=s)&&null!==e&&e instanceof Element&&"nodeType"in e))continue;const{fitWidth:n,fitHeight:i,fullWidth:o,fullHeight:r}=t.contentRect,a=s.dataset.x||"",l=s.dataset.y||"";let c=0,f=0;c=a.includes("%")?n*(parseFloat(a)/100):parseFloat(a)/o*n,c-=.5*n,f=l.includes("%")?i*(parseFloat(l)/100):parseFloat(l)/r*i,f-=.5*i;const p=new DOMPoint(c,f).matrixTransform(t.getMatrix());s.style.transform=`translate3d(${p.x||0}px, ${p.y||0}px, 0)`}var e}attach(){this.pins=Array.from(this.instance.container.querySelectorAll("[data-panzoom-pin]")),this.pins.length&&(this.instance.container.classList.add("has-pins"),this.instance.on("afterTransform",this.onTransform))}detach(){this.pins=[],this.instance.container.classList.remove("has-pins"),this.instance.off("afterTransform",this.onTransform)}}Object.defineProperty(o,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}}),t.Pins=o}));

2
dist/panzoom/panzoom.toolbar.esm.js

File diff suppressed because one or more lines are too long

2
dist/panzoom/panzoom.toolbar.umd.js

File diff suppressed because one or more lines are too long

2
dist/panzoom/panzoom.umd.js

File diff suppressed because one or more lines are too long

5
l10n/Carousel/ja.ts

@ -0,0 +1,5 @@
export const ja = {
NEXT: "次のスライド",
PREV: "前のスライド",
GOTO: "スライド #%d に移動",
};

20
l10n/Fancybox/ja.ts

@ -0,0 +1,20 @@
import { ja as PANZOOM_JA } from "../Panzoom/ja";
export const js = {
...PANZOOM_JA,
CLOSE: "近い",
NEXT: "次",
PREV: "前",
MODAL: "このモーダル コンテンツは ESC キーで閉じることができます",
ERROR: "何かが間違っています。後でもう一度試してください",
IMAGE_ERROR: "画像が見つかりません",
ELEMENT_NOT_FOUND: "HTML 要素が見つかりません",
AJAX_NOT_FOUND: "AJAX の読み込みエラー: 見つかりません",
AJAX_FORBIDDEN: "AJAX のロード中にエラーが発生しました: 禁止されています",
IFRAME_ERROR: "ページ読み込みエラー",
TOGGLE_ZOOM: "ズーム レベルの切り替え",
TOGGLE_THUMBS: "サムネイルの切り替え",
TOGGLE_SLIDESHOW: "スライドショーの切り替え",
TOGGLE_FULLSCREEN: "全画面モードの切り替え",
DOWNLOAD: "ダウンロード",
};

26
l10n/Panzoom/ja.ts

@ -0,0 +1,26 @@
export const ja = {
PANUP: "上に移動",
PANDOWN: "下に移動",
PANLEFT: "左に移動",
PANRIGHT: "右に動く",
ZOOMIN: "ズームイン",
ZOOMOUT: "ズームアウトする",
TOGGLEZOOM: "ズーム レベルの切り替え",
TOGGLE1TO1: "ズーム レベルの切り替え",
ITERATEZOOM: "ズーム レベルの切り替え",
ROTATECCW: "反時計回りに回転",
ROTATECW: "時計回りに回転します",
FLIPX: "左右反転",
FLIPY: "上下反転",
FITX: "水平に合わせる",
FITY: "縦に合わせる",
RESET: "リセット",
TOGGLEFS: "フルスクリーン切り替え",
};

2
package.json

@ -1,6 +1,6 @@
{
"name": "@fancyapps/ui",
"version": "5.0.12",
"version": "5.0.13",
"description": "Robust JavaScript UI Component Library",
"files": [
"dist",

2
types/Carousel/Carousel.d.ts

@ -152,7 +152,7 @@ export declare class Carousel extends Component<OptionsType, CarouselEventsType>
/**
* Get the progress of the active or selected page relative to the "center"
*/
getProgress(index?: number): number;
getProgress(index?: number, raw?: boolean): number;
/**
* Set the height of the viewport to match the maximum height of the slides on the current page
*/

7
types/Fancybox/Fancybox.d.ts

@ -9,12 +9,13 @@ declare module "../Carousel/types" {
src?: string | HTMLElement;
width?: number | "auto";
height?: number | "auto";
downloadSrc?: string;
filter?: string;
id?: string;
display?: string;
error?: string;
filter?: string;
caption?: string;
downloadSrc?: string;
downloadFilename?: string;
contentEl?: HTMLElement;
captionEl?: HTMLElement;
spinnerEl?: HTMLElement;
@ -36,7 +37,7 @@ export declare class Fancybox extends Component<OptionsType, EventsType> {
private idle;
private idleTimer;
private clickTimer;
private prevWheelTime;
private pwt;
private ignoreFocusChange;
state: States;
id: number | string;

42
types/Fancybox/options.d.ts

@ -27,6 +27,10 @@ export interface ComponentOptionsType {
* Set focus on first focusable element after displaying content
*/
autoFocus: boolean;
/**
* The action to perform when the user clicks on the backdrop
*/
backdropClick: ClickAction | ((any?: any) => ClickAction | void);
/**
* Change caption per slide
*/
@ -47,6 +51,14 @@ export interface ComponentOptionsType {
* If compact mode needs to be activated
*/
compact: boolean | ((instance: Fancybox) => boolean);
/**
* The action to perform when the user clicks on the content
*/
contentClick: ClickAction | ((any?: any) => ClickAction | void);
/**
* The action to take when the user double-clicks on the content
*/
contentDblClick: ClickAction | ((any?: any) => ClickAction | void);
/**
* Default content type
*/
@ -73,6 +85,10 @@ export interface ComponentOptionsType {
* The name of the attribute used for grouping
*/
groupAttr: string;
/**
* Change content height per slide
*/
height?: "auto" | number | ((instance: Fancybox, slide: slideType) => "auto" | number);
/**
* Class name to be applied to the content to hide it.
* Note: If you disable image zoom, this class name will be used to run the image hide animation.
@ -94,10 +110,18 @@ export interface ComponentOptionsType {
* Keyboard events
*/
keyboard: keyboardType;
/**
* Localization of strings
*/
l10n?: Record<string, string>;
/**
* Custom class name for the container
*/
mainClass?: string;
/**
* Optional event listeners
*/
on?: Partial<Events>;
/**
* Element where container is appended
* Note. If no element is specified, container is appended to the `document.body`
@ -121,20 +145,20 @@ export interface ComponentOptionsType {
*/
startIndex: number;
/**
* Trap focus inside Fancybox
* HTML templates for various elements
*/
trapFocus: boolean;
width?: "auto" | number | ((instance: Fancybox, slide: slideType) => "auto" | number);
height?: "auto" | number | ((instance: Fancybox, slide: slideType) => "auto" | number);
contentClick: ClickAction | ((any?: any) => ClickAction | void);
contentDblClick: ClickAction | ((any?: any) => ClickAction | void);
backdropClick: ClickAction | ((any?: any) => ClickAction | void);
on?: Partial<Events>;
l10n?: Record<string, string>;
tpl: {
closeButton?: string;
main?: string;
};
/**
* Trap focus inside Fancybox
*/
trapFocus: boolean;
/**
* Change content width per slide
*/
width?: "auto" | number | ((instance: Fancybox, slide: slideType) => "auto" | number);
/**
* Mouse wheel event listener
*/

1
types/Fancybox/plugins/Html/Html.d.ts

@ -48,6 +48,7 @@ export type HtmlOptionsType = {
youtube: {
controls: 0 | 1;
enablejsapi: 0 | 1;
nocookie: 0 | 1;
rel: 0 | 1;
fs: 0 | 1;
};

6
types/Fancybox/plugins/Images/Images.d.ts

@ -5,6 +5,10 @@ import { Carousel } from "../../../Carousel/Carousel";
import { slideType } from "../../../Carousel/types";
import { Fancybox } from "../../Fancybox";
export type OptionsType = {
/**
* Set custom content per slide
*/
content?: (instance: Images, slide: slideType) => string | HTMLElement | HTMLPictureElement;
/**
* Initial image zoom level, see Panzoom documentation for more information.
*/
@ -30,7 +34,7 @@ export declare const defaultOptions: OptionsType;
declare module "../../../Carousel/types" {
interface slideType {
panzoom?: Panzoom;
imageEl?: HTMLImageElement | null;
imageEl?: HTMLImageElement | HTMLPictureElement;
srcset?: string;
sizes?: string;
}

11
types/Panzoom/Panzoom.d.ts

@ -17,10 +17,9 @@ export declare class Panzoom extends Component<OptionsType, EventsType> {
private isBouncingY;
private clicks;
private trackingPoints;
private wheelDelta;
private prevWheelDelta;
private prevWheelTime;
private prevMouseMoveEvent;
private pwt;
private cwd;
private pmme;
/**
* Current state of the instance
*/
@ -36,7 +35,7 @@ export declare class Panzoom extends Component<OptionsType, EventsType> {
/**
* Reference to the content element
*/
content: HTMLElement | HTMLImageElement;
content: HTMLElement | HTMLImageElement | HTMLPictureElement;
/**
* Reference to the loading indicator element
*/
@ -213,7 +212,7 @@ export declare class Panzoom extends Component<OptionsType, EventsType> {
*/
updateControls(): void;
/**
* Pan content to selected position and scale
* Pan content to selected position and scale, use `friction` to control duration
*/
panTo({ x, y, scale, friction, angle, originX, originY, flipX, flipY, ignoreBounds, }: {
x?: number;

2
types/shared/utils/addClass.d.ts

@ -1 +1 @@
export declare const addClass: (el: HTMLElement, classes?: string) => void;
export declare const addClass: (el: HTMLElement | null, classes?: string) => void;

2
types/shared/utils/getScrollableParent.d.ts

@ -1,2 +1,2 @@
export declare const isScrollable: (ele: HTMLElement) => boolean;
export declare const isScrollable: (ele: HTMLElement | null) => boolean;
export declare const getScrollableParent: (ele: HTMLElement, limit?: HTMLElement | undefined) => false | HTMLElement;

2
types/shared/utils/removeClass.d.ts

@ -1 +1 @@
export declare const removeClass: (el: HTMLElement, classes?: string) => void;
export declare const removeClass: (el: HTMLElement | null, classes?: string) => void;

Loading…
Cancel
Save