@kendawson-online/vantl 2.0.4 → 2.0.5
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/README.md +7 -1
- package/dist/timeline.min.css +2 -0
- package/dist/timeline.min.css.map +1 -0
- package/dist/timeline.min.js +1 -1
- package/dist/timeline.min.js.map +1 -1
- package/package.json +8 -3
- package/src/css/timeline.css +5 -3
package/README.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
A lightweight, responsive timeline library created with vanilla Javascript for creating beautiful horizontal and vertical timelines with zero dependencies. Inspired by [timeline](https://github.com/squarechip/timeline) originally created by [squarechip](https://github.com/squarechip) in 2018.
|
|
4
4
|
|
|
5
|
+
<table align="center">
|
|
6
|
+
<tr>
|
|
7
|
+
<td><img src="demo/assets/img/horizontal-screenshot.png" width="650"></td>
|
|
8
|
+
</tr>
|
|
9
|
+
</table>
|
|
10
|
+
|
|
5
11
|
|
|
6
12
|
## Features
|
|
7
13
|
|
|
@@ -24,7 +30,7 @@ A lightweight, responsive timeline library created with vanilla Javascript for c
|
|
|
24
30
|
<html>
|
|
25
31
|
<head>
|
|
26
32
|
<!-- timeline stylesheet -->
|
|
27
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@kendawson-online/vantl@2/
|
|
33
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@kendawson-online/vantl@2/dist/timeline.min.css">
|
|
28
34
|
</head>
|
|
29
35
|
<body>
|
|
30
36
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.timeline{--timeline-line-color:#ddd;--timeline-node-color:#ddd;--timeline-node-bg:#fff;--timeline-nav-color:#fff;--timeline-nav-border:#ddd;box-sizing:border-box;overflow-x:hidden;position:relative}.timeline__heading{color:#333;font-size:2rem;font-weight:700;margin:0 0 60px;text-align:center}.timeline *,.timeline :after,.timeline :before{box-sizing:inherit}.timeline:not(.timeline--horizontal):before{background-color:var(--timeline-line-color);bottom:0;content:"";left:50%;margin-left:-2px;position:absolute;top:0;width:4px;z-index:1}.timeline__wrap{overflow:hidden;position:relative;z-index:2}.timeline--horizontal .timeline__wrap{overflow:visible}.timeline__item{font-size:1rem;padding:10px 40px 10px 0;position:relative;width:50%;z-index:2}.timeline:not(.timeline--horizontal):not(.timeline--mobile) .timeline__item .timeline__content{display:flex;flex-direction:column;max-height:200px}.timeline:not(.timeline--horizontal):not(.timeline--mobile) .timeline__item .timeline__image{flex-shrink:0}.timeline:not(.timeline--horizontal):not(.timeline--mobile) .timeline__item .timeline__content>div{display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden}.timeline:not(.timeline--horizontal):not(.timeline--mobile) .timeline__item .timeline__content h3{flex-shrink:0;margin:0 0 6px;text-align:center}.timeline:not(.timeline--horizontal):not(.timeline--mobile) .timeline__item .timeline__content p{flex:1;margin-bottom:0;min-height:0;overflow:hidden}.timeline:not(.timeline--horizontal):not(.timeline--mobile) .timeline__item .timeline__image{height:auto;margin:0 auto 12px;max-height:100px;object-fit:cover;width:100px}.timeline__item:after{background-color:var(--timeline-node-bg);border:4px solid var(--timeline-node-color);border-radius:50%;content:"";height:20px;position:absolute;right:-10px;top:50%;transform:translateY(-50%);width:20px;z-index:1}.timeline__item.animated{animation-duration:1s;animation-fill-mode:both;opacity:0}.timeline__item.fadeIn{animation-name:fadeIn}.timeline__item--active .timeline__content{box-shadow:0 4px 12px rgba(0,0,0,.15);transform:scale(1.05)}.timeline__item--left{left:0}.timeline__item--right{left:50%;padding:10px 0 10px 40px}.timeline__item--right:after{left:-10px}.timeline__item--right .timeline__content:before{border:10px solid transparent;border-left:none;border-right:12px solid #ccc;left:-12px}.timeline__item--right .timeline__content:after{border:9px solid transparent;border-left:none;border-right:11px solid #fff;left:-10px}.timeline__content{background-color:#fff;border:1px solid #ccc;border-radius:10px;color:#333;display:block;padding:20px;position:relative}.timeline__image{border-radius:8px;display:block;height:auto;margin-bottom:12px;max-width:100%;width:100%}.timeline--horizontal .timeline__image{height:100px;margin:0 auto 8px;object-fit:cover;width:100px}.timeline__content:after,.timeline__content:before{content:"";height:0;position:absolute;top:50%;transform:translateY(-50%);width:0}.timeline__content:before{border-bottom:10px solid transparent;border-left:12px solid #ccc;border-top:10px solid transparent;right:-12px;z-index:1}.timeline__content:after{border-bottom:9px solid transparent;border-left:11px solid #fff;border-top:9px solid transparent;right:-10px;z-index:2}.timeline__content h2{font-size:20px;font-weight:700;margin:0 0 10px}.timeline__content h3{font-size:18px;font-weight:700;margin:0 0 10px}.timeline__content p{font-size:15px;line-height:1.5;margin-bottom:10px}.timeline--horizontal{font-size:0;overflow-x:hidden;overflow-y:visible;padding:0 60px;white-space:nowrap}.timeline--horizontal .timeline-divider{background-color:var(--timeline-line-color);display:block;height:4px;left:40px;position:absolute;right:40px;transform:translateY(-50%);z-index:1}.timeline--horizontal .timeline__items{transition:all .8s;will-change:transform}.timeline--horizontal .timeline__item{display:inline-block;left:0;padding:0 0 40px;position:relative;transition:none;vertical-align:top;white-space:normal;width:200px}.timeline--horizontal .timeline__item .timeline__content{min-height:180px;padding:12px}.timeline--horizontal .timeline__item .timeline__content h3{font-size:18px;font-weight:700;margin:0 0 8px}.timeline--horizontal .timeline__item .timeline__content p{font-size:11px;line-height:1.4;margin-bottom:0}.timeline--horizontal .timeline__item:after{left:50%;right:auto;top:100%;transform:translate(-50%,-50%)}.timeline--horizontal .timeline__item .timeline__item__inner{display:table;height:100%;width:100%}.timeline--horizontal .timeline__item .timeline__content__wrap{display:table-cell;margin:0;padding:0;vertical-align:bottom}.timeline--horizontal .timeline__item .timeline__content:before{border-left:12px solid transparent;border-right:12px solid transparent;border-top:12px solid #ccc;left:50%;right:auto;top:100%;transform:translateX(-50%)}.timeline--horizontal .timeline__item .timeline__content:after{border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid #fff;left:50%;right:auto;top:100%;transform:translateX(-50%)}.timeline--horizontal .timeline__item--bottom{padding:40px 0 0}.timeline--horizontal .timeline__item--bottom:after{top:0}.timeline--horizontal .timeline__item--bottom .timeline__content__wrap{vertical-align:top}.timeline--horizontal .timeline__item--bottom .timeline__content:before{border:12px solid transparent;border-bottom:12px solid #ccc;border-top:none;bottom:100%;top:auto}.timeline--horizontal .timeline__item--bottom .timeline__content:after{border:10px solid transparent;border-bottom:10px solid #fff;border-top:none;bottom:100%;top:auto}.timeline-nav-button{background-color:var(--timeline-nav-color);border:3px solid var(--timeline-nav-border);border-radius:50px;box-shadow:0 2px 4px rgba(0,0,0,.1);box-sizing:border-box;cursor:pointer;display:block;height:40px;outline:none;position:absolute;text-indent:-9999px;top:50%;transform:translateY(-50%);transition:all .3s ease;width:40px;z-index:10}.timeline-nav-button:hover{box-shadow:0 4px 8px rgba(0,0,0,.15);transform:translateY(-50%) scale(1.15)}.timeline-nav-button:disabled{cursor:not-allowed;opacity:.5;pointer-events:none;user-select:none}.timeline-nav-button:before{display:none}.timeline-nav-button svg{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.timeline-nav-button--prev{left:10px}.timeline-nav-button--next{right:10px}.timeline--mobile{padding:0}.timeline--mobile:before{left:10px!important;margin:0!important}.timeline--mobile .timeline__item{left:0;margin-bottom:20px;padding-left:40px;padding-right:0;width:100%}.timeline--mobile .timeline__item .timeline__content{align-items:flex-start;display:flex;flex-direction:row;gap:6px;max-height:100px;padding:12px}.timeline--mobile .timeline__item .timeline__image{border-radius:6px;flex-shrink:0;height:80px;margin:0;object-fit:cover;width:80px}.timeline--mobile .timeline__item .timeline__content>div{flex:1;min-width:0}.timeline--mobile .timeline__item .timeline__content h3{font-size:16px;margin:0 0 6px}.timeline--mobile .timeline__item .timeline__content p{font-size:13px;line-height:1.4;margin:0;overflow:hidden;text-overflow:ellipsis}.timeline--mobile .timeline__item:after{left:2px;margin:0}.timeline--mobile .timeline__item .timeline__content:before{border:12px solid transparent;border-left:none;border-right-color:#ccc;left:-12px}.timeline--mobile .timeline__item .timeline__content:after{border:10px solid transparent;border-left:none;border-right-color:#fff;left:-10px}@keyframes fadeIn{0%{opacity:0;top:70px}to{opacity:1;top:0}}@keyframes liftUp{0%{top:0}to{top:-15px}}.timeline-modal-overlay{background-color:rgba(0,0,0,.85);height:100%;left:0;opacity:0;position:fixed;top:0;transition:opacity .3s ease,visibility .3s ease;visibility:hidden;width:100%;z-index:9998}.timeline-modal-overlay.timeline-modal-show{opacity:1;visibility:visible}.timeline-modal{background-color:#fff;border-radius:12px;box-shadow:0 10px 40px rgba(0,0,0,.3);left:50%;max-height:90vh;max-width:900px;opacity:0;overflow:hidden;position:fixed;top:50%;transform:translate(-50%,-50%) scale(.7);transition:opacity .3s ease,transform .3s ease,visibility .3s ease;visibility:hidden;width:90%;z-index:9999}.timeline-modal.timeline-modal-show{opacity:1;transform:translate(-50%,-50%) scale(1);visibility:visible}.timeline-modal__content{max-height:90vh;overflow-x:hidden;overflow-y:auto;padding:40px 40px 80px}.timeline-modal__content::-webkit-scrollbar{width:8px}.timeline-modal__content::-webkit-scrollbar-track{background:#f1f1f1;border-radius:0 12px 12px 0}.timeline-modal__content::-webkit-scrollbar-thumb{background:#888;border-radius:4px}.timeline-modal__content::-webkit-scrollbar-thumb:hover{background:#555}.timeline-modal__image{border-radius:8px;display:block;height:auto;margin:0 auto 20px;max-width:100%;width:auto}.timeline-modal__title{color:#333;font-size:28px;font-weight:700;margin:0 0 20px}.timeline-modal__text{color:#555;font-size:16px;line-height:1.6}.timeline-modal__text p{margin-bottom:15px}.timeline-modal__divider{border:0;border-top:1px solid #ddd;margin:30px 0}.timeline-modal__close-bottom{background-color:#333;border:none;border-radius:6px;color:#fff;cursor:pointer;display:block;font-size:16px;margin:30px auto 0;padding:12px 40px;transition:background-color .2s ease}.timeline-modal__close-bottom:hover{background-color:#555}.timeline-modal__close{align-items:center;background-color:rgba(0,0,0,.6);border:none;border-radius:50%;color:#fff;cursor:pointer;display:flex;font-size:24px;height:40px;justify-content:center;line-height:1;position:absolute;right:20px;top:20px;transition:background-color .2s ease,transform .2s ease;width:40px}.timeline-modal__close:hover{background-color:rgba(0,0,0,.8);transform:scale(1.1)}.timeline-modal__close:before{content:"×"}.timeline__item{cursor:pointer;transition:transform .2s ease}.timeline__item:hover .timeline__content{box-shadow:0 4px 12px rgba(0,0,0,.15);transform:translateY(-2px)}.timeline__loader-overlay{background-color:#fff;inset:0;position:fixed;z-index:10000}.timeline__loader,.timeline__loader-overlay{align-items:center;display:flex;justify-content:center}.timeline__loader{padding:20px}.timeline__loader-spinner{display:block;height:auto;max-width:100%;object-fit:contain;width:120px}.timeline__error{align-items:center;background-color:#f9f9f9;border:2px solid #e0e0e0;border-radius:12px;display:flex;flex-direction:column;justify-content:center;margin:20px auto;max-width:600px;min-height:300px;padding:60px 20px;text-align:center}.timeline__error-icon{height:auto;margin-bottom:24px;max-width:100%;opacity:.8;width:200px}.timeline__error-title{color:#d32f2f;font-size:24px;font-weight:700;margin:0 0 16px}.timeline__error-message{color:#555;font-size:16px;line-height:1.6;margin:0 0 16px}.timeline__error-solution{background-color:#fff3cd;border:1px solid #ffc107;border-radius:6px;color:#333;font-size:15px;line-height:1.6;margin:0 0 12px;padding:12px 16px}.timeline__error-solution strong{color:#856404}.timeline__error-details{background-color:#f5f5f5;border:1px solid #ddd;border-radius:4px;color:#666;font-family:Courier New,monospace;font-size:13px;line-height:1.5;margin:12px 0 0;max-width:100%;overflow-x:auto;padding:8px 12px}.timeline__error-details strong{color:#333}
|
|
2
|
+
/*# sourceMappingURL=timeline.min.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["timeline.css"],"names":[],"mappings":"AAAA,UAMI,0BAA2B,CAC3B,0BAA2B,CAC3B,uBAAwB,CACxB,yBAA0B,CAC1B,0BAA2B,CAT3B,qBAAsB,CAEtB,iBAAkB,CADlB,iBASJ,CAGA,mBAKI,UAAW,CAJX,cAAe,CACf,eAAgB,CAChB,eAAgB,CAChB,iBAEJ,CAEA,+CAGI,kBACJ,CAEA,4CACI,2CAA4C,CA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,uDAA2D,CAT3D,UAaJ,CAEA,6BACI,+BAAoC,CACpC,oBACJ,CAEA,8BACI,WACJ,CAGA,gBACI,cAAe,CACf,6BACJ,CAEA,yCAEI,qCAA0C,CAD1C,0BAEJ,CAGA,0BAGI,qBAAyB,CADzB,OAAQ,CADR,cAAe,CAGf,aAIJ,CAEA,4CAJI,kBAAmB,CADnB,YAAa,CAEb,sBAQJ,CALA,kBAII,YACJ,CAEA,0BAII,aAAc,CADd,WAAY,CADZ,cAAe,CAGf,kBAAmB,CAJnB,WAKJ,CAGA,iBAGI,kBAAmB,CAKnB,wBAAyB,CACzB,wBAAyB,CACzB,kBAAmB,CATnB,YAAa,CACb,qBAAsB,CAEtB,sBAAuB,CAOvB,gBAAiB,CACjB,eAAgB,CAPhB,gBAAiB,CACjB,iBAAkB,CAClB,iBAMJ,CAEA,sBAGI,WAAY,CACZ,kBAAmB,CAFnB,cAAe,CAGf,UAAY,CAJZ,WAKJ,CAEA,uBAII,aAAc,CAHd,cAAe,CACf,eAAgB,CAChB,eAEJ,CAEA,yBAII,UAAW,CAHX,cAAe,CACf,eAAgB,CAChB,eAEJ,CAEA,0BAKI,wBAAyB,CACzB,wBAAyB,CACzB,iBAAkB,CAHlB,UAAW,CAHX,cAAe,CACf,eAAgB,CAChB,eAAgB,CAKhB,iBACJ,CAEA,iCACI,aACJ,CAEA,yBAMI,wBAAyB,CACzB,qBAAsB,CACtB,iBAAkB,CAJlB,UAAW,CACX,iCAAqC,CAJrC,cAAe,CACf,eAAgB,CAChB,eAAgB,CAOhB,cAAe,CACf,eAAgB,CAFhB,gBAGJ,CAEA,gCACI,UACJ","file":"timeline.min.css","sourcesContent":[".timeline {\n box-sizing: border-box;\n position: relative;\n overflow-x: hidden;\n \n /* CSS Custom Properties for dynamic colors */\n --timeline-line-color: #DDD;\n --timeline-node-color: #DDD;\n --timeline-node-bg: #FFF;\n --timeline-nav-color: #FFF;\n --timeline-nav-border: #DDD;\n}\n\n/* Timeline heading */\n.timeline__heading {\n font-size: 2rem;\n font-weight: 700;\n margin: 0 0 60px;\n text-align: center;\n color: #333;\n}\n\n.timeline *,\n.timeline *::before,\n.timeline *::after {\n box-sizing: inherit;\n}\n\n.timeline:not(.timeline--horizontal)::before {\n background-color: var(--timeline-line-color);\n bottom: 0;\n content: '';\n left: 50%;\n margin-left: -2px;\n position: absolute;\n top: 0;\n width: 4px;\n z-index: 1;\n}\n\n.timeline__wrap {\n overflow: hidden;\n position: relative;\n z-index: 2;\n}\n\n.timeline--horizontal .timeline__wrap {\n overflow: visible;\n}\n\n.timeline__item {\n font-size: 1rem;\n padding: 10px 40px 10px 0;\n position: relative;\n width: 50%;\n z-index: 2;\n}\n\n/* Vertical timeline (not mobile) - side-by-side layout */\n.timeline:not(.timeline--horizontal):not(.timeline--mobile) .timeline__item .timeline__content {\n max-height: 200px;\n display: flex;\n flex-direction: column;\n}\n\n.timeline:not(.timeline--horizontal):not(.timeline--mobile) .timeline__item .timeline__image {\n flex-shrink: 0;\n}\n\n.timeline:not(.timeline--horizontal):not(.timeline--mobile) .timeline__item .timeline__content > div {\n flex: 1;\n min-height: 0;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n\n.timeline:not(.timeline--horizontal):not(.timeline--mobile) .timeline__item .timeline__content h3 {\n text-align: center;\n margin: 0 0 6px;\n flex-shrink: 0;\n}\n\n.timeline:not(.timeline--horizontal):not(.timeline--mobile) .timeline__item .timeline__content p {\n margin-bottom: 0;\n overflow: hidden;\n flex: 1;\n min-height: 0;\n}\n\n.timeline:not(.timeline--horizontal):not(.timeline--mobile) .timeline__item .timeline__image {\n width: 100px;\n height: auto;\n max-height: 100px;\n object-fit: cover;\n margin: 0 auto 12px;\n}\n\n.timeline__item::after {\n background-color: var(--timeline-node-bg);\n border: 4px solid var(--timeline-node-color);\n border-radius: 50%;\n content: '';\n height: 20px;\n position: absolute;\n right: -10px;\n transform: translateY(-50%);\n top: 50%;\n width: 20px;\n z-index: 1;\n}\n\n.timeline__item.animated {\n animation-duration: 1s;\n animation-fill-mode: both;\n opacity: 0;\n}\n\n.timeline__item.fadeIn {\n animation-name: fadeIn;\n}\n\n/* Active state for deep linking */\n.timeline__item--active .timeline__content {\n transform: scale(1.05);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n}\n\n.timeline__item--left {\n left: 0;\n}\n\n.timeline__item--right {\n left: 50%;\n padding: 10px 0 10px 40px;\n}\n\n.timeline__item--right::after {\n left: -10px;\n}\n\n.timeline__item--right .timeline__content::before {\n border-bottom: 10px solid transparent;\n border-right: 12px solid #CCC;\n border-left: none;\n border-top: 10px solid transparent;\n left: -12px;\n}\n\n.timeline__item--right .timeline__content::after {\n border-bottom: 9px solid transparent;\n border-right: 11px solid #FFF;\n border-left: none;\n border-top: 9px solid transparent;\n left: -10px;\n}\n\n.timeline__content {\n background-color: #FFF;\n border: 1px solid #CCC;\n border-radius: 10px;\n color: #333;\n display: block;\n padding: 20px;\n position: relative;\n}\n\n/* Image styling - fluid to fit content box */\n.timeline__image {\n width: 100%;\n height: auto;\n max-width: 100%;\n border-radius: 8px;\n margin-bottom: 12px;\n display: block;\n}\n\n/* Horizontal timeline images - square thumbnails */\n.timeline--horizontal .timeline__image {\n width: 100px;\n height: 100px;\n object-fit: cover;\n margin: 0 auto 8px;\n}\n\n.timeline__content::before,\n.timeline__content::after {\n content: '';\n height: 0;\n position: absolute;\n transform: translateY(-50%);\n top: 50%;\n width: 0;\n}\n\n.timeline__content::before {\n border-bottom: 10px solid transparent;\n border-left: 12px solid #CCC;\n border-top: 10px solid transparent;\n right: -12px;\n z-index: 1;\n}\n\n.timeline__content::after {\n border-bottom: 9px solid transparent;\n border-left: 11px solid #FFF;\n border-top: 9px solid transparent;\n right: -10px;\n z-index: 2;\n}\n\n.timeline__content h2 {\n font-size: 20px;\n font-weight: 700;\n margin: 0 0 10px;\n}\n\n.timeline__content h3 {\n font-size: 18px;\n font-weight: 700;\n margin: 0 0 10px;\n}\n\n.timeline__content p {\n font-size: 15px;\n line-height: 1.5;\n margin-bottom: 10px;\n}\n\n.timeline--horizontal {\n font-size: 0;\n padding: 0 60px;\n overflow-x: hidden;\n overflow-y: visible;\n white-space: nowrap;\n}\n\n.timeline--horizontal .timeline-divider {\n background-color: var(--timeline-line-color);\n display: block;\n height: 4px;\n left: 40px;\n position: absolute;\n transform: translateY(-50%);\n right: 40px;\n z-index: 1;\n}\n\n.timeline--horizontal .timeline__items {\n transition: all 0.8s;\n will-change: transform;\n}\n\n.timeline--horizontal .timeline__item {\n display: inline-block;\n left: 0;\n padding: 0 0 40px;\n position: relative;\n transition: none;\n vertical-align: top;\n white-space: normal;\n width: 200px;\n}\n\n.timeline--horizontal .timeline__item .timeline__content {\n padding: 12px;\n min-height: 180px;\n}\n\n.timeline--horizontal .timeline__item .timeline__content h3 {\n font-size: 18px;\n font-weight: 700;\n margin: 0 0 8px;\n}\n\n.timeline--horizontal .timeline__item .timeline__content p {\n font-size: 11px;\n line-height: 1.4;\n margin-bottom: 0;\n}\n\n.timeline--horizontal .timeline__item::after {\n left: 50%;\n right: auto;\n transform: translate(-50%, -50%);\n top: 100%;\n}\n\n.timeline--horizontal .timeline__item .timeline__item__inner {\n display: table;\n height: 100%;\n width: 100%;\n}\n\n.timeline--horizontal .timeline__item .timeline__content__wrap {\n display: table-cell;\n margin: 0;\n padding: 0;\n vertical-align: bottom;\n}\n\n.timeline--horizontal .timeline__item .timeline__content::before {\n border-left: 12px solid transparent;\n border-right: 12px solid transparent;\n border-top: 12px solid #CCC;\n left: 50%;\n right: auto;\n transform: translateX(-50%);\n top: 100%;\n}\n\n.timeline--horizontal .timeline__item .timeline__content::after {\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n border-top: 10px solid #FFF;\n left: 50%;\n right: auto;\n transform: translateX(-50%);\n top: 100%;\n}\n\n.timeline--horizontal .timeline__item--bottom {\n padding: 40px 0 0;\n}\n\n.timeline--horizontal .timeline__item--bottom::after {\n top: 0;\n}\n\n.timeline--horizontal .timeline__item--bottom .timeline__content__wrap {\n vertical-align: top;\n}\n\n.timeline--horizontal .timeline__item--bottom .timeline__content::before {\n border-bottom: 12px solid #CCC;\n border-left: 12px solid transparent;\n border-right: 12px solid transparent;\n border-top: none;\n bottom: 100%;\n top: auto;\n}\n\n.timeline--horizontal .timeline__item--bottom .timeline__content::after {\n border-bottom: 10px solid #FFF;\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n border-top: none;\n bottom: 100%;\n top: auto;\n}\n\n.timeline-nav-button {\n background-color: var(--timeline-nav-color);\n border: 3px solid var(--timeline-nav-border);\n border-radius: 50px;\n box-sizing: border-box;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n cursor: pointer;\n display: block;\n height: 40px;\n outline: none;\n position: absolute;\n text-indent: -9999px;\n transform: translateY(-50%);\n top: 50%;\n width: 40px;\n z-index: 10;\n transition: all 0.3s ease;\n}\n\n.timeline-nav-button:hover {\n transform: translateY(-50%) scale(1.15);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);\n}\n\n.timeline-nav-button:disabled {\n opacity: .5;\n pointer-events: none;\n cursor: not-allowed;\n user-select: none;\n}\n\n.timeline-nav-button::before {\n display: none;\n}\n\n.timeline-nav-button svg {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.timeline-nav-button--prev {\n left: 10px;\n}\n\n.timeline-nav-button--next {\n right: 10px;\n}\n\n.timeline--mobile {\n padding: 0;\n}\n\n.timeline--mobile::before {\n left: 10px !important;\n margin: 0 !important;\n}\n\n.timeline--mobile .timeline__item {\n left: 0;\n padding-left: 40px;\n padding-right: 0;\n width: 100%;\n margin-bottom: 20px;\n}\n\n.timeline--mobile .timeline__item .timeline__content {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: 6px;\n padding: 12px;\n max-height: 100px;\n}\n\n.timeline--mobile .timeline__item .timeline__image {\n width: 80px;\n height: 80px;\n object-fit: cover;\n flex-shrink: 0;\n margin: 0;\n border-radius: 6px;\n}\n\n.timeline--mobile .timeline__item .timeline__content > div {\n flex: 1;\n min-width: 0;\n}\n\n.timeline--mobile .timeline__item .timeline__content h3 {\n font-size: 16px;\n margin: 0 0 6px;\n}\n\n.timeline--mobile .timeline__item .timeline__content p {\n font-size: 13px;\n line-height: 1.4;\n margin: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.timeline--mobile .timeline__item::after {\n left: 2px;\n margin: 0;\n}\n\n.timeline--mobile .timeline__item .timeline__content::before {\n left: -12px;\n border-bottom: 12px solid transparent;\n border-right: 12px solid #CCC;\n border-left: none;\n border-top: 12px solid transparent;\n}\n\n.timeline--mobile .timeline__item .timeline__content::after {\n left: -10px;\n border-bottom: 10px solid transparent;\n border-right: 10px solid #FFF;\n border-left: none;\n border-top: 10px solid transparent;\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n top: 70px;\n }\n 100% {\n opacity: 1;\n top: 0px;\n }\n}\n\n@keyframes liftUp {\n 0% {\n top: 0px;\n }\n 100% {\n top: -15px;\n }\n}\n\n/* Modal Styles */\n.timeline-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.85);\n z-index: 9998;\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.3s ease, visibility 0.3s ease;\n}\n\n.timeline-modal-overlay.timeline-modal-show {\n opacity: 1;\n visibility: visible;\n}\n\n.timeline-modal {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0.7);\n width: 90%;\n max-width: 900px;\n max-height: 90vh;\n background-color: #FFF;\n border-radius: 12px;\n box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);\n z-index: 9999;\n opacity: 0;\n visibility: hidden;\n overflow: hidden;\n transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;\n}\n\n.timeline-modal.timeline-modal-show {\n opacity: 1;\n visibility: visible;\n transform: translate(-50%, -50%) scale(1);\n}\n\n.timeline-modal__content {\n padding: 40px 40px 80px 40px;\n max-height: 90vh;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n/* Fix scrollbar overflow on rounded corners */\n.timeline-modal__content::-webkit-scrollbar {\n width: 8px;\n}\n\n.timeline-modal__content::-webkit-scrollbar-track {\n background: #f1f1f1;\n border-radius: 0 12px 12px 0;\n}\n\n.timeline-modal__content::-webkit-scrollbar-thumb {\n background: #888;\n border-radius: 4px;\n}\n\n.timeline-modal__content::-webkit-scrollbar-thumb:hover {\n background: #555;\n}\n\n.timeline-modal__image {\n width: auto;\n max-width: 100%;\n height: auto;\n border-radius: 8px;\n margin: 0 auto 20px;\n display: block;\n}\n\n.timeline-modal__title {\n font-size: 28px;\n font-weight: 700;\n margin: 0 0 20px;\n color: #333;\n}\n\n.timeline-modal__text {\n font-size: 16px;\n line-height: 1.6;\n color: #555;\n}\n\n.timeline-modal__text p {\n margin-bottom: 15px;\n}\n\n.timeline-modal__divider {\n border: 0;\n border-top: 1px solid #ddd;\n margin: 30px 0;\n}\n\n.timeline-modal__close-bottom {\n display: block;\n margin: 30px auto 0;\n padding: 12px 40px;\n background-color: #333;\n color: #fff;\n border: none;\n border-radius: 6px;\n font-size: 16px;\n cursor: pointer;\n transition: background-color 0.2s ease;\n}\n\n.timeline-modal__close-bottom:hover {\n background-color: #555;\n}\n\n.timeline-modal__close {\n position: absolute;\n top: 20px;\n right: 20px;\n width: 40px;\n height: 40px;\n background-color: rgba(0, 0, 0, 0.6);\n border: none;\n border-radius: 50%;\n color: #FFF;\n font-size: 24px;\n line-height: 1;\n cursor: pointer;\n transition: background-color 0.2s ease, transform 0.2s ease;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.timeline-modal__close:hover {\n background-color: rgba(0, 0, 0, 0.8);\n transform: scale(1.1);\n}\n\n.timeline-modal__close::before {\n content: '×';\n}\n\n/* Make timeline items clickable */\n.timeline__item {\n cursor: pointer;\n transition: transform 0.2s ease;\n}\n\n.timeline__item:hover .timeline__content {\n transform: translateY(-2px);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n}\n\n/* Loading spinner styles */\n.timeline__loader-overlay {\n position: fixed;\n inset: 0;\n background-color: #ffffff;\n z-index: 10000;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.timeline__loader {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 20px;\n}\n\n.timeline__loader-spinner {\n width: 120px;\n max-width: 100%;\n height: auto;\n display: block;\n object-fit: contain;\n}\n\n/* Error display styles */\n.timeline__error {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n min-height: 300px;\n padding: 60px 20px;\n text-align: center;\n background-color: #f9f9f9;\n border: 2px solid #e0e0e0;\n border-radius: 12px;\n margin: 20px auto;\n max-width: 600px;\n}\n\n.timeline__error-icon {\n width: 200px;\n max-width: 100%;\n height: auto;\n margin-bottom: 24px;\n opacity: 0.8;\n}\n\n.timeline__error-title {\n font-size: 24px;\n font-weight: 700;\n margin: 0 0 16px;\n color: #d32f2f;\n}\n\n.timeline__error-message {\n font-size: 16px;\n line-height: 1.6;\n margin: 0 0 16px;\n color: #555;\n}\n\n.timeline__error-solution {\n font-size: 15px;\n line-height: 1.6;\n margin: 0 0 12px;\n color: #333;\n background-color: #fff3cd;\n border: 1px solid #ffc107;\n border-radius: 6px;\n padding: 12px 16px;\n}\n\n.timeline__error-solution strong {\n color: #856404;\n}\n\n.timeline__error-details {\n font-size: 13px;\n line-height: 1.5;\n margin: 12px 0 0;\n color: #666;\n font-family: 'Courier New', monospace;\n background-color: #f5f5f5;\n border: 1px solid #ddd;\n border-radius: 4px;\n padding: 8px 12px;\n max-width: 100%;\n overflow-x: auto;\n}\n\n.timeline__error-details strong {\n color: #333;\n}\n"]}
|
package/dist/timeline.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Timeline=function(e){"use strict";const t={count:0,startTime:0,removeTimer:null,overlayEl:null},i={modal:null,overlay:null},n={};function o(){if(i.modal)return;i.overlay=document.createElement("div"),i.overlay.className="timeline-modal-overlay",i.overlay.addEventListener("click",a),i.modal=document.createElement("div"),i.modal.className="timeline-modal",i.modal.innerHTML='\n <button class="timeline-modal__close" aria-label="Close modal"></button>\n <div class="timeline-modal__content">\n <img class="timeline-modal__image" src="" alt="" style="display: none;">\n <h2 class="timeline-modal__title"></h2>\n <div class="timeline-modal__text"></div>\n <hr class="timeline-modal__divider">\n <button class="timeline-modal__close-bottom">Close</button>\n </div>\n ';const e=i.modal.querySelector(".timeline-modal__close"),t=i.modal.querySelector(".timeline-modal__close-bottom");e.addEventListener("click",a),t.addEventListener("click",a),i.modal.addEventListener("click",function(e){e.stopPropagation()}),document.body.appendChild(i.overlay),document.body.appendChild(i.modal),document.addEventListener("keydown",function(e){"Escape"===e.key&&i.modal.classList.contains("timeline-modal-show")&&a()})}function l(e){i.modal||o();const t=e.getAttribute("data-modal-title"),n=e.getAttribute("data-modal-content"),l=e.getAttribute("data-modal-image"),a=e.getAttribute("data-modal-html"),r=i.modal.querySelector(".timeline-modal__title"),s=i.modal.querySelector(".timeline-modal__text"),d=i.modal.querySelector(".timeline-modal__image");r.textContent=t||"",l?(d.src=l,d.alt=t||"",d.style.display="block"):d.style.display="none",s.innerHTML=a||(n?"<p>"+n.replace(/\n/g,"</p><p>")+"</p>":""),setTimeout(function(){i.modal.classList.add("timeline-modal-show"),i.overlay.classList.add("timeline-modal-show"),document.body.style.overflow="hidden"},10)}function a(){i.modal&&(i.modal.classList.remove("timeline-modal-show"),i.overlay.classList.remove("timeline-modal-show"),document.body.style.overflow="")}function r(e){const t=new URLSearchParams(window.location.search),i=t.get("timeline"),n=t.get("id");if(!n)return;let o;if(o=i?document.getElementById(i):document.querySelector(e),!o)return void console.warn("Timeline not found for deep linking:",i||e);o.scrollIntoView({behavior:"smooth",block:"start"});const l=o.querySelector('[data-node-id="'+n+'"]');l&&setTimeout(function(){l.classList.add("timeline__item--active");const e=Array.from(l.parentNode.children).indexOf(l);s(o,e)},500)}function s(e,t){if(!e)return;const i=e.id||e.getAttribute("data-timeline-id");if(!i)return void console.warn("Cannot navigate: timeline container has no ID");const o=n[i];o?e.classList.contains("timeline--horizontal")&&o.setCurrentIndex&&o.updatePosition&&(o.setCurrentIndex(t),o.updatePosition()):console.warn("Timeline not found in registry:",i)}const d=function(){if("undefined"!=typeof window&&window.TimelineConfig&&window.TimelineConfig.basePath)return window.TimelineConfig.basePath;const e=document.getElementsByTagName("script");for(let t=0;t<e.length;t++){const i=e[t].src||"";if(!i)continue;const n=i.substring(0,i.lastIndexOf("/"));if(-1!==i.indexOf("timeline.min.js"))return n.replace("/dist","/src/images");if(-1!==i.indexOf("timeline.js"))return n.replace("/js","/images")}return"../src/images"}();function m(){if(t.count+=1,1!==t.count)return;t.startTime=Date.now(),t.removeTimer&&(clearTimeout(t.removeTimer),t.removeTimer=null);const e=document.createElement("div");e.className="timeline__loader-overlay";const i=document.createElement("div");i.className="timeline__loader";const n=document.createElement("img");n.src=d+"/spinner.gif",n.alt="Loading...",n.title="Loading...",n.className="timeline__loader-spinner",i.appendChild(n),e.appendChild(i),document.body.appendChild(e),t.overlayEl=e}function c(){if(t.count<=0)return;if(t.count-=1,t.count>0)return;const e=Date.now()-t.startTime,i=Math.max(0,1300-e),n=function(){t.overlayEl&&(t.overlayEl.remove(),t.overlayEl=null),t.removeTimer=null};t.removeTimer&&(clearTimeout(t.removeTimer),t.removeTimer=null),i>0?t.removeTimer=setTimeout(n,i):n()}function u(e,t,i){if(!e)return;const n={"json-load":{title:"Timeline Data Could Not Be Loaded",message:"The timeline data failed to load. This could be due to a network error or an incorrect file path.",solution:"Please check that the data-json-config path is correct and the file is accessible."},"json-parse":{title:"Invalid Timeline Data",message:"The timeline data file exists but contains invalid JSON.",solution:"Please validate your JSON using a tool like jsonlint.com and ensure it follows the correct schema."},"missing-element":{title:"Timeline Element Not Found",message:"The required timeline container element could not be found on the page.",solution:'Ensure your HTML includes a container with the class "timeline" and the correct selector.'},"invalid-config":{title:"Invalid Configuration",message:"One or more timeline configuration options are invalid.",solution:"Check your data attributes or JavaScript options and ensure they match the expected format."}}[t]||{title:"Timeline Error",message:"An unexpected error occurred while initializing the timeline.",solution:"Please check the browser console for more details."};c(),e.innerHTML="";const o=document.createElement("div");o.className="timeline__error";const l=document.createElement("img");l.src=d+"/alert.svg",l.alt="Error",l.className="timeline__error-icon";const a=document.createElement("h2");a.className="timeline__error-title",a.textContent=n.title;const r=document.createElement("p");r.className="timeline__error-message",r.textContent=n.message;const s=document.createElement("p");if(s.className="timeline__error-solution",s.innerHTML="<strong>Solution:</strong> "+n.solution,i){const e=document.createElement("p");e.className="timeline__error-details",e.innerHTML="<strong>Details:</strong> "+i,o.appendChild(e)}o.appendChild(l),o.appendChild(a),o.appendChild(r),o.appendChild(s),e.appendChild(o),console.error("Timeline Error ["+t+"]:",n.message,i||"")}function h(e){let t;if(!e||"string"!=typeof e)return 128;if(e.startsWith("#")){let i=e.substring(1);3===i.length&&(i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]);t=[parseInt(i.substring(0,2),16),parseInt(i.substring(2,4),16),parseInt(i.substring(4,6),16)]}else{if(!e.startsWith("rgb"))return 128;{const i=e.match(/\d+/g);t=i?i.map(Number):[128,128,128]}}return(299*t[0]+587*t[1]+114*t[2])/1e3}function f(e,t){let i=t.nodeColor||null,n=t.lineColor||null;const o=t.navColor||null;if(i&&!n&&(n=i),n&&!i&&(i=n),i&&e.style.setProperty("--timeline-node-color",i),n&&e.style.setProperty("--timeline-line-color",n),o){e.style.setProperty("--timeline-nav-color",o),e.style.setProperty("--timeline-nav-border",h(o)>128?"rgba(0, 0, 0, 0.2)":"rgba(255, 255, 255, 0.3)");const t=h(o)>128?"#333":"#fff";e.style.setProperty("--timeline-arrow-color",t),e.setAttribute("data-arrow-color",t)}}function g(e,t){return"left"===e?'<svg xmlns="http://www.w3.org/2000/svg" width="7.8" height="14" style="display:block;margin:auto;"><path fill="none" stroke="'+t+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M6.8 1L1 7l5.8 6"/></svg>':'<svg xmlns="http://www.w3.org/2000/svg" width="7.8" height="14" style="display:block;margin:auto;"><path fill="none" stroke="'+t+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M1 1l5.8 6L1 13"/></svg>'}function v(e,t){const i=[],o="Timeline:";let a,r=window.innerWidth,s=0;m();let d=!0;const h={minWidth:{type:"integer",defaultValue:600},horizontalStartPosition:{type:"string",acceptedValues:["bottom","top"],defaultValue:"top"},mode:{type:"string",acceptedValues:["horizontal","vertical"],defaultValue:"vertical"},moveItems:{type:"integer",defaultValue:1},rtlMode:{type:"boolean",acceptedValues:[!0,!1],defaultValue:!1},startIndex:{type:"integer",defaultValue:0},verticalStartPosition:{type:"string",acceptedValues:["left","right"],defaultValue:"left"},verticalTrigger:{type:"string",defaultValue:"15%"},visibleItems:{type:"integer",defaultValue:3}};function v(e,t,i){t.classList.add(i),e.parentNode.insertBefore(t,e),t.appendChild(e)}function p(e,t){const i=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,o=h.verticalTrigger.defaultValue.match(/(\d*\.?\d*)(.*)/);let l=t.unit,a=t.value,r=n;return"px"===l&&a>=n&&(console.warn('The value entered for the setting "verticalTrigger" is larger than the window height. The default value will be used instead.'),[,a,l]=o),"px"===l?r=parseInt(r-a,10):"%"===l&&(r=parseInt(r*((100-a)/100),10)),i.top<=r&&i.left<=(window.innerWidth||document.documentElement.clientWidth)&&i.top+i.height>=0&&i.left+i.width>=0}function b(e,t){e.style.webkitTransform=t,e.style.msTransform=t,e.style.transform=t}function w(e){const t=`translate3d(-${e.items[s].offsetLeft}px, 0, 0)`;b(e.scroller,t)}function y(e){s=e.settings.rtlMode?e.items.length>e.settings.visibleItems?e.items.length-e.settings.visibleItems:0:e.settings.startIndex,e.timelineEl.classList.add("timeline--horizontal"),function(e){window.innerWidth>e.settings.minWidth&&(e.itemWidth=200,e.items.forEach(t=>{t.style.width=`${e.itemWidth}px`}),e.scrollerWidth=e.itemWidth*e.items.length,e.scroller.style.width=`${e.scrollerWidth}px`,function(){let t=0,i=0;e.items.forEach((e,n)=>{e.style.height="auto";const o=e.offsetHeight;n%2==0?i=o>i?o:i:t=o>t?o:t});const n=`translateY(${i}px)`;e.items.forEach((o,l)=>{l%2==0?(o.style.height=`${i}px`,"bottom"===e.settings.horizontalStartPosition?(o.classList.add("timeline__item--bottom"),b(o,n)):o.classList.add("timeline__item--top")):(o.style.height=`${t}px`,"bottom"!==e.settings.horizontalStartPosition?(o.classList.add("timeline__item--bottom"),b(o,n)):o.classList.add("timeline__item--top"))}),e.scroller.style.height=`${i+t}px`}())}(e),w(e),function(e){const t=e.wrap.offsetWidth,i=Math.floor(t/e.itemWidth);if(e.items.length>i){const t=document.createElement("button"),n=document.createElement("button"),o=e.items[0].offsetHeight;t.className="timeline-nav-button timeline-nav-button--prev",n.className="timeline-nav-button timeline-nav-button--next",t.textContent="Previous",n.textContent="Next",t.style.top=`${o}px`,n.style.top=`${o}px`;const l=e.timelineEl.getAttribute("data-arrow-color")||"#333";t.innerHTML=g("left",l),n.innerHTML=g("right",l);const a=Math.max(0,e.items.length-i);0===s?t.disabled=!0:s>=a&&(n.disabled=!0),e.timelineEl.appendChild(t),e.timelineEl.appendChild(n)}}(e),function(e){const t=e.timelineEl.querySelector(".timeline-divider");t&&e.timelineEl.removeChild(t);const i=e.items[0].offsetHeight,n=document.createElement("span");n.className="timeline-divider",n.style.top=`${i}px`,e.timelineEl.appendChild(n)}(e),function(e){const t=e.timelineEl.querySelectorAll(".timeline-nav-button"),i=e.timelineEl.querySelector(".timeline-nav-button--prev"),n=e.timelineEl.querySelector(".timeline-nav-button--next"),o=e.wrap.offsetWidth,l=Math.floor(o/e.itemWidth),a=Math.max(0,e.items.length-l),r=parseInt(e.settings.moveItems,10),d=function(t){t.preventDefault(),t.stopPropagation(),this.disabled||(s=this.classList.contains("timeline-nav-button--next")?s+=r:s-=r,0===s||s<0?(s=0,i.disabled=!0,n.disabled=!1):s===a||s>a?(s=a,i.disabled=!1,n.disabled=!0):(i.disabled=!1,n.disabled=!1),w(e))};Array.from(t).forEach(t=>{t.addEventListener("click",d),e.listeners.push({element:t,type:"click",handler:d})})}(e);const t=e.timelineEl.id||e.timelineEl.getAttribute("data-timeline-id");t&&(n[t]={setCurrentIndex:function(t){const i=e.wrap.offsetWidth,n=Math.floor(i/e.itemWidth),o=Math.max(0,e.items.length-n);s=Math.max(0,Math.min(t,o))},updatePosition:function(){w(e);const t=e.timelineEl.querySelector(".timeline-nav-button--prev"),i=e.timelineEl.querySelector(".timeline-nav-button--next");if(t&&i){const n=e.wrap.offsetWidth,o=Math.floor(n/e.itemWidth),l=Math.max(0,e.items.length-o);t.disabled=0===s,i.disabled=s>=l}}})}function E(){i.forEach(e=>{e.timelineEl.style.opacity=0,e.timelineEl.classList.contains("timeline--loaded")||e.items.forEach(e=>{v(e.querySelector(".timeline__content"),document.createElement("div"),"timeline__content__wrap"),v(e.querySelector(".timeline__content__wrap"),document.createElement("div"),"timeline__item__inner")}),function(e){e.listeners&&e.listeners.length>0&&(e.listeners.forEach(({element:e,type:t,handler:i})=>{e.removeEventListener(t,i)}),e.listeners=[]),e.observer&&(e.observer.disconnect(),e.observer=null),e.timelineEl.classList.remove("timeline--horizontal","timeline--mobile"),e.scroller.removeAttribute("style"),e.items.forEach(e=>{e.removeAttribute("style"),e.classList.remove("animated","fadeIn","timeline__item--left","timeline__item--right")});const t=e.timelineEl.querySelectorAll(".timeline-nav-button");Array.from(t).forEach(e=>{e.parentNode.removeChild(e)})}(e),window.innerWidth<=e.settings.minWidth&&e.timelineEl.classList.add("timeline--mobile"),"horizontal"===e.settings.mode&&window.innerWidth>e.settings.minWidth?y(e):function(e){let t=0;e.items.forEach((i,n)=>{i.classList.remove("animated","fadeIn"),!p(i,e.settings.verticalTrigger)&&n>0?i.classList.add("animated"):t=n,n%2==("left"===e.settings.verticalStartPosition?1:0)&&window.innerWidth>e.settings.minWidth?i.classList.add("timeline__item--right"):i.classList.add("timeline__item--left")});for(let i=0;i<t;i+=1)e.items[i].classList.remove("animated","fadeIn");if("IntersectionObserver"in window){const t={rootMargin:"%"===e.settings.verticalTrigger.unit?`${e.settings.verticalTrigger.value}%`:`${e.settings.verticalTrigger.value}px`,threshold:.01},i=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.target.classList.add("fadeIn")})},t);e.items.forEach(e=>{e.classList.contains("animated")&&i.observe(e)}),e.observer=i}else{const t=()=>{e.items.forEach(t=>{p(t,e.settings.verticalTrigger)&&t.classList.add("fadeIn")})};window.addEventListener("scroll",t),e.listeners.push({element:window,type:"scroll",handler:t})}}(e),e.timelineEl.classList.add("timeline--loaded")}),setTimeout(()=>{i.forEach(e=>{e.timelineEl.style.opacity=1})},500),d&&(c(),d=!1)}e.length&&Array.from(e).forEach(function(e){const n=e.id?`#${e.id}`:`.${e.className}`,a="could not be found as a direct descendant of",r=e.dataset;let s,d,m;const c={};try{if(s=e.querySelector(".timeline__wrap"),!s)throw new Error(`${o} .timeline__wrap ${a} ${n}`);if(d=s.querySelector(".timeline__items"),!d)throw new Error(`${o} .timeline__items ${a} .timeline__wrap`);m=[].slice.call(d.children,0)}catch(t){return console.warn(t.message),u(e,"missing-element",t.message),!1}Object.keys(h).forEach(e=>{if(c[e]=h[e].defaultValue,"minWidth"===e){let e;void 0!==r.minWidth&&(e=r.minWidth),void 0!==r.minwidth&&(e=r.minwidth),void 0!==r.forceVerticalMode&&(e=r.forceVerticalMode),void 0!==r.forceverticalmode&&(e=r.forceverticalmode),void 0===e&&t&&(void 0!==t.minWidth?e=t.minWidth:void 0!==t.forceVerticalMode&&(e=t.forceVerticalMode)),void 0!==e&&(c.minWidth=e)}else r[e]?c[e]=r[e]:t&&void 0!==t[e]&&(c[e]=t[e]);var i,n;"integer"===h[e].type?c[e]&&(n=e,"number"==typeof(i=c[e])||i%1==0||(console.warn(`${o} The value "${i}" entered for the setting "${n}" is not an integer.`),0))||(c[e]=h[e].defaultValue):"string"===h[e].type&&h[e].acceptedValues&&-1===h[e].acceptedValues.indexOf(c[e])&&(console.warn(`${o} The value "${c[e]}" entered for the setting "${e}" was not recognised.`),c[e]=h[e].defaultValue)}),function(){const i=e.dataset,n=function(e){return void 0!==i[e]?i[e]:void 0!==i[e&&e.toLowerCase()]?i[e.toLowerCase()]:void 0};let o=n("nodeColor"),l=n("lineColor"),a=n("navColor");t&&(void 0!==t.nodeColor&&(o=t.nodeColor),void 0!==t.lineColor&&(l=t.lineColor),void 0!==t.navColor&&(a=t.navColor)),(o||l||a)&&f(e,{nodeColor:o,lineColor:l,navColor:a})}();const g=h.verticalTrigger.defaultValue.match(/(\d*\.?\d*)(.*)/),v=c.verticalTrigger.match(/(\d*\.?\d*)(.*)/);let[,p,b]=v,w=!0;p||(console.warn(`${o} No numercial value entered for the 'verticalTrigger' setting.`),w=!1),"px"!==b&&"%"!==b&&(console.warn(`${o} The setting 'verticalTrigger' must be a percentage or pixel value.`),w=!1),"%"===b&&(p>100||p<0)?(console.warn(`${o} The 'verticalTrigger' setting value must be between 0 and 100 if using a percentage value.`),w=!1):"px"===b&&p<0&&(console.warn(`${o} The 'verticalTrigger' setting value must be above 0 if using a pixel value.`),w=!1),!1===w&&([,p,b]=g),c.verticalTrigger={unit:b,value:p},c.moveItems>c.visibleItems&&(console.warn(`${o} The value of "moveItems" (${c.moveItems}) is larger than the number of "visibleItems" (${c.visibleItems}). The value of "visibleItems" has been used instead.`),c.moveItems=c.visibleItems),c.startIndex>m.length-c.visibleItems&&m.length>c.visibleItems?(console.warn(`${o} The 'startIndex' setting must be between 0 and ${m.length-c.visibleItems} for this timeline. The value of ${m.length-c.visibleItems} has been used instead.`),c.startIndex=m.length-c.visibleItems):m.length<=c.visibleItems?(console.warn(`${o} The number of items in the timeline must exceed the number of visible items to use the 'startIndex' option.`),c.startIndex=0):c.startIndex<0&&(console.warn(`${o} The 'startIndex' setting must be between 0 and ${m.length-c.visibleItems} for this timeline. The value of 0 has been used instead.`),c.startIndex=0),function(e,t){t&&t.length&&t.forEach(function(e){"1"!==e.getAttribute("data-modal-bound")&&(function(e){if(!e)return;const t=e.querySelector(".timeline__content")||e;if(!e.hasAttribute("data-modal-title")){const i=t.querySelector("h1,h2,h3,h4,h5,h6");i&&i.textContent&&e.setAttribute("data-modal-title",i.textContent.trim())}if(!e.hasAttribute("data-modal-content")){const i=t.querySelector("p");i&&i.textContent&&e.setAttribute("data-modal-content",i.textContent.trim())}if(!e.hasAttribute("data-modal-image")){const i=t.querySelector("img");i&&i.getAttribute("src")&&e.setAttribute("data-modal-image",i.getAttribute("src"))}}(e),(e.hasAttribute("data-modal-title")||e.hasAttribute("data-modal-content")||e.hasAttribute("data-modal-image")||e.hasAttribute("data-modal-html"))&&(e.addEventListener("click",function(t){t.preventDefault(),l(e)}),e.setAttribute("data-modal-bound","1")))})}(0,m),e.id||e.setAttribute("data-timeline-id","timeline-"+Date.now()+"-"+Math.random().toString(36).substr(2,9)),i.push({timelineEl:e,wrap:s,scroller:d,items:m,settings:c,listeners:[]})}),E(),window.addEventListener("resize",()=>{clearTimeout(a),a=setTimeout(()=>{const e=window.innerWidth;e!==r&&(E(),r=e)},250)})}function p(e,t,i){const n=document.querySelector(e);if(!n)return;let o=n.querySelector(".timeline__items");if(o)o.innerHTML="";else{const e=document.createElement("div");e.className="timeline__wrap",o=document.createElement("div"),o.className="timeline__items",e.appendChild(o),n.appendChild(e)}if(i&&(function(e,t){t.layoutMode&&e.setAttribute("data-mode",t.layoutMode),void 0!==t.visibleItems&&e.setAttribute("data-visible-items",t.visibleItems),void 0!==t.minWidth&&(e.setAttribute("data-minwidth",t.minWidth),e.setAttribute("data-force-vertical-mode",t.minWidth)),void 0!==t.maxWidth&&e.setAttribute("data-maxwidth",t.maxWidth)}(n,i),f(n,i),i.timelineName&&""!==i.timelineName.trim())){const e=n.previousElementSibling;if(e&&e.classList.contains("timeline__heading"))e.textContent=i.timelineName;else{const e=document.createElement("h1");e.className="timeline__heading",e.textContent=i.timelineName,n.parentNode.insertBefore(e,n)}n.setAttribute("data-timeline-name",i.timelineName)}return t.forEach(function(e){o.appendChild(function(e){const t=document.createElement("div");t.className="timeline__item",e.id&&t.setAttribute("data-node-id",e.id),t.setAttribute("data-modal-title",e.title||""),t.setAttribute("data-modal-content",e.content||""),t.setAttribute("data-modal-image",e.image||""),e.html&&t.setAttribute("data-modal-html",e.html);const i=document.createElement("div");if(i.className="timeline__content",e.image){const t=document.createElement("img");t.src=e.image,t.className="timeline__image",t.alt=e.title||"",t.onerror=function(){console.error('Timeline: The image "'+e.image+'" could not be loaded. Please check the path.'),this.src=d+"/missing-image.svg",this.alt="Image not found",this.title="Original image: "+e.image},i.appendChild(t)}const n=document.createElement("div");if(e.title){const t=document.createElement("h3");t.textContent=e.title,n.appendChild(t)}if(e.content){const t=document.createElement("p");let i=e.content;i.length>105&&(i=i.substring(0,105)+"..."),t.innerHTML=i,n.appendChild(t)}if(e.html){const t=document.createElement("div");t.innerHTML=e.html,n.appendChild(t)}return i.appendChild(n),t.appendChild(i),t.addEventListener("click",function(e){e.preventDefault(),"function"==typeof window.openTimelineModal&&window.openTimelineModal(t)}),t.setAttribute("data-modal-bound","1"),t}(e))}),n}function b(e,t,i){const n=p(e,t,i);n&&v([n],i)}function w(e,t){const i=document.querySelector(t);if(!i)return void console.error("Timeline: Container not found:",t);m();const n=i?i.id:null,o=n?"vjs_"+n:null;if(o&&"undefined"!=typeof Storage)try{const i=localStorage.getItem(o);if(i){const l=JSON.parse(i);return void fetch(e).then(function(t){if(!t.ok)throw new Error("Failed to load "+e+" ("+t.status+")");return t.json()}).then(function(e){e.lastupdated&&l.lastupdated&&e.lastupdated===l.lastupdated?(console.log("Using cached timeline data for",n),y(l,t)):(console.log("Updating cached timeline data for",n),localStorage.setItem(o,JSON.stringify(e)),y(e,t))}).catch(function(e){console.warn("Failed to fetch fresh data, using cache:",e),y(l,t)})}}catch(e){console.warn("Error reading from localStorage:",e)}fetch(e).then(function(t){if(!t.ok)throw new Error("Failed to load "+e+" ("+t.status+")");return t.json()}).then(function(e){if(o&&"undefined"!=typeof Storage)try{localStorage.setItem(o,JSON.stringify(e)),console.log("Cached timeline data for",n)}catch(e){console.warn("Failed to cache timeline data:",e)}y(e,t)}).catch(function(e){console.error("Error loading timeline JSON:",e),u(i,"json-load",e.message)})}function y(e,t){const i=document.querySelector(t);if(!i)return void console.error("Timeline: Container not found:",t);let n=null,o=[];try{if(e.nodes&&Array.isArray(e.nodes))o=e.nodes,n={timelineName:e.timelineName,layoutMode:e.layoutMode,visibleItems:e.visibleItems,minWidth:e.minWidth,maxWidth:e.maxWidth,nodeColor:e.nodeColor,lineColor:e.lineColor,navColor:e.navColor,lastupdated:e.lastupdated};else{if(!Array.isArray(e))throw new Error('Invalid JSON format. Expected object with "nodes" array or simple array.');o=e}if(0===o.length)throw new Error("No timeline items found in data.");p(t,o,n);try{v(document.querySelectorAll(t)),r(t),c()}catch(e){console.error("Error initializing timeline:",e);const i=document.querySelector(t);i&&u(i,"invalid-config",e.message),c()}}catch(e){console.error("Error processing timeline data:",e),u(i,"json-parse",e.message),c()}}function E(e){if("undefined"!=typeof Storage)if(e){const t="vjs_"+e;localStorage.removeItem(t),console.log("Cleared cache for timeline:",e)}else{const e=Object.keys(localStorage);let t=0;e.forEach(function(e){e.startsWith("vjs_")&&(localStorage.removeItem(e),t++)}),console.log("Cleared",t,"timeline cache(s)")}else console.warn("localStorage not supported")}return"undefined"!=typeof window&&(window.timeline=v,window.timelineFromData=b,window.renderTimelineFromData=p,window.processTimelineData=y,window.loadDataFromJson=w,window.clearTimelineCache=E,window.createTimelineModal=o,window.openTimelineModal=l,window.closeTimelineModal=a,window.handleTimelineDeepLinking=r,window.navigateTimelineToNodeIndex=s),document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll("[data-json-config]").forEach(function(e){const t=e.getAttribute("data-json-config");if(!t)return;const i=(e.className||"").split(" ")[0],n=e.id?"#"+e.id:i?"."+i:null;n&&w(t,n)})}),"undefined"!=typeof window&&window.jQuery&&(window.jQuery.fn.timeline=function(e){return v(this,e),this}),e.clearTimelineCache=E,e.closeTimelineModal=a,e.createTimelineModal=o,e.handleDeepLinking=r,e.loadDataFromJson=w,e.navigateToNodeIndex=s,e.openTimelineModal=l,e.processTimelineData=y,e.renderTimelineFromData=p,e.timeline=v,e.timelineFromData=b,e}({});
|
|
1
|
+
var Timeline=function(e){"use strict";const t={count:0,startTime:0,removeTimer:null,overlayEl:null},i={modal:null,overlay:null},n={};function o(){if(i.modal)return;i.overlay=document.createElement("div"),i.overlay.className="timeline-modal-overlay",i.overlay.addEventListener("click",a),i.modal=document.createElement("div"),i.modal.className="timeline-modal",i.modal.innerHTML='\n <button class="timeline-modal__close" aria-label="Close modal"></button>\n <div class="timeline-modal__content">\n <img class="timeline-modal__image" src="" alt="" style="display: none;">\n <h2 class="timeline-modal__title"></h2>\n <div class="timeline-modal__text"></div>\n <hr class="timeline-modal__divider">\n <button class="timeline-modal__close-bottom">Close</button>\n </div>\n ';const e=i.modal.querySelector(".timeline-modal__close"),t=i.modal.querySelector(".timeline-modal__close-bottom");e.addEventListener("click",a),t.addEventListener("click",a),i.modal.addEventListener("click",function(e){e.stopPropagation()}),document.body.appendChild(i.overlay),document.body.appendChild(i.modal),document.addEventListener("keydown",function(e){"Escape"===e.key&&i.modal.classList.contains("timeline-modal-show")&&a()})}function l(e){i.modal||o();const t=e.getAttribute("data-modal-title"),n=e.getAttribute("data-modal-content"),l=e.getAttribute("data-modal-image"),a=e.getAttribute("data-modal-html"),r=i.modal.querySelector(".timeline-modal__title"),s=i.modal.querySelector(".timeline-modal__text"),d=i.modal.querySelector(".timeline-modal__image");r.textContent=t||"",l?(d.src=l,d.alt=t||"",d.style.display="block"):d.style.display="none",s.innerHTML=a||(n?"<p>"+n.replace(/\n/g,"</p><p>")+"</p>":""),setTimeout(function(){i.modal.classList.add("timeline-modal-show"),i.overlay.classList.add("timeline-modal-show"),document.body.style.overflow="hidden"},10)}function a(){i.modal&&(i.modal.classList.remove("timeline-modal-show"),i.overlay.classList.remove("timeline-modal-show"),document.body.style.overflow="")}function r(e){const t=new URLSearchParams(window.location.search),i=t.get("timeline"),n=t.get("id");if(!n)return;let o;if(o=i?document.getElementById(i):document.querySelector(e),!o)return void console.warn("Timeline not found for deep linking:",i||e);o.scrollIntoView({behavior:"smooth",block:"start"});const l=o.querySelector('[data-node-id="'+n+'"]');l&&setTimeout(function(){l.classList.add("timeline__item--active");const e=Array.from(l.parentNode.children).indexOf(l);s(o,e)},500)}function s(e,t){if(!e)return;const i=e.id||e.getAttribute("data-timeline-id");if(!i)return void console.warn("Cannot navigate: timeline container has no ID");const o=n[i];o?e.classList.contains("timeline--horizontal")&&o.setCurrentIndex&&o.updatePosition&&(o.setCurrentIndex(t),o.updatePosition()):console.warn("Timeline not found in registry:",i)}const d=function(){if("undefined"!=typeof window&&window.TimelineConfig&&window.TimelineConfig.basePath)return window.TimelineConfig.basePath;const e=document.getElementsByTagName("script");for(let t=0;t<e.length;t++){const i=e[t].src||"";if(!i)continue;const n=i.substring(0,i.lastIndexOf("/"));if(-1!==i.indexOf("timeline.min.js"))return n.replace("/dist","/src/images");if(-1!==i.indexOf("timeline.js"))return n.replace("/js","/images")}return"../src/images"}();function m(){if(t.count+=1,1!==t.count)return;t.startTime=Date.now(),t.removeTimer&&(clearTimeout(t.removeTimer),t.removeTimer=null);const e=document.createElement("div");e.className="timeline__loader-overlay";const i=document.createElement("div");i.className="timeline__loader";const n=document.createElement("img");n.src=d+"/spinner.gif",n.alt="Loading...",n.title="Loading...",n.className="timeline__loader-spinner",n.width=120,n.style.height="auto",i.appendChild(n),e.appendChild(i),document.body.appendChild(e),t.overlayEl=e}function c(){if(t.count<=0)return;if(t.count-=1,t.count>0)return;const e=Date.now()-t.startTime,i=Math.max(0,1300-e),n=function(){t.overlayEl&&(t.overlayEl.remove(),t.overlayEl=null),t.removeTimer=null};t.removeTimer&&(clearTimeout(t.removeTimer),t.removeTimer=null),i>0?t.removeTimer=setTimeout(n,i):n()}function u(e,t,i){if(!e)return;const n={"json-load":{title:"Timeline Data Could Not Be Loaded",message:"The timeline data failed to load. This could be due to a network error or an incorrect file path.",solution:"Please check that the data-json-config path is correct and the file is accessible."},"json-parse":{title:"Invalid Timeline Data",message:"The timeline data file exists but contains invalid JSON.",solution:"Please validate your JSON using a tool like jsonlint.com and ensure it follows the correct schema."},"missing-element":{title:"Timeline Element Not Found",message:"The required timeline container element could not be found on the page.",solution:'Ensure your HTML includes a container with the class "timeline" and the correct selector.'},"invalid-config":{title:"Invalid Configuration",message:"One or more timeline configuration options are invalid.",solution:"Check your data attributes or JavaScript options and ensure they match the expected format."}}[t]||{title:"Timeline Error",message:"An unexpected error occurred while initializing the timeline.",solution:"Please check the browser console for more details."};c(),e.innerHTML="";const o=document.createElement("div");o.className="timeline__error";const l=document.createElement("img");l.src=d+"/alert.svg",l.alt="Error",l.className="timeline__error-icon",l.width=200,l.style.height="auto";const a=document.createElement("h2");a.className="timeline__error-title",a.textContent=n.title;const r=document.createElement("p");r.className="timeline__error-message",r.textContent=n.message;const s=document.createElement("p");if(s.className="timeline__error-solution",s.innerHTML="<strong>Solution:</strong> "+n.solution,i){const e=document.createElement("p");e.className="timeline__error-details",e.innerHTML="<strong>Details:</strong> "+i,o.appendChild(e)}o.appendChild(l),o.appendChild(a),o.appendChild(r),o.appendChild(s),e.appendChild(o),console.error("Timeline Error ["+t+"]:",n.message,i||"")}function h(e){let t;if(!e||"string"!=typeof e)return 128;if(e.startsWith("#")){let i=e.substring(1);3===i.length&&(i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]);t=[parseInt(i.substring(0,2),16),parseInt(i.substring(2,4),16),parseInt(i.substring(4,6),16)]}else{if(!e.startsWith("rgb"))return 128;{const i=e.match(/\d+/g);t=i?i.map(Number):[128,128,128]}}return(299*t[0]+587*t[1]+114*t[2])/1e3}function f(e,t){let i=t.nodeColor||null,n=t.lineColor||null;const o=t.navColor||null;if(i&&!n&&(n=i),n&&!i&&(i=n),i&&e.style.setProperty("--timeline-node-color",i),n&&e.style.setProperty("--timeline-line-color",n),o){e.style.setProperty("--timeline-nav-color",o),e.style.setProperty("--timeline-nav-border",h(o)>128?"rgba(0, 0, 0, 0.2)":"rgba(255, 255, 255, 0.3)");const t=h(o)>128?"#333":"#fff";e.style.setProperty("--timeline-arrow-color",t),e.setAttribute("data-arrow-color",t)}}function g(e,t){return"left"===e?'<svg xmlns="http://www.w3.org/2000/svg" width="7.8" height="14" style="display:block;margin:auto;"><path fill="none" stroke="'+t+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M6.8 1L1 7l5.8 6"/></svg>':'<svg xmlns="http://www.w3.org/2000/svg" width="7.8" height="14" style="display:block;margin:auto;"><path fill="none" stroke="'+t+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M1 1l5.8 6L1 13"/></svg>'}function v(e,t){const i=[],o="Timeline:";let a,r=window.innerWidth,s=0;m();let d=!0;const h={minWidth:{type:"integer",defaultValue:600},horizontalStartPosition:{type:"string",acceptedValues:["bottom","top"],defaultValue:"top"},mode:{type:"string",acceptedValues:["horizontal","vertical"],defaultValue:"vertical"},moveItems:{type:"integer",defaultValue:1},rtlMode:{type:"boolean",acceptedValues:[!0,!1],defaultValue:!1},startIndex:{type:"integer",defaultValue:0},verticalStartPosition:{type:"string",acceptedValues:["left","right"],defaultValue:"left"},verticalTrigger:{type:"string",defaultValue:"15%"},visibleItems:{type:"integer",defaultValue:3}};function v(e,t,i){t.classList.add(i),e.parentNode.insertBefore(t,e),t.appendChild(e)}function p(e,t){const i=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,o=h.verticalTrigger.defaultValue.match(/(\d*\.?\d*)(.*)/);let l=t.unit,a=t.value,r=n;return"px"===l&&a>=n&&(console.warn('The value entered for the setting "verticalTrigger" is larger than the window height. The default value will be used instead.'),[,a,l]=o),"px"===l?r=parseInt(r-a,10):"%"===l&&(r=parseInt(r*((100-a)/100),10)),i.top<=r&&i.left<=(window.innerWidth||document.documentElement.clientWidth)&&i.top+i.height>=0&&i.left+i.width>=0}function w(e,t){e.style.webkitTransform=t,e.style.msTransform=t,e.style.transform=t}function b(e){const t=`translate3d(-${e.items[s].offsetLeft}px, 0, 0)`;w(e.scroller,t)}function y(e){s=e.settings.rtlMode?e.items.length>e.settings.visibleItems?e.items.length-e.settings.visibleItems:0:e.settings.startIndex,e.timelineEl.classList.add("timeline--horizontal"),function(e){window.innerWidth>e.settings.minWidth&&(e.itemWidth=200,e.items.forEach(t=>{t.style.width=`${e.itemWidth}px`}),e.scrollerWidth=e.itemWidth*e.items.length,e.scroller.style.width=`${e.scrollerWidth}px`,function(){let t=0,i=0;e.items.forEach((e,n)=>{e.style.height="auto";const o=e.offsetHeight;n%2==0?i=o>i?o:i:t=o>t?o:t});const n=`translateY(${i}px)`;e.items.forEach((o,l)=>{l%2==0?(o.style.height=`${i}px`,"bottom"===e.settings.horizontalStartPosition?(o.classList.add("timeline__item--bottom"),w(o,n)):o.classList.add("timeline__item--top")):(o.style.height=`${t}px`,"bottom"!==e.settings.horizontalStartPosition?(o.classList.add("timeline__item--bottom"),w(o,n)):o.classList.add("timeline__item--top"))}),e.scroller.style.height=`${i+t}px`}())}(e),b(e),function(e){const t=e.wrap.offsetWidth,i=Math.floor(t/e.itemWidth);if(e.items.length>i){const t=document.createElement("button"),n=document.createElement("button"),o=e.items[0].offsetHeight;t.className="timeline-nav-button timeline-nav-button--prev",n.className="timeline-nav-button timeline-nav-button--next",t.textContent="Previous",n.textContent="Next",t.style.top=`${o}px`,n.style.top=`${o}px`;const l=e.timelineEl.getAttribute("data-arrow-color")||"#333";t.innerHTML=g("left",l),n.innerHTML=g("right",l);const a=Math.max(0,e.items.length-i);0===s?t.disabled=!0:s>=a&&(n.disabled=!0),e.timelineEl.appendChild(t),e.timelineEl.appendChild(n)}}(e),function(e){const t=e.timelineEl.querySelector(".timeline-divider");t&&e.timelineEl.removeChild(t);const i=e.items[0].offsetHeight,n=document.createElement("span");n.className="timeline-divider",n.style.top=`${i}px`,e.timelineEl.appendChild(n)}(e),function(e){const t=e.timelineEl.querySelectorAll(".timeline-nav-button"),i=e.timelineEl.querySelector(".timeline-nav-button--prev"),n=e.timelineEl.querySelector(".timeline-nav-button--next"),o=e.wrap.offsetWidth,l=Math.floor(o/e.itemWidth),a=Math.max(0,e.items.length-l),r=parseInt(e.settings.moveItems,10),d=function(t){t.preventDefault(),t.stopPropagation(),this.disabled||(s=this.classList.contains("timeline-nav-button--next")?s+=r:s-=r,0===s||s<0?(s=0,i.disabled=!0,n.disabled=!1):s===a||s>a?(s=a,i.disabled=!1,n.disabled=!0):(i.disabled=!1,n.disabled=!1),b(e))};Array.from(t).forEach(t=>{t.addEventListener("click",d),e.listeners.push({element:t,type:"click",handler:d})})}(e);const t=e.timelineEl.id||e.timelineEl.getAttribute("data-timeline-id");t&&(n[t]={setCurrentIndex:function(t){const i=e.wrap.offsetWidth,n=Math.floor(i/e.itemWidth),o=Math.max(0,e.items.length-n);s=Math.max(0,Math.min(t,o))},updatePosition:function(){b(e);const t=e.timelineEl.querySelector(".timeline-nav-button--prev"),i=e.timelineEl.querySelector(".timeline-nav-button--next");if(t&&i){const n=e.wrap.offsetWidth,o=Math.floor(n/e.itemWidth),l=Math.max(0,e.items.length-o);t.disabled=0===s,i.disabled=s>=l}}})}function E(){i.forEach(e=>{e.timelineEl.style.opacity=0,e.timelineEl.classList.contains("timeline--loaded")||e.items.forEach(e=>{v(e.querySelector(".timeline__content"),document.createElement("div"),"timeline__content__wrap"),v(e.querySelector(".timeline__content__wrap"),document.createElement("div"),"timeline__item__inner")}),function(e){e.listeners&&e.listeners.length>0&&(e.listeners.forEach(({element:e,type:t,handler:i})=>{e.removeEventListener(t,i)}),e.listeners=[]),e.observer&&(e.observer.disconnect(),e.observer=null),e.timelineEl.classList.remove("timeline--horizontal","timeline--mobile"),e.scroller.removeAttribute("style"),e.items.forEach(e=>{e.removeAttribute("style"),e.classList.remove("animated","fadeIn","timeline__item--left","timeline__item--right")});const t=e.timelineEl.querySelectorAll(".timeline-nav-button");Array.from(t).forEach(e=>{e.parentNode.removeChild(e)})}(e),window.innerWidth<=e.settings.minWidth&&e.timelineEl.classList.add("timeline--mobile"),"horizontal"===e.settings.mode&&window.innerWidth>e.settings.minWidth?y(e):function(e){let t=0;e.items.forEach((i,n)=>{i.classList.remove("animated","fadeIn"),!p(i,e.settings.verticalTrigger)&&n>0?i.classList.add("animated"):t=n,n%2==("left"===e.settings.verticalStartPosition?1:0)&&window.innerWidth>e.settings.minWidth?i.classList.add("timeline__item--right"):i.classList.add("timeline__item--left")});for(let i=0;i<t;i+=1)e.items[i].classList.remove("animated","fadeIn");if("IntersectionObserver"in window){const t={rootMargin:"%"===e.settings.verticalTrigger.unit?`${e.settings.verticalTrigger.value}%`:`${e.settings.verticalTrigger.value}px`,threshold:.01},i=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.target.classList.add("fadeIn")})},t);e.items.forEach(e=>{e.classList.contains("animated")&&i.observe(e)}),e.observer=i}else{const t=()=>{e.items.forEach(t=>{p(t,e.settings.verticalTrigger)&&t.classList.add("fadeIn")})};window.addEventListener("scroll",t),e.listeners.push({element:window,type:"scroll",handler:t})}}(e),e.timelineEl.classList.add("timeline--loaded")}),setTimeout(()=>{i.forEach(e=>{e.timelineEl.style.opacity=1})},500),d&&(c(),d=!1)}e.length&&Array.from(e).forEach(function(e){const n=e.id?`#${e.id}`:`.${e.className}`,a="could not be found as a direct descendant of",r=e.dataset;let s,d,m;const c={};try{if(s=e.querySelector(".timeline__wrap"),!s)throw new Error(`${o} .timeline__wrap ${a} ${n}`);if(d=s.querySelector(".timeline__items"),!d)throw new Error(`${o} .timeline__items ${a} .timeline__wrap`);m=[].slice.call(d.children,0)}catch(t){return console.warn(t.message),u(e,"missing-element",t.message),!1}Object.keys(h).forEach(e=>{if(c[e]=h[e].defaultValue,"minWidth"===e){let e;void 0!==r.minWidth&&(e=r.minWidth),void 0!==r.minwidth&&(e=r.minwidth),void 0!==r.forceVerticalMode&&(e=r.forceVerticalMode),void 0!==r.forceverticalmode&&(e=r.forceverticalmode),void 0===e&&t&&(void 0!==t.minWidth?e=t.minWidth:void 0!==t.forceVerticalMode&&(e=t.forceVerticalMode)),void 0!==e&&(c.minWidth=e)}else r[e]?c[e]=r[e]:t&&void 0!==t[e]&&(c[e]=t[e]);var i,n;"integer"===h[e].type?c[e]&&(n=e,"number"==typeof(i=c[e])||i%1==0||(console.warn(`${o} The value "${i}" entered for the setting "${n}" is not an integer.`),0))||(c[e]=h[e].defaultValue):"string"===h[e].type&&h[e].acceptedValues&&-1===h[e].acceptedValues.indexOf(c[e])&&(console.warn(`${o} The value "${c[e]}" entered for the setting "${e}" was not recognised.`),c[e]=h[e].defaultValue)}),function(){const i=e.dataset,n=function(e){return void 0!==i[e]?i[e]:void 0!==i[e&&e.toLowerCase()]?i[e.toLowerCase()]:void 0};let o=n("nodeColor"),l=n("lineColor"),a=n("navColor");t&&(void 0!==t.nodeColor&&(o=t.nodeColor),void 0!==t.lineColor&&(l=t.lineColor),void 0!==t.navColor&&(a=t.navColor)),(o||l||a)&&f(e,{nodeColor:o,lineColor:l,navColor:a})}();const g=h.verticalTrigger.defaultValue.match(/(\d*\.?\d*)(.*)/),v=c.verticalTrigger.match(/(\d*\.?\d*)(.*)/);let[,p,w]=v,b=!0;p||(console.warn(`${o} No numercial value entered for the 'verticalTrigger' setting.`),b=!1),"px"!==w&&"%"!==w&&(console.warn(`${o} The setting 'verticalTrigger' must be a percentage or pixel value.`),b=!1),"%"===w&&(p>100||p<0)?(console.warn(`${o} The 'verticalTrigger' setting value must be between 0 and 100 if using a percentage value.`),b=!1):"px"===w&&p<0&&(console.warn(`${o} The 'verticalTrigger' setting value must be above 0 if using a pixel value.`),b=!1),!1===b&&([,p,w]=g),c.verticalTrigger={unit:w,value:p},c.moveItems>c.visibleItems&&(console.warn(`${o} The value of "moveItems" (${c.moveItems}) is larger than the number of "visibleItems" (${c.visibleItems}). The value of "visibleItems" has been used instead.`),c.moveItems=c.visibleItems),c.startIndex>m.length-c.visibleItems&&m.length>c.visibleItems?(console.warn(`${o} The 'startIndex' setting must be between 0 and ${m.length-c.visibleItems} for this timeline. The value of ${m.length-c.visibleItems} has been used instead.`),c.startIndex=m.length-c.visibleItems):m.length<=c.visibleItems?(console.warn(`${o} The number of items in the timeline must exceed the number of visible items to use the 'startIndex' option.`),c.startIndex=0):c.startIndex<0&&(console.warn(`${o} The 'startIndex' setting must be between 0 and ${m.length-c.visibleItems} for this timeline. The value of 0 has been used instead.`),c.startIndex=0),function(e,t){t&&t.length&&t.forEach(function(e){"1"!==e.getAttribute("data-modal-bound")&&(function(e){if(!e)return;const t=e.querySelector(".timeline__content")||e;if(!e.hasAttribute("data-modal-title")){const i=t.querySelector("h1,h2,h3,h4,h5,h6");i&&i.textContent&&e.setAttribute("data-modal-title",i.textContent.trim())}if(!e.hasAttribute("data-modal-content")){const i=t.querySelector("p");i&&i.textContent&&e.setAttribute("data-modal-content",i.textContent.trim())}if(!e.hasAttribute("data-modal-image")){const i=t.querySelector("img");i&&i.getAttribute("src")&&e.setAttribute("data-modal-image",i.getAttribute("src"))}}(e),(e.hasAttribute("data-modal-title")||e.hasAttribute("data-modal-content")||e.hasAttribute("data-modal-image")||e.hasAttribute("data-modal-html"))&&(e.addEventListener("click",function(t){t.preventDefault(),l(e)}),e.setAttribute("data-modal-bound","1")))})}(0,m),e.id||e.setAttribute("data-timeline-id","timeline-"+Date.now()+"-"+Math.random().toString(36).substr(2,9)),i.push({timelineEl:e,wrap:s,scroller:d,items:m,settings:c,listeners:[]})}),E(),window.addEventListener("resize",()=>{clearTimeout(a),a=setTimeout(()=>{const e=window.innerWidth;e!==r&&(E(),r=e)},250)})}function p(e,t,i){const n=document.querySelector(e);if(!n)return;let o=n.querySelector(".timeline__items");if(o)o.innerHTML="";else{const e=document.createElement("div");e.className="timeline__wrap",o=document.createElement("div"),o.className="timeline__items",e.appendChild(o),n.appendChild(e)}if(i&&(function(e,t){t.layoutMode&&e.setAttribute("data-mode",t.layoutMode),void 0!==t.visibleItems&&e.setAttribute("data-visible-items",t.visibleItems),void 0!==t.minWidth&&(e.setAttribute("data-minwidth",t.minWidth),e.setAttribute("data-force-vertical-mode",t.minWidth)),void 0!==t.maxWidth&&e.setAttribute("data-maxwidth",t.maxWidth)}(n,i),f(n,i),i.timelineName&&""!==i.timelineName.trim())){const e=n.previousElementSibling;if(e&&e.classList.contains("timeline__heading"))e.textContent=i.timelineName;else{const e=document.createElement("h1");e.className="timeline__heading",e.textContent=i.timelineName,n.parentNode.insertBefore(e,n)}n.setAttribute("data-timeline-name",i.timelineName)}return t.forEach(function(e){o.appendChild(function(e){const t=document.createElement("div");t.className="timeline__item",e.id&&t.setAttribute("data-node-id",e.id),t.setAttribute("data-modal-title",e.title||""),t.setAttribute("data-modal-content",e.content||""),t.setAttribute("data-modal-image",e.image||""),e.html&&t.setAttribute("data-modal-html",e.html);const i=document.createElement("div");if(i.className="timeline__content",e.image){const t=document.createElement("img");t.src=e.image,t.className="timeline__image",t.alt=e.title||"",t.onerror=function(){console.error('Timeline: The image "'+e.image+'" could not be loaded. Please check the path.'),this.src=d+"/missing-image.svg",this.alt="Image not found",this.title="Original image: "+e.image},i.appendChild(t)}const n=document.createElement("div");if(e.title){const t=document.createElement("h3");t.textContent=e.title,n.appendChild(t)}if(e.content){const t=document.createElement("p");let i=e.content;i.length>105&&(i=i.substring(0,105)+"..."),t.innerHTML=i,n.appendChild(t)}if(e.html){const t=document.createElement("div");t.innerHTML=e.html,n.appendChild(t)}return i.appendChild(n),t.appendChild(i),t.addEventListener("click",function(e){e.preventDefault(),"function"==typeof window.openTimelineModal&&window.openTimelineModal(t)}),t.setAttribute("data-modal-bound","1"),t}(e))}),n}function w(e,t,i){const n=p(e,t,i);n&&v([n],i)}function b(e,t){const i=document.querySelector(t);if(!i)return void console.error("Timeline: Container not found:",t);m();const n=i?i.id:null,o=n?"vjs_"+n:null;if(o&&"undefined"!=typeof Storage)try{const i=localStorage.getItem(o);if(i){const l=JSON.parse(i);return void fetch(e).then(function(t){if(!t.ok)throw new Error("Failed to load "+e+" ("+t.status+")");return t.json()}).then(function(e){e.lastupdated&&l.lastupdated&&e.lastupdated===l.lastupdated?(console.log("Using cached timeline data for",n),y(l,t)):(console.log("Updating cached timeline data for",n),localStorage.setItem(o,JSON.stringify(e)),y(e,t))}).catch(function(e){console.warn("Failed to fetch fresh data, using cache:",e),y(l,t)})}}catch(e){console.warn("Error reading from localStorage:",e)}fetch(e).then(function(t){if(!t.ok)throw new Error("Failed to load "+e+" ("+t.status+")");return t.json()}).then(function(e){if(o&&"undefined"!=typeof Storage)try{localStorage.setItem(o,JSON.stringify(e)),console.log("Cached timeline data for",n)}catch(e){console.warn("Failed to cache timeline data:",e)}y(e,t)}).catch(function(e){console.error("Error loading timeline JSON:",e),u(i,"json-load",e.message)})}function y(e,t){const i=document.querySelector(t);if(!i)return void console.error("Timeline: Container not found:",t);let n=null,o=[];try{if(e.nodes&&Array.isArray(e.nodes))o=e.nodes,n={timelineName:e.timelineName,layoutMode:e.layoutMode,visibleItems:e.visibleItems,minWidth:e.minWidth,maxWidth:e.maxWidth,nodeColor:e.nodeColor,lineColor:e.lineColor,navColor:e.navColor,lastupdated:e.lastupdated};else{if(!Array.isArray(e))throw new Error('Invalid JSON format. Expected object with "nodes" array or simple array.');o=e}if(0===o.length)throw new Error("No timeline items found in data.");p(t,o,n);try{v(document.querySelectorAll(t)),r(t),c()}catch(e){console.error("Error initializing timeline:",e);const i=document.querySelector(t);i&&u(i,"invalid-config",e.message),c()}}catch(e){console.error("Error processing timeline data:",e),u(i,"json-parse",e.message),c()}}function E(e){if("undefined"!=typeof Storage)if(e){const t="vjs_"+e;localStorage.removeItem(t),console.log("Cleared cache for timeline:",e)}else{const e=Object.keys(localStorage);let t=0;e.forEach(function(e){e.startsWith("vjs_")&&(localStorage.removeItem(e),t++)}),console.log("Cleared",t,"timeline cache(s)")}else console.warn("localStorage not supported")}return"undefined"!=typeof window&&(window.timeline=v,window.timelineFromData=w,window.renderTimelineFromData=p,window.processTimelineData=y,window.loadDataFromJson=b,window.clearTimelineCache=E,window.createTimelineModal=o,window.openTimelineModal=l,window.closeTimelineModal=a,window.handleTimelineDeepLinking=r,window.navigateTimelineToNodeIndex=s),document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll("[data-json-config]").forEach(function(e){const t=e.getAttribute("data-json-config");if(!t)return;const i=(e.className||"").split(" ")[0],n=e.id?"#"+e.id:i?"."+i:null;n&&b(t,n)})}),"undefined"!=typeof window&&window.jQuery&&(window.jQuery.fn.timeline=function(e){return v(this,e),this}),e.clearTimelineCache=E,e.closeTimelineModal=a,e.createTimelineModal=o,e.handleDeepLinking=r,e.loadDataFromJson=b,e.navigateToNodeIndex=s,e.openTimelineModal=l,e.processTimelineData=y,e.renderTimelineFromData=p,e.timeline=v,e.timelineFromData=w,e}({});
|
|
2
2
|
//# sourceMappingURL=timeline.min.js.map
|
package/dist/timeline.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline.min.js","sources":["../src/js/shared/state.js","../src/js/features/modals.js","../src/js/features/deep-linking.js","../src/js/shared/config.js","../src/js/features/loader-ui.js","../src/js/features/error-ui.js","../src/js/shared/utils.js","../src/js/features/colors.js","../src/js/core/timeline-engine.js","../src/js/features/data-loader.js","../src/js/timeline.js"],"sourcesContent":["// Shared state containers\nexport const loaderState = {\n count: 0,\n startTime: 0,\n removeTimer: null,\n overlayEl: null\n};\n\nexport const modalState = {\n modal: null,\n overlay: null\n};\n\n// Global registry to store timeline instances for programmatic navigation\nexport const timelineRegistry = {};\n","import { modalState } from '../shared/state.js';\n\nexport function createTimelineModal() {\n if (modalState.modal) return;\n\n modalState.overlay = document.createElement('div');\n modalState.overlay.className = 'timeline-modal-overlay';\n modalState.overlay.addEventListener('click', closeTimelineModal);\n\n modalState.modal = document.createElement('div');\n modalState.modal.className = 'timeline-modal';\n modalState.modal.innerHTML = `\n <button class=\"timeline-modal__close\" aria-label=\"Close modal\"></button>\n <div class=\"timeline-modal__content\">\n <img class=\"timeline-modal__image\" src=\"\" alt=\"\" style=\"display: none;\">\n <h2 class=\"timeline-modal__title\"></h2>\n <div class=\"timeline-modal__text\"></div>\n <hr class=\"timeline-modal__divider\">\n <button class=\"timeline-modal__close-bottom\">Close</button>\n </div>\n `;\n\n const closeBtn = modalState.modal.querySelector('.timeline-modal__close');\n const closeBottomBtn = modalState.modal.querySelector('.timeline-modal__close-bottom');\n closeBtn.addEventListener('click', closeTimelineModal);\n closeBottomBtn.addEventListener('click', closeTimelineModal);\n\n modalState.modal.addEventListener('click', function(e) {\n e.stopPropagation();\n });\n\n document.body.appendChild(modalState.overlay);\n document.body.appendChild(modalState.modal);\n\n document.addEventListener('keydown', function(e) {\n if (e.key === 'Escape' && modalState.modal.classList.contains('timeline-modal-show')) {\n closeTimelineModal();\n }\n });\n}\n\nexport function openTimelineModal(itemEl) {\n if (!modalState.modal) {\n createTimelineModal();\n }\n\n const title = itemEl.getAttribute('data-modal-title');\n const content = itemEl.getAttribute('data-modal-content');\n const image = itemEl.getAttribute('data-modal-image');\n const html = itemEl.getAttribute('data-modal-html');\n\n const modalTitle = modalState.modal.querySelector('.timeline-modal__title');\n const modalText = modalState.modal.querySelector('.timeline-modal__text');\n const modalImage = modalState.modal.querySelector('.timeline-modal__image');\n\n modalTitle.textContent = title || '';\n\n if (image) {\n modalImage.src = image;\n modalImage.alt = title || '';\n modalImage.style.display = 'block';\n } else {\n modalImage.style.display = 'none';\n }\n\n if (html) {\n modalText.innerHTML = html;\n } else if (content) {\n modalText.innerHTML = '<p>' + content.replace(/\\n/g, '</p><p>') + '</p>';\n } else {\n modalText.innerHTML = '';\n }\n\n setTimeout(function() {\n modalState.modal.classList.add('timeline-modal-show');\n modalState.overlay.classList.add('timeline-modal-show');\n document.body.style.overflow = 'hidden';\n }, 10);\n}\n\nexport function closeTimelineModal() {\n if (modalState.modal) {\n modalState.modal.classList.remove('timeline-modal-show');\n modalState.overlay.classList.remove('timeline-modal-show');\n document.body.style.overflow = '';\n }\n}\n","import { timelineRegistry } from '../shared/state.js';\n\nexport function handleDeepLinking(containerSelector) {\n const urlParams = new URLSearchParams(window.location.search);\n const timelineId = urlParams.get('timeline');\n const nodeId = urlParams.get('id');\n if (!nodeId) return;\n\n let targetContainer;\n if (timelineId) {\n targetContainer = document.getElementById(timelineId);\n } else {\n targetContainer = document.querySelector(containerSelector);\n }\n\n if (!targetContainer) {\n console.warn('Timeline not found for deep linking:', timelineId || containerSelector);\n return;\n }\n\n targetContainer.scrollIntoView({ behavior: 'smooth', block: 'start' });\n\n const targetNode = targetContainer.querySelector('[data-node-id=\"' + nodeId + '\"]');\n if (targetNode) {\n setTimeout(function() {\n targetNode.classList.add('timeline__item--active');\n const itemIndex = Array.from(targetNode.parentNode.children).indexOf(targetNode);\n navigateToNodeIndex(targetContainer, itemIndex);\n }, 500);\n }\n}\n\nexport function navigateToNodeIndex(container, index) {\n if (!container) return;\n const timelineId = container.id || container.getAttribute('data-timeline-id');\n if (!timelineId) {\n console.warn('Cannot navigate: timeline container has no ID');\n return;\n }\n\n const tlData = timelineRegistry[timelineId];\n if (!tlData) {\n console.warn('Timeline not found in registry:', timelineId);\n return;\n }\n\n if (!container.classList.contains('timeline--horizontal')) {\n return;\n }\n\n if (tlData.setCurrentIndex && tlData.updatePosition) {\n tlData.setCurrentIndex(index);\n tlData.updatePosition();\n }\n}\n","// Shared configuration values\n// Auto-detect the timeline.js script location to build correct image paths\nexport const timelineBasePath = (function() {\n // Check for user override\n if (typeof window !== 'undefined' && \n window.TimelineConfig && \n window.TimelineConfig.basePath) {\n return window.TimelineConfig.basePath;\n }\n \n const scripts = document.getElementsByTagName('script');\n for (let i = 0; i < scripts.length; i++) {\n const src = scripts[i].src || '';\n if (!src) continue;\n const dir = src.substring(0, src.lastIndexOf('/'));\n if (src.indexOf('timeline.min.js') !== -1) {\n // When loading from dist, map to src/images\n return dir.replace('/dist', '/src/images');\n }\n if (src.indexOf('timeline.js') !== -1) {\n // When loading from src/js, map to src/images\n return dir.replace('/js', '/images');\n }\n }\n // Fallback relative to demo pages; most demos live under demo/**\n return '../src/images';\n})();\n\n// Minimum time (ms) to keep the loading spinner visible\nlet timelineLoaderMinMs = 1300;\nexport function getTimelineLoaderMinMs() {\n return timelineLoaderMinMs;\n}\nexport function setTimelineLoaderMinMs(value) {\n if (typeof value === 'number' && value >= 0) {\n timelineLoaderMinMs = value;\n }\n}\n","import { loaderState } from '../shared/state.js';\nimport { getTimelineLoaderMinMs, timelineBasePath } from '../shared/config.js';\n\nexport function showTimelineLoader() {\n loaderState.count += 1;\n if (loaderState.count !== 1) return;\n\n loaderState.startTime = Date.now();\n\n if (loaderState.removeTimer) {\n clearTimeout(loaderState.removeTimer);\n loaderState.removeTimer = null;\n }\n\n const overlay = document.createElement('div');\n overlay.className = 'timeline__loader-overlay';\n\n const loader = document.createElement('div');\n loader.className = 'timeline__loader';\n\n const spinner = document.createElement('img');\n spinner.src = timelineBasePath + '/spinner.gif';\n spinner.alt = 'Loading...';\n spinner.title = 'Loading...';\n spinner.className = 'timeline__loader-spinner';\n\n loader.appendChild(spinner);\n overlay.appendChild(loader);\n\n document.body.appendChild(overlay);\n loaderState.overlayEl = overlay;\n}\n\nexport function hideTimelineLoader() {\n if (loaderState.count <= 0) return;\n loaderState.count -= 1;\n if (loaderState.count > 0) return;\n\n const elapsed = Date.now() - loaderState.startTime;\n const minMs = getTimelineLoaderMinMs();\n const remaining = Math.max(0, minMs - elapsed);\n\n const removeOverlay = function() {\n if (loaderState.overlayEl) {\n loaderState.overlayEl.remove();\n loaderState.overlayEl = null;\n }\n loaderState.removeTimer = null;\n };\n\n if (loaderState.removeTimer) {\n clearTimeout(loaderState.removeTimer);\n loaderState.removeTimer = null;\n }\n\n if (remaining > 0) {\n loaderState.removeTimer = setTimeout(removeOverlay, remaining);\n } else {\n removeOverlay();\n }\n}\n","import { timelineBasePath } from '../shared/config.js';\nimport { hideTimelineLoader } from './loader-ui.js';\n\nexport function showTimelineError(container, errorType, details) {\n if (!container) return;\n\n const errorMessages = {\n 'json-load': {\n title: 'Timeline Data Could Not Be Loaded',\n message: 'The timeline data failed to load. This could be due to a network error or an incorrect file path.',\n solution: 'Please check that the data-json-config path is correct and the file is accessible.'\n },\n 'json-parse': {\n title: 'Invalid Timeline Data',\n message: 'The timeline data file exists but contains invalid JSON.',\n solution: 'Please validate your JSON using a tool like jsonlint.com and ensure it follows the correct schema.'\n },\n 'missing-element': {\n title: 'Timeline Element Not Found',\n message: 'The required timeline container element could not be found on the page.',\n solution: 'Ensure your HTML includes a container with the class \"timeline\" and the correct selector.'\n },\n 'invalid-config': {\n title: 'Invalid Configuration',\n message: 'One or more timeline configuration options are invalid.',\n solution: 'Check your data attributes or JavaScript options and ensure they match the expected format.'\n }\n };\n\n const errorInfo = errorMessages[errorType] || {\n title: 'Timeline Error',\n message: 'An unexpected error occurred while initializing the timeline.',\n solution: 'Please check the browser console for more details.'\n };\n\n hideTimelineLoader(container);\n container.innerHTML = '';\n\n const errorDiv = document.createElement('div');\n errorDiv.className = 'timeline__error';\n\n const errorIcon = document.createElement('img');\n errorIcon.src = timelineBasePath + '/alert.svg';\n errorIcon.alt = 'Error';\n errorIcon.className = 'timeline__error-icon';\n\n const errorTitle = document.createElement('h2');\n errorTitle.className = 'timeline__error-title';\n errorTitle.textContent = errorInfo.title;\n\n const errorMessage = document.createElement('p');\n errorMessage.className = 'timeline__error-message';\n errorMessage.textContent = errorInfo.message;\n\n const errorSolution = document.createElement('p');\n errorSolution.className = 'timeline__error-solution';\n errorSolution.innerHTML = '<strong>Solution:</strong> ' + errorInfo.solution;\n\n if (details) {\n const errorDetails = document.createElement('p');\n errorDetails.className = 'timeline__error-details';\n errorDetails.innerHTML = '<strong>Details:</strong> ' + details;\n errorDiv.appendChild(errorDetails);\n }\n\n errorDiv.appendChild(errorIcon);\n errorDiv.appendChild(errorTitle);\n errorDiv.appendChild(errorMessage);\n errorDiv.appendChild(errorSolution);\n\n container.appendChild(errorDiv);\n\n console.error('Timeline Error [' + errorType + ']:', errorInfo.message, details || '');\n}\n","// Utility helpers shared across modules\nexport function getContrastColor(bgColor) {\n const brightness = getColorBrightness(bgColor);\n return brightness > 128 ? 'rgba(0, 0, 0, 0.2)' : 'rgba(255, 255, 255, 0.3)';\n}\n\nexport function getColorBrightness(color) {\n let rgb;\n if (!color || typeof color !== 'string') return 128;\n\n if (color.startsWith('#')) {\n let hex = color.substring(1);\n if (hex.length === 3) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n const r = parseInt(hex.substring(0, 2), 16);\n const g = parseInt(hex.substring(2, 4), 16);\n const b = parseInt(hex.substring(4, 6), 16);\n rgb = [r, g, b];\n } else if (color.startsWith('rgb')) {\n const matches = color.match(/\\d+/g);\n rgb = matches ? matches.map(Number) : [128, 128, 128];\n } else {\n return 128;\n }\n\n return (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n}\n","import { getContrastColor, getColorBrightness } from '../shared/utils.js';\n\nexport function applyTimelineColors(container, config) {\n let nodeColor = config.nodeColor || null;\n let lineColor = config.lineColor || null;\n const navColor = config.navColor || null;\n\n if (nodeColor && !lineColor) lineColor = nodeColor;\n if (lineColor && !nodeColor) nodeColor = lineColor;\n\n if (nodeColor) {\n container.style.setProperty('--timeline-node-color', nodeColor);\n }\n if (lineColor) {\n container.style.setProperty('--timeline-line-color', lineColor);\n }\n if (navColor) {\n container.style.setProperty('--timeline-nav-color', navColor);\n container.style.setProperty('--timeline-nav-border', getContrastColor(navColor));\n const brightness = getColorBrightness(navColor);\n const arrowColor = brightness > 128 ? '#333' : '#fff';\n container.style.setProperty('--timeline-arrow-color', arrowColor);\n container.setAttribute('data-arrow-color', arrowColor);\n }\n}\n","import { showTimelineLoader, hideTimelineLoader } from '../features/loader-ui.js';\nimport { showTimelineError } from '../features/error-ui.js';\nimport { applyTimelineColors } from '../features/colors.js';\nimport { openTimelineModal } from '../features/modals.js';\nimport { timelineRegistry } from '../shared/state.js';\n\nfunction ensureInlineModalData(itemEl) {\n if (!itemEl) return;\n const content = itemEl.querySelector('.timeline__content') || itemEl;\n if (!itemEl.hasAttribute('data-modal-title')) {\n const heading = content.querySelector('h1,h2,h3,h4,h5,h6');\n if (heading && heading.textContent) {\n itemEl.setAttribute('data-modal-title', heading.textContent.trim());\n }\n }\n if (!itemEl.hasAttribute('data-modal-content')) {\n const firstP = content.querySelector('p');\n if (firstP && firstP.textContent) {\n itemEl.setAttribute('data-modal-content', firstP.textContent.trim());\n }\n }\n if (!itemEl.hasAttribute('data-modal-image')) {\n const img = content.querySelector('img');\n if (img && img.getAttribute('src')) {\n itemEl.setAttribute('data-modal-image', img.getAttribute('src'));\n }\n }\n}\n\nfunction enhanceInlineItems(timelineEl, items) {\n if (!items || !items.length) return;\n items.forEach(function(item){\n if (item.getAttribute('data-modal-bound') === '1') return;\n ensureInlineModalData(item);\n const hasModal = item.hasAttribute('data-modal-title') || item.hasAttribute('data-modal-content') || item.hasAttribute('data-modal-image') || item.hasAttribute('data-modal-html');\n if (hasModal) {\n item.addEventListener('click', function(e){\n e.preventDefault();\n openTimelineModal(item);\n });\n item.setAttribute('data-modal-bound', '1');\n }\n });\n}\n\nfunction createArrowSVG(direction, color) {\n if (direction === 'left') {\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"7.8\" height=\"14\" style=\"display:block;margin:auto;\"><path fill=\"none\" stroke=\"' + color + '\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6.8 1L1 7l5.8 6\"/></svg>';\n }\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"7.8\" height=\"14\" style=\"display:block;margin:auto;\"><path fill=\"none\" stroke=\"' + color + '\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M1 1l5.8 6L1 13\"/></svg>';\n}\n\nexport function timeline(collection, options) {\n const timelines = [];\n const warningLabel = 'Timeline:';\n let winWidth = window.innerWidth;\n let resizeTimer;\n let currentIndex = 0;\n const eventListeners = new Map(); // Track listeners for cleanup\n\n showTimelineLoader();\n let shouldHideLoader = true;\n\n const defaultSettings = {\n minWidth: { type: 'integer', defaultValue: 600 },\n horizontalStartPosition: { type: 'string', acceptedValues: ['bottom', 'top'], defaultValue: 'top' },\n mode: { type: 'string', acceptedValues: ['horizontal', 'vertical'], defaultValue: 'vertical' },\n moveItems: { type: 'integer', defaultValue: 1 },\n rtlMode: { type: 'boolean', acceptedValues: [true, false], defaultValue: false },\n startIndex: { type: 'integer', defaultValue: 0 },\n verticalStartPosition: { type: 'string', acceptedValues: ['left', 'right'], defaultValue: 'left' },\n verticalTrigger: { type: 'string', defaultValue: '15%' },\n visibleItems: { type: 'integer', defaultValue: 3 }\n };\n\n function testValues(value, settingName) {\n if (typeof value !== 'number' && value % 1 !== 0) {\n console.warn(`${warningLabel} The value \"${value}\" entered for the setting \"${settingName}\" is not an integer.`);\n return false;\n }\n return true;\n }\n\n function itemWrap(el, wrapper, classes) {\n wrapper.classList.add(classes);\n el.parentNode.insertBefore(wrapper, el);\n wrapper.appendChild(el);\n }\n\n function wrapElements(items) {\n items.forEach((item) => {\n itemWrap(item.querySelector('.timeline__content'), document.createElement('div'), 'timeline__content__wrap');\n itemWrap(item.querySelector('.timeline__content__wrap'), document.createElement('div'), 'timeline__item__inner');\n });\n }\n\n function isElementInViewport(el, triggerPosition) {\n const rect = el.getBoundingClientRect();\n const windowHeight = window.innerHeight || document.documentElement.clientHeight;\n const defaultTrigger = defaultSettings.verticalTrigger.defaultValue.match(/(\\d*\\.?\\d*)(.*)/);\n let triggerUnit = triggerPosition.unit;\n let triggerValue = triggerPosition.value;\n let trigger = windowHeight;\n if (triggerUnit === 'px' && triggerValue >= windowHeight) {\n console.warn('The value entered for the setting \"verticalTrigger\" is larger than the window height. The default value will be used instead.');\n [, triggerValue, triggerUnit] = defaultTrigger;\n }\n if (triggerUnit === 'px') {\n trigger = parseInt(trigger - triggerValue, 10);\n } else if (triggerUnit === '%') {\n trigger = parseInt(trigger * ((100 - triggerValue) / 100), 10);\n }\n return (\n rect.top <= trigger &&\n rect.left <= (window.innerWidth || document.documentElement.clientWidth) &&\n (rect.top + rect.height) >= 0 &&\n (rect.left + rect.width) >= 0\n );\n }\n\n function addTransforms(el, transform) {\n el.style.webkitTransform = transform;\n el.style.msTransform = transform;\n el.style.transform = transform;\n }\n\n function createTimelines(timelineEl) {\n const timelineName = timelineEl.id ? `#${timelineEl.id}` : `.${timelineEl.className}`;\n const errorPart = 'could not be found as a direct descendant of';\n const data = timelineEl.dataset;\n let wrap;\n let scroller;\n let items;\n const settings = {};\n\n try {\n wrap = timelineEl.querySelector('.timeline__wrap');\n if (!wrap) {\n throw new Error(`${warningLabel} .timeline__wrap ${errorPart} ${timelineName}`);\n } else {\n scroller = wrap.querySelector('.timeline__items');\n if (!scroller) {\n throw new Error(`${warningLabel} .timeline__items ${errorPart} .timeline__wrap`);\n } else {\n items = [].slice.call(scroller.children, 0);\n }\n }\n } catch (e) {\n console.warn(e.message);\n showTimelineError(timelineEl, 'missing-element', e.message);\n return false;\n }\n\n Object.keys(defaultSettings).forEach((key) => {\n settings[key] = defaultSettings[key].defaultValue;\n\n if (key === 'minWidth') {\n let candidate = undefined;\n if (data.minWidth !== undefined) candidate = data.minWidth;\n if (data.minwidth !== undefined) candidate = data.minwidth;\n if (data.forceVerticalMode !== undefined) candidate = data.forceVerticalMode;\n if (data.forceverticalmode !== undefined) candidate = data.forceverticalmode;\n if (candidate === undefined && options) {\n if (options.minWidth !== undefined) candidate = options.minWidth;\n else if (options.forceVerticalMode !== undefined) candidate = options.forceVerticalMode;\n }\n if (candidate !== undefined) settings.minWidth = candidate;\n } else {\n if (data[key]) {\n settings[key] = data[key];\n } else if (options && options[key] !== undefined) {\n settings[key] = options[key];\n }\n }\n\n if (defaultSettings[key].type === 'integer') {\n if (!settings[key] || !testValues(settings[key], key)) {\n settings[key] = defaultSettings[key].defaultValue;\n }\n } else if (defaultSettings[key].type === 'string') {\n if (defaultSettings[key].acceptedValues && defaultSettings[key].acceptedValues.indexOf(settings[key]) === -1) {\n console.warn(`${warningLabel} The value \"${settings[key]}\" entered for the setting \"${key}\" was not recognised.`);\n settings[key] = defaultSettings[key].defaultValue;\n }\n }\n });\n\n (function applyColorParity(){\n const data = timelineEl.dataset;\n const getData = function(k){\n return data[k] !== undefined ? data[k] : (data[k && k.toLowerCase()] !== undefined ? data[k.toLowerCase()] : undefined);\n };\n let nodeColor = getData('nodeColor');\n let lineColor = getData('lineColor');\n let navColor = getData('navColor');\n if (options) {\n if (options.nodeColor !== undefined) nodeColor = options.nodeColor;\n if (options.lineColor !== undefined) lineColor = options.lineColor;\n if (options.navColor !== undefined) navColor = options.navColor;\n }\n if (nodeColor || lineColor || navColor) {\n applyTimelineColors(timelineEl, { nodeColor, lineColor, navColor });\n }\n })();\n\n const defaultTrigger = defaultSettings.verticalTrigger.defaultValue.match(/(\\d*\\.?\\d*)(.*)/);\n const triggerArray = settings.verticalTrigger.match(/(\\d*\\.?\\d*)(.*)/);\n let [, triggerValue, triggerUnit] = triggerArray;\n let triggerValid = true;\n if (!triggerValue) {\n console.warn(`${warningLabel} No numercial value entered for the 'verticalTrigger' setting.`);\n triggerValid = false;\n }\n if (triggerUnit !== 'px' && triggerUnit !== '%') {\n console.warn(`${warningLabel} The setting 'verticalTrigger' must be a percentage or pixel value.`);\n triggerValid = false;\n }\n if (triggerUnit === '%' && (triggerValue > 100 || triggerValue < 0)) {\n console.warn(`${warningLabel} The 'verticalTrigger' setting value must be between 0 and 100 if using a percentage value.`);\n triggerValid = false;\n } else if (triggerUnit === 'px' && triggerValue < 0) {\n console.warn(`${warningLabel} The 'verticalTrigger' setting value must be above 0 if using a pixel value.`);\n triggerValid = false;\n }\n\n if (triggerValid === false) {\n [, triggerValue, triggerUnit] = defaultTrigger;\n }\n\n settings.verticalTrigger = {\n unit: triggerUnit,\n value: triggerValue\n };\n\n if (settings.moveItems > settings.visibleItems) {\n console.warn(`${warningLabel} The value of \"moveItems\" (${settings.moveItems}) is larger than the number of \"visibleItems\" (${settings.visibleItems}). The value of \"visibleItems\" has been used instead.`);\n settings.moveItems = settings.visibleItems;\n }\n\n if (settings.startIndex > (items.length - settings.visibleItems) && items.length > settings.visibleItems) {\n console.warn(`${warningLabel} The 'startIndex' setting must be between 0 and ${items.length - settings.visibleItems} for this timeline. The value of ${items.length - settings.visibleItems} has been used instead.`);\n settings.startIndex = items.length - settings.visibleItems;\n } else if (items.length <= settings.visibleItems) {\n console.warn(`${warningLabel} The number of items in the timeline must exceed the number of visible items to use the 'startIndex' option.`);\n settings.startIndex = 0;\n } else if (settings.startIndex < 0) {\n console.warn(`${warningLabel} The 'startIndex' setting must be between 0 and ${items.length - settings.visibleItems} for this timeline. The value of 0 has been used instead.`);\n settings.startIndex = 0;\n }\n\n enhanceInlineItems(timelineEl, items);\n\n if (!timelineEl.id) {\n timelineEl.setAttribute('data-timeline-id', 'timeline-' + Date.now() + '-' + Math.random().toString(36).substr(2, 9));\n }\n\n timelines.push({\n timelineEl,\n wrap,\n scroller,\n items,\n settings,\n listeners: [] // Store listeners for cleanup\n });\n }\n\n if (collection.length) {\n Array.from(collection).forEach(createTimelines);\n }\n\n function setHeightandWidths(tl) {\n function setWidths() {\n tl.itemWidth = 200;\n tl.items.forEach((item) => {\n item.style.width = `${tl.itemWidth}px`;\n });\n tl.scrollerWidth = tl.itemWidth * tl.items.length;\n tl.scroller.style.width = `${tl.scrollerWidth}px`;\n }\n\n function setHeights() {\n let oddIndexTallest = 0;\n let evenIndexTallest = 0;\n tl.items.forEach((item, i) => {\n item.style.height = 'auto';\n const height = item.offsetHeight;\n if (i % 2 === 0) {\n evenIndexTallest = height > evenIndexTallest ? height : evenIndexTallest;\n } else {\n oddIndexTallest = height > oddIndexTallest ? height : oddIndexTallest;\n }\n });\n\n const transformString = `translateY(${evenIndexTallest}px)`;\n tl.items.forEach((item, i) => {\n if (i % 2 === 0) {\n item.style.height = `${evenIndexTallest}px`;\n if (tl.settings.horizontalStartPosition === 'bottom') {\n item.classList.add('timeline__item--bottom');\n addTransforms(item, transformString);\n } else {\n item.classList.add('timeline__item--top');\n }\n } else {\n item.style.height = `${oddIndexTallest}px`;\n if (tl.settings.horizontalStartPosition !== 'bottom') {\n item.classList.add('timeline__item--bottom');\n addTransforms(item, transformString);\n } else {\n item.classList.add('timeline__item--top');\n }\n }\n });\n tl.scroller.style.height = `${evenIndexTallest + oddIndexTallest}px`;\n }\n\n if (window.innerWidth > tl.settings.minWidth) {\n setWidths();\n setHeights();\n }\n }\n\n function addNavigation(tl) {\n const viewportWidth = tl.wrap.offsetWidth;\n const itemsVisible = Math.floor(viewportWidth / tl.itemWidth);\n\n if (tl.items.length > itemsVisible) {\n const prevArrow = document.createElement('button');\n const nextArrow = document.createElement('button');\n const topPosition = tl.items[0].offsetHeight;\n prevArrow.className = 'timeline-nav-button timeline-nav-button--prev';\n nextArrow.className = 'timeline-nav-button timeline-nav-button--next';\n prevArrow.textContent = 'Previous';\n nextArrow.textContent = 'Next';\n prevArrow.style.top = `${topPosition}px`;\n nextArrow.style.top = `${topPosition}px`;\n\n const arrowColor = tl.timelineEl.getAttribute('data-arrow-color') || '#333';\n prevArrow.innerHTML = createArrowSVG('left', arrowColor);\n nextArrow.innerHTML = createArrowSVG('right', arrowColor);\n\n const maxIndex = Math.max(0, tl.items.length - itemsVisible);\n if (currentIndex === 0) {\n prevArrow.disabled = true;\n } else if (currentIndex >= maxIndex) {\n nextArrow.disabled = true;\n }\n tl.timelineEl.appendChild(prevArrow);\n tl.timelineEl.appendChild(nextArrow);\n }\n }\n\n function addHorizontalDivider(tl) {\n const divider = tl.timelineEl.querySelector('.timeline-divider');\n if (divider) {\n tl.timelineEl.removeChild(divider);\n }\n const topPosition = tl.items[0].offsetHeight;\n const horizontalDivider = document.createElement('span');\n horizontalDivider.className = 'timeline-divider';\n horizontalDivider.style.top = `${topPosition}px`;\n tl.timelineEl.appendChild(horizontalDivider);\n }\n\n function timelinePosition(tl) {\n const position = tl.items[currentIndex].offsetLeft;\n const str = `translate3d(-${position}px, 0, 0)`;\n addTransforms(tl.scroller, str);\n }\n\n function slideTimeline(tl) {\n const navArrows = tl.timelineEl.querySelectorAll('.timeline-nav-button');\n const arrowPrev = tl.timelineEl.querySelector('.timeline-nav-button--prev');\n const arrowNext = tl.timelineEl.querySelector('.timeline-nav-button--next');\n\n const viewportWidth = tl.wrap.offsetWidth;\n const itemsVisible = Math.floor(viewportWidth / tl.itemWidth);\n const maxIndex = Math.max(0, tl.items.length - itemsVisible);\n\n const moveItems = parseInt(tl.settings.moveItems, 10);\n \n const handleArrowClick = function(e) {\n e.preventDefault();\n e.stopPropagation();\n\n if (this.disabled) {\n return;\n }\n\n currentIndex = this.classList.contains('timeline-nav-button--next') ? (currentIndex += moveItems) : (currentIndex -= moveItems);\n if (currentIndex === 0 || currentIndex < 0) {\n currentIndex = 0;\n arrowPrev.disabled = true;\n arrowNext.disabled = false;\n } else if (currentIndex === maxIndex || currentIndex > maxIndex) {\n currentIndex = maxIndex;\n arrowPrev.disabled = false;\n arrowNext.disabled = true;\n } else {\n arrowPrev.disabled = false;\n arrowNext.disabled = false;\n }\n timelinePosition(tl);\n };\n \n Array.from(navArrows).forEach((arrow) => {\n arrow.addEventListener('click', handleArrowClick);\n tl.listeners.push({ element: arrow, type: 'click', handler: handleArrowClick });\n });\n }\n\n function setUpHorinzontalTimeline(tl) {\n if (tl.settings.rtlMode) {\n currentIndex = tl.items.length > tl.settings.visibleItems ? tl.items.length - tl.settings.visibleItems : 0;\n } else {\n currentIndex = tl.settings.startIndex;\n }\n tl.timelineEl.classList.add('timeline--horizontal');\n setHeightandWidths(tl);\n timelinePosition(tl);\n addNavigation(tl);\n addHorizontalDivider(tl);\n slideTimeline(tl);\n\n const timelineId = tl.timelineEl.id || tl.timelineEl.getAttribute('data-timeline-id');\n if (timelineId) {\n timelineRegistry[timelineId] = {\n setCurrentIndex: function(index) {\n const viewportWidth = tl.wrap.offsetWidth;\n const itemsVisible = Math.floor(viewportWidth / tl.itemWidth);\n const maxIndex = Math.max(0, tl.items.length - itemsVisible);\n currentIndex = Math.max(0, Math.min(index, maxIndex));\n },\n updatePosition: function() {\n timelinePosition(tl);\n const arrowPrev = tl.timelineEl.querySelector('.timeline-nav-button--prev');\n const arrowNext = tl.timelineEl.querySelector('.timeline-nav-button--next');\n if (arrowPrev && arrowNext) {\n const viewportWidth = tl.wrap.offsetWidth;\n const itemsVisible = Math.floor(viewportWidth / tl.itemWidth);\n const maxIndex = Math.max(0, tl.items.length - itemsVisible);\n arrowPrev.disabled = currentIndex === 0;\n arrowNext.disabled = currentIndex >= maxIndex;\n }\n }\n };\n }\n }\n\n function setUpVerticalTimeline(tl) {\n let lastVisibleIndex = 0;\n tl.items.forEach((item, i) => {\n item.classList.remove('animated', 'fadeIn');\n if (!isElementInViewport(item, tl.settings.verticalTrigger) && i > 0) {\n item.classList.add('animated');\n } else {\n lastVisibleIndex = i;\n }\n const divider = tl.settings.verticalStartPosition === 'left' ? 1 : 0;\n if (i % 2 === divider && window.innerWidth > tl.settings.minWidth) {\n item.classList.add('timeline__item--right');\n } else {\n item.classList.add('timeline__item--left');\n }\n });\n for (let i = 0; i < lastVisibleIndex; i += 1) {\n tl.items[i].classList.remove('animated', 'fadeIn');\n }\n \n // Use IntersectionObserver instead of scroll listener for better performance\n if ('IntersectionObserver' in window) {\n const observerOptions = {\n rootMargin: tl.settings.verticalTrigger.unit === '%' \n ? `${tl.settings.verticalTrigger.value}%` \n : `${tl.settings.verticalTrigger.value}px`,\n threshold: 0.01\n };\n \n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n entry.target.classList.add('fadeIn');\n }\n });\n }, observerOptions);\n \n tl.items.forEach((item) => {\n if (item.classList.contains('animated')) {\n observer.observe(item);\n }\n });\n \n // Store observer for cleanup\n tl.observer = observer;\n } else {\n // Fallback for older browsers (though we're targeting 2018+)\n const scrollHandler = () => {\n tl.items.forEach((item) => {\n if (isElementInViewport(item, tl.settings.verticalTrigger)) {\n item.classList.add('fadeIn');\n }\n });\n };\n window.addEventListener('scroll', scrollHandler);\n tl.listeners.push({ element: window, type: 'scroll', handler: scrollHandler });\n }\n }\n\n function resetTimelines(tl) {\n // Clean up event listeners\n if (tl.listeners && tl.listeners.length > 0) {\n tl.listeners.forEach(({ element, type, handler }) => {\n element.removeEventListener(type, handler);\n });\n tl.listeners = [];\n }\n \n // Clean up IntersectionObserver\n if (tl.observer) {\n tl.observer.disconnect();\n tl.observer = null;\n }\n \n tl.timelineEl.classList.remove('timeline--horizontal', 'timeline--mobile');\n tl.scroller.removeAttribute('style');\n tl.items.forEach((item) => {\n item.removeAttribute('style');\n item.classList.remove('animated', 'fadeIn', 'timeline__item--left', 'timeline__item--right');\n });\n const navArrows = tl.timelineEl.querySelectorAll('.timeline-nav-button');\n Array.from(navArrows).forEach((arrow) => {\n arrow.parentNode.removeChild(arrow);\n });\n }\n\n function setUpTimelines() {\n timelines.forEach((tl) => {\n tl.timelineEl.style.opacity = 0;\n if (!tl.timelineEl.classList.contains('timeline--loaded')) {\n wrapElements(tl.items);\n }\n resetTimelines(tl);\n if (window.innerWidth <= tl.settings.minWidth) {\n tl.timelineEl.classList.add('timeline--mobile');\n }\n if (tl.settings.mode === 'horizontal' && window.innerWidth > tl.settings.minWidth) {\n setUpHorinzontalTimeline(tl);\n } else {\n setUpVerticalTimeline(tl);\n }\n tl.timelineEl.classList.add('timeline--loaded');\n });\n\n setTimeout(() => {\n timelines.forEach((tl) => {\n tl.timelineEl.style.opacity = 1;\n });\n }, 500);\n\n if (shouldHideLoader) {\n hideTimelineLoader();\n shouldHideLoader = false;\n }\n }\n\n setUpTimelines();\n\n window.addEventListener('resize', () => {\n clearTimeout(resizeTimer);\n resizeTimer = setTimeout(() => {\n const newWinWidth = window.innerWidth;\n if (newWinWidth !== winWidth) {\n setUpTimelines();\n winWidth = newWinWidth;\n }\n }, 250);\n });\n}","import { timelineBasePath } from '../shared/config.js';\nimport { showTimelineLoader, hideTimelineLoader } from './loader-ui.js';\nimport { showTimelineError } from './error-ui.js';\nimport { applyTimelineColors } from './colors.js';\nimport { handleDeepLinking } from './deep-linking.js';\nimport { timeline } from '../core/timeline-engine.js';\n\nfunction createItemNode(item) {\n const itemEl = document.createElement('div');\n itemEl.className = 'timeline__item';\n\n if (item.id) {\n itemEl.setAttribute('data-node-id', item.id);\n }\n\n itemEl.setAttribute('data-modal-title', item.title || '');\n itemEl.setAttribute('data-modal-content', item.content || '');\n itemEl.setAttribute('data-modal-image', item.image || '');\n if (item.html) {\n itemEl.setAttribute('data-modal-html', item.html);\n }\n\n const content = document.createElement('div');\n content.className = 'timeline__content';\n\n if (item.image) {\n const img = document.createElement('img');\n img.src = item.image;\n img.className = 'timeline__image';\n img.alt = item.title || '';\n img.onerror = function() {\n console.error('Timeline: The image \"' + item.image + '\" could not be loaded. Please check the path.');\n this.src = timelineBasePath + '/missing-image.svg';\n this.alt = 'Image not found';\n this.title = 'Original image: ' + item.image;\n };\n content.appendChild(img);\n }\n\n const textWrapper = document.createElement('div');\n if (item.title) {\n const title = document.createElement('h3');\n title.textContent = item.title;\n textWrapper.appendChild(title);\n }\n\n if (item.content) {\n const para = document.createElement('p');\n let displayText = item.content;\n if (displayText.length > 105) {\n displayText = displayText.substring(0, 105) + '...';\n }\n para.innerHTML = displayText;\n textWrapper.appendChild(para);\n }\n\n if (item.html) {\n const wrapper = document.createElement('div');\n wrapper.innerHTML = item.html;\n textWrapper.appendChild(wrapper);\n }\n\n content.appendChild(textWrapper);\n itemEl.appendChild(content);\n\n itemEl.addEventListener('click', function(e) {\n e.preventDefault();\n if (typeof window.openTimelineModal === 'function') {\n window.openTimelineModal(itemEl);\n }\n });\n itemEl.setAttribute('data-modal-bound', '1');\n\n return itemEl;\n}\n\nfunction applyDataAttributes(container, config) {\n if (config.layoutMode) {\n container.setAttribute('data-mode', config.layoutMode);\n }\n if (config.visibleItems !== undefined) {\n container.setAttribute('data-visible-items', config.visibleItems);\n }\n if (config.minWidth !== undefined) {\n container.setAttribute('data-minwidth', config.minWidth);\n container.setAttribute('data-force-vertical-mode', config.minWidth);\n }\n if (config.maxWidth !== undefined) {\n container.setAttribute('data-maxwidth', config.maxWidth);\n }\n}\n\nexport function renderTimelineFromData(containerSelector, data, config) {\n const container = document.querySelector(containerSelector);\n if (!container) return;\n\n let itemsWrap = container.querySelector('.timeline__items');\n if (!itemsWrap) {\n const wrap = document.createElement('div');\n wrap.className = 'timeline__wrap';\n itemsWrap = document.createElement('div');\n itemsWrap.className = 'timeline__items';\n wrap.appendChild(itemsWrap);\n container.appendChild(wrap);\n } else {\n itemsWrap.innerHTML = '';\n }\n\n if (config) {\n applyDataAttributes(container, config);\n applyTimelineColors(container, config);\n\n if (config.timelineName && config.timelineName.trim() !== '') {\n const existingHeading = container.previousElementSibling;\n if (existingHeading && existingHeading.classList.contains('timeline__heading')) {\n existingHeading.textContent = config.timelineName;\n } else {\n const heading = document.createElement('h1');\n heading.className = 'timeline__heading';\n heading.textContent = config.timelineName;\n container.parentNode.insertBefore(heading, container);\n }\n container.setAttribute('data-timeline-name', config.timelineName);\n }\n }\n\n data.forEach(function (it) {\n itemsWrap.appendChild(createItemNode(it));\n });\n\n return container;\n}\n\nexport function timelineFromData(containerSelector, data, options) {\n const container = renderTimelineFromData(containerSelector, data, options);\n if (!container) return;\n timeline([container], options);\n}\n\nexport function loadDataFromJson(url, containerSelector) {\n const container = document.querySelector(containerSelector);\n if (!container) {\n console.error('Timeline: Container not found:', containerSelector);\n return;\n }\n\n showTimelineLoader();\n\n const timelineId = container ? container.id : null;\n const cacheKey = timelineId ? 'vjs_' + timelineId : null;\n\n if (cacheKey && typeof(Storage) !== 'undefined') {\n try {\n const cached = localStorage.getItem(cacheKey);\n if (cached) {\n const cachedData = JSON.parse(cached);\n fetch(url).then(function(res) {\n if (!res.ok) throw new Error('Failed to load ' + url + ' (' + res.status + ')');\n return res.json();\n }).then(function(json) {\n if (json.lastupdated && cachedData.lastupdated && json.lastupdated === cachedData.lastupdated) {\n console.log('Using cached timeline data for', timelineId);\n processTimelineData(cachedData, containerSelector);\n } else {\n console.log('Updating cached timeline data for', timelineId);\n localStorage.setItem(cacheKey, JSON.stringify(json));\n processTimelineData(json, containerSelector);\n }\n }).catch(function(err) {\n console.warn('Failed to fetch fresh data, using cache:', err);\n processTimelineData(cachedData, containerSelector);\n });\n return;\n }\n } catch (e) {\n console.warn('Error reading from localStorage:', e);\n }\n }\n\n fetch(url).then(function (res) {\n if (!res.ok) throw new Error('Failed to load ' + url + ' (' + res.status + ')');\n return res.json();\n }).then(function (json) {\n if (cacheKey && typeof(Storage) !== 'undefined') {\n try {\n localStorage.setItem(cacheKey, JSON.stringify(json));\n console.log('Cached timeline data for', timelineId);\n } catch (e) {\n console.warn('Failed to cache timeline data:', e);\n }\n }\n processTimelineData(json, containerSelector);\n }).catch(function (err) {\n console.error('Error loading timeline JSON:', err);\n showTimelineError(container, 'json-load', err.message);\n });\n}\n\nexport function processTimelineData(json, containerSelector) {\n const container = document.querySelector(containerSelector);\n if (!container) {\n console.error('Timeline: Container not found:', containerSelector);\n return;\n }\n\n let config = null;\n let nodes = [];\n\n try {\n if (json.nodes && Array.isArray(json.nodes)) {\n nodes = json.nodes;\n config = {\n timelineName: json.timelineName,\n layoutMode: json.layoutMode,\n visibleItems: json.visibleItems,\n minWidth: json.minWidth,\n maxWidth: json.maxWidth,\n nodeColor: json.nodeColor,\n lineColor: json.lineColor,\n navColor: json.navColor,\n lastupdated: json.lastupdated\n };\n } else if (Array.isArray(json)) {\n nodes = json;\n } else {\n throw new Error('Invalid JSON format. Expected object with \"nodes\" array or simple array.');\n }\n\n if (nodes.length === 0) {\n throw new Error('No timeline items found in data.');\n }\n\n renderTimelineFromData(containerSelector, nodes, config);\n\n try {\n timeline(document.querySelectorAll(containerSelector));\n handleDeepLinking(containerSelector);\n hideTimelineLoader();\n } catch (e) {\n console.error('Error initializing timeline:', e);\n const container = document.querySelector(containerSelector);\n if (container) {\n showTimelineError(container, 'invalid-config', e.message);\n }\n hideTimelineLoader();\n }\n\n } catch (e) {\n console.error('Error processing timeline data:', e);\n showTimelineError(container, 'json-parse', e.message);\n hideTimelineLoader();\n }\n}\n\nexport function clearTimelineCache(timelineId) {\n if (typeof(Storage) === 'undefined') {\n console.warn('localStorage not supported');\n return;\n }\n\n if (timelineId) {\n const key = 'vjs_' + timelineId;\n localStorage.removeItem(key);\n console.log('Cleared cache for timeline:', timelineId);\n } else {\n const keys = Object.keys(localStorage);\n let cleared = 0;\n keys.forEach(function(key) {\n if (key.startsWith('vjs_')) {\n localStorage.removeItem(key);\n cleared++;\n }\n });\n console.log('Cleared', cleared, 'timeline cache(s)');\n }\n}\n","// --------------------------------------------------------------------------\r\n// timeline.js - a vanilla JS app to display timelines\r\n// \r\n// Created in 2018 by Mike Collins (https://github.com/squarechip/timeline)\r\n// Modified in 2026 by Ken Dawson (https://github.com/kendawson-online)\r\n// Last updated: 01/08/26\r\n//\r\n// --------------------------------------------------------------------------\r\n\r\nimport { createTimelineModal, openTimelineModal, closeTimelineModal } from './features/modals.js';\r\nimport { handleDeepLinking, navigateToNodeIndex } from './features/deep-linking.js';\r\nimport { renderTimelineFromData, timelineFromData, loadDataFromJson, processTimelineData, clearTimelineCache } from './features/data-loader.js';\r\nimport { timeline } from './core/timeline-engine.js';\r\n\r\nfunction autoInitJsonTimelines() {\r\n const timelinesWithJson = document.querySelectorAll('[data-json-config]');\r\n timelinesWithJson.forEach(function(timelineEl) {\r\n const jsonUrl = timelineEl.getAttribute('data-json-config');\r\n if (!jsonUrl) return;\r\n const className = (timelineEl.className || '').split(' ')[0];\r\n const selector = timelineEl.id ? '#' + timelineEl.id : (className ? '.' + className : null);\r\n if (selector) {\r\n loadDataFromJson(jsonUrl, selector);\r\n }\r\n });\r\n}\r\n\r\nfunction exposeGlobals() {\r\n if (typeof window === 'undefined') return;\r\n window.timeline = timeline;\r\n window.timelineFromData = timelineFromData;\r\n window.renderTimelineFromData = renderTimelineFromData;\r\n window.processTimelineData = processTimelineData;\r\n window.loadDataFromJson = loadDataFromJson;\r\n window.clearTimelineCache = clearTimelineCache;\r\n window.createTimelineModal = createTimelineModal;\r\n window.openTimelineModal = openTimelineModal;\r\n window.closeTimelineModal = closeTimelineModal;\r\n window.handleTimelineDeepLinking = handleDeepLinking;\r\n window.navigateTimelineToNodeIndex = navigateToNodeIndex;\r\n}\r\n\r\nexposeGlobals();\r\n\r\ndocument.addEventListener('DOMContentLoaded', function() {\r\n autoInitJsonTimelines();\r\n});\r\n\r\nif (typeof window !== 'undefined' && window.jQuery) {\r\n (( $) => {\r\n $.fn.timeline = function(opts) {\r\n timeline(this, opts);\r\n return this;\r\n };\r\n })(window.jQuery);\r\n}\r\n\r\nexport {\r\n timeline,\r\n timelineFromData,\r\n renderTimelineFromData,\r\n loadDataFromJson,\r\n processTimelineData,\r\n clearTimelineCache,\r\n createTimelineModal,\r\n openTimelineModal,\r\n closeTimelineModal,\r\n handleDeepLinking,\r\n navigateToNodeIndex\r\n};"],"names":["loaderState","count","startTime","removeTimer","overlayEl","modalState","modal","overlay","timelineRegistry","createTimelineModal","document","createElement","className","addEventListener","closeTimelineModal","innerHTML","closeBtn","querySelector","closeBottomBtn","e","stopPropagation","body","appendChild","key","classList","contains","openTimelineModal","itemEl","title","getAttribute","content","image","html","modalTitle","modalText","modalImage","textContent","src","alt","style","display","replace","setTimeout","add","overflow","remove","handleDeepLinking","containerSelector","urlParams","URLSearchParams","window","location","search","timelineId","get","nodeId","targetContainer","getElementById","console","warn","scrollIntoView","behavior","block","targetNode","itemIndex","Array","from","parentNode","children","indexOf","navigateToNodeIndex","container","index","id","tlData","setCurrentIndex","updatePosition","timelineBasePath","TimelineConfig","basePath","scripts","getElementsByTagName","i","length","dir","substring","lastIndexOf","showTimelineLoader","Date","now","clearTimeout","loader","spinner","hideTimelineLoader","elapsed","remaining","Math","max","removeOverlay","showTimelineError","errorType","details","errorInfo","message","solution","errorDiv","errorIcon","errorTitle","errorMessage","errorSolution","errorDetails","error","getColorBrightness","color","rgb","startsWith","hex","parseInt","matches","match","map","Number","applyTimelineColors","config","nodeColor","lineColor","navColor","setProperty","arrowColor","setAttribute","createArrowSVG","direction","timeline","collection","options","timelines","warningLabel","resizeTimer","winWidth","innerWidth","currentIndex","shouldHideLoader","defaultSettings","minWidth","type","defaultValue","horizontalStartPosition","acceptedValues","mode","moveItems","rtlMode","startIndex","verticalStartPosition","verticalTrigger","visibleItems","itemWrap","el","wrapper","classes","insertBefore","isElementInViewport","triggerPosition","rect","getBoundingClientRect","windowHeight","innerHeight","documentElement","clientHeight","defaultTrigger","triggerUnit","unit","triggerValue","value","trigger","top","left","clientWidth","height","width","addTransforms","transform","webkitTransform","msTransform","timelinePosition","tl","str","items","offsetLeft","scroller","setUpHorinzontalTimeline","settings","timelineEl","itemWidth","forEach","item","scrollerWidth","oddIndexTallest","evenIndexTallest","offsetHeight","transformString","setHeights","setHeightandWidths","viewportWidth","wrap","offsetWidth","itemsVisible","floor","prevArrow","nextArrow","topPosition","maxIndex","disabled","addNavigation","divider","removeChild","horizontalDivider","addHorizontalDivider","navArrows","querySelectorAll","arrowPrev","arrowNext","handleArrowClick","preventDefault","this","arrow","listeners","push","element","handler","slideTimeline","min","setUpTimelines","opacity","removeEventListener","observer","disconnect","removeAttribute","resetTimelines","lastVisibleIndex","observerOptions","rootMargin","threshold","IntersectionObserver","entries","entry","isIntersecting","target","observe","scrollHandler","setUpVerticalTimeline","timelineName","errorPart","data","dataset","Error","slice","call","Object","keys","candidate","undefined","minwidth","forceVerticalMode","forceverticalmode","settingName","getData","k","toLowerCase","triggerArray","triggerValid","hasAttribute","heading","trim","firstP","img","ensureInlineModalData","enhanceInlineItems","random","toString","substr","newWinWidth","renderTimelineFromData","itemsWrap","layoutMode","maxWidth","applyDataAttributes","existingHeading","previousElementSibling","it","onerror","textWrapper","para","displayText","createItemNode","timelineFromData","loadDataFromJson","url","cacheKey","cached","localStorage","getItem","cachedData","JSON","parse","fetch","then","res","ok","status","json","lastupdated","log","processTimelineData","setItem","stringify","catch","err","nodes","isArray","clearTimelineCache","removeItem","cleared","handleTimelineDeepLinking","navigateTimelineToNodeIndex","jsonUrl","split","selector","jQuery","fn","opts"],"mappings":"sCACO,MAAMA,EAAc,CACzBC,MAAO,EACPC,UAAW,EACXC,YAAa,KACbC,UAAW,MAGAC,EAAa,CACxBC,MAAO,KACPC,QAAS,MAIEC,EAAmB,CAAA,ECZzB,SAASC,IACd,GAAIJ,EAAWC,MAAO,OAEtBD,EAAWE,QAAUG,SAASC,cAAc,OAC5CN,EAAWE,QAAQK,UAAY,yBAC/BP,EAAWE,QAAQM,iBAAiB,QAASC,GAE7CT,EAAWC,MAAQI,SAASC,cAAc,OAC1CN,EAAWC,MAAMM,UAAY,iBAC7BP,EAAWC,MAAMS,UAAY,0aAW7B,MAAMC,EAAWX,EAAWC,MAAMW,cAAc,0BAC1CC,EAAiBb,EAAWC,MAAMW,cAAc,iCACtDD,EAASH,iBAAiB,QAASC,GACnCI,EAAeL,iBAAiB,QAASC,GAEzCT,EAAWC,MAAMO,iBAAiB,QAAS,SAASM,GAClDA,EAAEC,iBACJ,GAEAV,SAASW,KAAKC,YAAYjB,EAAWE,SACrCG,SAASW,KAAKC,YAAYjB,EAAWC,OAErCI,SAASG,iBAAiB,UAAW,SAASM,GAC9B,WAAVA,EAAEI,KAAoBlB,EAAWC,MAAMkB,UAAUC,SAAS,wBAC5DX,GAEJ,EACF,CAEO,SAASY,EAAkBC,GAC3BtB,EAAWC,OACdG,IAGF,MAAMmB,EAAQD,EAAOE,aAAa,oBAC5BC,EAAUH,EAAOE,aAAa,sBAC9BE,EAAQJ,EAAOE,aAAa,oBAC5BG,EAAOL,EAAOE,aAAa,mBAE3BI,EAAa5B,EAAWC,MAAMW,cAAc,0BAC5CiB,EAAY7B,EAAWC,MAAMW,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C,KAAK,6BAmBjB,OCvPwB,oBAAXT,SACXA,OAAOkF,SAAWA,EAClBlF,OAAOoP,iBAAmBA,EAC1BpP,OAAOuO,uBAAyBA,EAChCvO,OAAOsQ,oBAAsBA,EAC7BtQ,OAAOqP,iBAAmBA,EAC1BrP,OAAO6Q,mBAAqBA,EAC5B7Q,OAAOzC,oBAAsBA,EAC7ByC,OAAOxB,kBAAoBA,EAC3BwB,OAAOpC,mBAAqBA,EAC5BoC,OAAOgR,0BAA4BpR,EACnCI,OAAOiR,4BAA8B7P,GAKvC5D,SAASG,iBAAiB,mBAAoB,WA7BlBH,SAASgN,iBAAiB,sBAClCzB,QAAQ,SAASF,GACjC,MAAMqI,EAAUrI,EAAWlK,aAAa,oBACxC,IAAKuS,EAAS,OACd,MAAMxT,GAAamL,EAAWnL,WAAa,IAAIyT,MAAM,KAAK,GACpDC,EAAWvI,EAAWtH,GAAK,IAAMsH,EAAWtH,GAAM7D,EAAY,IAAMA,EAAY,KAClF0T,GACF/B,EAAiB6B,EAASE,EAE9B,EAsBF,GAEsB,oBAAXpR,QAA0BA,OAAOqR,SAMvCrR,OAAOqR,OAJNC,GAAGpM,SAAW,SAASqM,GAEvB,OADArM,EAAS2F,KAAM0G,GACR1G,IACT"}
|
|
1
|
+
{"version":3,"file":"timeline.min.js","sources":["../src/js/shared/state.js","../src/js/features/modals.js","../src/js/features/deep-linking.js","../src/js/shared/config.js","../src/js/features/loader-ui.js","../src/js/features/error-ui.js","../src/js/shared/utils.js","../src/js/features/colors.js","../src/js/core/timeline-engine.js","../src/js/features/data-loader.js","../src/js/timeline.js"],"sourcesContent":["// Shared state containers\nexport const loaderState = {\n count: 0,\n startTime: 0,\n removeTimer: null,\n overlayEl: null\n};\n\nexport const modalState = {\n modal: null,\n overlay: null\n};\n\n// Global registry to store timeline instances for programmatic navigation\nexport const timelineRegistry = {};\n","import { modalState } from '../shared/state.js';\n\nexport function createTimelineModal() {\n if (modalState.modal) return;\n\n modalState.overlay = document.createElement('div');\n modalState.overlay.className = 'timeline-modal-overlay';\n modalState.overlay.addEventListener('click', closeTimelineModal);\n\n modalState.modal = document.createElement('div');\n modalState.modal.className = 'timeline-modal';\n modalState.modal.innerHTML = `\n <button class=\"timeline-modal__close\" aria-label=\"Close modal\"></button>\n <div class=\"timeline-modal__content\">\n <img class=\"timeline-modal__image\" src=\"\" alt=\"\" style=\"display: none;\">\n <h2 class=\"timeline-modal__title\"></h2>\n <div class=\"timeline-modal__text\"></div>\n <hr class=\"timeline-modal__divider\">\n <button class=\"timeline-modal__close-bottom\">Close</button>\n </div>\n `;\n\n const closeBtn = modalState.modal.querySelector('.timeline-modal__close');\n const closeBottomBtn = modalState.modal.querySelector('.timeline-modal__close-bottom');\n closeBtn.addEventListener('click', closeTimelineModal);\n closeBottomBtn.addEventListener('click', closeTimelineModal);\n\n modalState.modal.addEventListener('click', function(e) {\n e.stopPropagation();\n });\n\n document.body.appendChild(modalState.overlay);\n document.body.appendChild(modalState.modal);\n\n document.addEventListener('keydown', function(e) {\n if (e.key === 'Escape' && modalState.modal.classList.contains('timeline-modal-show')) {\n closeTimelineModal();\n }\n });\n}\n\nexport function openTimelineModal(itemEl) {\n if (!modalState.modal) {\n createTimelineModal();\n }\n\n const title = itemEl.getAttribute('data-modal-title');\n const content = itemEl.getAttribute('data-modal-content');\n const image = itemEl.getAttribute('data-modal-image');\n const html = itemEl.getAttribute('data-modal-html');\n\n const modalTitle = modalState.modal.querySelector('.timeline-modal__title');\n const modalText = modalState.modal.querySelector('.timeline-modal__text');\n const modalImage = modalState.modal.querySelector('.timeline-modal__image');\n\n modalTitle.textContent = title || '';\n\n if (image) {\n modalImage.src = image;\n modalImage.alt = title || '';\n modalImage.style.display = 'block';\n } else {\n modalImage.style.display = 'none';\n }\n\n if (html) {\n modalText.innerHTML = html;\n } else if (content) {\n modalText.innerHTML = '<p>' + content.replace(/\\n/g, '</p><p>') + '</p>';\n } else {\n modalText.innerHTML = '';\n }\n\n setTimeout(function() {\n modalState.modal.classList.add('timeline-modal-show');\n modalState.overlay.classList.add('timeline-modal-show');\n document.body.style.overflow = 'hidden';\n }, 10);\n}\n\nexport function closeTimelineModal() {\n if (modalState.modal) {\n modalState.modal.classList.remove('timeline-modal-show');\n modalState.overlay.classList.remove('timeline-modal-show');\n document.body.style.overflow = '';\n }\n}\n","import { timelineRegistry } from '../shared/state.js';\n\nexport function handleDeepLinking(containerSelector) {\n const urlParams = new URLSearchParams(window.location.search);\n const timelineId = urlParams.get('timeline');\n const nodeId = urlParams.get('id');\n if (!nodeId) return;\n\n let targetContainer;\n if (timelineId) {\n targetContainer = document.getElementById(timelineId);\n } else {\n targetContainer = document.querySelector(containerSelector);\n }\n\n if (!targetContainer) {\n console.warn('Timeline not found for deep linking:', timelineId || containerSelector);\n return;\n }\n\n targetContainer.scrollIntoView({ behavior: 'smooth', block: 'start' });\n\n const targetNode = targetContainer.querySelector('[data-node-id=\"' + nodeId + '\"]');\n if (targetNode) {\n setTimeout(function() {\n targetNode.classList.add('timeline__item--active');\n const itemIndex = Array.from(targetNode.parentNode.children).indexOf(targetNode);\n navigateToNodeIndex(targetContainer, itemIndex);\n }, 500);\n }\n}\n\nexport function navigateToNodeIndex(container, index) {\n if (!container) return;\n const timelineId = container.id || container.getAttribute('data-timeline-id');\n if (!timelineId) {\n console.warn('Cannot navigate: timeline container has no ID');\n return;\n }\n\n const tlData = timelineRegistry[timelineId];\n if (!tlData) {\n console.warn('Timeline not found in registry:', timelineId);\n return;\n }\n\n if (!container.classList.contains('timeline--horizontal')) {\n return;\n }\n\n if (tlData.setCurrentIndex && tlData.updatePosition) {\n tlData.setCurrentIndex(index);\n tlData.updatePosition();\n }\n}\n","// Shared configuration values\n// Auto-detect the timeline.js script location to build correct image paths\nexport const timelineBasePath = (function() {\n // Check for user override\n if (typeof window !== 'undefined' && \n window.TimelineConfig && \n window.TimelineConfig.basePath) {\n return window.TimelineConfig.basePath;\n }\n \n const scripts = document.getElementsByTagName('script');\n for (let i = 0; i < scripts.length; i++) {\n const src = scripts[i].src || '';\n if (!src) continue;\n const dir = src.substring(0, src.lastIndexOf('/'));\n if (src.indexOf('timeline.min.js') !== -1) {\n // When loading from dist, map to src/images\n return dir.replace('/dist', '/src/images');\n }\n if (src.indexOf('timeline.js') !== -1) {\n // When loading from src/js, map to src/images\n return dir.replace('/js', '/images');\n }\n }\n // Fallback relative to demo pages; most demos live under demo/**\n return '../src/images';\n})();\n\n// Minimum time (ms) to keep the loading spinner visible\nlet timelineLoaderMinMs = 1300;\nexport function getTimelineLoaderMinMs() {\n return timelineLoaderMinMs;\n}\nexport function setTimelineLoaderMinMs(value) {\n if (typeof value === 'number' && value >= 0) {\n timelineLoaderMinMs = value;\n }\n}\n","import { loaderState } from '../shared/state.js';\nimport { getTimelineLoaderMinMs, timelineBasePath } from '../shared/config.js';\n\nexport function showTimelineLoader() {\n loaderState.count += 1;\n if (loaderState.count !== 1) return;\n\n loaderState.startTime = Date.now();\n\n if (loaderState.removeTimer) {\n clearTimeout(loaderState.removeTimer);\n loaderState.removeTimer = null;\n }\n\n const overlay = document.createElement('div');\n overlay.className = 'timeline__loader-overlay';\n\n const loader = document.createElement('div');\n loader.className = 'timeline__loader';\n\n const spinner = document.createElement('img');\n spinner.src = timelineBasePath + '/spinner.gif';\n spinner.alt = 'Loading...';\n spinner.title = 'Loading...';\n spinner.className = 'timeline__loader-spinner';\n // Default to a compact spinner if page CSS is missing\n spinner.width = 120;\n spinner.style.height = 'auto';\n\n loader.appendChild(spinner);\n overlay.appendChild(loader);\n\n document.body.appendChild(overlay);\n loaderState.overlayEl = overlay;\n}\n\nexport function hideTimelineLoader() {\n if (loaderState.count <= 0) return;\n loaderState.count -= 1;\n if (loaderState.count > 0) return;\n\n const elapsed = Date.now() - loaderState.startTime;\n const minMs = getTimelineLoaderMinMs();\n const remaining = Math.max(0, minMs - elapsed);\n\n const removeOverlay = function() {\n if (loaderState.overlayEl) {\n loaderState.overlayEl.remove();\n loaderState.overlayEl = null;\n }\n loaderState.removeTimer = null;\n };\n\n if (loaderState.removeTimer) {\n clearTimeout(loaderState.removeTimer);\n loaderState.removeTimer = null;\n }\n\n if (remaining > 0) {\n loaderState.removeTimer = setTimeout(removeOverlay, remaining);\n } else {\n removeOverlay();\n }\n}\n","import { timelineBasePath } from '../shared/config.js';\nimport { hideTimelineLoader } from './loader-ui.js';\n\nexport function showTimelineError(container, errorType, details) {\n if (!container) return;\n\n const errorMessages = {\n 'json-load': {\n title: 'Timeline Data Could Not Be Loaded',\n message: 'The timeline data failed to load. This could be due to a network error or an incorrect file path.',\n solution: 'Please check that the data-json-config path is correct and the file is accessible.'\n },\n 'json-parse': {\n title: 'Invalid Timeline Data',\n message: 'The timeline data file exists but contains invalid JSON.',\n solution: 'Please validate your JSON using a tool like jsonlint.com and ensure it follows the correct schema.'\n },\n 'missing-element': {\n title: 'Timeline Element Not Found',\n message: 'The required timeline container element could not be found on the page.',\n solution: 'Ensure your HTML includes a container with the class \"timeline\" and the correct selector.'\n },\n 'invalid-config': {\n title: 'Invalid Configuration',\n message: 'One or more timeline configuration options are invalid.',\n solution: 'Check your data attributes or JavaScript options and ensure they match the expected format.'\n }\n };\n\n const errorInfo = errorMessages[errorType] || {\n title: 'Timeline Error',\n message: 'An unexpected error occurred while initializing the timeline.',\n solution: 'Please check the browser console for more details.'\n };\n\n hideTimelineLoader(container);\n container.innerHTML = '';\n\n const errorDiv = document.createElement('div');\n errorDiv.className = 'timeline__error';\n\n const errorIcon = document.createElement('img');\n errorIcon.src = timelineBasePath + '/alert.svg';\n errorIcon.alt = 'Error';\n errorIcon.className = 'timeline__error-icon';\n // Ensure a reasonable default size even if CSS isn't loaded\n // This makes the error icon usable when a consumer forgets to include CSS.\n errorIcon.width = 200;\n errorIcon.style.height = 'auto';\n\n const errorTitle = document.createElement('h2');\n errorTitle.className = 'timeline__error-title';\n errorTitle.textContent = errorInfo.title;\n\n const errorMessage = document.createElement('p');\n errorMessage.className = 'timeline__error-message';\n errorMessage.textContent = errorInfo.message;\n\n const errorSolution = document.createElement('p');\n errorSolution.className = 'timeline__error-solution';\n errorSolution.innerHTML = '<strong>Solution:</strong> ' + errorInfo.solution;\n\n if (details) {\n const errorDetails = document.createElement('p');\n errorDetails.className = 'timeline__error-details';\n errorDetails.innerHTML = '<strong>Details:</strong> ' + details;\n errorDiv.appendChild(errorDetails);\n }\n\n errorDiv.appendChild(errorIcon);\n errorDiv.appendChild(errorTitle);\n errorDiv.appendChild(errorMessage);\n errorDiv.appendChild(errorSolution);\n\n container.appendChild(errorDiv);\n\n console.error('Timeline Error [' + errorType + ']:', errorInfo.message, details || '');\n}\n","// Utility helpers shared across modules\nexport function getContrastColor(bgColor) {\n const brightness = getColorBrightness(bgColor);\n return brightness > 128 ? 'rgba(0, 0, 0, 0.2)' : 'rgba(255, 255, 255, 0.3)';\n}\n\nexport function getColorBrightness(color) {\n let rgb;\n if (!color || typeof color !== 'string') return 128;\n\n if (color.startsWith('#')) {\n let hex = color.substring(1);\n if (hex.length === 3) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n const r = parseInt(hex.substring(0, 2), 16);\n const g = parseInt(hex.substring(2, 4), 16);\n const b = parseInt(hex.substring(4, 6), 16);\n rgb = [r, g, b];\n } else if (color.startsWith('rgb')) {\n const matches = color.match(/\\d+/g);\n rgb = matches ? matches.map(Number) : [128, 128, 128];\n } else {\n return 128;\n }\n\n return (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n}\n","import { getContrastColor, getColorBrightness } from '../shared/utils.js';\n\nexport function applyTimelineColors(container, config) {\n let nodeColor = config.nodeColor || null;\n let lineColor = config.lineColor || null;\n const navColor = config.navColor || null;\n\n if (nodeColor && !lineColor) lineColor = nodeColor;\n if (lineColor && !nodeColor) nodeColor = lineColor;\n\n if (nodeColor) {\n container.style.setProperty('--timeline-node-color', nodeColor);\n }\n if (lineColor) {\n container.style.setProperty('--timeline-line-color', lineColor);\n }\n if (navColor) {\n container.style.setProperty('--timeline-nav-color', navColor);\n container.style.setProperty('--timeline-nav-border', getContrastColor(navColor));\n const brightness = getColorBrightness(navColor);\n const arrowColor = brightness > 128 ? '#333' : '#fff';\n container.style.setProperty('--timeline-arrow-color', arrowColor);\n container.setAttribute('data-arrow-color', arrowColor);\n }\n}\n","import { showTimelineLoader, hideTimelineLoader } from '../features/loader-ui.js';\nimport { showTimelineError } from '../features/error-ui.js';\nimport { applyTimelineColors } from '../features/colors.js';\nimport { openTimelineModal } from '../features/modals.js';\nimport { timelineRegistry } from '../shared/state.js';\n\nfunction ensureInlineModalData(itemEl) {\n if (!itemEl) return;\n const content = itemEl.querySelector('.timeline__content') || itemEl;\n if (!itemEl.hasAttribute('data-modal-title')) {\n const heading = content.querySelector('h1,h2,h3,h4,h5,h6');\n if (heading && heading.textContent) {\n itemEl.setAttribute('data-modal-title', heading.textContent.trim());\n }\n }\n if (!itemEl.hasAttribute('data-modal-content')) {\n const firstP = content.querySelector('p');\n if (firstP && firstP.textContent) {\n itemEl.setAttribute('data-modal-content', firstP.textContent.trim());\n }\n }\n if (!itemEl.hasAttribute('data-modal-image')) {\n const img = content.querySelector('img');\n if (img && img.getAttribute('src')) {\n itemEl.setAttribute('data-modal-image', img.getAttribute('src'));\n }\n }\n}\n\nfunction enhanceInlineItems(timelineEl, items) {\n if (!items || !items.length) return;\n items.forEach(function(item){\n if (item.getAttribute('data-modal-bound') === '1') return;\n ensureInlineModalData(item);\n const hasModal = item.hasAttribute('data-modal-title') || item.hasAttribute('data-modal-content') || item.hasAttribute('data-modal-image') || item.hasAttribute('data-modal-html');\n if (hasModal) {\n item.addEventListener('click', function(e){\n e.preventDefault();\n openTimelineModal(item);\n });\n item.setAttribute('data-modal-bound', '1');\n }\n });\n}\n\nfunction createArrowSVG(direction, color) {\n if (direction === 'left') {\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"7.8\" height=\"14\" style=\"display:block;margin:auto;\"><path fill=\"none\" stroke=\"' + color + '\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6.8 1L1 7l5.8 6\"/></svg>';\n }\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"7.8\" height=\"14\" style=\"display:block;margin:auto;\"><path fill=\"none\" stroke=\"' + color + '\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M1 1l5.8 6L1 13\"/></svg>';\n}\n\nexport function timeline(collection, options) {\n const timelines = [];\n const warningLabel = 'Timeline:';\n let winWidth = window.innerWidth;\n let resizeTimer;\n let currentIndex = 0;\n const eventListeners = new Map(); // Track listeners for cleanup\n\n showTimelineLoader();\n let shouldHideLoader = true;\n\n const defaultSettings = {\n minWidth: { type: 'integer', defaultValue: 600 },\n horizontalStartPosition: { type: 'string', acceptedValues: ['bottom', 'top'], defaultValue: 'top' },\n mode: { type: 'string', acceptedValues: ['horizontal', 'vertical'], defaultValue: 'vertical' },\n moveItems: { type: 'integer', defaultValue: 1 },\n rtlMode: { type: 'boolean', acceptedValues: [true, false], defaultValue: false },\n startIndex: { type: 'integer', defaultValue: 0 },\n verticalStartPosition: { type: 'string', acceptedValues: ['left', 'right'], defaultValue: 'left' },\n verticalTrigger: { type: 'string', defaultValue: '15%' },\n visibleItems: { type: 'integer', defaultValue: 3 }\n };\n\n function testValues(value, settingName) {\n if (typeof value !== 'number' && value % 1 !== 0) {\n console.warn(`${warningLabel} The value \"${value}\" entered for the setting \"${settingName}\" is not an integer.`);\n return false;\n }\n return true;\n }\n\n function itemWrap(el, wrapper, classes) {\n wrapper.classList.add(classes);\n el.parentNode.insertBefore(wrapper, el);\n wrapper.appendChild(el);\n }\n\n function wrapElements(items) {\n items.forEach((item) => {\n itemWrap(item.querySelector('.timeline__content'), document.createElement('div'), 'timeline__content__wrap');\n itemWrap(item.querySelector('.timeline__content__wrap'), document.createElement('div'), 'timeline__item__inner');\n });\n }\n\n function isElementInViewport(el, triggerPosition) {\n const rect = el.getBoundingClientRect();\n const windowHeight = window.innerHeight || document.documentElement.clientHeight;\n const defaultTrigger = defaultSettings.verticalTrigger.defaultValue.match(/(\\d*\\.?\\d*)(.*)/);\n let triggerUnit = triggerPosition.unit;\n let triggerValue = triggerPosition.value;\n let trigger = windowHeight;\n if (triggerUnit === 'px' && triggerValue >= windowHeight) {\n console.warn('The value entered for the setting \"verticalTrigger\" is larger than the window height. The default value will be used instead.');\n [, triggerValue, triggerUnit] = defaultTrigger;\n }\n if (triggerUnit === 'px') {\n trigger = parseInt(trigger - triggerValue, 10);\n } else if (triggerUnit === '%') {\n trigger = parseInt(trigger * ((100 - triggerValue) / 100), 10);\n }\n return (\n rect.top <= trigger &&\n rect.left <= (window.innerWidth || document.documentElement.clientWidth) &&\n (rect.top + rect.height) >= 0 &&\n (rect.left + rect.width) >= 0\n );\n }\n\n function addTransforms(el, transform) {\n el.style.webkitTransform = transform;\n el.style.msTransform = transform;\n el.style.transform = transform;\n }\n\n function createTimelines(timelineEl) {\n const timelineName = timelineEl.id ? `#${timelineEl.id}` : `.${timelineEl.className}`;\n const errorPart = 'could not be found as a direct descendant of';\n const data = timelineEl.dataset;\n let wrap;\n let scroller;\n let items;\n const settings = {};\n\n try {\n wrap = timelineEl.querySelector('.timeline__wrap');\n if (!wrap) {\n throw new Error(`${warningLabel} .timeline__wrap ${errorPart} ${timelineName}`);\n } else {\n scroller = wrap.querySelector('.timeline__items');\n if (!scroller) {\n throw new Error(`${warningLabel} .timeline__items ${errorPart} .timeline__wrap`);\n } else {\n items = [].slice.call(scroller.children, 0);\n }\n }\n } catch (e) {\n console.warn(e.message);\n showTimelineError(timelineEl, 'missing-element', e.message);\n return false;\n }\n\n Object.keys(defaultSettings).forEach((key) => {\n settings[key] = defaultSettings[key].defaultValue;\n\n if (key === 'minWidth') {\n let candidate = undefined;\n if (data.minWidth !== undefined) candidate = data.minWidth;\n if (data.minwidth !== undefined) candidate = data.minwidth;\n if (data.forceVerticalMode !== undefined) candidate = data.forceVerticalMode;\n if (data.forceverticalmode !== undefined) candidate = data.forceverticalmode;\n if (candidate === undefined && options) {\n if (options.minWidth !== undefined) candidate = options.minWidth;\n else if (options.forceVerticalMode !== undefined) candidate = options.forceVerticalMode;\n }\n if (candidate !== undefined) settings.minWidth = candidate;\n } else {\n if (data[key]) {\n settings[key] = data[key];\n } else if (options && options[key] !== undefined) {\n settings[key] = options[key];\n }\n }\n\n if (defaultSettings[key].type === 'integer') {\n if (!settings[key] || !testValues(settings[key], key)) {\n settings[key] = defaultSettings[key].defaultValue;\n }\n } else if (defaultSettings[key].type === 'string') {\n if (defaultSettings[key].acceptedValues && defaultSettings[key].acceptedValues.indexOf(settings[key]) === -1) {\n console.warn(`${warningLabel} The value \"${settings[key]}\" entered for the setting \"${key}\" was not recognised.`);\n settings[key] = defaultSettings[key].defaultValue;\n }\n }\n });\n\n (function applyColorParity(){\n const data = timelineEl.dataset;\n const getData = function(k){\n return data[k] !== undefined ? data[k] : (data[k && k.toLowerCase()] !== undefined ? data[k.toLowerCase()] : undefined);\n };\n let nodeColor = getData('nodeColor');\n let lineColor = getData('lineColor');\n let navColor = getData('navColor');\n if (options) {\n if (options.nodeColor !== undefined) nodeColor = options.nodeColor;\n if (options.lineColor !== undefined) lineColor = options.lineColor;\n if (options.navColor !== undefined) navColor = options.navColor;\n }\n if (nodeColor || lineColor || navColor) {\n applyTimelineColors(timelineEl, { nodeColor, lineColor, navColor });\n }\n })();\n\n const defaultTrigger = defaultSettings.verticalTrigger.defaultValue.match(/(\\d*\\.?\\d*)(.*)/);\n const triggerArray = settings.verticalTrigger.match(/(\\d*\\.?\\d*)(.*)/);\n let [, triggerValue, triggerUnit] = triggerArray;\n let triggerValid = true;\n if (!triggerValue) {\n console.warn(`${warningLabel} No numercial value entered for the 'verticalTrigger' setting.`);\n triggerValid = false;\n }\n if (triggerUnit !== 'px' && triggerUnit !== '%') {\n console.warn(`${warningLabel} The setting 'verticalTrigger' must be a percentage or pixel value.`);\n triggerValid = false;\n }\n if (triggerUnit === '%' && (triggerValue > 100 || triggerValue < 0)) {\n console.warn(`${warningLabel} The 'verticalTrigger' setting value must be between 0 and 100 if using a percentage value.`);\n triggerValid = false;\n } else if (triggerUnit === 'px' && triggerValue < 0) {\n console.warn(`${warningLabel} The 'verticalTrigger' setting value must be above 0 if using a pixel value.`);\n triggerValid = false;\n }\n\n if (triggerValid === false) {\n [, triggerValue, triggerUnit] = defaultTrigger;\n }\n\n settings.verticalTrigger = {\n unit: triggerUnit,\n value: triggerValue\n };\n\n if (settings.moveItems > settings.visibleItems) {\n console.warn(`${warningLabel} The value of \"moveItems\" (${settings.moveItems}) is larger than the number of \"visibleItems\" (${settings.visibleItems}). The value of \"visibleItems\" has been used instead.`);\n settings.moveItems = settings.visibleItems;\n }\n\n if (settings.startIndex > (items.length - settings.visibleItems) && items.length > settings.visibleItems) {\n console.warn(`${warningLabel} The 'startIndex' setting must be between 0 and ${items.length - settings.visibleItems} for this timeline. The value of ${items.length - settings.visibleItems} has been used instead.`);\n settings.startIndex = items.length - settings.visibleItems;\n } else if (items.length <= settings.visibleItems) {\n console.warn(`${warningLabel} The number of items in the timeline must exceed the number of visible items to use the 'startIndex' option.`);\n settings.startIndex = 0;\n } else if (settings.startIndex < 0) {\n console.warn(`${warningLabel} The 'startIndex' setting must be between 0 and ${items.length - settings.visibleItems} for this timeline. The value of 0 has been used instead.`);\n settings.startIndex = 0;\n }\n\n enhanceInlineItems(timelineEl, items);\n\n if (!timelineEl.id) {\n timelineEl.setAttribute('data-timeline-id', 'timeline-' + Date.now() + '-' + Math.random().toString(36).substr(2, 9));\n }\n\n timelines.push({\n timelineEl,\n wrap,\n scroller,\n items,\n settings,\n listeners: [] // Store listeners for cleanup\n });\n }\n\n if (collection.length) {\n Array.from(collection).forEach(createTimelines);\n }\n\n function setHeightandWidths(tl) {\n function setWidths() {\n tl.itemWidth = 200;\n tl.items.forEach((item) => {\n item.style.width = `${tl.itemWidth}px`;\n });\n tl.scrollerWidth = tl.itemWidth * tl.items.length;\n tl.scroller.style.width = `${tl.scrollerWidth}px`;\n }\n\n function setHeights() {\n let oddIndexTallest = 0;\n let evenIndexTallest = 0;\n tl.items.forEach((item, i) => {\n item.style.height = 'auto';\n const height = item.offsetHeight;\n if (i % 2 === 0) {\n evenIndexTallest = height > evenIndexTallest ? height : evenIndexTallest;\n } else {\n oddIndexTallest = height > oddIndexTallest ? height : oddIndexTallest;\n }\n });\n\n const transformString = `translateY(${evenIndexTallest}px)`;\n tl.items.forEach((item, i) => {\n if (i % 2 === 0) {\n item.style.height = `${evenIndexTallest}px`;\n if (tl.settings.horizontalStartPosition === 'bottom') {\n item.classList.add('timeline__item--bottom');\n addTransforms(item, transformString);\n } else {\n item.classList.add('timeline__item--top');\n }\n } else {\n item.style.height = `${oddIndexTallest}px`;\n if (tl.settings.horizontalStartPosition !== 'bottom') {\n item.classList.add('timeline__item--bottom');\n addTransforms(item, transformString);\n } else {\n item.classList.add('timeline__item--top');\n }\n }\n });\n tl.scroller.style.height = `${evenIndexTallest + oddIndexTallest}px`;\n }\n\n if (window.innerWidth > tl.settings.minWidth) {\n setWidths();\n setHeights();\n }\n }\n\n function addNavigation(tl) {\n const viewportWidth = tl.wrap.offsetWidth;\n const itemsVisible = Math.floor(viewportWidth / tl.itemWidth);\n\n if (tl.items.length > itemsVisible) {\n const prevArrow = document.createElement('button');\n const nextArrow = document.createElement('button');\n const topPosition = tl.items[0].offsetHeight;\n prevArrow.className = 'timeline-nav-button timeline-nav-button--prev';\n nextArrow.className = 'timeline-nav-button timeline-nav-button--next';\n prevArrow.textContent = 'Previous';\n nextArrow.textContent = 'Next';\n prevArrow.style.top = `${topPosition}px`;\n nextArrow.style.top = `${topPosition}px`;\n\n const arrowColor = tl.timelineEl.getAttribute('data-arrow-color') || '#333';\n prevArrow.innerHTML = createArrowSVG('left', arrowColor);\n nextArrow.innerHTML = createArrowSVG('right', arrowColor);\n\n const maxIndex = Math.max(0, tl.items.length - itemsVisible);\n if (currentIndex === 0) {\n prevArrow.disabled = true;\n } else if (currentIndex >= maxIndex) {\n nextArrow.disabled = true;\n }\n tl.timelineEl.appendChild(prevArrow);\n tl.timelineEl.appendChild(nextArrow);\n }\n }\n\n function addHorizontalDivider(tl) {\n const divider = tl.timelineEl.querySelector('.timeline-divider');\n if (divider) {\n tl.timelineEl.removeChild(divider);\n }\n const topPosition = tl.items[0].offsetHeight;\n const horizontalDivider = document.createElement('span');\n horizontalDivider.className = 'timeline-divider';\n horizontalDivider.style.top = `${topPosition}px`;\n tl.timelineEl.appendChild(horizontalDivider);\n }\n\n function timelinePosition(tl) {\n const position = tl.items[currentIndex].offsetLeft;\n const str = `translate3d(-${position}px, 0, 0)`;\n addTransforms(tl.scroller, str);\n }\n\n function slideTimeline(tl) {\n const navArrows = tl.timelineEl.querySelectorAll('.timeline-nav-button');\n const arrowPrev = tl.timelineEl.querySelector('.timeline-nav-button--prev');\n const arrowNext = tl.timelineEl.querySelector('.timeline-nav-button--next');\n\n const viewportWidth = tl.wrap.offsetWidth;\n const itemsVisible = Math.floor(viewportWidth / tl.itemWidth);\n const maxIndex = Math.max(0, tl.items.length - itemsVisible);\n\n const moveItems = parseInt(tl.settings.moveItems, 10);\n \n const handleArrowClick = function(e) {\n e.preventDefault();\n e.stopPropagation();\n\n if (this.disabled) {\n return;\n }\n\n currentIndex = this.classList.contains('timeline-nav-button--next') ? (currentIndex += moveItems) : (currentIndex -= moveItems);\n if (currentIndex === 0 || currentIndex < 0) {\n currentIndex = 0;\n arrowPrev.disabled = true;\n arrowNext.disabled = false;\n } else if (currentIndex === maxIndex || currentIndex > maxIndex) {\n currentIndex = maxIndex;\n arrowPrev.disabled = false;\n arrowNext.disabled = true;\n } else {\n arrowPrev.disabled = false;\n arrowNext.disabled = false;\n }\n timelinePosition(tl);\n };\n \n Array.from(navArrows).forEach((arrow) => {\n arrow.addEventListener('click', handleArrowClick);\n tl.listeners.push({ element: arrow, type: 'click', handler: handleArrowClick });\n });\n }\n\n function setUpHorinzontalTimeline(tl) {\n if (tl.settings.rtlMode) {\n currentIndex = tl.items.length > tl.settings.visibleItems ? tl.items.length - tl.settings.visibleItems : 0;\n } else {\n currentIndex = tl.settings.startIndex;\n }\n tl.timelineEl.classList.add('timeline--horizontal');\n setHeightandWidths(tl);\n timelinePosition(tl);\n addNavigation(tl);\n addHorizontalDivider(tl);\n slideTimeline(tl);\n\n const timelineId = tl.timelineEl.id || tl.timelineEl.getAttribute('data-timeline-id');\n if (timelineId) {\n timelineRegistry[timelineId] = {\n setCurrentIndex: function(index) {\n const viewportWidth = tl.wrap.offsetWidth;\n const itemsVisible = Math.floor(viewportWidth / tl.itemWidth);\n const maxIndex = Math.max(0, tl.items.length - itemsVisible);\n currentIndex = Math.max(0, Math.min(index, maxIndex));\n },\n updatePosition: function() {\n timelinePosition(tl);\n const arrowPrev = tl.timelineEl.querySelector('.timeline-nav-button--prev');\n const arrowNext = tl.timelineEl.querySelector('.timeline-nav-button--next');\n if (arrowPrev && arrowNext) {\n const viewportWidth = tl.wrap.offsetWidth;\n const itemsVisible = Math.floor(viewportWidth / tl.itemWidth);\n const maxIndex = Math.max(0, tl.items.length - itemsVisible);\n arrowPrev.disabled = currentIndex === 0;\n arrowNext.disabled = currentIndex >= maxIndex;\n }\n }\n };\n }\n }\n\n function setUpVerticalTimeline(tl) {\n let lastVisibleIndex = 0;\n tl.items.forEach((item, i) => {\n item.classList.remove('animated', 'fadeIn');\n if (!isElementInViewport(item, tl.settings.verticalTrigger) && i > 0) {\n item.classList.add('animated');\n } else {\n lastVisibleIndex = i;\n }\n const divider = tl.settings.verticalStartPosition === 'left' ? 1 : 0;\n if (i % 2 === divider && window.innerWidth > tl.settings.minWidth) {\n item.classList.add('timeline__item--right');\n } else {\n item.classList.add('timeline__item--left');\n }\n });\n for (let i = 0; i < lastVisibleIndex; i += 1) {\n tl.items[i].classList.remove('animated', 'fadeIn');\n }\n \n // Use IntersectionObserver instead of scroll listener for better performance\n if ('IntersectionObserver' in window) {\n const observerOptions = {\n rootMargin: tl.settings.verticalTrigger.unit === '%' \n ? `${tl.settings.verticalTrigger.value}%` \n : `${tl.settings.verticalTrigger.value}px`,\n threshold: 0.01\n };\n \n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n entry.target.classList.add('fadeIn');\n }\n });\n }, observerOptions);\n \n tl.items.forEach((item) => {\n if (item.classList.contains('animated')) {\n observer.observe(item);\n }\n });\n \n // Store observer for cleanup\n tl.observer = observer;\n } else {\n // Fallback for older browsers (though we're targeting 2018+)\n const scrollHandler = () => {\n tl.items.forEach((item) => {\n if (isElementInViewport(item, tl.settings.verticalTrigger)) {\n item.classList.add('fadeIn');\n }\n });\n };\n window.addEventListener('scroll', scrollHandler);\n tl.listeners.push({ element: window, type: 'scroll', handler: scrollHandler });\n }\n }\n\n function resetTimelines(tl) {\n // Clean up event listeners\n if (tl.listeners && tl.listeners.length > 0) {\n tl.listeners.forEach(({ element, type, handler }) => {\n element.removeEventListener(type, handler);\n });\n tl.listeners = [];\n }\n \n // Clean up IntersectionObserver\n if (tl.observer) {\n tl.observer.disconnect();\n tl.observer = null;\n }\n \n tl.timelineEl.classList.remove('timeline--horizontal', 'timeline--mobile');\n tl.scroller.removeAttribute('style');\n tl.items.forEach((item) => {\n item.removeAttribute('style');\n item.classList.remove('animated', 'fadeIn', 'timeline__item--left', 'timeline__item--right');\n });\n const navArrows = tl.timelineEl.querySelectorAll('.timeline-nav-button');\n Array.from(navArrows).forEach((arrow) => {\n arrow.parentNode.removeChild(arrow);\n });\n }\n\n function setUpTimelines() {\n timelines.forEach((tl) => {\n tl.timelineEl.style.opacity = 0;\n if (!tl.timelineEl.classList.contains('timeline--loaded')) {\n wrapElements(tl.items);\n }\n resetTimelines(tl);\n if (window.innerWidth <= tl.settings.minWidth) {\n tl.timelineEl.classList.add('timeline--mobile');\n }\n if (tl.settings.mode === 'horizontal' && window.innerWidth > tl.settings.minWidth) {\n setUpHorinzontalTimeline(tl);\n } else {\n setUpVerticalTimeline(tl);\n }\n tl.timelineEl.classList.add('timeline--loaded');\n });\n\n setTimeout(() => {\n timelines.forEach((tl) => {\n tl.timelineEl.style.opacity = 1;\n });\n }, 500);\n\n if (shouldHideLoader) {\n hideTimelineLoader();\n shouldHideLoader = false;\n }\n }\n\n setUpTimelines();\n\n window.addEventListener('resize', () => {\n clearTimeout(resizeTimer);\n resizeTimer = setTimeout(() => {\n const newWinWidth = window.innerWidth;\n if (newWinWidth !== winWidth) {\n setUpTimelines();\n winWidth = newWinWidth;\n }\n }, 250);\n });\n}","import { timelineBasePath } from '../shared/config.js';\nimport { showTimelineLoader, hideTimelineLoader } from './loader-ui.js';\nimport { showTimelineError } from './error-ui.js';\nimport { applyTimelineColors } from './colors.js';\nimport { handleDeepLinking } from './deep-linking.js';\nimport { timeline } from '../core/timeline-engine.js';\n\nfunction createItemNode(item) {\n const itemEl = document.createElement('div');\n itemEl.className = 'timeline__item';\n\n if (item.id) {\n itemEl.setAttribute('data-node-id', item.id);\n }\n\n itemEl.setAttribute('data-modal-title', item.title || '');\n itemEl.setAttribute('data-modal-content', item.content || '');\n itemEl.setAttribute('data-modal-image', item.image || '');\n if (item.html) {\n itemEl.setAttribute('data-modal-html', item.html);\n }\n\n const content = document.createElement('div');\n content.className = 'timeline__content';\n\n if (item.image) {\n const img = document.createElement('img');\n img.src = item.image;\n img.className = 'timeline__image';\n img.alt = item.title || '';\n img.onerror = function() {\n console.error('Timeline: The image \"' + item.image + '\" could not be loaded. Please check the path.');\n this.src = timelineBasePath + '/missing-image.svg';\n this.alt = 'Image not found';\n this.title = 'Original image: ' + item.image;\n };\n content.appendChild(img);\n }\n\n const textWrapper = document.createElement('div');\n if (item.title) {\n const title = document.createElement('h3');\n title.textContent = item.title;\n textWrapper.appendChild(title);\n }\n\n if (item.content) {\n const para = document.createElement('p');\n let displayText = item.content;\n if (displayText.length > 105) {\n displayText = displayText.substring(0, 105) + '...';\n }\n para.innerHTML = displayText;\n textWrapper.appendChild(para);\n }\n\n if (item.html) {\n const wrapper = document.createElement('div');\n wrapper.innerHTML = item.html;\n textWrapper.appendChild(wrapper);\n }\n\n content.appendChild(textWrapper);\n itemEl.appendChild(content);\n\n itemEl.addEventListener('click', function(e) {\n e.preventDefault();\n if (typeof window.openTimelineModal === 'function') {\n window.openTimelineModal(itemEl);\n }\n });\n itemEl.setAttribute('data-modal-bound', '1');\n\n return itemEl;\n}\n\nfunction applyDataAttributes(container, config) {\n if (config.layoutMode) {\n container.setAttribute('data-mode', config.layoutMode);\n }\n if (config.visibleItems !== undefined) {\n container.setAttribute('data-visible-items', config.visibleItems);\n }\n if (config.minWidth !== undefined) {\n container.setAttribute('data-minwidth', config.minWidth);\n container.setAttribute('data-force-vertical-mode', config.minWidth);\n }\n if (config.maxWidth !== undefined) {\n container.setAttribute('data-maxwidth', config.maxWidth);\n }\n}\n\nexport function renderTimelineFromData(containerSelector, data, config) {\n const container = document.querySelector(containerSelector);\n if (!container) return;\n\n let itemsWrap = container.querySelector('.timeline__items');\n if (!itemsWrap) {\n const wrap = document.createElement('div');\n wrap.className = 'timeline__wrap';\n itemsWrap = document.createElement('div');\n itemsWrap.className = 'timeline__items';\n wrap.appendChild(itemsWrap);\n container.appendChild(wrap);\n } else {\n itemsWrap.innerHTML = '';\n }\n\n if (config) {\n applyDataAttributes(container, config);\n applyTimelineColors(container, config);\n\n if (config.timelineName && config.timelineName.trim() !== '') {\n const existingHeading = container.previousElementSibling;\n if (existingHeading && existingHeading.classList.contains('timeline__heading')) {\n existingHeading.textContent = config.timelineName;\n } else {\n const heading = document.createElement('h1');\n heading.className = 'timeline__heading';\n heading.textContent = config.timelineName;\n container.parentNode.insertBefore(heading, container);\n }\n container.setAttribute('data-timeline-name', config.timelineName);\n }\n }\n\n data.forEach(function (it) {\n itemsWrap.appendChild(createItemNode(it));\n });\n\n return container;\n}\n\nexport function timelineFromData(containerSelector, data, options) {\n const container = renderTimelineFromData(containerSelector, data, options);\n if (!container) return;\n timeline([container], options);\n}\n\nexport function loadDataFromJson(url, containerSelector) {\n const container = document.querySelector(containerSelector);\n if (!container) {\n console.error('Timeline: Container not found:', containerSelector);\n return;\n }\n\n showTimelineLoader();\n\n const timelineId = container ? container.id : null;\n const cacheKey = timelineId ? 'vjs_' + timelineId : null;\n\n if (cacheKey && typeof(Storage) !== 'undefined') {\n try {\n const cached = localStorage.getItem(cacheKey);\n if (cached) {\n const cachedData = JSON.parse(cached);\n fetch(url).then(function(res) {\n if (!res.ok) throw new Error('Failed to load ' + url + ' (' + res.status + ')');\n return res.json();\n }).then(function(json) {\n if (json.lastupdated && cachedData.lastupdated && json.lastupdated === cachedData.lastupdated) {\n console.log('Using cached timeline data for', timelineId);\n processTimelineData(cachedData, containerSelector);\n } else {\n console.log('Updating cached timeline data for', timelineId);\n localStorage.setItem(cacheKey, JSON.stringify(json));\n processTimelineData(json, containerSelector);\n }\n }).catch(function(err) {\n console.warn('Failed to fetch fresh data, using cache:', err);\n processTimelineData(cachedData, containerSelector);\n });\n return;\n }\n } catch (e) {\n console.warn('Error reading from localStorage:', e);\n }\n }\n\n fetch(url).then(function (res) {\n if (!res.ok) throw new Error('Failed to load ' + url + ' (' + res.status + ')');\n return res.json();\n }).then(function (json) {\n if (cacheKey && typeof(Storage) !== 'undefined') {\n try {\n localStorage.setItem(cacheKey, JSON.stringify(json));\n console.log('Cached timeline data for', timelineId);\n } catch (e) {\n console.warn('Failed to cache timeline data:', e);\n }\n }\n processTimelineData(json, containerSelector);\n }).catch(function (err) {\n console.error('Error loading timeline JSON:', err);\n showTimelineError(container, 'json-load', err.message);\n });\n}\n\nexport function processTimelineData(json, containerSelector) {\n const container = document.querySelector(containerSelector);\n if (!container) {\n console.error('Timeline: Container not found:', containerSelector);\n return;\n }\n\n let config = null;\n let nodes = [];\n\n try {\n if (json.nodes && Array.isArray(json.nodes)) {\n nodes = json.nodes;\n config = {\n timelineName: json.timelineName,\n layoutMode: json.layoutMode,\n visibleItems: json.visibleItems,\n minWidth: json.minWidth,\n maxWidth: json.maxWidth,\n nodeColor: json.nodeColor,\n lineColor: json.lineColor,\n navColor: json.navColor,\n lastupdated: json.lastupdated\n };\n } else if (Array.isArray(json)) {\n nodes = json;\n } else {\n throw new Error('Invalid JSON format. Expected object with \"nodes\" array or simple array.');\n }\n\n if (nodes.length === 0) {\n throw new Error('No timeline items found in data.');\n }\n\n renderTimelineFromData(containerSelector, nodes, config);\n\n try {\n timeline(document.querySelectorAll(containerSelector));\n handleDeepLinking(containerSelector);\n hideTimelineLoader();\n } catch (e) {\n console.error('Error initializing timeline:', e);\n const container = document.querySelector(containerSelector);\n if (container) {\n showTimelineError(container, 'invalid-config', e.message);\n }\n hideTimelineLoader();\n }\n\n } catch (e) {\n console.error('Error processing timeline data:', e);\n showTimelineError(container, 'json-parse', e.message);\n hideTimelineLoader();\n }\n}\n\nexport function clearTimelineCache(timelineId) {\n if (typeof(Storage) === 'undefined') {\n console.warn('localStorage not supported');\n return;\n }\n\n if (timelineId) {\n const key = 'vjs_' + timelineId;\n localStorage.removeItem(key);\n console.log('Cleared cache for timeline:', timelineId);\n } else {\n const keys = Object.keys(localStorage);\n let cleared = 0;\n keys.forEach(function(key) {\n if (key.startsWith('vjs_')) {\n localStorage.removeItem(key);\n cleared++;\n }\n });\n console.log('Cleared', cleared, 'timeline cache(s)');\n }\n}\n","// --------------------------------------------------------------------------\r\n// timeline.js - a vanilla JS app to display timelines\r\n// \r\n// Created in 2018 by Mike Collins (https://github.com/squarechip/timeline)\r\n// Modified in 2026 by Ken Dawson (https://github.com/kendawson-online)\r\n// Last updated: 01/08/26\r\n//\r\n// --------------------------------------------------------------------------\r\n\r\nimport { createTimelineModal, openTimelineModal, closeTimelineModal } from './features/modals.js';\r\nimport { handleDeepLinking, navigateToNodeIndex } from './features/deep-linking.js';\r\nimport { renderTimelineFromData, timelineFromData, loadDataFromJson, processTimelineData, clearTimelineCache } from './features/data-loader.js';\r\nimport { timeline } from './core/timeline-engine.js';\r\nimport '../css/timeline.css';\r\n\r\nfunction autoInitJsonTimelines() {\r\n const timelinesWithJson = document.querySelectorAll('[data-json-config]');\r\n timelinesWithJson.forEach(function(timelineEl) {\r\n const jsonUrl = timelineEl.getAttribute('data-json-config');\r\n if (!jsonUrl) return;\r\n const className = (timelineEl.className || '').split(' ')[0];\r\n const selector = timelineEl.id ? '#' + timelineEl.id : (className ? '.' + className : null);\r\n if (selector) {\r\n loadDataFromJson(jsonUrl, selector);\r\n }\r\n });\r\n}\r\n\r\nfunction exposeGlobals() {\r\n if (typeof window === 'undefined') return;\r\n window.timeline = timeline;\r\n window.timelineFromData = timelineFromData;\r\n window.renderTimelineFromData = renderTimelineFromData;\r\n window.processTimelineData = processTimelineData;\r\n window.loadDataFromJson = loadDataFromJson;\r\n window.clearTimelineCache = clearTimelineCache;\r\n window.createTimelineModal = createTimelineModal;\r\n window.openTimelineModal = openTimelineModal;\r\n window.closeTimelineModal = closeTimelineModal;\r\n window.handleTimelineDeepLinking = handleDeepLinking;\r\n window.navigateTimelineToNodeIndex = navigateToNodeIndex;\r\n}\r\n\r\nexposeGlobals();\r\n\r\ndocument.addEventListener('DOMContentLoaded', function() {\r\n autoInitJsonTimelines();\r\n});\r\n\r\nif (typeof window !== 'undefined' && window.jQuery) {\r\n (( $) => {\r\n $.fn.timeline = function(opts) {\r\n timeline(this, opts);\r\n return this;\r\n };\r\n })(window.jQuery);\r\n}\r\n\r\nexport {\r\n timeline,\r\n timelineFromData,\r\n renderTimelineFromData,\r\n loadDataFromJson,\r\n processTimelineData,\r\n clearTimelineCache,\r\n createTimelineModal,\r\n openTimelineModal,\r\n closeTimelineModal,\r\n handleDeepLinking,\r\n navigateToNodeIndex\r\n};"],"names":["loaderState","count","startTime","removeTimer","overlayEl","modalState","modal","overlay","timelineRegistry","createTimelineModal","document","createElement","className","addEventListener","closeTimelineModal","innerHTML","closeBtn","querySelector","closeBottomBtn","e","stopPropagation","body","appendChild","key","classList","contains","openTimelineModal","itemEl","title","getAttribute","content","image","html","modalTitle","modalText","modalImage","textContent","src","alt","style","display","replace","setTimeout","add","overflow","remove","handleDeepLinking","containerSelector","urlParams","URLSearchParams","window","location","search","timelineId","get","nodeId","targetContainer","getElementById","console","warn","scrollIntoView","behavior","block","targetNode","itemIndex","Array","from","parentNode","children","indexOf","navigateToNodeIndex","container","index","id","tlData","setCurrentIndex","updatePosition","timelineBasePath","TimelineConfig","basePath","scripts","getElementsByTagName","i","length","dir","substring","lastIndexOf","showTimelineLoader","Date","now","clearTimeout","loader","spinner","width","height","hideTimelineLoader","elapsed","remaining","Math","max","removeOverlay","showTimelineError","errorType","details","errorInfo","message","solution","errorDiv","errorIcon","errorTitle","errorMessage","errorSolution","errorDetails","error","getColorBrightness","color","rgb","startsWith","hex","parseInt","matches","match","map","Number","applyTimelineColors","config","nodeColor","lineColor","navColor","setProperty","arrowColor","setAttribute","createArrowSVG","direction","timeline","collection","options","timelines","warningLabel","resizeTimer","winWidth","innerWidth","currentIndex","shouldHideLoader","defaultSettings","minWidth","type","defaultValue","horizontalStartPosition","acceptedValues","mode","moveItems","rtlMode","startIndex","verticalStartPosition","verticalTrigger","visibleItems","itemWrap","el","wrapper","classes","insertBefore","isElementInViewport","triggerPosition","rect","getBoundingClientRect","windowHeight","innerHeight","documentElement","clientHeight","defaultTrigger","triggerUnit","unit","triggerValue","value","trigger","top","left","clientWidth","addTransforms","transform","webkitTransform","msTransform","timelinePosition","tl","str","items","offsetLeft","scroller","setUpHorinzontalTimeline","settings","timelineEl","itemWidth","forEach","item","scrollerWidth","oddIndexTallest","evenIndexTallest","offsetHeight","transformString","setHeights","setHeightandWidths","viewportWidth","wrap","offsetWidth","itemsVisible","floor","prevArrow","nextArrow","topPosition","maxIndex","disabled","addNavigation","divider","removeChild","horizontalDivider","addHorizontalDivider","navArrows","querySelectorAll","arrowPrev","arrowNext","handleArrowClick","preventDefault","this","arrow","listeners","push","element","handler","slideTimeline","min","setUpTimelines","opacity","removeEventListener","observer","disconnect","removeAttribute","resetTimelines","lastVisibleIndex","observerOptions","rootMargin","threshold","IntersectionObserver","entries","entry","isIntersecting","target","observe","scrollHandler","setUpVerticalTimeline","timelineName","errorPart","data","dataset","Error","slice","call","Object","keys","candidate","undefined","minwidth","forceVerticalMode","forceverticalmode","settingName","getData","k","toLowerCase","triggerArray","triggerValid","hasAttribute","heading","trim","firstP","img","ensureInlineModalData","enhanceInlineItems","random","toString","substr","newWinWidth","renderTimelineFromData","itemsWrap","layoutMode","maxWidth","applyDataAttributes","existingHeading","previousElementSibling","it","onerror","textWrapper","para","displayText","createItemNode","timelineFromData","loadDataFromJson","url","cacheKey","cached","localStorage","getItem","cachedData","JSON","parse","fetch","then","res","ok","status","json","lastupdated","log","processTimelineData","setItem","stringify","catch","err","nodes","isArray","clearTimelineCache","removeItem","cleared","handleTimelineDeepLinking","navigateTimelineToNodeIndex","jsonUrl","split","selector","jQuery","fn","opts"],"mappings":"sCACO,MAAMA,EAAc,CACzBC,MAAO,EACPC,UAAW,EACXC,YAAa,KACbC,UAAW,MAGAC,EAAa,CACxBC,MAAO,KACPC,QAAS,MAIEC,EAAmB,CAAA,ECZzB,SAASC,IACd,GAAIJ,EAAWC,MAAO,OAEtBD,EAAWE,QAAUG,SAASC,cAAc,OAC5CN,EAAWE,QAAQK,UAAY,yBAC/BP,EAAWE,QAAQM,iBAAiB,QAASC,GAE7CT,EAAWC,MAAQI,SAASC,cAAc,OAC1CN,EAAWC,MAAMM,UAAY,iBAC7BP,EAAWC,MAAMS,UAAY,0aAW7B,MAAMC,EAAWX,EAAWC,MAAMW,cAAc,0BAC1CC,EAAiBb,EAAWC,MAAMW,cAAc,iCACtDD,EAASH,iBAAiB,QAASC,GACnCI,EAAeL,iBAAiB,QAASC,GAEzCT,EAAWC,MAAMO,iBAAiB,QAAS,SAASM,GAClDA,EAAEC,iBACJ,GAEAV,SAASW,KAAKC,YAAYjB,EAAWE,SACrCG,SAASW,KAAKC,YAAYjB,EAAWC,OAErCI,SAASG,iBAAiB,UAAW,SAASM,GAC9B,WAAVA,EAAEI,KAAoBlB,EAAWC,MAAMkB,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"name": "@kendawson-online/vantl",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "A vanilla JavaScript library that creates responsive timelines for both horizontal and vertical layouts",
|
|
5
5
|
"main": "dist/timeline.min.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@rollup/plugin-terser": "^0.4.4",
|
|
12
|
-
"
|
|
12
|
+
"cssnano": "^7.1.2",
|
|
13
|
+
"postcss": "^8.5.6",
|
|
14
|
+
"rollup": "^4.55.1",
|
|
15
|
+
"rollup-plugin-postcss": "^4.0.2"
|
|
13
16
|
},
|
|
14
17
|
"keywords": [
|
|
15
18
|
"timeline",
|
|
@@ -33,5 +36,7 @@
|
|
|
33
36
|
"src/images"
|
|
34
37
|
],
|
|
35
38
|
"prepare": "npm run build",
|
|
36
|
-
"publishConfig": {
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
}
|
|
37
42
|
}
|
package/src/css/timeline.css
CHANGED
|
@@ -669,8 +669,9 @@
|
|
|
669
669
|
}
|
|
670
670
|
|
|
671
671
|
.timeline__loader-spinner {
|
|
672
|
-
width:
|
|
673
|
-
|
|
672
|
+
width: 120px;
|
|
673
|
+
max-width: 100%;
|
|
674
|
+
height: auto;
|
|
674
675
|
display: block;
|
|
675
676
|
object-fit: contain;
|
|
676
677
|
}
|
|
@@ -693,7 +694,8 @@
|
|
|
693
694
|
|
|
694
695
|
.timeline__error-icon {
|
|
695
696
|
width: 200px;
|
|
696
|
-
|
|
697
|
+
max-width: 100%;
|
|
698
|
+
height: auto;
|
|
697
699
|
margin-bottom: 24px;
|
|
698
700
|
opacity: 0.8;
|
|
699
701
|
}
|