@creaditor/web-starterkit 1.0.6 → 1.0.7

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.
Files changed (69) hide show
  1. package/dist/1260.creaditor.bundle.js +260 -128
  2. package/dist/1260.creaditor.bundle.js.gz +0 -0
  3. package/dist/1271.creaditor.bundle.js +1 -1
  4. package/dist/1271.creaditor.bundle.js.gz +0 -0
  5. package/dist/1529.creaditor.bundle.js +1 -1
  6. package/dist/1529.creaditor.bundle.js.gz +0 -0
  7. package/dist/1565.creaditor.bundle.js +237 -73
  8. package/dist/1565.creaditor.bundle.js.gz +0 -0
  9. package/dist/170.creaditor.bundle.js +11 -5
  10. package/dist/170.creaditor.bundle.js.gz +0 -0
  11. package/dist/2384.creaditor.bundle.js +33 -17
  12. package/dist/2384.creaditor.bundle.js.gz +0 -0
  13. package/dist/2590.creaditor.bundle.js +1 -2
  14. package/dist/2590.creaditor.bundle.js.gz +0 -0
  15. package/dist/3095.creaditor.bundle.js +91 -58
  16. package/dist/3095.creaditor.bundle.js.gz +0 -0
  17. package/dist/3521.creaditor.bundle.js +11 -9
  18. package/dist/3521.creaditor.bundle.js.gz +0 -0
  19. package/dist/3553.creaditor.bundle.js +1 -1
  20. package/dist/3553.creaditor.bundle.js.gz +0 -0
  21. package/dist/3932.creaditor.bundle.js +3 -3
  22. package/dist/3932.creaditor.bundle.js.gz +0 -0
  23. package/dist/4114.creaditor.bundle.js +1 -0
  24. package/dist/4114.creaditor.bundle.js.gz +0 -0
  25. package/dist/453.creaditor.bundle.js +1 -1
  26. package/dist/453.creaditor.bundle.js.gz +0 -0
  27. package/dist/4569.creaditor.bundle.js +141 -108
  28. package/dist/4569.creaditor.bundle.js.gz +0 -0
  29. package/dist/4819.creaditor.bundle.js +198 -235
  30. package/dist/4819.creaditor.bundle.js.gz +0 -0
  31. package/dist/5119.creaditor.bundle.js +1 -1
  32. package/dist/5119.creaditor.bundle.js.gz +0 -0
  33. package/dist/5340.creaditor.bundle.js +125 -36
  34. package/dist/5340.creaditor.bundle.js.gz +0 -0
  35. package/dist/5926.creaditor.bundle.js +24 -31
  36. package/dist/5926.creaditor.bundle.js.gz +0 -0
  37. package/dist/6937.creaditor.bundle.js +1 -0
  38. package/dist/6937.creaditor.bundle.js.gz +0 -0
  39. package/dist/7209.creaditor.bundle.js +2 -3
  40. package/dist/7209.creaditor.bundle.js.gz +0 -0
  41. package/dist/7238.creaditor.bundle.js +3 -3
  42. package/dist/7238.creaditor.bundle.js.gz +0 -0
  43. package/dist/752.creaditor.bundle.js +3 -7
  44. package/dist/752.creaditor.bundle.js.gz +0 -0
  45. package/dist/7937.creaditor.bundle.js +63 -115
  46. package/dist/7937.creaditor.bundle.js.gz +0 -0
  47. package/dist/8196.creaditor.bundle.js +51 -0
  48. package/dist/8196.creaditor.bundle.js.gz +0 -0
  49. package/dist/8305.creaditor.bundle.js +6 -6
  50. package/dist/8305.creaditor.bundle.js.gz +0 -0
  51. package/dist/8478.creaditor.bundle.js +1 -0
  52. package/dist/8478.creaditor.bundle.js.gz +0 -0
  53. package/dist/8516.creaditor.bundle.js +1 -1
  54. package/dist/8516.creaditor.bundle.js.gz +0 -0
  55. package/dist/8676.creaditor.bundle.js +1 -0
  56. package/dist/8676.creaditor.bundle.js.gz +0 -0
  57. package/dist/8916.creaditor.bundle.js +4 -4
  58. package/dist/8916.creaditor.bundle.js.gz +0 -0
  59. package/dist/9041.creaditor.bundle.js +1 -1
  60. package/dist/9041.creaditor.bundle.js.gz +0 -0
  61. package/dist/9162.creaditor.bundle.js +4 -3
  62. package/dist/9162.creaditor.bundle.js.gz +0 -0
  63. package/dist/9694.creaditor.bundle.js +1 -1
  64. package/dist/9694.creaditor.bundle.js.gz +0 -0
  65. package/dist/creaditor.bundle.js +1683 -558
  66. package/dist/creaditor.bundle.js.gz +0 -0
  67. package/dist/service-worker.js +1 -1
  68. package/dist/service-worker.js.gz +0 -0
  69. package/package.json +1 -1
