@creaditor/web-starterkit 1.0.60 → 1.0.61
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/dist/112.creaditor.bundle.js.gz +0 -0
- package/dist/1142.creaditor.bundle.js.gz +0 -0
- package/dist/1204.creaditor.bundle.js.gz +0 -0
- package/dist/1271.creaditor.bundle.js.gz +0 -0
- package/dist/1317.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/1317.creaditor.bundle.js.gz +0 -0
- package/dist/1334.creaditor.bundle.js.gz +0 -0
- package/dist/1396.creaditor.bundle.js.gz +0 -0
- package/dist/1403.creaditor.bundle.js.gz +0 -0
- package/dist/1456.creaditor.bundle.js.gz +0 -0
- package/dist/1529.creaditor.bundle.js.gz +0 -0
- package/dist/168.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/168.creaditor.bundle.js.gz +0 -0
- package/dist/170.creaditor.bundle.js.gz +0 -0
- package/dist/175.creaditor.bundle.js.gz +0 -0
- package/dist/1972.creaditor.bundle.js.gz +0 -0
- package/dist/2001.creaditor.bundle.js +116 -133
- package/dist/2001.creaditor.bundle.js.gz +0 -0
- package/dist/211.creaditor.bundle.js.gz +0 -0
- package/dist/2112.creaditor.bundle.js.gz +0 -0
- package/dist/2154.creaditor.bundle.js.gz +0 -0
- package/dist/2234.creaditor.bundle.js.gz +0 -0
- package/dist/2298.creaditor.bundle.js.gz +0 -0
- package/dist/235.creaditor.bundle.js.gz +0 -0
- package/dist/2350.creaditor.bundle.js.gz +0 -0
- package/dist/2377.creaditor.bundle.js.gz +0 -0
- package/dist/2384.creaditor.bundle.js.gz +0 -0
- package/dist/2397.creaditor.bundle.js.gz +0 -0
- package/dist/2409.creaditor.bundle.js.gz +0 -0
- package/dist/2547.creaditor.bundle.js.gz +0 -0
- package/dist/2550.creaditor.bundle.js.gz +0 -0
- package/dist/2590.creaditor.bundle.js.gz +0 -0
- package/dist/2655.creaditor.bundle.js.gz +0 -0
- package/dist/2682.creaditor.bundle.js +195 -0
- package/dist/{7051.creaditor.bundle.js.LICENSE.txt → 2682.creaditor.bundle.js.LICENSE.txt} +0 -6
- package/dist/{7051.creaditor.bundle.js.LICENSE.txt.gz → 2682.creaditor.bundle.js.LICENSE.txt.gz} +0 -0
- package/dist/2682.creaditor.bundle.js.gz +0 -0
- package/dist/2706.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/2706.creaditor.bundle.js.gz +0 -0
- package/dist/271.creaditor.bundle.js.gz +0 -0
- package/dist/2717.creaditor.bundle.js.gz +0 -0
- package/dist/2765.creaditor.bundle.js.gz +0 -0
- package/dist/2773.creaditor.bundle.js.gz +0 -0
- package/dist/2833.creaditor.bundle.js.gz +0 -0
- package/dist/2837.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/2837.creaditor.bundle.js.gz +0 -0
- package/dist/2956.creaditor.bundle.js.gz +0 -0
- package/dist/2963.creaditor.bundle.js.gz +0 -0
- package/dist/3105.creaditor.bundle.js.gz +0 -0
- package/dist/3233.creaditor.bundle.js.gz +0 -0
- package/dist/3418.creaditor.bundle.js.gz +0 -0
- package/dist/3521.creaditor.bundle.js.gz +0 -0
- package/dist/353.creaditor.bundle.js.gz +0 -0
- package/dist/3545.creaditor.bundle.js.gz +0 -0
- package/dist/3553.creaditor.bundle.js.gz +0 -0
- package/dist/3606.creaditor.bundle.js.gz +0 -0
- package/dist/3792.creaditor.bundle.js.gz +0 -0
- package/dist/380.creaditor.bundle.js.gz +0 -0
- package/dist/3827.creaditor.bundle.js.gz +0 -0
- package/dist/3847.creaditor.bundle.js.gz +0 -0
- package/dist/3875.creaditor.bundle.js.gz +0 -0
- package/dist/3971.creaditor.bundle.js.gz +0 -0
- package/dist/4061.creaditor.bundle.js.gz +0 -0
- package/dist/407.creaditor.bundle.js.gz +0 -0
- package/dist/4074.creaditor.bundle.js.gz +0 -0
- package/dist/4100.creaditor.bundle.js.gz +0 -0
- package/dist/4109.creaditor.bundle.js.gz +0 -0
- package/dist/4114.creaditor.bundle.js.gz +0 -0
- package/dist/4161.creaditor.bundle.js.gz +0 -0
- package/dist/4186.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/4186.creaditor.bundle.js.gz +0 -0
- package/dist/4288.creaditor.bundle.js.gz +0 -0
- package/dist/4413.creaditor.bundle.js.gz +0 -0
- package/dist/4475.creaditor.bundle.js.gz +0 -0
- package/dist/453.creaditor.bundle.js.gz +0 -0
- package/dist/4615.creaditor.bundle.js.gz +0 -0
- package/dist/4639.creaditor.bundle.js.gz +0 -0
- package/dist/467.creaditor.bundle.js.gz +0 -0
- package/dist/4762.creaditor.bundle.js.gz +0 -0
- package/dist/4770.creaditor.bundle.js.gz +0 -0
- package/dist/4819.creaditor.bundle.js +7 -7
- package/dist/4819.creaditor.bundle.js.gz +0 -0
- package/dist/4947.creaditor.bundle.js.gz +0 -0
- package/dist/4987.creaditor.bundle.js.gz +0 -0
- package/dist/4988.creaditor.bundle.js.gz +0 -0
- package/dist/5119.creaditor.bundle.js.gz +0 -0
- package/dist/5133.creaditor.bundle.js.gz +0 -0
- package/dist/5156.creaditor.bundle.js.gz +0 -0
- package/dist/5284.creaditor.bundle.js.gz +0 -0
- package/dist/5379.creaditor.bundle.js.gz +0 -0
- package/dist/5391.creaditor.bundle.js.gz +0 -0
- package/dist/5411.creaditor.bundle.js.gz +0 -0
- package/dist/5501.creaditor.bundle.js.gz +0 -0
- package/dist/5530.creaditor.bundle.js.gz +0 -0
- package/dist/5666.creaditor.bundle.js.gz +0 -0
- package/dist/567.creaditor.bundle.js.gz +0 -0
- package/dist/5713.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/5713.creaditor.bundle.js.gz +0 -0
- package/dist/574.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/574.creaditor.bundle.js.gz +0 -0
- package/dist/578.creaditor.bundle.js.gz +0 -0
- package/dist/5791.creaditor.bundle.js.gz +0 -0
- package/dist/5839.creaditor.bundle.js.gz +0 -0
- package/dist/5849.creaditor.bundle.js.gz +0 -0
- package/dist/5850.creaditor.bundle.js.gz +0 -0
- package/dist/5884.creaditor.bundle.js.gz +0 -0
- package/dist/59.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/59.creaditor.bundle.js.gz +0 -0
- package/dist/5926.creaditor.bundle.js.gz +0 -0
- package/dist/6036.creaditor.bundle.js.gz +0 -0
- package/dist/6151.creaditor.bundle.js.gz +0 -0
- package/dist/6216.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/6216.creaditor.bundle.js.gz +0 -0
- package/dist/638.creaditor.bundle.js.gz +0 -0
- package/dist/6442.creaditor.bundle.js.gz +0 -0
- package/dist/6496.creaditor.bundle.js.gz +0 -0
- package/dist/653.creaditor.bundle.js.gz +0 -0
- package/dist/6751.creaditor.bundle.js.gz +0 -0
- package/dist/6814.creaditor.bundle.js.gz +0 -0
- package/dist/6937.creaditor.bundle.js.gz +0 -0
- package/dist/7055.creaditor.bundle.js.gz +0 -0
- package/dist/715.creaditor.bundle.js +4 -4
- package/dist/715.creaditor.bundle.js.gz +0 -0
- package/dist/7155.creaditor.bundle.js.gz +0 -0
- package/dist/7209.creaditor.bundle.js.gz +0 -0
- package/dist/7238.creaditor.bundle.js.gz +0 -0
- package/dist/7255.creaditor.bundle.js.gz +0 -0
- package/dist/738.creaditor.bundle.js.gz +0 -0
- package/dist/7380.creaditor.bundle.js.gz +0 -0
- package/dist/7463.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/7463.creaditor.bundle.js.gz +0 -0
- package/dist/7466.creaditor.bundle.js.gz +0 -0
- package/dist/752.creaditor.bundle.js.gz +0 -0
- package/dist/7523.creaditor.bundle.js.gz +0 -0
- package/dist/7564.creaditor.bundle.js.gz +0 -0
- package/dist/7654.creaditor.bundle.js.gz +0 -0
- package/dist/767.creaditor.bundle.js.gz +0 -0
- package/dist/7789.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/7789.creaditor.bundle.js.gz +0 -0
- package/dist/7838.creaditor.bundle.js.gz +0 -0
- package/dist/7937.creaditor.bundle.js.gz +0 -0
- package/dist/7997.creaditor.bundle.js.gz +0 -0
- package/dist/8042.creaditor.bundle.js.gz +0 -0
- package/dist/8064.creaditor.bundle.js.gz +0 -0
- package/dist/8141.creaditor.bundle.js.gz +0 -0
- package/dist/8173.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/8173.creaditor.bundle.js.gz +0 -0
- package/dist/8196.creaditor.bundle.js.gz +0 -0
- package/dist/823.creaditor.bundle.js.gz +0 -0
- package/dist/8250.creaditor.bundle.js.gz +0 -0
- package/dist/8251.creaditor.bundle.js.gz +0 -0
- package/dist/8299.creaditor.bundle.js.gz +0 -0
- package/dist/8315.creaditor.bundle.js.gz +0 -0
- package/dist/8443.creaditor.bundle.js.gz +0 -0
- package/dist/8516.creaditor.bundle.js.gz +0 -0
- package/dist/8533.creaditor.bundle.js.gz +0 -0
- package/dist/8547.creaditor.bundle.js.gz +0 -0
- package/dist/8570.creaditor.bundle.js.gz +0 -0
- package/dist/8646.creaditor.bundle.js.gz +0 -0
- package/dist/8654.creaditor.bundle.js.gz +0 -0
- package/dist/8854.creaditor.bundle.js.gz +0 -0
- package/dist/8878.creaditor.bundle.js.gz +0 -0
- package/dist/8916.creaditor.bundle.js.gz +0 -0
- package/dist/8921.creaditor.bundle.js.gz +0 -0
- package/dist/898.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/898.creaditor.bundle.js.gz +0 -0
- package/dist/8983.creaditor.bundle.js.gz +0 -0
- package/dist/9041.creaditor.bundle.js.gz +0 -0
- package/dist/9158.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/9158.creaditor.bundle.js.gz +0 -0
- package/dist/9250.creaditor.bundle.js.gz +0 -0
- package/dist/9386.creaditor.bundle.js.gz +0 -0
- package/dist/9431.creaditor.bundle.js.gz +0 -0
- package/dist/9453.creaditor.bundle.js.gz +0 -0
- package/dist/9570.creaditor.bundle.js.gz +0 -0
- package/dist/9694.creaditor.bundle.js.gz +0 -0
- package/dist/975.creaditor.bundle.js.gz +0 -0
- package/dist/976.creaditor.bundle.js.gz +0 -0
- package/dist/9986.creaditor.bundle.js.gz +0 -0
- package/dist/9990.creaditor.bundle.js.gz +0 -0
- package/dist/9994.creaditor.bundle.js.gz +0 -0
- package/dist/creaditor.bundle.js +610 -215
- package/dist/creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/creaditor.bundle.js.gz +0 -0
- package/dist/index.html.gz +0 -0
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.gz +0 -0
- package/dist/workbox-f3063069.js.gz +0 -0
- package/package.json +1 -1
- package/dist/7051.creaditor.bundle.js +0 -162
- package/dist/7051.creaditor.bundle.js.gz +0 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/*! For license information please see 2682.creaditor.bundle.js.LICENSE.txt */
|
|
2
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2682],{2682(e,t,s){s.r(t);var o=s(14583),i=Object.defineProperty,n=(e,t,s)=>((e,t,s)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);const r=2;class d{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,s){this._$Ct=e,this._$AM=t,this._$Ci=s}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const c=(e,t)=>{var s;const o=e._$AN;if(void 0===o)return!1;for(const e of o)null==(s=e._$AO)||s.call(e,t,!1),c(e,t);return!0},a=e=>{let t,s;do{if(void 0===(t=e._$AM))break;s=t._$AN,s.delete(e),e=t}while(0===(null==s?void 0:s.size))},h=e=>{for(let t;t=e._$AM;e=t){let s=t._$AN;if(void 0===s)t._$AN=s=new Set;else if(s.has(e))break;s.add(e),p(t)}};function l(e){void 0!==this._$AN?(a(this),this._$AM=e,h(this)):this._$AM=e}function u(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const o=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(t)if(Array.isArray(o))for(let e=s;e<o.length;e++)c(o[e],!1),a(o[e]);else null!=o&&(c(o,!1),a(o));else c(this,e)}const p=e=>{e.type==r&&(e._$AP??(e._$AP=u),e._$AQ??(e._$AQ=l))};class b extends d{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,s){super._$AT(e,t,s),h(this),this.isConnected=e._$AU}_$AO(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];var s,o;e!==this.isConnected&&(this.isConnected=e,e?null==(s=this.reconnected)||s.call(this):null==(o=this.disconnected)||o.call(this)),t&&(c(this,e),a(this))}setValue(e){if(void 0===this._$Ct.strings)this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}class f{}const v=new WeakMap,m=(g=class extends b{render(e){return o.A}update(e,t){let[s]=t;var i;const n=s!==this.G;return n&&void 0!==this.G&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.G=s,this.ht=null==(i=e.options)?void 0:i.host,this.rt(this.ct=e.element)),o.A}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){const t=this.ht??globalThis;let s=v.get(t);void 0===s&&(s=new WeakMap,v.set(t,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){var e,t;return"function"==typeof this.G?null==(e=v.get(this.ht??globalThis))?void 0:e.get(this.G):null==(t=this.G)?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}},function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return{_$litDirective$:g,values:t}});var g;let w=1500;function y(){return w++}class x extends o.i{constructor(){super(),n(this,"contentRef",new f),this.toggle=this.toggle.bind(this),this.onEnter=this.onEnter.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.scheduleCalc=this.scheduleCalc.bind(this),this._calcScheduled=!1,this._resizeObserver=null,this.overflow=!0,this.maxHeight=300,this.left=0,this.top=0,this.custom=!1,this.opened=!1}close(){this.toggle()}onBouncing(e){this.searchText=e.target.value;const t=new UIEvent("search",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}render(){return o.b`
|
|
3
|
+
<slot @click=${()=>this.toggle()} tabindex="0" name="trigger"></slot>
|
|
4
|
+
${this.opened?o.b` <div
|
|
5
|
+
@mouseup=${this.onClickOutside}
|
|
6
|
+
@mousemove=${this.onPointerMove}
|
|
7
|
+
class="backdrop"
|
|
8
|
+
style="z-index:${y()};"
|
|
9
|
+
>
|
|
10
|
+
<div
|
|
11
|
+
${m(this.contentRef)}
|
|
12
|
+
@mouseup=${this.preventClosing}
|
|
13
|
+
style="z-index:${y()};left:${this.left}px;top:${this.top}px;"
|
|
14
|
+
class="dropdown-content fade-in ${this.custom?"":"dropdown-background"}"
|
|
15
|
+
>
|
|
16
|
+
${this.search?o.b`<cdtr-input
|
|
17
|
+
@input=${this.onBouncing}
|
|
18
|
+
type="search"
|
|
19
|
+
value=${this.searchText}
|
|
20
|
+
></cdtr-input>`:null}
|
|
21
|
+
<slot name="content"></slot>
|
|
22
|
+
</div>
|
|
23
|
+
</div>`:null}
|
|
24
|
+
`}preventClosing(e){return e.stopPropagation(),setTimeout(()=>{this.calcRects()},0),!1}onClickOutside(){this.toggle(!1)}updated(){const e=this.contentRef.value;this.opened&&e?(e.classList.add("fade-in"),this.scheduleCalc(),!this._resizeObserver&&typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(this.scheduleCalc),this._resizeObserver.observe(e))):!this.opened&&this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}scheduleCalc(){this._calcScheduled||(this._calcScheduled=!0,requestAnimationFrame(()=>{this._calcScheduled=!1,this.opened&&this.calcRects()}))}calcRects(){var e;const t=null==(e=this.contentRef)?void 0:e.value;if(!t)return;const s=this.getBoundingClientRect(),o=document.documentElement,i=o.clientWidth||window.innerWidth,n=o.clientHeight||window.innerHeight,r=i-16,d=n-16;t.style.maxWidth=`${r}px`,t.style.maxHeight=`${Math.min(this.maxHeight||d,d)}px`;const c=t.getBoundingClientRect(),a=c.width,h=c.height;let l=s.left;l+a>i-8&&(l=i-8-a),l<8&&(l=8);let u=s.bottom;if(u+h>n-8){const e=s.top-h;u=e>=8?e:n-8-h}u<8&&(u=8),this.left=l,this.top=u,t.style.left=`${l}px`,t.style.top=`${u}px`,t.style.overflow=this.overflow?"hidden auto":"hidden"}toggle(){var e;const t=arguments.length>0&&void 0!==arguments[0]&&arguments[0]||!this.opened;t?(window.removeEventListener("keydown",this.onKeydown),window.addEventListener("keydown",this.onKeydown),this.style.removeProperty("--cdtr-item-hover"),this.opened=t,setTimeout(()=>{const e=this.focusedItem=this.querySelector("cdtr-dropdown-item[focused]")||this.querySelector("cdtr-dropdown-item");e&&e.focus()},20)):(window.removeEventListener("keydown",this.onKeydown),null==(e=this.contentRef.value)||e.classList.add("fade-out"),setTimeout(()=>{this.opened=t},150)),this.setAttribute("aria-expanded",t)}onEnter(e){e.target===this&&13===e.keyCode&&this.toggle()}onPointerMove(){this.style.removeProperty("--cdtr-item-hover")}onKeydown(e){(40===e.keyCode||38===e.keyCode)&&this.style.setProperty("--cdtr-item-hover","transparent"),this.focusedItem&&40===e.keyCode&&this.focusedItem.nextElementSibling&&"CDTR-DROPDOWN-ITEM"===this.focusedItem.nextElementSibling.nodeName?(this.focusedItem=this.focusedItem.nextElementSibling,this.focusedItem&&this.focusedItem.focus()):this.focusedItem&&38===e.keyCode&&this.focusedItem.previousElementSibling&&"CDTR-DROPDOWN-ITEM"===this.focusedItem.previousElementSibling.nodeName?(this.focusedItem=this.focusedItem.previousElementSibling,this.focusedItem&&this.focusedItem.focus()):27===e.keyCode&&this.toggle();const t=new UIEvent("keypress",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-disabled","false"),this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",this.opened),this.addEventListener("keydown",this.onEnter),setTimeout(()=>{this.opened&&this.toggle(!0)},50)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.onKeydown),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}patch(e){this.value=e,this.toggle(!1);const t=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t),setTimeout(()=>{this.focus()},0)}}n(x,"styles",o.a`
|
|
25
|
+
:host {
|
|
26
|
+
display: inline-block;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.backdrop {
|
|
32
|
+
position: fixed;
|
|
33
|
+
top: 0;
|
|
34
|
+
left: 0;
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 100%;
|
|
37
|
+
background: transparent;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
}
|
|
40
|
+
/* padding lives here so custom content stays flush against the panel */
|
|
41
|
+
.dropdown-background {
|
|
42
|
+
background: #fff;
|
|
43
|
+
padding: 4px;
|
|
44
|
+
}
|
|
45
|
+
.dropdown-content {
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
min-width: 180px;
|
|
48
|
+
min-height: 40px;
|
|
49
|
+
position: fixed;
|
|
50
|
+
border-radius: 10px;
|
|
51
|
+
border: 1px solid #eceef1;
|
|
52
|
+
/* layered depth: a tight ambient edge + a soft key shadow */
|
|
53
|
+
box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06),
|
|
54
|
+
0 8px 24px -6px rgba(16, 24, 40, 0.16);
|
|
55
|
+
transition: box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
56
|
+
}
|
|
57
|
+
.fade-in {
|
|
58
|
+
animation: fade-in 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
|
|
59
|
+
}
|
|
60
|
+
.fade-out {
|
|
61
|
+
animation: fade-out 140ms ease both;
|
|
62
|
+
opacity: 0;
|
|
63
|
+
}
|
|
64
|
+
@keyframes fade-in {
|
|
65
|
+
from {
|
|
66
|
+
opacity: 0;
|
|
67
|
+
transform: translateY(-6px) scale(0.98);
|
|
68
|
+
}
|
|
69
|
+
to {
|
|
70
|
+
opacity: 1;
|
|
71
|
+
transform: none;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
@keyframes fade-out {
|
|
75
|
+
from {
|
|
76
|
+
opacity: 1;
|
|
77
|
+
}
|
|
78
|
+
to {
|
|
79
|
+
opacity: 0;
|
|
80
|
+
transform: translateY(-4px);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
@media (prefers-reduced-motion: reduce) {
|
|
84
|
+
.fade-in,
|
|
85
|
+
.fade-out {
|
|
86
|
+
animation-duration: 1ms;
|
|
87
|
+
transform: none;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
`),n(x,"properties",{search:{type:Boolean},searchText:{type:String},left:{type:Number},top:{type:Number},opened:{type:Boolean},maxHeight:{type:Number},overflow:{type:Boolean},value:{type:String},custom:{type:String}});class k extends o.i{constructor(){super(),this.minWidth=50}render(){return o.b`<paper-button style="min-width:${this.minWidth}px"
|
|
91
|
+
><slot></slot> <cdtr-dd-arrow-icon></cdtr-dd-arrow-icon
|
|
92
|
+
></paper-button>`}}n(k,"properties",{minWidth:{type:Number}}),n(k,"styles",o.a`
|
|
93
|
+
paper-button {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: space-between;
|
|
97
|
+
gap: 8px;
|
|
98
|
+
text-transform: capitalize;
|
|
99
|
+
width: 100%;
|
|
100
|
+
line-height: 1.4;
|
|
101
|
+
font-size: 13px;
|
|
102
|
+
font-weight: 500;
|
|
103
|
+
color: rgb(33, 37, 41);
|
|
104
|
+
background: rgb(255, 255, 255);
|
|
105
|
+
background-clip: padding-box;
|
|
106
|
+
border: 1px solid var(--input-border-color, #ced4da);
|
|
107
|
+
appearance: none;
|
|
108
|
+
border-radius: 8px;
|
|
109
|
+
transition: border-color 0.15s ease-in-out 0s,
|
|
110
|
+
box-shadow 0.15s ease-in-out 0s, background-color 0.15s ease-in-out 0s;
|
|
111
|
+
margin: 0px;
|
|
112
|
+
font-family: var(--font-family, "Inter", Arial, sans-serif);
|
|
113
|
+
box-sizing: border-box;
|
|
114
|
+
padding: 7px 10px;
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
}
|
|
117
|
+
paper-button:hover {
|
|
118
|
+
border-color: #9aa1a9;
|
|
119
|
+
background: #fbfbfc;
|
|
120
|
+
}
|
|
121
|
+
paper-button:focus,
|
|
122
|
+
paper-button:focus-within {
|
|
123
|
+
outline: none;
|
|
124
|
+
border-color: var(--cdtr-dropdown-accent, #7c5cf6);
|
|
125
|
+
box-shadow: 0 0 0 3px rgba(124, 92, 246, 0.2);
|
|
126
|
+
}
|
|
127
|
+
`);class $ extends o.i{constructor(){super(),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}focus(){this.shadowRoot.querySelector(".dropdown-item").focus()}onFocus(){this.focused=!0}onBlur(){this.focused=!1}onClick(e){if(this.notClickable)return;const t=this.closest("cdtr-dropdown");t&&t.patch(this.value,e,this)}onPress(e){if(13===e.keyCode){const t=new UIEvent("click",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t);const s=this.closest("cdtr-dropdown");s&&s.patch(this.value,e,this)}}connectedCallback(){super.connectedCallback(),this.selected&&this.scrollIntoView({behavior:"smooth",block:"start"})}render(){return o.b`<div role="button"
|
|
128
|
+
@click=${this.onClick}
|
|
129
|
+
@keydown=${this.onPress}
|
|
130
|
+
@blur=${this.onBlur}
|
|
131
|
+
@focus=${this.onFocus}
|
|
132
|
+
class="dropdown-item"
|
|
133
|
+
tabindex="0"
|
|
134
|
+
>
|
|
135
|
+
<slot></slot>
|
|
136
|
+
${this.selected?o.b` <svg
|
|
137
|
+
class="check"
|
|
138
|
+
fill="currentColor"
|
|
139
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
140
|
+
viewBox="0 0 24 24"
|
|
141
|
+
aria-hidden="true"
|
|
142
|
+
>
|
|
143
|
+
<path fill="none" d="M0 0h24v24H0z" />
|
|
144
|
+
<path
|
|
145
|
+
d="M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z"
|
|
146
|
+
/>
|
|
147
|
+
</svg>`:null}
|
|
148
|
+
</div>`}}n($,"properties",{focused:{type:Boolean,reflect:!0},selected:{type:Boolean,reflect:!0},value:{type:String,reflect:!0},notClickable:{type:Boolean}}),n($,"styles",o.a`
|
|
149
|
+
.dropdown-item {
|
|
150
|
+
position: relative;
|
|
151
|
+
box-sizing: border-box;
|
|
152
|
+
display: flex;
|
|
153
|
+
align-items: center;
|
|
154
|
+
justify-content: space-between;
|
|
155
|
+
gap: 10px;
|
|
156
|
+
width: 100%;
|
|
157
|
+
padding: 8px 12px;
|
|
158
|
+
border-radius: 6px;
|
|
159
|
+
font-family: var(--font-family, "Inter", Arial, sans-serif);
|
|
160
|
+
font-size: 13px;
|
|
161
|
+
line-height: 1.4;
|
|
162
|
+
color: #212529;
|
|
163
|
+
cursor: pointer;
|
|
164
|
+
user-select: none;
|
|
165
|
+
transition: background-color 120ms ease, color 120ms ease,
|
|
166
|
+
box-shadow 120ms ease;
|
|
167
|
+
}
|
|
168
|
+
/* hover = a translucent violet wash: ephemeral pointer feedback. The
|
|
169
|
+
parent sets --cdtr-item-hover to transparent while arrow-key
|
|
170
|
+
navigating so it never competes with the keyboard cursor below. */
|
|
171
|
+
.dropdown-item:hover {
|
|
172
|
+
background: var(--cdtr-item-hover, rgba(124, 92, 246, 0.1));
|
|
173
|
+
}
|
|
174
|
+
/* keyboard cursor: stronger wash + a left accent bar, so "where am I"
|
|
175
|
+
reads at a glance and is distinct from both hover and selected */
|
|
176
|
+
.dropdown-item:focus {
|
|
177
|
+
outline: none;
|
|
178
|
+
background: rgba(124, 92, 246, 0.16);
|
|
179
|
+
color: var(--cdtr-dropdown-accent-ink, #5a3cc9);
|
|
180
|
+
box-shadow: inset 3px 0 0 var(--cdtr-dropdown-accent, #7c5cf6);
|
|
181
|
+
}
|
|
182
|
+
/* selected = the committed choice: a SOLID chip (opaque, not a wash),
|
|
183
|
+
accent text, weight, and a check — so it can't be mistaken for hover */
|
|
184
|
+
:host([selected]) .dropdown-item {
|
|
185
|
+
color: var(--cdtr-dropdown-accent-ink, #5a3cc9);
|
|
186
|
+
font-weight: 600;
|
|
187
|
+
background: var(--cdtr-dropdown-selected-bg, #efeaff);
|
|
188
|
+
}
|
|
189
|
+
.check {
|
|
190
|
+
width: 16px;
|
|
191
|
+
height: 16px;
|
|
192
|
+
flex: none;
|
|
193
|
+
color: var(--cdtr-dropdown-accent, #7c5cf6);
|
|
194
|
+
}
|
|
195
|
+
`),customElements.get("cdtr-dropdown-item")||customElements.define("cdtr-dropdown-item",$),customElements.get("cdtr-dropdown-button")||customElements.define("cdtr-dropdown-button",k),customElements.get("cdtr-dropdown")||customElements.define("cdtr-dropdown",x)}}]);
|
package/dist/{7051.creaditor.bundle.js.LICENSE.txt.gz → 2682.creaditor.bundle.js.LICENSE.txt.gz}
RENAMED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4819],{84819(t,e,
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4819],{84819(t,e,o){o.r(e),o.d(e,{NameAndSubjectPlugin:()=>u});var i=o(59929),s=o(49410);o(78533);function r(){return window.___cdtr_isConsoleLogged||console.log("%cWe run on production, if you want to point to dev server, please add ?dev=1 at the url","color:green"),window.___cdtr_isConsoleLogged=!0,!1}window.___cdtr_isConsoleLogged=window.___cdtr_isConsoleLogged||!1,r(),r(),r(),r(),r();const n=r()?"http://localhost:8000/api/v1/prompt/subject":"https://agent.creaditor.ai/api/v1/prompt/subject",a=r()?"http://localhost:8000/api/v1/prompt/subtitle":"https://agent.creaditor.ai/api/v1/prompt/subtitle";var l=Object.defineProperty,p=(t,e,o,i)=>{for(var s,r=void 0,n=t.length-1;n>=0;n--)(s=t[n])&&(r=s(e,o,r)||r);return r&&l(e,o,r),r};typeof window<"u"&&!window.__polymerElementsLoaded&&(window.__polymerElementsLoaded=!0,(async()=>{try{const t=["paper-dropdown-menu","paper-item","paper-listbox"].filter(t=>customElements.get(t));if(t.length>0)return void console.warn(`Polymer elements already loaded: ${t.join(", ")}. Skipping imports to prevent conflicts.`);if(customElements.get("dom-module"))return void console.warn("dom-module already defined, skipping Polymer element imports to prevent conflicts");await Promise.all([Promise.all([o.e(59),o.e(9158),o.e(7789),o.e(574)]).then(o.bind(o,50574)),o.e(898).then(o.bind(o,90898)),Promise.all([o.e(6216),o.e(7463)]).then(o.bind(o,97463))]),console.log("Polymer elements loaded successfully")}catch(t){console.warn("Failed to load Polymer elements:",t)}})().catch(console.error));const d="cdtr-name-and-subject-plugin",c=class extends i.WF{constructor(){super(...arguments),this.bgColor="#000",this.textColor="#000000",this.headerText="Details",this.nameLabel="Name",this.subjectLabel="Subject",this.subtitleLabel="Subtitle",this.saveButtonText="Save",this.subjectPlaceholder="Enter subject",this.mergeTags=[],this.name="",this.subject="",this.subtitle="",this.save=()=>{},this.isGeneratingSubject=!1,this.isGeneratingSubtitle=!1}getTextDirection(t){return/[\u0590-\u05FF]/.test(t)?"rtl":"ltr"}getPlaceholderStyle(){const t=this.getTextDirection(this.subjectPlaceholder);return`direction: ${t}; text-align: ${"rtl"===t?"right":"left"};`}handleSave(){"string"!=typeof this.subtitle&&(this.subtitle=""),"string"!=typeof this.subject&&(this.subject=""),this.dispatchEvent(new CustomEvent("save",{detail:{name:this.name,subject:this.subject,subtitle:this.subtitle}})),this.save(),setTimeout(()=>{var t,e;null==(e=null==(t=this.shadowRoot)?void 0:t.querySelector("#name-popover"))||e.close()},200)}handleFieldClick(t){this.subject+=t.value,this.requestUpdate()}handleEmojiSelect(t){const e=t.detail.unicode;this.subject=this.subject+e,this.requestUpdate()}open(){var t,e;null==(e=null==(t=this.shadowRoot)?void 0:t.querySelector("#name-popover"))||e.open()}focusInputs(t){var e;this.open();const o=null==(e=this.shadowRoot)?void 0:e.querySelectorAll("input");if(o)if(o.forEach(t=>t.classList.remove("shake")),t){const e=Array.from(o).find(e=>{var o;const i=e.previousElementSibling;return null==(o=null==i?void 0:i.textContent)?void 0:o.toLowerCase().includes(t.toLowerCase())});e&&(e.focus(),e.classList.add("shake"))}else o.forEach(t=>{t.focus(),t.classList.add("shake")})}handleGenerateSubject(){if(this.isGeneratingSubject)return;const t=this.subject||"";this.subject="",this.isGeneratingSubject=!0,this.requestUpdate(),(async t=>{let e="";if(Array.from(document.querySelectorAll(".text-component")).forEach(t=>{e+=`${t.textContent}\n`}),e.length>500){const t=Math.floor(250);e=e.slice(0,t)+e.slice(-t)}try{const o=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:"write my subject",context:e})});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);if(!o.body)throw new Error("Response body is null");const i=o.body.getReader(),s=new TextDecoder;try{for(;;){const{done:e,value:o}=await i.read();if(e)break;const r=s.decode(o,{stream:!0}).split("data: ");for(const e of r)if(e.trim()&&!e.includes("[DONE]"))try{const o=JSON.parse(e);o.text&&t(o.text)}catch{}}}finally{i.releaseLock()}}catch(t){throw console.error("Error generating subject:",t),t}})(t=>{this.subject+=t,this.requestUpdate()}).catch(()=>{this.subject=t}).finally(()=>{this.isGeneratingSubject=!1,this.requestUpdate()})}handleGenerateSubtitle(){if(this.isGeneratingSubtitle)return;const t=this.subtitle||"";this.subtitle="",this.isGeneratingSubtitle=!0,this.requestUpdate(),(async t=>{let e="";if(Array.from(document.querySelectorAll(".text-component")).forEach(t=>{e+=`${t.textContent}\n`}),e.length>1400){const t=Math.floor(700);e=e.slice(0,t)+e.slice(-t)}try{const o=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);if(!o.body)throw new Error("Response body is null");const i=o.body.getReader(),s=new TextDecoder;try{for(;;){const{done:e,value:o}=await i.read();if(e)break;const r=s.decode(o,{stream:!0}).split("data: ");for(const e of r)if(e.trim()&&!e.includes("[DONE]"))try{const o=JSON.parse(e);o.text&&t(o.text)}catch{}}}finally{i.releaseLock()}}catch(t){throw console.error("Error generating subtitle:",t),t}})(t=>{this.subtitle+=t,this.requestUpdate()}).catch(()=>{this.subtitle=t}).finally(()=>{this.isGeneratingSubtitle=!1,this.requestUpdate()})}render(){return i.qy`
|
|
2
2
|
<div class="subject-input">
|
|
3
3
|
<div class="subject-input-left">
|
|
4
4
|
<cdtr-popover width="400px">
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
</div>
|
|
29
29
|
</cdtr-popover>
|
|
30
30
|
|
|
31
|
-
${this.mergeTags.length>0?
|
|
31
|
+
${this.mergeTags.length>0?i.qy` <cdtr-popover>
|
|
32
32
|
<paper-button
|
|
33
33
|
style=${`color:${this.textColor}`}
|
|
34
34
|
size="sm"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
<div class="popover-header">
|
|
53
53
|
<h3 dir="auto">${this.headerText}</h3>
|
|
54
54
|
</div>
|
|
55
|
-
${this.mergeTags.map(t=>
|
|
55
|
+
${this.mergeTags.map(t=>i.qy`
|
|
56
56
|
<div
|
|
57
57
|
class="field-item"
|
|
58
58
|
@click=${()=>this.handleFieldClick(t)}
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
?disabled=${this.isGeneratingSubject}
|
|
120
120
|
class="generate-button"
|
|
121
121
|
>
|
|
122
|
-
${this.isGeneratingSubject?
|
|
122
|
+
${this.isGeneratingSubject?i.qy` <div class="loading-spinner"></div> `:i.qy`
|
|
123
123
|
<svg
|
|
124
124
|
xmlns="http://www.w3.org/2000/svg"
|
|
125
125
|
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
?disabled=${this.isGeneratingSubtitle}
|
|
167
167
|
class="generate-button"
|
|
168
168
|
>
|
|
169
|
-
${this.isGeneratingSubtitle?
|
|
169
|
+
${this.isGeneratingSubtitle?i.qy` <div class="loading-spinner"></div> `:i.qy`
|
|
170
170
|
<svg
|
|
171
171
|
xmlns="http://www.w3.org/2000/svg"
|
|
172
172
|
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
</div>
|
|
218
218
|
</cdtr-popover>
|
|
219
219
|
</div>
|
|
220
|
-
`}};
|
|
220
|
+
`}};c.styles=i.AH`
|
|
221
221
|
* {
|
|
222
222
|
box-sizing: border-box;
|
|
223
223
|
}
|
|
@@ -404,4 +404,4 @@
|
|
|
404
404
|
--button-active-background: #f1f3f5;
|
|
405
405
|
--font-size: 14px;
|
|
406
406
|
}
|
|
407
|
-
`;let c
|
|
407
|
+
`;let u=c;p([(0,s.MZ)({type:String})],u.prototype,"bgColor"),p([(0,s.MZ)({type:String})],u.prototype,"textColor"),p([(0,s.MZ)({type:String})],u.prototype,"headerText"),p([(0,s.MZ)({type:String})],u.prototype,"nameLabel"),p([(0,s.MZ)({type:String})],u.prototype,"subjectLabel"),p([(0,s.MZ)({type:String})],u.prototype,"subtitleLabel"),p([(0,s.MZ)({type:String})],u.prototype,"saveButtonText"),p([(0,s.MZ)({type:String})],u.prototype,"subjectPlaceholder"),p([(0,s.MZ)({type:Array})],u.prototype,"mergeTags"),p([(0,s.MZ)({type:String})],u.prototype,"name"),p([(0,s.MZ)({type:String})],u.prototype,"subject"),p([(0,s.MZ)({type:String})],u.prototype,"subtitle"),p([(0,s.MZ)({attribute:!1})],u.prototype,"save"),p([(0,s.MZ)({type:Boolean})],u.prototype,"isGeneratingSubject"),p([(0,s.MZ)({type:Boolean})],u.prototype,"isGeneratingSubtitle"),customElements.get(d)||customElements.define(d,u)}}]);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|