@creaditor/web-starterkit 1.0.11 → 1.0.13
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/1142.creaditor.bundle.js +1 -1
- package/dist/1142.creaditor.bundle.js.gz +0 -0
- package/dist/1260.creaditor.bundle.js +63 -26
- package/dist/1260.creaditor.bundle.js.gz +0 -0
- package/dist/1271.creaditor.bundle.js +1 -1
- package/dist/1271.creaditor.bundle.js.gz +0 -0
- package/dist/1334.creaditor.bundle.js +2 -2
- package/dist/1334.creaditor.bundle.js.gz +0 -0
- package/dist/170.creaditor.bundle.js +144 -17
- package/dist/170.creaditor.bundle.js.gz +0 -0
- package/dist/211.creaditor.bundle.js +1 -1
- package/dist/211.creaditor.bundle.js.gz +0 -0
- package/dist/2234.creaditor.bundle.js +121 -1
- package/dist/2234.creaditor.bundle.js.gz +0 -0
- package/dist/2590.creaditor.bundle.js +1 -1
- package/dist/2590.creaditor.bundle.js.gz +0 -0
- package/dist/2765.creaditor.bundle.js +1 -1
- package/dist/2765.creaditor.bundle.js.gz +0 -0
- package/dist/2956.creaditor.bundle.js +1 -1
- package/dist/2956.creaditor.bundle.js.gz +0 -0
- package/dist/3418.creaditor.bundle.js +1 -1
- package/dist/3418.creaditor.bundle.js.gz +0 -0
- package/dist/353.creaditor.bundle.js +3 -3
- package/dist/353.creaditor.bundle.js.gz +0 -0
- package/dist/3778.creaditor.bundle.js +1 -0
- package/dist/3778.creaditor.bundle.js.gz +0 -0
- package/dist/3792.creaditor.bundle.js +1 -0
- package/dist/3792.creaditor.bundle.js.gz +0 -0
- package/dist/4061.creaditor.bundle.js +1 -1
- package/dist/4061.creaditor.bundle.js.gz +0 -0
- package/dist/4288.creaditor.bundle.js +10 -10
- package/dist/4288.creaditor.bundle.js.gz +0 -0
- package/dist/4475.creaditor.bundle.js +1 -1
- package/dist/4475.creaditor.bundle.js.gz +0 -0
- package/dist/4639.creaditor.bundle.js +1 -1
- package/dist/4639.creaditor.bundle.js.gz +0 -0
- package/dist/4739.creaditor.bundle.js +1 -1
- package/dist/4739.creaditor.bundle.js.gz +0 -0
- package/dist/4762.creaditor.bundle.js +3 -3
- package/dist/4762.creaditor.bundle.js.gz +0 -0
- package/dist/4770.creaditor.bundle.js +3 -3
- package/dist/4770.creaditor.bundle.js.gz +0 -0
- package/dist/4970.creaditor.bundle.js +7 -7
- package/dist/4970.creaditor.bundle.js.gz +0 -0
- package/dist/5119.creaditor.bundle.js +5 -5
- package/dist/5119.creaditor.bundle.js.gz +0 -0
- package/dist/5340.creaditor.bundle.js +19 -18
- package/dist/5340.creaditor.bundle.js.gz +0 -0
- package/dist/5379.creaditor.bundle.js +70 -0
- package/dist/5379.creaditor.bundle.js.gz +0 -0
- package/dist/5391.creaditor.bundle.js +1 -1
- package/dist/5391.creaditor.bundle.js.gz +0 -0
- package/dist/5884.creaditor.bundle.js +91 -0
- package/dist/5884.creaditor.bundle.js.gz +0 -0
- package/dist/5909.creaditor.bundle.js +644 -0
- package/dist/5909.creaditor.bundle.js.gz +0 -0
- package/dist/5926.creaditor.bundle.js +26 -28
- package/dist/5926.creaditor.bundle.js.gz +0 -0
- package/dist/6151.creaditor.bundle.js +1 -1
- package/dist/6151.creaditor.bundle.js.gz +0 -0
- package/dist/638.creaditor.bundle.js +49 -20
- package/dist/638.creaditor.bundle.js.gz +0 -0
- package/dist/6713.creaditor.bundle.js +1 -1
- package/dist/6713.creaditor.bundle.js.gz +0 -0
- package/dist/6814.creaditor.bundle.js +1 -1
- package/dist/6814.creaditor.bundle.js.gz +0 -0
- package/dist/7209.creaditor.bundle.js +98 -56
- package/dist/7209.creaditor.bundle.js.gz +0 -0
- package/dist/7564.creaditor.bundle.js +1 -1
- package/dist/7564.creaditor.bundle.js.gz +0 -0
- package/dist/7937.creaditor.bundle.js +18 -42
- package/dist/7937.creaditor.bundle.js.gz +0 -0
- package/dist/8141.creaditor.bundle.js +2 -2
- package/dist/8141.creaditor.bundle.js.gz +0 -0
- package/dist/8250.creaditor.bundle.js +1 -1
- package/dist/8250.creaditor.bundle.js.gz +0 -0
- package/dist/8646.creaditor.bundle.js +20 -24
- package/dist/8646.creaditor.bundle.js.gz +0 -0
- package/dist/8654.creaditor.bundle.js +7 -7
- package/dist/8654.creaditor.bundle.js.gz +0 -0
- package/dist/9041.creaditor.bundle.js +13 -15
- package/dist/9041.creaditor.bundle.js.gz +0 -0
- package/dist/9431.creaditor.bundle.js +1 -1
- package/dist/9431.creaditor.bundle.js.gz +0 -0
- package/dist/9694.creaditor.bundle.js +1 -1
- package/dist/9694.creaditor.bundle.js.gz +0 -0
- package/dist/creaditor.bundle.js +2102 -1589
- package/dist/creaditor.bundle.js.gz +0 -0
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1 +1,121 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2234],{62234(
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2234],{62234(t,a,s){s.r(a),s.d(a,{ToastProvider:()=>i});var e=s(59929),o=s(49937);let r=0;class i extends e.WF{constructor(){super(),this._toasts=[],this._handleSnackbar=this._handleSnackbar.bind(this)}connectedCallback(){super.connectedCallback(),o.A.subscribe("snackbar",this._handleSnackbar),window.snackbar=t=>{"string"==typeof t&&(t={text:t}),this._handleSnackbar(t)}}disconnectedCallback(){super.disconnectedCallback()}_handleSnackbar(){let{text:t,type:a,action:s,timeout:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t)return;const o=++r,i={id:o,text:t,type:a||"neutral",action:s||null};this._toasts=[...this._toasts,i],this._toasts.length>3&&(this._toasts=this._toasts.slice(-3)),setTimeout(()=>this._dismiss(o),e||4e3)}_dismiss(t){const a=this.shadowRoot?.querySelector(`[data-toast-id="${t}"]`);a?(a.classList.add("removing"),setTimeout(()=>{this._toasts=this._toasts.filter(a=>a.id!==t)},120)):this._toasts=this._toasts.filter(a=>a.id!==t)}_onAction(t){t.action&&"function"==typeof t.action.onClick&&t.action.onClick(),this._dismiss(t.id)}render(){return e.qy`${this._toasts.map(t=>e.qy`
|
|
2
|
+
<div class="toast ${t.type}" data-toast-id="${t.id}">
|
|
3
|
+
<span class="toast-text">${t.text}</span>
|
|
4
|
+
${t.action?e.qy`<button class="toast-action" @click=${()=>this._onAction(t)}>${t.action.label}</button>`:null}
|
|
5
|
+
<button class="toast-close" @click=${()=>this._dismiss(t.id)}>
|
|
6
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
7
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
8
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
9
|
+
</svg>
|
|
10
|
+
</button>
|
|
11
|
+
</div>
|
|
12
|
+
`)}`}}i.properties={_toasts:{state:!0}},i.styles=e.AH`
|
|
13
|
+
:host {
|
|
14
|
+
position: fixed;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
left: 50%;
|
|
17
|
+
transform: translateX(-50%);
|
|
18
|
+
z-index: var(--z-toast, 1100);
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column-reverse;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: var(--space-2, 8px);
|
|
23
|
+
padding: var(--space-6, 24px);
|
|
24
|
+
pointer-events: none;
|
|
25
|
+
direction: ltr;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.toast {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: var(--space-3, 12px);
|
|
32
|
+
max-width: 420px;
|
|
33
|
+
min-width: 200px;
|
|
34
|
+
padding: var(--space-3, 12px) var(--space-4, 16px);
|
|
35
|
+
background: var(--color-text, #1a1a1f);
|
|
36
|
+
color: #fff;
|
|
37
|
+
border-radius: var(--radius-md, 10px);
|
|
38
|
+
box-shadow: var(--shadow-lg);
|
|
39
|
+
font-family: var(--font-sans, -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif);
|
|
40
|
+
font-size: var(--text-sm, 13px);
|
|
41
|
+
font-weight: 500;
|
|
42
|
+
line-height: 1.4;
|
|
43
|
+
pointer-events: auto;
|
|
44
|
+
animation: cdtr-toast-in var(--duration-normal, 200ms) var(--ease-out, cubic-bezier(0, 0, 0.2, 1));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.toast.removing {
|
|
48
|
+
animation: cdtr-toast-out var(--duration-fast, 120ms) var(--ease-default, ease) forwards;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Accent stripe on the left for semantic variants */
|
|
52
|
+
.toast::before {
|
|
53
|
+
content: '';
|
|
54
|
+
flex: 0 0 auto;
|
|
55
|
+
width: 3px;
|
|
56
|
+
align-self: stretch;
|
|
57
|
+
border-radius: 2px;
|
|
58
|
+
background: transparent;
|
|
59
|
+
}
|
|
60
|
+
.toast.success::before { background: var(--color-success, #16a34a); }
|
|
61
|
+
.toast.error::before { background: var(--color-danger, #dc2626); }
|
|
62
|
+
.toast.warning::before { background: var(--color-warning, #d97706); }
|
|
63
|
+
|
|
64
|
+
.toast-text {
|
|
65
|
+
flex: 1 1 auto;
|
|
66
|
+
min-width: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.toast-action {
|
|
70
|
+
flex: 0 0 auto;
|
|
71
|
+
background: transparent;
|
|
72
|
+
border: 1px solid rgba(255, 255, 255, 0.25);
|
|
73
|
+
color: #fff;
|
|
74
|
+
padding: var(--space-1, 4px) var(--space-2, 8px);
|
|
75
|
+
border-radius: var(--radius-sm, 6px);
|
|
76
|
+
font: inherit;
|
|
77
|
+
font-size: var(--text-xs, 12px);
|
|
78
|
+
font-weight: 600;
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
white-space: nowrap;
|
|
81
|
+
transition: background var(--duration-fast, 120ms) ease;
|
|
82
|
+
}
|
|
83
|
+
.toast-action:hover {
|
|
84
|
+
background: rgba(255, 255, 255, 0.15);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.toast-close {
|
|
88
|
+
flex: 0 0 auto;
|
|
89
|
+
background: transparent;
|
|
90
|
+
border: none;
|
|
91
|
+
color: rgba(255, 255, 255, 0.5);
|
|
92
|
+
padding: var(--space-1, 4px);
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
border-radius: var(--radius-sm, 6px);
|
|
98
|
+
transition: color var(--duration-fast, 120ms) ease;
|
|
99
|
+
}
|
|
100
|
+
.toast-close:hover {
|
|
101
|
+
color: #fff;
|
|
102
|
+
}
|
|
103
|
+
.toast-close svg {
|
|
104
|
+
width: 14px;
|
|
105
|
+
height: 14px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@keyframes cdtr-toast-in {
|
|
109
|
+
from {
|
|
110
|
+
opacity: 0;
|
|
111
|
+
transform: translateY(16px);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@keyframes cdtr-toast-out {
|
|
116
|
+
to {
|
|
117
|
+
opacity: 0;
|
|
118
|
+
transform: translateY(8px);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
`,customElements.define("cdtr-toast-provider",i)}}]);
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2590],{2590(t,e,
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2590],{2590(t,e,n){n.r(e),n.d(e,{TitleEditor:()=>l});var i=n(59929),s=n(86319);class l extends i.WF{constructor(){super(),this.text="",this.whiteSpace="pre"}connectedCallback(){super.connectedCallback(),this.style.fontFamily="var(--font-family)",this.bold&&(this.style.fontWeight="bold"),this._onStoreChange=()=>this.requestUpdate(),s.M.connect(["lang","theme"],this._onStoreChange)}disconnectedCallback(){this._onStoreChange&&(s.M.disconnect(this._onStoreChange),this._onStoreChange=null),super.disconnectedCallback()}render(){const t=s.M.get("theme");t&&(this.style.direction=t.direction,this.style.textAlign=this.textAlign||t.textAlign);const e=s.M.get("lang",this.text);return i.qy`<slot
|
|
2
2
|
><span
|
|
3
3
|
style="-webkit-font-smoothing: antialiased;display:inline-block;direction:var(--direction-locale);text-align:var(--text-align-locale);white-space:${this.whiteSpace}"
|
|
4
4
|
>${e||this.text}</span
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2765],{12765(e,t,o){o.d(t,{default:()=>
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2765],{12765(e,t,o){o.d(t,{default:()=>s});var n=o(61919);const r=e=>{{const{component:t,commands:o}=e;return{select:e=>{let{changeTab:t,tab:o}=e;o.text||t("style")},tabs:e=>{const t=[{text:"style",selected:!0},{text:"interactions"},{text:"settings"}];return e?(t.forEach(t=>t.selected=t.text===e),t):t},layout:e=>{let{tab:r}=e;const i=t.props.src.includes("img.creaditor.ai"),s=()=>"style"===r.text;return[{type:"heading",level:6,text:"icon",active:s},{type:"icons",active:s,selectedIcon:t.props.src,useIconsApi:!0,iconColor:t.props.iconColor||"000000",iconSize:parseInt(t.props.style?.width,10)||24,onChange:e=>{const n=e.detail;if(n){const e=n.urlPng||n.src;e&&o.execCommand("src",e),t.props.alt&&"icon"!==t.props.alt||o.execCommand("alt",n.name),n.size?.width&&n.size?.height&&o.execCommand("style",{width:n.size.width+"px",height:n.size.height+"px"}),null!=n.category&&null!=n.name&&(o.execCommand("iconCategory",n.category),o.execCommand("iconName",n.name));const r=(n.color??t.props.iconColor??"000000").toString().replace(/^#/,"");o.execCommand("iconColor",r)}}},{type:"input",title:"altText",active:s,value:t.props.alt||"",onChange:e=>{const t=e.target.value;o.execCommand("alt",t)}},{type:"heading",level:6,text:"size",active:s},{type:"slider",title:"size",min:8,max:256,active:s,value:parseInt(t.props.style?.width,10)||24,onInput:e=>{const t=e.target.value;o.execCommand("style",{width:t+"px",height:t+"px"})}},{type:"heading",level:6,text:"colors",active:()=>s()&&i},{type:"colorpicker",title:"icon_color",alpha:!1,active:()=>s()&&i,value:t.props.iconColor?t.props.iconColor.startsWith("#")?t.props.iconColor:"#"+t.props.iconColor:"#000000",onChange:e=>{let t=e.target.value;t=(0,n.A)(t).toHex(),t.startsWith("#")&&(t=t.slice(1)),o.execCommand("iconColor",t)}},{type:"heading",level:6,text:"link",active:()=>"interactions"===r.text},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"interactions"===r.text,onChange:e=>{const t={link:e.target.value};o.execCommand("onClick",t)}}]}}}},i=e=>{let{helpers:t}=e;return{set:(e,o,n)=>{switch(o){case"style":return e[o]=t.deepMerge(e[o],n),!0;case"src":case"alt":case"iconColor":case"iconCategory":case"iconName":return e[o]=n,!0;case"onClick":if(n&&n.link)return e[o]=n,!0}}}};const s=()=>{const e="icon";return{name:e,create:t=>{const{createElement:o,compose:n,helpers:s}=t,{mergeDiff:a}=s,c=document.createElement("div"),l=document.createElement("img");c.appendChild(l);return o({name:e,id:n.id,template:c,defaultProps:{style:{height:"24px",width:"24px",display:"inline-block"},src:"",alt:"",iconColor:"000000"},draggable:{group:"element"},droppable:{group:"element"},render:()=>{a(l,{style:n.props.style});const e=function(e){const t=e.props.iconCategory,o=e.props.iconName;if(!t||!o)return null;let n=parseInt(e.props.style?.width,10)||24,r=parseInt(e.props.style?.height,10)||24;n=Math.min(512,Math.max(1,n)),r=Math.min(512,Math.max(1,r));const i=function(e){let t=(e||"000000").toString().trim();return t.startsWith("#")&&(t=t.slice(1)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length?"000000":t}(e.props.iconColor);return`https://img.creaditor.ai/icons/serve/${encodeURIComponent(t)}/${encodeURIComponent(o)}.png?${new URLSearchParams({width:String(n),height:String(r),color:i}).toString()}`}(n)||n.props.src;a(l,{src:e,alt:n.props.alt||""})},resizeable:null,handleBar:!0,validator:i({helpers:s}),schema:n.schema,onSelect:e=>{c.classList.add(e)},onDeselect:e=>{c.classList.remove(e)},elementProps:n,remove:()=>{c.remove()},createEditor:r})}}}}}]);
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3418],{3418(e,t,n){n.d(t,{default:()=>r});const s=e=>{{const{component:t,commands:n,helpers:s}=e;return{select:e=>{let{changeTab:t,tab:n}=e;"
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3418],{3418(e,t,n){n.d(t,{default:()=>r});const s=e=>{{const{component:t,commands:n,helpers:s}=e;return{select:e=>{let{changeTab:t,tab:n}=e;"style"!==n.text&&t("style")},tabs:e=>{const t=[{text:"style"},{text:"interactions"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:o,changeTab:l,tabs:r}=e;return[{type:"linkpicker",active:"interactions"===o.text,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,href:t.props.onClick?.link?.href,onChange:e=>{const t={link:e.target.value};n.execCommand("onClick",t)}},{type:"heading",level:4,text:"typography",active:"style"===o.text},{active:"style"===o.text,type:"typography",bold:700===t.props.style.fontWeight,italic:"italic"===t.props.style.fontStyle,underline:"underline"===t.props.style.textDecoration,onChange:e=>{switch(e){case"bold":const e=700===t.props.style.fontWeight?400:700;n.execCommand("style",{fontWeight:e});break;case"italic":const s="italic"===t.props.style.fontStyle?"normal":"italic";n.execCommand("style",{fontStyle:s});break;case"underline":const o="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:o})}}},{active:"style"===o.text,type:"fontFamily",value:t.props.style.fontFamily,weight:!0,weightValue:t.props.style.fontWeight,onChange:e=>{const t=e.target.value;n.execCommand("style",{fontFamily:t})},onWeightChange:e=>{n.execCommand("style",{fontWeight:e.detail.value})}},{active:"style"===o.text,type:"colorpicker",title:"color",value:t.props.style?.color,onChange:e=>{const t=e.target.value;n.execCommand("style",{color:t})}},{active:"style"===o.text,type:"fontSize",min:8,max:80,title:"fontSize",value:parseInt(t.props.style?.fontSize)||14,device:e=>{const n=e.target.device;e.target.value="phone"===n?parseInt(t.props?.breakpoints?.sm?.style?.fontSize)||14:parseInt(t.props.style.fontSize)||14},value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;"phone"===e.target.device?n.execCommand("breakpoints",e=>{const n=e.props.breakpoints?.sm||{};return{sm:s.deepMerge(n,{style:{fontSize:t+"px"}})}}):n.execCommand("style",{fontSize:t+"px"})}},{active:"style"===o.text,type:"input",title:"prefix",value:t.props.prefix||"",onInput:e=>{const t=e.target.value;n.execCommand("prefix",t)}},{active:"style"===o.text,type:"input",title:"suffix",value:t.props.suffix||"",onInput:e=>{const t=e.target.value;n.execCommand("suffix",t)}},{active:"style"===o.text,type:"divider"},{active:"style"===o.text,type:"heading",level:4,text:"svg"},{active:"style"===o.text,type:"slider",min:10,max:600,title:"size",value:parseInt(t.props.width)||14,onInput:e=>{const t=e.target.value;n.execCommand("width",t)}},{active:"style"===o.text,type:"colorpicker",title:"svg_color",value:t.props.fill,onChange:e=>{const t=e.target.value;n.execCommand("fill",t)}},{active:"style"===o.text,type:"svgpicker",value:t.props.content,onChange:e=>{n.execCommand("content",e.svg)}}]}}}},o=["fontWeight","color","fontSize","textDecdoration","fontStyle","fontFamily"],l=e=>{let{helpers:t,template:n,svgElement:s,suffix:l,prefix:r}=e;return{set:(e,i,a)=>{switch(i){case"style":e[i]=t.deepMerge(e[i],a);for(const t in e[i])if(Object.hasOwnProperty.call(e[i],t)&&-1!==o.indexOf(t)){const s=e[i][t];n.style[t]=s}return!0;case"suffix":return e[i]=a,l(a),!0;case"prefix":return e[i]=a,r(a),!0;case"onClick":if(a.link)return e.onClick||(e.onClick={}),e.onClick={...e.onClick,...a},!0;break;case"content":return s.innerHTML=a,e[i]=a,!0;case"width":case"height":case"fill":return e[i]=a,s.setAttribute(i,a),s.style[i]=a,s.style.height="auto",!0;default:return!0}}}},r=()=>({name:"svg",create:e=>{let{createElement:t,compose:n,helpers:r}=e;"string"==typeof n.props.content&&-1!==n.props.content.indexOf("<svg")&&(n.props.content=(new DOMParser).parseFromString(n.props.content,"text/xml").firstElementChild.innerHTML);const i=document.createElement("span");i.innerHTML=n.props.prefix||"";const a=document.createElement("span");a.innerHTML=n.props.suffix||"";let p=(new DOMParser).parseFromString(`<svg\n width="30"\n height="auto"\n xmlns="http://www.w3.org/2000/svg"\n viewBox="0 0 24 24">${n.props.content}</svg>`,"text/xml").firstChild;p.setAttribute("width",n?.props?.width||n?.props?.style?.width),p.setAttribute("fill",n?.props?.fill||n.props.style.fill);const c=document.createElement("div");if(c.setAttribute("dir","auto"),c.style=n.props.style,c.style.display="flex",c.style.alignItems="center",n.props.style)for(const e in n.props.style)if(Object.hasOwnProperty.call(n.props.style,e)&&-1!==o.indexOf(e)){const t=n.props.style[e];c.style[e]=t}const y=document.createElement("cdtr-move-handle-bar");return y.for=n.id,c.append(a,p,i,y),t({name:"svg",id:n.id,template:c,defaultProps:{},draggable:{group:"elements"},validator:l({template:c,helpers:r,svgElement:p,suffix:e=>a.innerHTML=e,prefix:e=>i.innerHTML=e}),schema:n.schema,onSelect:e=>{c.classList.add(e)},onDeselect:e=>{c.classList.remove(e)},elementProps:n,remove:()=>{c.remove()},createEditor:s})}})}}]);
|
|
Binary file
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[353],{40353(e,t,s){var n=s(59929),i=s(40156),
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[353],{40353(e,t,s){s.r(t),s.d(t,{HaloBackground:()=>c});var n=s(59929),i=s(40156),o=s(21421),r=s(12106);class c extends n.WF{constructor(){super(),this.containerRef=(0,o._)(),this.renderStyles=()=>`#${this.containerId} canvas {height:100% !important;width:100% !important;}`,this.containerId="halo-"+(0,r.A)(),this.config={mouseControls:!0,touchControls:!0,gyroControls:!1,minHeight:200,minWidth:200,size:1}}createRenderRoot(){return this}render(){return n.qy`<div
|
|
2
2
|
style="height:100%;width:100%;"
|
|
3
3
|
id=${this.containerId}
|
|
4
|
-
${(0,
|
|
4
|
+
${(0,o.K)(this.containerRef)}
|
|
5
5
|
>
|
|
6
6
|
<style>
|
|
7
7
|
${this.renderStyles()}
|
|
8
8
|
</style>
|
|
9
|
-
</div>`}connectedCallback(){super.connectedCallback(),(0,i.A)("https://cdnjs.cloudflare.com/ajax/libs/three.js/r121/three.min.js",()=>{(0,i.A)("https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.halo.min.js",()=>{setTimeout(()=>{window.VANTA&&(this.config.el=this.containerRef.value,this.effect=window.VANTA.HALO(this.config))},100)})})}disconnectedCallback(){super.disconnectedCallback()}}
|
|
9
|
+
</div>`}connectedCallback(){super.connectedCallback(),(0,i.A)("https://cdnjs.cloudflare.com/ajax/libs/three.js/r121/three.min.js",()=>{(0,i.A)("https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.halo.min.js",()=>{setTimeout(()=>{window.VANTA&&(this.config.el=this.containerRef.value,this.effect=window.VANTA.HALO(this.config))},100)})})}disconnectedCallback(){super.disconnectedCallback(),this.effect&&"function"==typeof this.effect.destroy&&(this.effect.destroy(),this.effect=null)}}c.properties={name:{}},c.styles=n.AH``,customElements.define("cdtr-halo-preset",c)}}]);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3778],{43778(e,t,o){o.d(t,{default:()=>E});var n=o(86319),r=o(61919);function c(e){let t=(e||"000000").toString().trim();return t.startsWith("#")&&(t=t.slice(1)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length?"000000":t}function i(e){const t=e.iconCategory||"Arrows",o=e.iconName||"arrow-down-s-line",n=c(e.iconColor);return`https://img.creaditor.ai/icons/serve/${encodeURIComponent(t)}/${encodeURIComponent(o)}.png?width=40&height=40&color=${n}`}const a={he:{designTab:"עיצוב",designDesc:"פאנלים",arrowTab:"חץ",arrowDesc:"סמל וצבע החץ",settingsTab:"הגדרות",settingsDesc:"גודל והתנהגות",panel:e=>`פאנל ${e}`,panelDesc:"שנו סדר, קבעו מצב פתיחה או הסירו פאנל. עריכת הטקסט מתבצעת ישירות על הקנבס.",openDefault:"פתוח כברירת מחדל",openDefaultDesc:"הצג פאנל זה פתוח בטעינת העמוד.",moveUp:"הזז למעלה",moveUpDesc:"העבר פאנל זה מיקום אחד למעלה.",moveDown:"הזז למטה",moveDownDesc:"העבר פאנל זה מיקום אחד למטה.",removePanel:"הסר פאנל",removePanelDesc:"מחק פאנל זה.",addPanel:"הוסף פאנל",addPanelDesc:"הוסף פאנל חדש לאקורדיון.",arrowIcon:"סמל החץ",arrowColor:"צבע החץ",width:"רוחב",widthDesc:"הרוחב הכולל של האקורדיון.",maxWidth:"רוחב מרבי",maxWidthDesc:"הרוחב המרבי של האקורדיון.",multipleOpen:"מספר פאנלים פתוחים בו-זמנית",singleOpen:"פאנל אחד פתוח בכל פעם",allowMultipleDesc:"קבע האם ניתן לפתוח כמה פאנלים יחד.",borderColor:"צבע גבול",checkmark:" ✓"},en:{designTab:"Design",designDesc:"Panels",arrowTab:"Arrow",arrowDesc:"Arrow icon & color",settingsTab:"Settings",settingsDesc:"Size & behavior",panel:e=>`Panel ${e}`,panelDesc:"Reorder, set default state, or remove this panel. Edit its text directly on the canvas.",openDefault:"Open by default",openDefaultDesc:"Show this panel expanded when the page loads.",moveUp:"Move Up",moveUpDesc:"Move this panel one position up.",moveDown:"Move Down",moveDownDesc:"Move this panel one position down.",removePanel:"Remove Panel",removePanelDesc:"Delete this panel.",addPanel:"Add Panel",addPanelDesc:"Add a new panel to the accordion.",arrowIcon:"Arrow icon",arrowColor:"Arrow color",width:"Width",widthDesc:"Overall width of the accordion.",maxWidth:"Max Width",maxWidthDesc:"Maximum width of the accordion.",multipleOpen:"Multiple panels open",singleOpen:"One panel open at a time",allowMultipleDesc:"Toggle whether several panels can be expanded at once.",borderColor:"Border Color",checkmark:" ✓"}};function l(e){let{component:t,commands:o}=e;const l=function(){try{return"en"!==n.M.get("config","language")}catch(e){return!1}}()?a.he:a.en,s=Array.isArray(t.props.items)?t.props.items:[],d=t.props.style||{},p=t.accordion||{},m=!1!==t.props.allowMultiple,u=s.map((e,t)=>({type:"accordion",label:l.panel(t+1),isOpen:!1,description:l.panelDesc,onToggle:()=>{},children:[{type:"option",text:e.isOpen?l.openDefault+l.checkmark:l.openDefault,description:l.openDefaultDesc,active:!0,onClick:()=>p.setDefaultOpen&&p.setDefaultOpen(t,!e.isOpen)},{type:"option",text:l.moveUp,description:l.moveUpDesc,active:t>0,onClick:()=>p.moveItem&&p.moveItem(t,t-1)},{type:"option",text:l.moveDown,description:l.moveDownDesc,active:t<s.length-1,onClick:()=>p.moveItem&&p.moveItem(t,t+1)},{type:"option",text:l.removePanel,icon:"remove",color:"red",description:l.removePanelDesc,onClick:()=>p.removeItem&&p.removeItem(t)},{type:"divider"}]}));return{tabs:e=>{const t=[{text:l.designTab,description:l.designDesc},{text:l.arrowTab,description:l.arrowDesc},{text:l.settingsTab,description:l.settingsDesc}];return t.forEach(t=>{t.selected=t.text===e}),t},layout:e=>{let{tab:n}=e;return n.text===l.arrowTab?[{type:"icons",title:l.arrowIcon,useIconsApi:!0,selectedIcon:i(t.props),iconColor:c(t.props.iconColor),iconSize:24,onChange:e=>{const n=e.detail;if(!n)return;null!=n.category&&null!=n.name&&(o.execCommand("iconCategory",n.category),o.execCommand("iconName",n.name));const r=(null!=n.color?n.color:t.props.iconColor||"000000").toString().replace(/^#/,"");o.execCommand("iconColor",r)}},{type:"colorpicker",title:l.arrowColor,alpha:!1,value:t.props.iconColor?t.props.iconColor.startsWith("#")?t.props.iconColor:"#"+t.props.iconColor:"#000000",onChange:e=>{o.execCommand("iconColor",(0,r.A)(e.target.value).toHex())}}]:n.text===l.settingsTab?[{type:"input",title:l.width,description:l.widthDesc,value:d.width||"",onInput:e=>{let{target:t}=e;return o.execCommand("style",{width:t.value})}},{type:"input",title:l.maxWidth,description:l.maxWidthDesc,value:d.maxWidth||"",onInput:e=>{let{target:t}=e;return o.execCommand("style",{maxWidth:t.value})}},{type:"option",text:m?l.multipleOpen+l.checkmark:l.singleOpen,description:l.allowMultipleDesc,active:!0,onClick:()=>o.execCommand("allowMultiple",!m)},{type:"colorpicker",title:l.borderColor,alpha:!1,value:t.props.borderColor||"#e6e6e6",onChange:e=>o.execCommand("borderColor",(0,r.A)(e.target.value).toHexString())}]:[...u,{type:"option",text:l.addPanel,icon:"add",description:l.addPanelDesc,onClick:()=>p.addItem&&p.addItem()}]}}}function s(e){let{helpers:t,controller:o}=e;return{set:(e,n,r)=>{switch(n){case"style":return e[n]=t.deepMerge(e[n]||{},r),o.applyStyle(),!0;case"items":return!!Array.isArray(r)&&(e[n]=r,o.reconcile(r),!0);case"allowMultiple":return e[n]=r,!0;case"borderColor":return e[n]=r,o.applyStyle(),!0;case"iconCategory":case"iconName":case"iconColor":return e[n]=r,o.refreshArrows(),!0;default:return!1}}}}var d=o(84488),p=o.n(d);const m="cdtr-accordion-styles",u=[];let h=!1,g=null;function y(e){const t=e.iconCategory||"Arrows",o=e.iconName||"arrow-down-s-line",n=function(e){let t=(e||"000000").toString().trim();return t.startsWith("#")&&(t=t.slice(1)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length?"000000":t}(e.iconColor);return`${`https://img.creaditor.ai/icons/serve/${encodeURIComponent(t)}/${encodeURIComponent(o)}.png`}?${new URLSearchParams({width:"40",height:"40",color:n}).toString()}`}function f(e){const t=w();return{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:t?"rtl":"ltr",textAlign:t?"right":"left"},content:e?[{type:"text",text:String(e)}]:[]}]}}function w(){try{return"en"!==n.M.get("config","language")}catch(e){return!1}}function v(e){return e&&"object"==typeof e&&e.childNodes?{childNodes:e.childNodes}:{childNodes:f("string"==typeof e?e:"")}}function C(e){return{title:v(e&&e.title),content:v(e&&e.content),isOpen:!(!e||!e.isOpen)}}const D=[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,40,44,48,56,64,72];function x(e){return[{type:"fontFamily",fonts:e||[],useCloud:!0},{type:"fontSize",sizes:D},{type:"bold"},{type:"italic"},{type:"underline"},{type:"fontColor"},{type:"backcolor"},{type:"direction"},{type:"left"},{type:"center"},{type:"right"},{type:"clearFormat"}]}function b(e){return[{type:"fontFamily",fonts:e||[],useCloud:!0},{type:"fontSize",sizes:D},{type:"bold"},{type:"italic"},{type:"underline"},{type:"strike"},{type:"fontColor"},{type:"backcolor"},{type:"bullet"},{type:"numbered"},{type:"link"},{type:"unLink"},{type:"direction"},{type:"left"},{type:"center"},{type:"right"},{type:"clearFormat"}]}const E=()=>{const e="accordion";return{name:e,create:t=>{const{createElement:o,compose:r,helpers:c}=t,i=document.createElement("div");i.classList.add("cdtr-acc-root"),function(e){if(!e||!e.head||e.getElementById(m))return;const t=e.createElement("style");t.id=m,t.textContent="\n.cdtr-acc-root { display: block; }\n.cdtr-acc-item { border-bottom: 1px solid var(--cdtr-acc-border, #e6e6e6); }\n.cdtr-acc-header {\n display: flex; align-items: center; justify-content: space-between;\n gap: 12px; cursor: pointer; padding: 14px 4px;\n}\n.cdtr-acc-title-host { flex: 1 1 auto; min-width: 0; font-weight: 600; }\n.cdtr-acc-arrow {\n flex: 0 0 auto; width: 20px; height: 20px; user-select: none;\n transition: transform .3s ease; pointer-events: none;\n}\n.cdtr-acc-item.is-open > .cdtr-acc-header .cdtr-acc-arrow { transform: rotate(180deg); }\n.cdtr-acc-panel {\n display: grid; grid-template-rows: 0fr;\n transition: grid-template-rows .3s ease;\n}\n.cdtr-acc-item.is-open > .cdtr-acc-panel { grid-template-rows: 1fr; }\n.cdtr-acc-panel-inner { overflow: hidden; min-height: 0; }\n.cdtr-acc-content-host { padding: 4px 4px 14px; }\n",e.head.appendChild(t)}(i.ownerDocument||document);let a=n.M.get("config","target");"string"==typeof a&&(a=document.querySelector(a)),a||(a=document.body);const d=n.M.get("config","editor","configure","editorProps","fonts");let f=[],D=null,E=!1,O=null;const k=()=>Array.isArray(r.props.items)?r.props.items:[],A=()=>k().map(e=>C(e)),I=()=>{const e=r.props.style||{};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i.style[t]=e[t]);r.props.borderColor&&i.style.setProperty("--cdtr-acc-border",r.props.borderColor)},N=function(e){let{structural:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};O&&(E=t,O.commands.execCommand("items",e),E=!1)},S=(e,t,o)=>{const n=k()[o],r=v(n&&n[t]).childNodes,c=p()({element:e,container:a||document.body,editable:!0,offsetTop:40,defaultDirection:w()?"rtl":"ltr",content:r,ignoresBlurByQuerySelectors:[".ignore-events"],builder:"title"===t?x(d):b(d),onFocus:()=>{if(!h||g===c||null===g){if(h=!0,g=c,D={index:o,field:t},u.length>0)for(u.forEach(e=>{e!==c&&e.hideEditor()});u.length>0;)u.pop();u.push(c),setTimeout(()=>{g===c&&h&&c.showEditor()},100)}},onBlur:()=>{g===c&&(g=null),setTimeout(()=>{g!==c&&(h=!1)},150)},onUpdate:e=>{let{editor:n,transaction:r}=e;if(0===r.steps.length)return;D={index:o,field:t};const c=A();c[o]&&(c[o][t]={childNodes:n.getJSON()},N(c))}});return c},P=e=>{const t=k()[e],o=document.createElement("div");o.className="cdtr-acc-item",t&&t.isOpen&&o.classList.add("is-open");const n=document.createElement("div");n.className="cdtr-acc-header";const c=document.createElement("div");c.className="cdtr-acc-title-host";const i=document.createElement("img");i.className="cdtr-acc-arrow",i.alt="",i.setAttribute("draggable","false"),i.src=y(r.props),n.append(c,i);const a=document.createElement("div");a.className="cdtr-acc-panel";const l=document.createElement("div");l.className="cdtr-acc-panel-inner";const s=document.createElement("div");return s.className="cdtr-acc-content-host",l.appendChild(s),a.appendChild(l),o.append(n,a),n.addEventListener("click",t=>{c.contains(t.target)||function(e){const t=!1!==r.props.allowMultiple,o=A();if(!o[e])return;const n=!o[e].isOpen;o.forEach((o,r)=>{o.isOpen=t?r===e?n:o.isOpen:r===e&&n}),f.forEach((e,t)=>{e.node&&e.node.classList.toggle("is-open",!!o[t].isOpen)}),N(o,{structural:!0})}(e)}),{itemNode:o,header:n,arrow:i,titleHost:c,panelInner:l,contentHost:s}},M=()=>{f.forEach(e=>{try{e.title&&e.title.hideEditor&&e.title.hideEditor(),e.content&&e.content.hideEditor&&e.content.hideEditor()}catch(e){}}),f=[]},T=()=>{M(),i.innerHTML="",k().forEach((e,t)=>{const{itemNode:o,header:n,arrow:r,titleHost:c,panelInner:a,contentHost:l}=P(t);i.appendChild(o);const s=S(c,"title",t);c.parentElement!==n&&n.insertBefore(c,r);const d=S(l,"content",t);l.parentElement!==a&&a.appendChild(l),f.push({title:s,content:d,node:o})})};const U={reconcile:e=>{!E&&Array.isArray(e)&&(e.length===f.length?e.forEach((e,t)=>{["title","content"].forEach(o=>{const n=f[t]&&f[t][o],r=e[o]&&e[o].childNodes;if(n&&r&&(!D||D.index!==t||D.field!==o))try{JSON.stringify(n.getJSON())!==JSON.stringify(r)&&n.chain().setContent(r).run()}catch(e){}});const o=f[t]&&f[t].node;o&&o.classList.toggle("is-open",!!e.isOpen)}):T())},applyStyle:I,refreshArrows:()=>{const e=y(r.props);f.forEach(t=>{const o=t.node&&t.node.querySelector(".cdtr-acc-arrow");o&&(o.src=e)})}};return T(),I(),O=o({name:e,id:r.id,template:i,defaultProps:{style:{},items:[],allowMultiple:!0,iconCategory:"Arrows",iconName:"arrow-down-s-line",iconColor:"000000"},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>i,handleBar:!0,validator:s({helpers:c,controller:U}),schema:r.schema,onSelect:e=>i.classList.add(e),onDeselect:e=>i.classList.remove(e),elementProps:r,remove:()=>{M(),i.remove()},createEditor:l}),O.addProp("accordion",{addItem:()=>{const e=A(),t=e.length+1,o=w();e.push(C({title:o?`כותרת ${t}`:`Accordion title ${t}`,content:o?`תוכן הסעיף ${t}`:`Accordion content ${t}`})),N(e,{structural:!0}),T()},removeItem:e=>{const t=A();e<0||e>=t.length||(t.splice(e,1),N(t,{structural:!0}),T())},moveItem:(e,t)=>{const o=A();if(t<0||t>=o.length||e<0||e>=o.length)return;const[n]=o.splice(e,1);o.splice(t,0,n),N(o,{structural:!0}),T()},setDefaultOpen:(e,t)=>{const o=A();o[e]&&(o[e].isOpen=!!t,t&&!1===r.props.allowMultiple&&o.forEach((t,o)=>{o!==e&&(t.isOpen=!1)}),f.forEach((e,t)=>{e.node&&e.node.classList.toggle("is-open",!!o[t].isOpen)}),N(o,{structural:!0}))}}),O}}}}}]);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3792],{23792(e,t,n){n.d(t,{default:()=>E});let s=!1;const o=e=>{{const{component:t,commands:n,helpers:o}=e;return{select:e=>{let{changeTab:t,tab:n}=e;"design"!==n.text&&t("design")},tabs:e=>{const t=[{text:"design"},{text:"list-settings"},{text:"settings"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:a,changeTab:i,tabs:r}=e;s=!1;return[{type:"heading",active:()=>"list-settings"===a.text,level:5,text:"autotype_info"},{type:"heading",level:3,text:"design",active:()=>"design"===a.text},{type:"typography",active:()=>"design"===a.text,bold:700===t.props.style.fontWeight,italic:"italic"===t.props.style.fontStyle,underline:"underline"===t.props.style.textDecoration,onChange:e=>{switch(e){case"bold":const e=700===t.props.style.fontWeight?400:700;n.execCommand("style",{fontWeight:e});break;case"italic":const s="italic"===t.props.style.fontStyle?"normal":"italic";n.execCommand("style",{fontStyle:s});break;case"underline":const o="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:o})}}},{type:"fontFamily",active:()=>"design"===a.text,value:t.props.style.fontFamily,weight:!0,weightValue:t.props.style.fontWeight,onChange:e=>{const t=e.target.value;n.execCommand("style",{fontFamily:t})},onWeightChange:e=>{n.execCommand("style",{fontWeight:e.detail.value})}},{type:"divider",active:()=>"design"===a.text},{type:"colorpicker",active:()=>"design"===a.text,title:"color",value:t.props.style.color,onChange:e=>{const t=e.target.value;n.execCommand("style",{color:t})}},{type:"fontSize",active:()=>"design"===a.text,title:"size",max:150,min:8,device:e=>{const n=e.target.device;e.target.value="phone"===n?parseInt(t.props?.breakpoints?.sm?.style?.fontSize)||14:parseInt(t.props.style.fontSize)||14},value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;"phone"===e.target.device?n.execCommand("breakpoints",e=>{const n=e.props.breakpoints?.sm||{};return{sm:o.deepMerge(n,{style:{fontSize:t+"px"}})}}):n.execCommand("style",{fontSize:t+"px"})}},{type:"slider",max:5e3,min:0,title:"sleepBetween",value:parseInt(t.props.sleepBetween)||1e3,active:()=>"list-settings"===a.text,onInput:e=>{const t=e.target.value;n.execCommand("sleepBetween",parseInt(t))}},{type:"heading",active:()=>"list-settings"===a.text,level:6,text:"how_much_should_wait_between_each_item"},{type:"slider",active:()=>"list-settings"===a.text,max:5e3,min:0,title:"speed",value:parseInt(t.props.speed)||50,active:()=>"list-settings"===a.text,onInput:e=>{const t=e.target.value;n.execCommand("speed",parseInt(t))}}]}}}},a=e=>{let{helpers:t,template:n,reRender:s}=e;return{set:(e,n,o)=>{switch(n){case"style":const a={...e[n]};return e[n]=t.deepMerge(a,o),s(),!0;case"size":case"text":return e[n]=o,s(),!0;case"data":Array.isArray(o)&&(e[n]=o,s())}return!0}}};var i=n(25873),r=n(81318),l=n(1366),c=n(67291),p=n(28396);let d;var m=n(72591),u=n.n(m),y=n(88639),g=n.n(y),h=n(88128),A=n.n(h),C=n(30855),x=n.n(C),v=n(93051),f=n.n(v),b=n(48135),k={};k.setAttributes=x(),k.insert=A().bind(null,"head"),k.domAPI=g(),k.insertStyleElement=f();u()(b.A,k);const w=b.A&&b.A.locals?b.A.locals:void 0,E=()=>{const e="autotype";return{name:e,menu:t=>{let{Compose:n}=t;return new n(()=>({type:e,props:{style:{},speed:50,sleepBetween:1e3,text:{type:"doc",content:[{type:"paragraph",content:[{type:"text",text:"Hello World"}]}]}}}),{group:"elements",name:e,puzzle:['<svg width="46" height="32" viewBox="0 0 46 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M17.44 31L14.688 23.928H5.632L2.912 31H0L8.928 8.056H11.52L20.416 31H17.44ZM11.264 14.456C11.2 14.2853 11.0933 13.976 10.944 13.528C10.7947 13.08 10.6453 12.6213 10.496 12.152C10.368 11.6613 10.2613 11.288 10.176 11.032C10.0693 11.4587 9.952 11.896 9.824 12.344C9.71733 12.7707 9.6 13.1653 9.472 13.528C9.36533 13.8907 9.26933 14.2 9.184 14.456L6.592 21.368H13.824L11.264 14.456ZM30.0695 8.152C31.9682 8.152 33.5575 8.33333 34.8375 8.696C36.1388 9.05867 37.1095 9.656 37.7495 10.488C38.4108 11.32 38.7415 12.4293 38.7415 13.816C38.7415 14.712 38.5708 15.512 38.2295 16.216C37.9095 16.8987 37.4188 17.4747 36.7575 17.944C36.1175 18.392 35.3282 18.7013 34.3895 18.872V19.032C35.3495 19.1813 36.2135 19.4587 36.9815 19.864C37.7708 20.2693 38.3895 20.8453 38.8375 21.592C39.2855 22.3387 39.5095 23.3093 39.5095 24.504C39.5095 25.8907 39.1895 27.0747 38.5495 28.056C37.9095 29.016 36.9922 29.752 35.7975 30.264C34.6242 30.7547 33.2162 31 31.5735 31H23.5415V8.152H30.0695ZM30.6455 17.88C32.6082 17.88 33.9522 17.5707 34.6775 16.952C35.4028 16.312 35.7655 15.3733 35.7655 14.136C35.7655 12.8773 35.3175 11.9813 34.4215 11.448C33.5468 10.8933 32.1388 10.616 30.1975 10.616H26.4215V17.88H30.6455ZM26.4215 20.28V28.568H31.0295C33.0562 28.568 34.4642 28.1733 35.2535 27.384C36.0428 26.5947 36.4375 25.56 36.4375 24.28C36.4375 23.4693 36.2562 22.7653 35.8935 22.168C35.5522 21.5707 34.9655 21.112 34.1335 20.792C33.3228 20.4507 32.2135 20.28 30.8055 20.28H26.4215Z" fill="black"/>\n<rect x="42" y="1" width="1" height="30" fill="black"/>\n<rect x="39" width="7" height="1" fill="black"/>\n<rect x="39" y="31" width="7" height="1" fill="black"/>\n</svg>\n'],tags:[e,"text"],index:null})},create:t=>{const{createElement:n,compose:s,helpers:m}=t,u=(s.editor,e=>{for(const t in e.style)if(Object.hasOwnProperty.call(e.style,t)){const n=e.style[t];y.style[t]=n}y.classList.contains("autotype-selected")||A.chain().focus().setContent(e.text).run()}),y=document.createElement("div");y.classList.add(w.autoTypeEditing);const g=document.createElement("div"),h=document.createElement("div");h.classList.add(w.caret);const A=(e=>{let{content:t,element:n}=e;return d=new r.KE({element:n,extensions:[l.A,c.A,p.A],editorProps:{},injectCSS:!1,content:t}),d})({element:h,content:s.props.text});A.on("focus",()=>{y.classList.add("autotype-selected")}),A.on("blur",()=>{y.classList.remove("autotype-selected")}),A.on("update",e=>{let{editor:t,transaction:n}=e;if(0===n.steps.length)return;(e=>{s.editor.store().execCommands([{key:"text",value:JSON.parse(JSON.stringify(e))}])})(A.getJSON())}),y.append(g,h);i.H(g);return u(s.props),n({name:e,id:s.id,template:y,resizeable:!0,handleBar:!0,draggable:{group:"element"},defaultProps:{},validator:a({template:y,helpers:m,reRender:()=>{u(s.props)}}),schema:s.schema,onSelect:e=>{y.classList.add(e)},onDeselect:e=>{y.classList.remove(e)},elementProps:s,remove:()=>{y.remove()},createEditor:o})}}}},48135(e,t,n){n.d(t,{A:()=>r});var s=n(82001),o=n.n(s),a=n(40935),i=n.n(a)()(o());i.push([e.id,'\n.ZBsBZOYVC6wCOkoT7OFk {\n background-color: transparent;\n min-width: 1rem;\n min-height: 1em;\n}\n\n.yOO_P1NnvBQ705I1zyUA {\n display: inline-block;\n}\n\n.yOO_P1NnvBQ705I1zyUA::after {\n content: "";\n width: 2px;\n height: 1em;\n background: #ec7fff;\n display: inline-block;\n vertical-align: text-bottom;\n animation: p0oX1Sqo4sKJHs_I1qOK 1.5s steps(2) infinite;\n}\n\n@keyframes p0oX1Sqo4sKJHs_I1qOK {\n 0% {\n opacity: 0;\n }\n}\n',"",{version:3,sources:["webpack://./../web-editors/autotype-editor-component/src/styles.module.css"],names:[],mappings:";AACA;EACE,6BAA6B;EAC7B,eAAe;EACf,eAAe;AACjB;;AAEA;EACE,qBAAqB;AACvB;;AAEA;EACE,WAAW;EACX,UAAU;EACV,WAAW;EACX,mBAAmB;EACnB,qBAAqB;EACrB,2BAA2B;EAC3B,sDAA8C;AAChD;;AAEA;EACE;IACE,UAAU;EACZ;AACF",sourcesContent:['\n.autoTypeEditing {\n background-color: transparent;\n min-width: 1rem;\n min-height: 1em;\n}\n\n.caret {\n display: inline-block;\n}\n\n.caret::after {\n content: "";\n width: 2px;\n height: 1em;\n background: #ec7fff;\n display: inline-block;\n vertical-align: text-bottom;\n animation: cursor-blink 1.5s steps(2) infinite;\n}\n\n@keyframes cursor-blink {\n 0% {\n opacity: 0;\n }\n}\n'],sourceRoot:""}]),i.locals={autoTypeEditing:"ZBsBZOYVC6wCOkoT7OFk",caret:"yOO_P1NnvBQ705I1zyUA","cursor-blink":"p0oX1Sqo4sKJHs_I1qOK"};const r=i},67291(e,t,n){n.d(t,{A:()=>o});var s=n(81318);const o=s.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,s.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})}}]);
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4061],{84061(e,t,n){n.d(t,{default:()=>f});const r=e=>{const{component:t,commands:n}=e;return{select:e=>{let{changeTab:t,tab:n}=e;n.text||t("
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4061],{84061(e,t,n){n.d(t,{default:()=>f});const r=e=>{const{component:t,commands:n}=e;return{select:e=>{let{changeTab:t,tab:n}=e;n.text||t("style")},tabs:e=>{const t=[{text:"style",selected:!0},{text:"settings"}];return e?(t.forEach(t=>t.selected=t.text===e),t):t},layout:e=>{let{tab:r}=e;return[{type:"info",text:"this_is_empty_iframe_start_add_url_link",active:()=>"style"===r.text},{type:"input",title:"urlAddress",active:()=>"style"===r.text,value:t.props.src||"",onChange:e=>{const t=e.target.value;n.execCommand("src",t)}},{type:"slider",title:"width",min:100,max:1200,active:()=>"style"===r.text,value:parseInt(t.props.style?.width,10)||400,onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px"})}},{type:"slider",title:"height",min:100,max:800,active:()=>"style"===r.text,value:parseInt(t.props.style?.height,10)||300,onInput:e=>{const t=e.target.value;n.execCommand("style",{height:t+"px"})}}]}}},s=e=>{let{helpers:t}=e;return{set:(e,n,r)=>{switch(n){case"style":return e[n]=t.deepMerge(e[n],r),!0;case"src":return e[n]=r,!0;default:return!1}}}};var a=n(72591),i=n.n(a),l=n(88639),o=n.n(l),A=n(88128),d=n.n(A),c=n(30855),m=n.n(c),p=n(93051),h=n.n(p),u=n(22800),C={};C.setAttributes=m(),C.insert=d().bind(null,"head"),C.domAPI=o(),C.insertStyleElement=h();i()(u.A,C);const g=u.A&&u.A.locals?u.A.locals:void 0,f=()=>{const e="iframe";return{name:e,create:t=>{const{createElement:n,compose:a,helpers:i}=t,{arrayToString:l,mergeDiff:o}=i,A=document.createElement("div");A.setAttribute("data-id",a.id),A.setAttribute("draggable-element","element"),A.setAttribute("droppable-element","element"),A.className=l("iframe-component",g.main);const d=document.createElement("div");d.style.cssText="position:relative;max-width:100%;height:100%;width:100%;",A.appendChild(d);const c=document.createElement("iframe");c.style.cssText="width:100%;height:100%;border:none;",d.appendChild(c);const m=document.createElement("div");m.className=g.emptyIframeHolder;const p=document.createElement("h1");p.setAttribute("align","center");const h=document.createElement("lang-text");h.setAttribute("text","this_is_empty_iframe_start_add_url_link"),p.appendChild(h),m.appendChild(p),d.appendChild(m);return n({name:e,id:a.id,template:A,defaultProps:{style:{display:"block",margin:"auto",width:"400px",height:"300px"},src:""},draggable:{group:"element"},droppable:{group:"element"},render:()=>{o(c,{style:a.props.style,src:a.props.src||""}),a.props.src?m.style.display="none":m.style.display="flex"},resizeable:()=>d,handleBar:!0,validator:s({helpers:i}),schema:a.schema,onSelect:e=>{A.classList.add(e)},onDeselect:e=>{A.classList.remove(e)},elementProps:a,remove:()=>{A.remove()},createEditor:r})}}}},22800(e,t,n){n.d(t,{A:()=>l});var r=n(82001),s=n.n(r),a=n(40935),i=n.n(a)()(s());i.push([e.id,'.dwbwX3rm1rCfFBXzg4l5 {\n position: relative;\n width: 100%;\n}\n\n.dwbwX3rm1rCfFBXzg4l5:hover::after {\n content: "";\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: #000;\n background: var(--primary, #000);\n opacity: 0.1;\n z-index: 9;\n}\n\n.dwbwX3rm1rCfFBXzg4l5 iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n.TNFcnLszwFUVJerzzPS8 {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n z-index: 15;\n gap: 15px;\n}\n\n.TNFcnLszwFUVJerzzPS8 h1 {\n font-size: 1.2rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.72);\n}\n',"",{version:3,sources:["webpack://./../web-editors/iframe-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,WAAW;EACX,kBAAkB;EAClB,OAAO;EACP,MAAM;EACN,WAAW;EACX,YAAY;EACZ,gBAAgC;EAAhC,gCAAgC;EAChC,YAAY;EACZ,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,SAAS;EACT,QAAQ;EACR,gCAAgC;EAChC,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,sBAAsB;EACtB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,iBAAiB;EACjB,gBAAgB;EAChB,0BAA0B;AAC5B",sourcesContent:['.main {\n position: relative;\n width: 100%;\n}\n\n.main:hover::after {\n content: "";\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: var(--primary, #000);\n opacity: 0.1;\n z-index: 9;\n}\n\n.main iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n.emptyIframeHolder {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n z-index: 15;\n gap: 15px;\n}\n\n.emptyIframeHolder h1 {\n font-size: 1.2rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.72);\n}\n'],sourceRoot:""}]),i.locals={main:"dwbwX3rm1rCfFBXzg4l5",emptyIframeHolder:"TNFcnLszwFUVJerzzPS8"};const l=i}}]);
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4288],{64288(t,e,o){o.r(e),o.d(e,{ElementHandleBar:()=>
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4288],{64288(t,e,o){o.r(e),o.d(e,{ElementHandleBar:()=>n});var s=o(59929),i=o(86319),r=o(90142);class n extends s.WF{constructor(){super(),this.show_click_message=!0,this.onRemove=this.onRemove.bind(this)}onRemove(){const t={detail:this.closest(this.target),bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("remove",t))}onClone(){const t={detail:this.closest(this.target),bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("clone",t))}render(){const t="20",e="20",o=i.M.get("config","editor","configure","onSaveBlock");return s.qy`<cdtr-row
|
|
2
2
|
alignItems="center"
|
|
3
3
|
justify="space-evenly"
|
|
4
4
|
class="wrapper"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
></cdtr-dupicate-icon>
|
|
38
38
|
</cdtr-tooltip>
|
|
39
39
|
</div>
|
|
40
|
-
${o&&
|
|
40
|
+
${o&&s.qy` <div class="button" @mouseup=${r.A}>
|
|
41
41
|
<cdtr-tooltip content="save_block">
|
|
42
42
|
<svg
|
|
43
43
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
<cdtr-remove-icon width=${t} height=${e}></cdtr-remove-icon>
|
|
58
58
|
</cdtr-tooltip>
|
|
59
59
|
</div>
|
|
60
|
-
</cdtr-row>`}}
|
|
60
|
+
</cdtr-row>`}}n.properties={target:{type:String},show_click_message:{type:Boolean}},n.styles=s.AH`
|
|
61
61
|
:host {
|
|
62
62
|
position: absolute;
|
|
63
63
|
top: 0;
|
|
64
64
|
right: 0;
|
|
65
65
|
height: 25px;
|
|
66
66
|
background: transparent;
|
|
67
|
-
z-index:
|
|
67
|
+
z-index: var(--z-dropdown, 100);
|
|
68
68
|
display: flex;
|
|
69
69
|
align-items: center;
|
|
70
70
|
width: 40%;
|
|
@@ -73,16 +73,16 @@
|
|
|
73
73
|
.wrapper {
|
|
74
74
|
position: absolute;
|
|
75
75
|
right: 0;
|
|
76
|
-
padding:
|
|
76
|
+
padding: var(--space-1, 4px);
|
|
77
77
|
height: 100%;
|
|
78
78
|
width: auto;
|
|
79
|
-
box-shadow:
|
|
79
|
+
box-shadow: var(--shadow-sm);
|
|
80
80
|
transform: translateY(-30%);
|
|
81
|
-
background: #fff;
|
|
82
|
-
border-radius:
|
|
81
|
+
background: var(--color-bg, #fff);
|
|
82
|
+
border-radius: var(--radius-sm, 6px);
|
|
83
83
|
}
|
|
84
84
|
.button {
|
|
85
|
-
padding:
|
|
85
|
+
padding: var(--space-1, 4px) var(--space-2, 8px);
|
|
86
86
|
min-width: auto;
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -95,4 +95,4 @@
|
|
|
95
95
|
.drag_block:active {
|
|
96
96
|
cursor: grabbing !important;
|
|
97
97
|
}
|
|
98
|
-
`,customElements.define("cdtr-element-handle-bar",
|
|
98
|
+
`,customElements.define("cdtr-element-handle-bar",n)}}]);
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4475],{44475(e,t,i){var r=i(59929);i(15284);class d extends r.WF{constructor(){super()}render(){const e=this.url||this.videoPath,t=this.width||window.innerWidth,i=this.height||window.innerWidth;return r.qy`<cdtr-media-player
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4475],{44475(e,t,i){i.r(t),i.d(t,{VideoPreset:()=>d});var r=i(59929);i(15284);class d extends r.WF{constructor(){super()}render(){const e=this.url||this.videoPath,t=this.width||window.innerWidth,i=this.height||window.innerWidth;return r.qy`<cdtr-media-player
|
|
2
2
|
.loop=${!0}
|
|
3
3
|
.playing=${!0}
|
|
4
4
|
.controls=${!1}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4639],{84639(e,t,r){r.d(t,{default:()=>
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4639],{84639(e,t,r){r.d(t,{default:()=>l});const s=e=>{const{component:t,commands:r}=e;return{select:e=>{let{changeTab:t,tab:r}=e;r.text||t("style")},tabs:e=>{const t=[{text:"style",selected:!0},{text:"settings"}];return e?(t.forEach(t=>t.selected=t.text===e),t):t},layout:e=>{let{tab:s}=e;return[{type:"linkpicker",href:t.props.link,protocol:t.props.link?.protocol,target:t.props.link?.target,autofocus:!0,active:()=>"style"===s.text,title:"QR link",onChange:e=>{const t=e.target.value;r.execCommand("link",t)}},{type:"slider",title:"size",min:100,max:600,active:()=>"style"===s.text,value:parseInt(t.props.size,10)||200,onInput:e=>{const t=parseInt(e.target.value,10);r.execCommand("size",t),r.execCommand("style",{width:t+"px",height:t+"px"})}}]}}},n=e=>{let{helpers:t}=e;return{set:(e,r,s)=>{switch(r){case"style":return e[r]=t.deepMerge(e[r],s),!0;case"link":case"size":return e[r]=s,!0;default:return!1}}}},a=200;const l=()=>({name:"qr",create:e=>{const{createElement:t,compose:r,helpers:l}=e,{mergeDiff:o}=l,i=document.createElement("div"),c=document.createElement("img");c.alt="QR code",i.appendChild(c);return t({name:"qr",id:r.id,template:i,defaultProps:{style:{width:a+"px",height:a+"px",display:"block"},link:"",size:a},draggable:{group:"element"},droppable:{group:"element"},render:()=>{o(c,{style:r.props.style});const e=function(e,t){if("object"==typeof e&&(e=e.fullHref||e.href),!e||"string"!=typeof e||!e.trim())return"";const r=Math.min(600,Math.max(100,parseInt(t,10)||a));return`https://img.creaditor.ai/images/qr?${new URLSearchParams({link:e.trim(),size:String(r)}).toString()}`}(r.props.link,r.props.size);o(c,{src:e})},resizeable:()=>i,handleBar:!0,validator:n({helpers:l}),schema:r.schema,onSelect:e=>{i.classList.add(e)},onDeselect:e=>{i.classList.remove(e)},elementProps:r,remove:()=>i.remove(),createEditor:s})}})}}]);
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4739],{54739(e,t,n){n.d(t,{default:()=>k});var o=n(86319);function i(){const e="undefined"!=typeof window&&window.location.hostname||"";return/^(localhost|127\.0\.0\.1|0\.0\.0\.0|\[::1\])$/.test(e)}function a(){const e=o.M.get("config","mcpUrl");if("string"==typeof e&&e)return e;return`${i()?"http://localhost:3000":"https://api.creaditor.ai"}/v1/mcp`}const r="https://claude.ai/settings/connectors";function c(){const e="undefined"!=typeof window?window.open("about:blank","_blank"):null,t=t=>{e?e.location=t:"undefined"!=typeof window&&window.open(t,"_blank","noopener,noreferrer")};(async function(){const e=o.M.get("editor");if(!e)return null;if("function"==typeof e.studioTokenProvider)try{const t=await e.studioTokenProvider({});if("string"==typeof t&&t)return t}catch(e){}return"string"==typeof e.studioToken&&e.studioToken?e.studioToken:null})().then(async e=>{if(!e)return t(r);const n=await fetch(`${a().replace(/\/v1\/mcp\/?$/,"")}/oauth/connect/ticket`,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!n.ok)return t(r);const{sessionUrl:o}=await n.json();t(o||r)}).catch(()=>t(r))}function s(e,t){return o.M.get("lang",e)||t}function l(e,t,n){const o=()=>{return e=t,o=n,void("undefined"!=typeof window&&"function"==typeof window.snackbar&&window.snackbar({text:s(e,o)}));var e,o};"undefined"!=typeof navigator&&navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(e).then(o).catch(()=>d(e,o)):d(e,o)}function d(e,t){try{const n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.focus(),n.select(),document.execCommand("copy"),document.body.removeChild(n),t()}catch{}}const A=e=>{const{component:t,commands:n}=e,r=t.id;return{select:e=>{let{changeTab:t,tab:n}=e;n.text||t("
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4739],{54739(e,t,n){n.d(t,{default:()=>k});var o=n(86319);function i(){const e="undefined"!=typeof window&&window.location.hostname||"";return/^(localhost|127\.0\.0\.1|0\.0\.0\.0|\[::1\])$/.test(e)}function a(){const e=o.M.get("config","mcpUrl");if("string"==typeof e&&e)return e;return`${i()?"http://localhost:3000":"https://api.creaditor.ai"}/v1/mcp`}const r="https://claude.ai/settings/connectors";function c(){const e="undefined"!=typeof window?window.open("about:blank","_blank"):null,t=t=>{e?e.location=t:"undefined"!=typeof window&&window.open(t,"_blank","noopener,noreferrer")};(async function(){const e=o.M.get("editor");if(!e)return null;if("function"==typeof e.studioTokenProvider)try{const t=await e.studioTokenProvider({});if("string"==typeof t&&t)return t}catch(e){}return"string"==typeof e.studioToken&&e.studioToken?e.studioToken:null})().then(async e=>{if(!e)return t(r);const n=await fetch(`${a().replace(/\/v1\/mcp\/?$/,"")}/oauth/connect/ticket`,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!n.ok)return t(r);const{sessionUrl:o}=await n.json();t(o||r)}).catch(()=>t(r))}function s(e,t){return o.M.get("lang",e)||t}function l(e,t,n){const o=()=>{return e=t,o=n,void("undefined"!=typeof window&&"function"==typeof window.snackbar&&window.snackbar({text:s(e,o)}));var e,o};"undefined"!=typeof navigator&&navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(e).then(o).catch(()=>d(e,o)):d(e,o)}function d(e,t){try{const n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.focus(),n.select(),document.execCommand("copy"),document.body.removeChild(n),t()}catch{}}const A=e=>{const{component:t,commands:n}=e,r=t.id;return{select:e=>{let{changeTab:t,tab:n}=e;n.text||t("style")},tabs:e=>{const t=[{text:"style",selected:!0},{text:"settings"}];return e?(t.forEach(t=>t.selected=t.text===e),t):t},layout:e=>{let{tab:s}=e;const d=()=>"style"===s.text;return[{type:"info",text:"ai_connect_intro",active:d},{type:"button",text:"ai_connect_btn",bgColor:"#6c47ff",color:"#ffffff",active:d,onClick:()=>{l(a(),"ai_connect_link_copied","Connection link copied — paste it in Claude's connector settings."),c()}},{type:"info",text:"ai_connect_localhost_note",active:()=>d()&&i()},{type:"input",title:"ai_connect_url_label",active:d,value:a(),onChange:e=>{e&&e.target&&(e.target.value=a())}},{type:"button",text:"ai_connect_prompt_btn",active:d,onClick:()=>{l(function(e){const t=o.M.get("app"),n=t&&t._id,i=n?`the AI element with id \`${e}\` on site \`${n}\``:`the AI element with id \`${e}\``;return[`Connect to my Creaditor site builder via its MCP connector at ${a()}.`,"",`Then use the write_element_html tool to build a complete, modern, responsive landing page into ${i}.`,"","If you're not sure what the page should be about, ask me first."].join("\n")}(r),"ai_connect_prompt_copied","Prompt copied — paste it into a Claude chat.")}},{type:"input",title:"elementId",active:d,value:r,onChange:()=>{}},{type:"slider",title:"height",min:200,max:2400,active:()=>"style"===s.text,value:parseInt(t.props.style?.height,10)||900,onInput:e=>{const t=e.target.value;n.execCommand("style",{height:t+"px"})}}]}}},p=e=>{let{helpers:t}=e;return{set:(e,n,o)=>{switch(n){case"style":return e[n]=t.deepMerge(e[n],o),!0;case"html":return e[n]=o,!0;default:return!1}}}};var u=n(72591),h=n.n(u),m=n(88639),f=n.n(m),g=n(88128),y=n.n(g),C=n(30855),b=n.n(C),E=n(93051),v=n.n(E),w=n(79646),B={};B.setAttributes=b(),B.insert=y().bind(null,"head"),B.domAPI=f(),B.insertStyleElement=v();h()(w.A,B);const x=w.A&&w.A.locals?w.A.locals:void 0,k=()=>({name:"ai",create:e=>{const{createElement:t,compose:n,helpers:o}=e,{arrayToString:i,mergeDiff:a}=o,r=document.createElement("div");r.setAttribute("data-id",n.id),r.setAttribute("draggable-element","element"),r.setAttribute("droppable-element","element"),r.className=i("ai-component",x.main);const c=document.createElement("div");c.style.cssText="position:relative;max-width:100%;height:100%;width:100%;",r.appendChild(c);const s=document.createElement("iframe");s.style.cssText="width:100%;height:100%;border:none;display:block;",c.appendChild(s);const l=document.createElement("div");l.className=x.emptyAiHolder;const d=document.createElement("h1");d.setAttribute("align","center");const u=document.createElement("lang-text");u.setAttribute("text","ai_element_empty_connect_claude"),d.appendChild(u),l.appendChild(d),c.appendChild(l);return t({name:"ai",id:n.id,template:r,defaultProps:{style:{display:"block",width:"100%",height:"100vh"},html:""},draggable:{group:"element"},droppable:{group:"element"},render:()=>{a(s,{style:n.props.style});const e=n.props.html||"";e?(s.srcdoc!==e&&(s.srcdoc=e),s.style.display="block",l.style.display="none"):(s.removeAttribute("srcdoc"),s.style.display="none",l.style.display="flex")},resizeable:()=>c,handleBar:!0,validator:p({helpers:o}),schema:n.schema,onSelect:e=>{r.classList.add(e)},onDeselect:e=>{r.classList.remove(e)},elementProps:n,remove:()=>{r.remove()},createEditor:A})}})},79646(e,t,n){n.d(t,{A:()=>c});var o=n(82001),i=n.n(o),a=n(40935),r=n.n(a)()(i());r.push([e.id,'.NBtRDhA9L9rE8tvMRYXh {\n position: relative;\n width: 100%;\n}\n\n.NBtRDhA9L9rE8tvMRYXh:hover::after {\n content: "";\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: #000;\n background: var(--primary, #000);\n opacity: 0.1;\n z-index: 9;\n}\n\n.NBtRDhA9L9rE8tvMRYXh iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n.BwJnFUnLniO8YoMqBrOB {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n gap: 15px;\n z-index: 15;\n width: 100%;\n padding: 24px;\n text-align: center;\n}\n\n.BwJnFUnLniO8YoMqBrOB h1 {\n font-size: 1.2rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.72);\n}\n',"",{version:3,sources:["webpack://./../web-editors/ai-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,WAAW;EACX,kBAAkB;EAClB,OAAO;EACP,MAAM;EACN,WAAW;EACX,YAAY;EACZ,gBAAgC;EAAhC,gCAAgC;EAChC,YAAY;EACZ,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,SAAS;EACT,QAAQ;EACR,gCAAgC;EAChC,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,sBAAsB;EACtB,SAAS;EACT,WAAW;EACX,WAAW;EACX,aAAa;EACb,kBAAkB;AACpB;;AAEA;EACE,iBAAiB;EACjB,gBAAgB;EAChB,0BAA0B;AAC5B",sourcesContent:['.main {\n position: relative;\n width: 100%;\n}\n\n.main:hover::after {\n content: "";\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: var(--primary, #000);\n opacity: 0.1;\n z-index: 9;\n}\n\n.main iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n.emptyAiHolder {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n gap: 15px;\n z-index: 15;\n width: 100%;\n padding: 24px;\n text-align: center;\n}\n\n.emptyAiHolder h1 {\n font-size: 1.2rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.72);\n}\n'],sourceRoot:""}]),r.locals={main:"NBtRDhA9L9rE8tvMRYXh",emptyAiHolder:"BwJnFUnLniO8YoMqBrOB"};const c=r}}]);
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4762],{64762(e,
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4762],{64762(t,e,r){r.r(e),r.d(e,{Page500:()=>o});var a=r(59929);class o extends a.WF{constructor(){super()}render(){return a.qy`<div class="root">
|
|
2
2
|
<div class="container">
|
|
3
3
|
<cdtr-row spacing="1rem">
|
|
4
4
|
<h1><lang-text text="connection_error"></lang-text></h1>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
height: 100vh;
|
|
26
26
|
left: 0;
|
|
27
27
|
top: 0;
|
|
28
|
-
z-index:
|
|
28
|
+
z-index: var(--z-blocking, 2147483646);
|
|
29
29
|
background-color: #0000001f;
|
|
30
30
|
}
|
|
31
31
|
.container {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
transform: translate(-50%, -50%);
|
|
36
36
|
background: #fff;
|
|
37
37
|
width: 700px;
|
|
38
|
-
z-index:
|
|
38
|
+
z-index: var(--z-toast, 1100);
|
|
39
39
|
max-width: 100%;
|
|
40
40
|
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
|
|
41
41
|
padding: 3rem;
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4770],{94770(e,t,
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4770],{94770(e,t,i){i.r(t),i.d(t,{RangeByDeviceEditor:()=>n});var c=i(59929);class n extends c.WF{constructor(e){super(),this.device="desktop",this.deviceEvent=new UIEvent("device",{view:window,bubbles:!0,cancelable:!0}),this.inputEvent=new UIEvent("input",{view:window,bubbles:!0,cancelable:!0}),this.changeEvent=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0})}connectedCallback(){super.connectedCallback(),this.device="desktop"}disconnectedCallback(){super.disconnectedCallback()}onChange(e){const t=e.target.value;this.value=t,this.dispatchEvent(this.changeEvent)}onInput(e){const t=e.target.value;this.value=t,this.dispatchEvent(this.inputEvent)}pickerDevice(e){this.device=e.detail?.device??e.target.device,this.dispatchEvent(this.deviceEvent)}render(){return c.qy` <cdtr-row class="container">
|
|
2
2
|
<cdtr-col sm="12">
|
|
3
3
|
<cdtr-row alignItems="center">
|
|
4
4
|
<cdtr-title pb="0"
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<cdtr-col class="device-picker" sm="4">
|
|
8
8
|
<cdtr-device-picker
|
|
9
9
|
device=${this.device}
|
|
10
|
-
@
|
|
10
|
+
@device-change=${this.pickerDevice}
|
|
11
11
|
></cdtr-device-picker>
|
|
12
12
|
</cdtr-col>
|
|
13
13
|
</cdtr-row>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
min="${this.min}"
|
|
23
23
|
></cdtr-range-input
|
|
24
24
|
></cdtr-col>
|
|
25
|
-
</cdtr-row>`}}n.styles=
|
|
25
|
+
</cdtr-row>`}}n.styles=c.AH`
|
|
26
26
|
.device-picker {
|
|
27
27
|
opacity: 0;
|
|
28
28
|
}
|
|
Binary file
|