Binary file
@@ -1,14 +1,22 @@
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();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(8876),o.e(5813),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
- <div class="subject-input">
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4819],{84819(t,e,i){i.r(e),i.d(e,{NameAndSubjectPlugin:()=>p});var o=i(59929),n=i(49410);i(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 s=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,c=(t,e,i,o)=>{for(var n,r=void 0,s=t.length-1;s>=0;s--)(n=t[s])&&(r=n(e,i,r)||r);return r&&l(e,i,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([i.e(59),i.e(8876),i.e(5813),i.e(574)]).then(i.bind(i,50574)),i.e(898).then(i.bind(i,90898)),Promise.all([i.e(6216),i.e(7463)]).then(i.bind(i,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",u=class extends o.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 i=null==(e=this.shadowRoot)?void 0:e.querySelectorAll("input");if(i)if(i.forEach(t=>t.classList.remove("shake")),t){const e=Array.from(i).find(e=>{var i;const o=e.previousElementSibling;return null==(i=null==o?void 0:o.textContent)?void 0:i.toLowerCase().includes(t.toLowerCase())});e&&(e.focus(),e.classList.add("shake"))}else i.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 i=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:"write my subject",context:e})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);if(!i.body)throw new Error("Response body is null");const o=i.body.getReader(),n=new TextDecoder;try{for(;;){const{done:e,value:i}=await o.read();if(e)break;const r=n.decode(i,{stream:!0}).split("data: ");for(const e of r)if(e.trim()&&!e.includes("[DONE]"))try{const i=JSON.parse(e);i.text&&t(i.text)}catch{}}}finally{o.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 i=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);if(!i.body)throw new Error("Response body is null");const o=i.body.getReader(),n=new TextDecoder;try{for(;;){const{done:e,value:i}=await o.read();if(e)break;const r=n.decode(i,{stream:!0}).split("data: ");for(const e of r)if(e.trim()&&!e.includes("[DONE]"))try{const i=JSON.parse(e);i.text&&t(i.text)}catch{}}}finally{o.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()})}renderSparkleIcon(){return o.qy`
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="16"
5
+ height="16"
6
+ viewBox="0 0 20.25 20.999999"
7
+ fill="currentColor"
8
+ aria-hidden="true"
9
+ >
10
+ <path
11
+ d="M 12.316406 0.679688 C 12.160156 0.382812 11.734375 0.382812 11.574219 0.679688 L 11.132812 1.507812 C 11.09375 1.582031 11.035156 1.640625 10.960938 1.679688 L 10.128906 2.117188 C 9.828125 2.277344 9.828125 2.699219 10.128906 2.855469 L 10.960938 3.296875 C 11.035156 3.335938 11.09375 3.394531 11.132812 3.46875 L 11.574219 4.296875 C 11.734375 4.59375 12.160156 4.59375 12.316406 4.296875 L 12.757812 3.46875 C 12.800781 3.394531 12.859375 3.335938 12.933594 3.296875 L 13.765625 2.855469 C 14.0625 2.699219 14.0625 2.277344 13.765625 2.117188 L 12.933594 1.679688 C 12.859375 1.640625 12.800781 1.582031 12.757812 1.507812 Z M 15.167969 16.96875 L 16.875 17.617188 L 16.226562 15.917969 Z M 16.882812 13.496094 L 5.136719 1.816406 C 4.15625 0.839844 2.558594 0.839844 1.574219 1.816406 L 0.984375 2.40625 C 0 3.382812 0 4.96875 0.984375 5.949219 L 12.730469 17.625 C 12.929688 17.824219 13.273438 18.039062 13.542969 18.140625 L 17.152344 19.507812 C 18.167969 19.890625 19.164062 18.902344 18.777344 17.890625 L 17.402344 14.300781 C 17.300781 14.035156 17.085938 13.695312 16.882812 13.496094 Z M 15.316406 14.296875 L 5.730469 4.769531 L 3.953125 6.535156 L 13.535156 16.066406 Z M 3.949219 3 L 4.542969 3.585938 L 2.765625 5.355469 L 2.171875 4.765625 C 1.84375 4.441406 1.84375 3.910156 2.171875 3.585938 L 2.761719 3 C 3.089844 2.671875 3.621094 2.671875 3.949219 3 Z M 4.550781 12.996094 C 4.390625 12.699219 3.964844 12.699219 3.808594 12.996094 L 3 14.503906 C 2.960938 14.578125 2.902344 14.640625 2.828125 14.679688 L 1.308594 15.480469 C 1.011719 15.636719 1.011719 16.058594 1.308594 16.214844 L 2.828125 17.015625 C 2.902344 17.054688 2.960938 17.117188 3 17.191406 L 3.808594 18.699219 C 3.964844 18.996094 4.390625 18.996094 4.550781 18.699219 L 5.355469 17.191406 C 5.394531 17.117188 5.453125 17.054688 5.527344 17.015625 L 7.046875 16.214844 C 7.34375 16.058594 7.34375 15.636719 7.046875 15.480469 L 5.527344 14.679688 C 5.453125 14.640625 5.394531 14.578125 5.355469 14.503906 Z M 17.355469 5.480469 C 17.199219 5.183594 16.773438 5.183594 16.613281 5.480469 L 16.027344 6.582031 C 15.988281 6.65625 15.929688 6.714844 15.855469 6.753906 L 14.746094 7.335938 C 14.449219 7.496094 14.449219 7.917969 14.746094 8.074219 L 15.855469 8.660156 C 15.929688 8.699219 15.988281 8.757812 16.027344 8.832031 L 16.613281 9.933594 C 16.773438 10.230469 17.199219 10.230469 17.355469 9.933594 L 17.945312 8.832031 C 17.984375 8.757812 18.042969 8.699219 18.117188 8.660156 L 19.226562 8.074219 C 19.523438 7.917969 19.523438 7.496094 19.226562 7.335938 L 18.117188 6.753906 C 18.042969 6.714844 17.984375 6.65625 17.945312 6.582031 Z M 17.355469 5.480469 "
12
+ fill-rule="evenodd"
13
+ ></path>
14
+ </svg>
15
+ `}render(){return o.qy`
16
+ <div class="field-shell subject-input">
3
17
  <div class="subject-input-left">
4
18
  <cdtr-popover width="400px">
5
- <paper-button
6
- style=${`color:${this.textColor}`}
7
- size="sm"
8
- variant="text"
9
- slot="trigger"
10
- dir="auto"
11
- >
19
+ <button class="icon-btn" slot="trigger" aria-label="Add emoji">
12
20
  <svg
13
21
  width="15"
14
22
  xmlns="http://www.w3.org/2000/svg"
@@ -19,7 +27,7 @@
19
27
  d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM7 12H9C9 13.6569 10.3431 15 12 15C13.6569 15 15 13.6569 15 12H17C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12Z"
20
28
  ></path>
21
29
  </svg>
22
- </paper-button>
30
+ </button>
23
31
 
24
32
  <div slot="content" class="popover-content" dir="auto">
25
33
  <emoji-picker
@@ -28,13 +36,11 @@
28
36
  </div>
29
37
  </cdtr-popover>
30
38
 
31
- ${this.mergeTags.length>0?i.qy` <cdtr-popover>
32
- <paper-button
33
- style=${`color:${this.textColor}`}
34
- size="sm"
35
- variant="text"
39
+ ${this.mergeTags.length>0?o.qy` <cdtr-popover>
40
+ <button
41
+ class="icon-btn"
36
42
  slot="trigger"
37
- dir="auto"
43
+ aria-label="Insert personalization tag"
38
44
  >
39
45
  <svg
40
46
  xmlns="http://www.w3.org/2000/svg"
@@ -47,12 +53,12 @@
47
53
  d="M20 22H18V20C18 18.3431 16.6569 17 15 17H9C7.34315 17 6 18.3431 6 20V22H4V20C4 17.2386 6.23858 15 9 15H15C17.7614 15 20 17.2386 20 20V22ZM12 13C8.68629 13 6 10.3137 6 7C6 3.68629 8.68629 1 12 1C15.3137 1 18 3.68629 18 7C18 10.3137 15.3137 13 12 13ZM12 11C14.2091 11 16 9.20914 16 7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7C8 9.20914 9.79086 11 12 11Z"
48
54
  ></path>
49
55
  </svg>
50
- </paper-button>
56
+ </button>
51
57
  <div slot="content" class="popover-content" dir="auto">
52
58
  <div class="popover-header">
53
59
  <h3 dir="auto">${this.headerText}</h3>
54
60
  </div>
55
- ${this.mergeTags.map(t=>i.qy`
61
+ ${this.mergeTags.map(t=>o.qy`
56
62
  <div
57
63
  class="field-item"
58
64
  @click=${()=>this.handleFieldClick(t)}
@@ -64,38 +70,30 @@
64
70
  </div>
65
71
  </cdtr-popover>`:""}
66
72
  </div>
67
- <div class="divider"></div>
68
73
  <input
69
74
  name="subject"
70
75
  type="text"
76
+ class=${this.isGeneratingSubject?"streaming":""}
71
77
  placeholder=${this.subjectPlaceholder}
72
78
  .value=${this.subject}
73
79
  @change=${this.handleSave}
74
80
  @input=${t=>{this.subject=t.target.value,"string"!=typeof this.subtitle&&(this.subtitle=""),0===this.subtitle.trim().length&&(this.subtitle=this.subject)}}
75
81
  dir="auto"
76
- style=${`${this.getPlaceholderStyle()}; border:none;`}
82
+ style=${this.getPlaceholderStyle()}
77
83
  />
78
- <div class="divider"></div>
79
84
 
80
85
  <cdtr-popover width="500px" id="name-popover">
81
- <paper-button
82
- style=${`color:${this.textColor}`}
83
- size="sm"
84
- variant="text"
85
- slot="trigger"
86
- dir="auto"
87
- >
86
+ <button class="icon-btn" slot="trigger" aria-label="Edit details">
88
87
  <svg
89
88
  xmlns="http://www.w3.org/2000/svg"
90
89
  viewBox="0 0 24 24"
91
- width="20"
92
- fill="#000"
90
+ width="18"
93
91
  >
94
92
  <path
95
93
  d="M3.33946 17.0002C2.90721 16.2515 2.58277 15.4702 2.36133 14.6741C3.3338 14.1779 3.99972 13.1668 3.99972 12.0002C3.99972 10.8345 3.3348 9.824 2.36353 9.32741C2.81025 7.71651 3.65857 6.21627 4.86474 4.99001C5.7807 5.58416 6.98935 5.65534 7.99972 5.072C9.01009 4.48866 9.55277 3.40635 9.4962 2.31604C11.1613 1.8846 12.8847 1.90004 14.5031 2.31862C14.4475 3.40806 14.9901 4.48912 15.9997 5.072C17.0101 5.65532 18.2187 5.58416 19.1346 4.99007C19.7133 5.57986 20.2277 6.25151 20.66 7.00021C21.0922 7.7489 21.4167 8.53025 21.6381 9.32628C20.6656 9.82247 19.9997 10.8336 19.9997 12.0002C19.9997 13.166 20.6646 14.1764 21.6359 14.673C21.1892 16.2839 20.3409 17.7841 19.1347 19.0104C18.2187 18.4163 17.0101 18.3451 15.9997 18.9284C14.9893 19.5117 14.4467 20.5941 14.5032 21.6844C12.8382 22.1158 11.1148 22.1004 9.49633 21.6818C9.55191 20.5923 9.00929 19.5113 7.99972 18.9284C6.98938 18.3451 5.78079 18.4162 4.86484 19.0103C4.28617 18.4205 3.77172 17.7489 3.33946 17.0002ZM8.99972 17.1964C10.0911 17.8265 10.8749 18.8227 11.2503 19.9659C11.7486 20.0133 12.2502 20.014 12.7486 19.9675C13.1238 18.8237 13.9078 17.8268 14.9997 17.1964C16.0916 16.5659 17.347 16.3855 18.5252 16.6324C18.8146 16.224 19.0648 15.7892 19.2729 15.334C18.4706 14.4373 17.9997 13.2604 17.9997 12.0002C17.9997 10.74 18.4706 9.5632 19.2729 8.6665C19.1688 8.4405 19.0538 8.21822 18.9279 8.00021C18.802 7.78219 18.667 7.57148 18.5233 7.36842C17.3457 7.61476 16.0911 7.43414 14.9997 6.80405C13.9083 6.17395 13.1246 5.17768 12.7491 4.03455C12.2509 3.98714 11.7492 3.98646 11.2509 4.03292C10.8756 5.17671 10.0916 6.17364 8.99972 6.80405C7.9078 7.43447 6.65245 7.61494 5.47428 7.36803C5.18485 7.77641 4.93463 8.21117 4.72656 8.66637C5.52881 9.56311 5.99972 10.74 5.99972 12.0002C5.99972 13.2604 5.52883 14.4372 4.72656 15.3339C4.83067 15.5599 4.94564 15.7822 5.07152 16.0002C5.19739 16.2182 5.3324 16.4289 5.47612 16.632C6.65377 16.3857 7.90838 16.5663 8.99972 17.1964ZM11.9997 15.0002C10.3429 15.0002 8.99972 13.6571 8.99972 12.0002C8.99972 10.3434 10.3429 9.00021 11.9997 9.00021C13.6566 9.00021 14.9997 10.3434 14.9997 12.0002C14.9997 13.6571 13.6566 15.0002 11.9997 15.0002ZM11.9997 13.0002C12.552 13.0002 12.9997 12.5525 12.9997 12.0002C12.9997 11.4479 12.552 11.0002 11.9997 11.0002C11.4474 11.0002 10.9997 11.4479 10.9997 12.0002C10.9997 12.5525 11.4474 13.0002 11.9997 13.0002Z"
96
94
  ></path>
97
95
  </svg>
98
- </paper-button>
96
+ </button>
99
97
 
100
98
  <div slot="content" class="popover-content" dir="auto">
101
99
  <div class="popover-header">
@@ -106,6 +104,7 @@
106
104
  <input
107
105
  name="name"
108
106
  type="text"
107
+ class="text-input"
109
108
  .value=${this.name}
110
109
  @input=${t=>this.name=t.target.value}
111
110
  dir="auto"
@@ -113,286 +112,250 @@
113
112
  </div>
114
113
  <div class="input-group">
115
114
  <label dir="auto">${this.subjectLabel}</label>
116
- <div class="row">
117
- <paper-button
118
- @click=${this.handleGenerateSubject}
119
- ?disabled=${this.isGeneratingSubject}
120
- class="generate-button"
121
- >
122
- ${this.isGeneratingSubject?i.qy` <div class="loading-spinner"></div> `:i.qy`
123
- <svg
124
- xmlns="http://www.w3.org/2000/svg"
125
- xmlnsXlink="http://www.w3.org/1999/xlink"
126
- width="18"
127
- zoomAndPan="magnify"
128
- viewBox="0 0 20.25 20.999999"
129
- height="18"
130
- preserveAspectRatio="xMidYMid meet"
131
- version="1.0"
132
- >
133
- <defs>
134
- <clippath id="84a0f9f97b">
135
- <path
136
- d="M 0 0.375 L 19.527344 0.375 L 19.527344 19.902344 L 0 19.902344 Z M 0 0.375 "
137
- clip-rule="nonzero"
138
- ></path>
139
- </clippath>
140
- </defs>
141
- <g clip-path="url(#84a0f9f97b)">
142
- <path
143
- fill="#9747ff"
144
- d="M 12.316406 0.679688 C 12.160156 0.382812 11.734375 0.382812 11.574219 0.679688 L 11.132812 1.507812 C 11.09375 1.582031 11.035156 1.640625 10.960938 1.679688 L 10.128906 2.117188 C 9.828125 2.277344 9.828125 2.699219 10.128906 2.855469 L 10.960938 3.296875 C 11.035156 3.335938 11.09375 3.394531 11.132812 3.46875 L 11.574219 4.296875 C 11.734375 4.59375 12.160156 4.59375 12.316406 4.296875 L 12.757812 3.46875 C 12.800781 3.394531 12.859375 3.335938 12.933594 3.296875 L 13.765625 2.855469 C 14.0625 2.699219 14.0625 2.277344 13.765625 2.117188 L 12.933594 1.679688 C 12.859375 1.640625 12.800781 1.582031 12.757812 1.507812 Z M 15.167969 16.96875 L 16.875 17.617188 L 16.226562 15.917969 Z M 16.882812 13.496094 L 5.136719 1.816406 C 4.15625 0.839844 2.558594 0.839844 1.574219 1.816406 L 0.984375 2.40625 C 0 3.382812 0 4.96875 0.984375 5.949219 L 12.730469 17.625 C 12.929688 17.824219 13.273438 18.039062 13.542969 18.140625 L 17.152344 19.507812 C 18.167969 19.890625 19.164062 18.902344 18.777344 17.890625 L 17.402344 14.300781 C 17.300781 14.035156 17.085938 13.695312 16.882812 13.496094 Z M 15.316406 14.296875 L 5.730469 4.769531 L 3.953125 6.535156 L 13.535156 16.066406 Z M 3.949219 3 L 4.542969 3.585938 L 2.765625 5.355469 L 2.171875 4.765625 C 1.84375 4.441406 1.84375 3.910156 2.171875 3.585938 L 2.761719 3 C 3.089844 2.671875 3.621094 2.671875 3.949219 3 Z M 4.550781 12.996094 C 4.390625 12.699219 3.964844 12.699219 3.808594 12.996094 L 3 14.503906 C 2.960938 14.578125 2.902344 14.640625 2.828125 14.679688 L 1.308594 15.480469 C 1.011719 15.636719 1.011719 16.058594 1.308594 16.214844 L 2.828125 17.015625 C 2.902344 17.054688 2.960938 17.117188 3 17.191406 L 3.808594 18.699219 C 3.964844 18.996094 4.390625 18.996094 4.550781 18.699219 L 5.355469 17.191406 C 5.394531 17.117188 5.453125 17.054688 5.527344 17.015625 L 7.046875 16.214844 C 7.34375 16.058594 7.34375 15.636719 7.046875 15.480469 L 5.527344 14.679688 C 5.453125 14.640625 5.394531 14.578125 5.355469 14.503906 Z M 17.355469 5.480469 C 17.199219 5.183594 16.773438 5.183594 16.613281 5.480469 L 16.027344 6.582031 C 15.988281 6.65625 15.929688 6.714844 15.855469 6.753906 L 14.746094 7.335938 C 14.449219 7.496094 14.449219 7.917969 14.746094 8.074219 L 15.855469 8.660156 C 15.929688 8.699219 15.988281 8.757812 16.027344 8.832031 L 16.613281 9.933594 C 16.773438 10.230469 17.199219 10.230469 17.355469 9.933594 L 17.945312 8.832031 C 17.984375 8.757812 18.042969 8.699219 18.117188 8.660156 L 19.226562 8.074219 C 19.523438 7.917969 19.523438 7.496094 19.226562 7.335938 L 18.117188 6.753906 C 18.042969 6.714844 17.984375 6.65625 17.945312 6.582031 Z M 17.355469 5.480469 "
145
- fill-opacity="1"
146
- fill-rule="evenodd"
147
- ></path>
148
- </g>
149
- </svg>
150
- `}
151
- </paper-button>
115
+ <div class="field-shell">
152
116
  <input
153
117
  name="subject"
154
118
  type="text"
119
+ class=${this.isGeneratingSubject?"streaming":""}
155
120
  .value=${this.subject}
156
121
  @input=${t=>this.subject=t.target.value}
157
122
  dir="auto"
158
123
  />
124
+ <button
125
+ @click=${this.handleGenerateSubject}
126
+ ?disabled=${this.isGeneratingSubject}
127
+ class="icon-btn generate-button ${this.isGeneratingSubject?"generating":""}"
128
+ aria-label="Generate subject with AI"
129
+ >
130
+ ${this.renderSparkleIcon()}
131
+ </button>
159
132
  </div>
160
133
  </div>
161
134
  <div class="input-group">
162
135
  <label dir="auto">${this.subtitleLabel}</label>
163
- <div class="row">
164
- <paper-button
165
- @click=${this.handleGenerateSubtitle}
166
- ?disabled=${this.isGeneratingSubtitle}
167
- class="generate-button"
168
- >
169
- ${this.isGeneratingSubtitle?i.qy` <div class="loading-spinner"></div> `:i.qy`
170
- <svg
171
- xmlns="http://www.w3.org/2000/svg"
172
- xmlnsXlink="http://www.w3.org/1999/xlink"
173
- width="18"
174
- zoomAndPan="magnify"
175
- viewBox="0 0 20.25 20.999999"
176
- height="18"
177
- preserveAspectRatio="xMidYMid meet"
178
- version="1.0"
179
- >
180
- <defs>
181
- <clippath id="84a0f9f97b">
182
- <path
183
- d="M 0 0.375 L 19.527344 0.375 L 19.527344 19.902344 L 0 19.902344 Z M 0 0.375 "
184
- clip-rule="nonzero"
185
- ></path>
186
- </clippath>
187
- </defs>
188
- <g clip-path="url(#84a0f9f97b)">
189
- <path
190
- fill="#9747ff"
191
- d="M 12.316406 0.679688 C 12.160156 0.382812 11.734375 0.382812 11.574219 0.679688 L 11.132812 1.507812 C 11.09375 1.582031 11.035156 1.640625 10.960938 1.679688 L 10.128906 2.117188 C 9.828125 2.277344 9.828125 2.699219 10.128906 2.855469 L 10.960938 3.296875 C 11.035156 3.335938 11.09375 3.394531 11.132812 3.46875 L 11.574219 4.296875 C 11.734375 4.59375 12.160156 4.59375 12.316406 4.296875 L 12.757812 3.46875 C 12.800781 3.394531 12.859375 3.335938 12.933594 3.296875 L 13.765625 2.855469 C 14.0625 2.699219 14.0625 2.277344 13.765625 2.117188 L 12.933594 1.679688 C 12.859375 1.640625 12.800781 1.582031 12.757812 1.507812 Z M 15.167969 16.96875 L 16.875 17.617188 L 16.226562 15.917969 Z M 16.882812 13.496094 L 5.136719 1.816406 C 4.15625 0.839844 2.558594 0.839844 1.574219 1.816406 L 0.984375 2.40625 C 0 3.382812 0 4.96875 0.984375 5.949219 L 12.730469 17.625 C 12.929688 17.824219 13.273438 18.039062 13.542969 18.140625 L 17.152344 19.507812 C 18.167969 19.890625 19.164062 18.902344 18.777344 17.890625 L 17.402344 14.300781 C 17.300781 14.035156 17.085938 13.695312 16.882812 13.496094 Z M 15.316406 14.296875 L 5.730469 4.769531 L 3.953125 6.535156 L 13.535156 16.066406 Z M 3.949219 3 L 4.542969 3.585938 L 2.765625 5.355469 L 2.171875 4.765625 C 1.84375 4.441406 1.84375 3.910156 2.171875 3.585938 L 2.761719 3 C 3.089844 2.671875 3.621094 2.671875 3.949219 3 Z M 4.550781 12.996094 C 4.390625 12.699219 3.964844 12.699219 3.808594 12.996094 L 3 14.503906 C 2.960938 14.578125 2.902344 14.640625 2.828125 14.679688 L 1.308594 15.480469 C 1.011719 15.636719 1.011719 16.058594 1.308594 16.214844 L 2.828125 17.015625 C 2.902344 17.054688 2.960938 17.117188 3 17.191406 L 3.808594 18.699219 C 3.964844 18.996094 4.390625 18.996094 4.550781 18.699219 L 5.355469 17.191406 C 5.394531 17.117188 5.453125 17.054688 5.527344 17.015625 L 7.046875 16.214844 C 7.34375 16.058594 7.34375 15.636719 7.046875 15.480469 L 5.527344 14.679688 C 5.453125 14.640625 5.394531 14.578125 5.355469 14.503906 Z M 17.355469 5.480469 C 17.199219 5.183594 16.773438 5.183594 16.613281 5.480469 L 16.027344 6.582031 C 15.988281 6.65625 15.929688 6.714844 15.855469 6.753906 L 14.746094 7.335938 C 14.449219 7.496094 14.449219 7.917969 14.746094 8.074219 L 15.855469 8.660156 C 15.929688 8.699219 15.988281 8.757812 16.027344 8.832031 L 16.613281 9.933594 C 16.773438 10.230469 17.199219 10.230469 17.355469 9.933594 L 17.945312 8.832031 C 17.984375 8.757812 18.042969 8.699219 18.117188 8.660156 L 19.226562 8.074219 C 19.523438 7.917969 19.523438 7.496094 19.226562 7.335938 L 18.117188 6.753906 C 18.042969 6.714844 17.984375 6.65625 17.945312 6.582031 Z M 17.355469 5.480469 "
192
- fill-opacity="1"
193
- fill-rule="evenodd"
194
- ></path>
195
- </g>
196
- </svg>
197
- `}
198
- </paper-button>
136
+ <div class="field-shell">
199
137
  <input
200
138
  name="subtitle"
201
139
  type="text"
140
+ class=${this.isGeneratingSubtitle?"streaming":""}
202
141
  .value=${this.subtitle}
203
142
  @input=${t=>this.subtitle=t.target.value}
204
143
  dir="auto"
205
144
  />
145
+ <button
146
+ @click=${this.handleGenerateSubtitle}
147
+ ?disabled=${this.isGeneratingSubtitle}
148
+ class="icon-btn generate-button ${this.isGeneratingSubtitle?"generating":""}"
149
+ aria-label="Generate subtitle with AI"
150
+ >
151
+ ${this.renderSparkleIcon()}
152
+ </button>
206
153
  </div>
207
154
  </div>
208
- <paper-button
209
- style=${`color:${this.textColor}; background:${this.bgColor};width:100%;`}
210
- fullwidth
211
- class="save-button"
212
- @click=${this.handleSave}
213
- dir="auto"
214
- >
155
+ <button class="save-button" @click=${this.handleSave} dir="auto">
215
156
  ${this.saveButtonText}
216
- </paper-button>
157
+ </button>
217
158
  </div>
218
159
  </cdtr-popover>
219
160
  </div>
220
- `}};c.styles=i.AH`
161
+ `}};u.styles=o.AH`
221
162
  * {
222
163
  box-sizing: border-box;
223
164
  }
224
- @keyframes shake {
225
- 0%,
226
- 100% {
227
- transform: translateX(0);
228
- }
229
- 10%,
230
- 30%,
231
- 50%,
232
- 70%,
233
- 90% {
234
- transform: translateX(-5px);
165
+ :host {
166
+ font-family: var(
167
+ --font-family,
168
+ -apple-system,
169
+ BlinkMacSystemFont,
170
+ "Segoe UI",
171
+ Roboto,
172
+ sans-serif
173
+ );
174
+ }
175
+ @keyframes ring-pulse {
176
+ 0% {
177
+ box-shadow: 0 0 0 0
178
+ color-mix(in srgb, var(--accent, #5b5fc7) 45%, transparent);
235
179
  }
236
- 20%,
237
- 40%,
238
- 60%,
239
- 80% {
240
- transform: translateX(5px);
180
+ 100% {
181
+ box-shadow: 0 0 0 6px transparent;
241
182
  }
242
183
  }
243
184
  .shake {
244
- animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
185
+ border-radius: 8px;
186
+ animation: ring-pulse 0.6s ease-out 2;
245
187
  }
246
188
  .popover-content {
247
189
  padding: 20px;
248
190
  min-width: 320px;
249
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
250
- Ubuntu, Cantarell, sans-serif;
251
191
  font-size: 14px;
252
192
  }
253
- .popover-header {
254
- margin-bottom: 20px;
255
- }
256
193
  .popover-header h3 {
257
- font-size: 1.25rem;
194
+ font-size: 15px;
258
195
  font-weight: 600;
259
196
  color: #1a1a1a;
260
- margin: 0;
261
- }
262
- paper-button {
263
- min-width: 10px;
197
+ margin: 0 0 16px;
264
198
  }
265
199
  .input-group {
266
- margin-bottom: 12px;
200
+ margin-bottom: 16px;
267
201
  }
268
202
  .input-group label {
269
203
  display: block;
270
- margin-bottom: 4px;
204
+ margin-bottom: 6px;
271
205
  font-weight: 500;
272
- font-size: 14px;
273
- color: #4a4a4a;
274
- }
275
- svg {
276
- fill: #000;
206
+ font-size: 13px;
207
+ color: #6b7280;
277
208
  }
278
- .row {
279
- display: flex;
209
+ .icon-btn {
210
+ display: inline-flex;
280
211
  align-items: center;
281
- gap: 8px;
212
+ justify-content: center;
213
+ flex: none;
214
+ width: 28px;
215
+ height: 28px;
216
+ padding: 0;
217
+ border: none;
218
+ border-radius: 6px;
219
+ background: transparent;
220
+ color: var(--icon-muted, #666);
221
+ cursor: pointer;
222
+ transition: color 0.15s, background-color 0.15s;
282
223
  }
283
- .input-group input {
284
- width: 100%;
285
- padding: 8px 12px;
286
- border: 1px solid #d1d1d1;
287
- border-radius: 4px;
288
- font-size: 14px;
289
- background-color: #ffffff;
290
- transition: border-color 0.2s, box-shadow 0.2s;
224
+ .icon-btn:hover {
225
+ color: var(--accent, #5b5fc7);
226
+ background: color-mix(in srgb, var(--accent, #5b5fc7) 8%, transparent);
291
227
  }
292
- .input-group input:focus {
293
- outline: none;
294
- border-color: #3b82f6;
295
- box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
296
- }
297
- .loading-spinner {
298
- width: 16px;
299
- height: 16px;
300
- border: 2px solid rgba(0, 0, 0, 0.3);
301
- border-top: 2px solid #000000;
302
- border-radius: 50%;
303
- animation: spin 1s linear infinite;
304
- display: inline-block;
305
- margin-right: 8px;
306
- }
307
- @keyframes spin {
308
- 0% {
309
- transform: rotate(0deg);
310
- }
311
- 100% {
312
- transform: rotate(360deg);
313
- }
228
+ .icon-btn:focus-visible {
229
+ outline: 2px solid var(--accent, #5b5fc7);
230
+ outline-offset: 1px;
314
231
  }
315
- @keyframes pulse {
316
- 0% {
317
- transform: scale(1);
232
+ .icon-btn svg {
233
+ fill: currentColor;
234
+ }
235
+ .generate-button {
236
+ color: var(--accent, #5b5fc7);
237
+ }
238
+ .generate-button:disabled {
239
+ cursor: default;
240
+ pointer-events: none;
241
+ }
242
+ .generate-button.generating svg {
243
+ animation: sparkle-pulse 1s ease-in-out infinite;
244
+ }
245
+ @keyframes sparkle-pulse {
246
+ 0%,
247
+ 100% {
318
248
  opacity: 1;
319
249
  }
320
250
  50% {
321
- transform: scale(1.05);
322
- opacity: 0.8;
251
+ opacity: 0.35;
323
252
  }
324
- 100% {
325
- transform: scale(1);
326
- opacity: 1;
253
+ }
254
+ @keyframes shimmer {
255
+ from {
256
+ background-position: 200% 0;
257
+ }
258
+ to {
259
+ background-position: -200% 0;
327
260
  }
328
261
  }
329
- .generate-button {
330
- padding: 0;
262
+ input.streaming {
263
+ background-image: linear-gradient(
264
+ 90deg,
265
+ transparent 0%,
266
+ color-mix(in srgb, var(--accent, #5b5fc7) 10%, transparent) 50%,
267
+ transparent 100%
268
+ );
269
+ background-size: 200% 100%;
270
+ animation: shimmer 1.4s linear infinite;
331
271
  }
332
- .generate-button:disabled {
333
- opacity: 0.6;
334
- cursor: not-allowed;
335
- pointer-events: none;
272
+ .text-input,
273
+ .field-shell {
274
+ width: 100%;
275
+ height: 36px;
276
+ border: 1px solid var(--divider-color, #e5e7eb);
277
+ border-radius: 8px;
278
+ background: #fff;
279
+ transition: border-color 0.15s, box-shadow 0.15s;
336
280
  }
337
- .pulse-button {
338
- animation: pulse 2s ease-in-out infinite;
339
- background-color: #3b82f6;
340
- color: white;
341
- border: none;
342
- border-radius: 4px;
343
- padding: 4px 8px;
344
- font-size: 12px;
345
- font-weight: 500;
346
- cursor: pointer;
347
- transition: background-color 0.2s;
281
+ .text-input {
282
+ padding: 0 10px;
283
+ font-size: 14px;
284
+ font-family: inherit;
285
+ color: inherit;
348
286
  }
349
- .pulse-button:hover {
350
- background-color: #2563eb;
351
- animation: none;
287
+ .text-input:focus,
288
+ .field-shell:focus-within {
289
+ outline: none;
290
+ border-color: var(--accent, #5b5fc7);
291
+ box-shadow: 0 0 0 3px
292
+ color-mix(in srgb, var(--accent, #5b5fc7) 12%, transparent);
352
293
  }
353
- .subject-input-left {
294
+ .field-shell {
354
295
  display: flex;
355
296
  align-items: center;
356
297
  gap: 2px;
298
+ padding: 0 4px;
357
299
  }
358
- .subject-input {
359
- max-height: 36px;
360
- display: flex;
361
- align-items: center;
362
- gap: 8px;
363
- background: #ffffff;
364
- border: 1px solid #d1d1d1;
365
- border-radius: 6px;
366
- max-width: 400px;
367
- overflow: hidden;
368
- }
369
- .subject-input input {
300
+ .field-shell > input {
370
301
  flex: 1;
371
- padding: 8px 12px;
372
- border-radius: 4px;
302
+ min-width: 0;
303
+ height: 100%;
304
+ border: none;
305
+ background: transparent;
306
+ padding: 0 6px;
373
307
  font-size: 14px;
308
+ font-family: inherit;
309
+ color: inherit;
374
310
  }
375
- .subject-input input:focus {
311
+ .field-shell > input:focus {
376
312
  outline: none;
377
313
  }
314
+ .subject-input {
315
+ max-width: 400px;
316
+ }
317
+ .subject-input-left {
318
+ display: flex;
319
+ align-items: center;
320
+ gap: 2px;
321
+ }
378
322
  .field-item {
379
- padding: 10px 12px;
323
+ padding: 8px 10px;
324
+ border-radius: 6px;
380
325
  cursor: pointer;
381
- border-bottom: 1px solid #f0f0f0;
382
326
  font-size: 14px;
383
- transition: background-color 0.2s;
327
+ transition: background-color 0.15s;
384
328
  }
385
329
  .field-item:hover {
386
- background-color: #f8f9fa;
330
+ background-color: #f5f5f7;
331
+ }
332
+ .save-button {
333
+ width: 100%;
334
+ height: 36px;
335
+ margin-top: 4px;
336
+ border: none;
337
+ border-radius: 8px;
338
+ background: var(--accent, #5b5fc7);
339
+ color: #fff;
340
+ font-size: 14px;
341
+ font-weight: 500;
342
+ font-family: inherit;
343
+ cursor: pointer;
344
+ transition: filter 0.15s;
387
345
  }
388
- .field-item:last-child {
389
- border-bottom: none;
346
+ .save-button:hover {
347
+ filter: brightness(0.94);
390
348
  }
391
- .divider {
392
- height: 20px;
393
- width: 1px;
394
- background-color: #d5d5d5;
395
- position: absolute;
349
+ .save-button:focus-visible {
350
+ outline: 2px solid var(--accent, #5b5fc7);
351
+ outline-offset: 2px;
352
+ }
353
+ @media (prefers-reduced-motion: reduce) {
354
+ .shake,
355
+ .generate-button.generating svg,
356
+ input.streaming {
357
+ animation: none;
358
+ }
396
359
  }
397
360
  emoji-picker {
398
361
  --emoji-size: 1.75rem;
@@ -404,4 +367,4 @@
404
367
  --button-active-background: #f1f3f5;
405
368
  --font-size: 14px;
406
369
  }
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)}}]);
370
+ `;let p=u;c([(0,n.MZ)({type:String})],p.prototype,"bgColor"),c([(0,n.MZ)({type:String})],p.prototype,"textColor"),c([(0,n.MZ)({type:String})],p.prototype,"headerText"),c([(0,n.MZ)({type:String})],p.prototype,"nameLabel"),c([(0,n.MZ)({type:String})],p.prototype,"subjectLabel"),c([(0,n.MZ)({type:String})],p.prototype,"subtitleLabel"),c([(0,n.MZ)({type:String})],p.prototype,"saveButtonText"),c([(0,n.MZ)({type:String})],p.prototype,"subjectPlaceholder"),c([(0,n.MZ)({type:Array})],p.prototype,"mergeTags"),c([(0,n.MZ)({type:String})],p.prototype,"name"),c([(0,n.MZ)({type:String})],p.prototype,"subject"),c([(0,n.MZ)({type:String})],p.prototype,"subtitle"),c([(0,n.MZ)({attribute:!1})],p.prototype,"save"),c([(0,n.MZ)({type:Boolean})],p.prototype,"isGeneratingSubject"),c([(0,n.MZ)({type:Boolean})],p.prototype,"isGeneratingSubtitle"),customElements.get(d)||customElements.define(d,p)}}]);
Binary file