This commit is contained in:
zbatte committed 2026-07-02 15:54:39 -06:00
commit 9883323161
17470 files changed
+4470592

No files matched your search

@@ -0,0 +1,47 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "jetpack/ai-chat",
"title": "Jetpack AI Search",
"description": "Provide a summarized answer to questions, trained on the sites content. Powered by AI.",
"keywords": [
"AI",
"GPT",
"Chat",
"Search"
],
"version": "12.5.0",
"textdomain": "jetpack",
"category": "text",
"icon": "<svg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M6.96774 8C6.96774 9.1402 6.04343 10.0645 4.90323 10.0645C3.76303 10.0645 2.83871 9.1402 2.83871 8C2.83871 6.8598 3.76303 5.93548 4.90323 5.93548C6.04343 5.93548 6.96774 6.8598 6.96774 8ZM5.41935 8C5.41935 8.28505 5.18828 8.51613 4.90323 8.51613C4.61818 8.51613 4.3871 8.28505 4.3871 8C4.3871 7.71495 4.61818 7.48387 4.90323 7.48387C5.18828 7.48387 5.41935 7.71495 5.41935 8Z'/><path fill-rule='evenodd' clip-rule='evenodd' d='M11.0968 10.0645C12.237 10.0645 13.1613 9.1402 13.1613 8C13.1613 6.8598 12.237 5.93548 11.0968 5.93548C9.95657 5.93548 9.03226 6.8598 9.03226 8C9.03226 9.1402 9.95657 10.0645 11.0968 10.0645ZM11.0968 8.51613C11.3818 8.51613 11.6129 8.28505 11.6129 8C11.6129 7.71495 11.3818 7.48387 11.0968 7.48387C10.8117 7.48387 10.5806 7.71495 10.5806 8C10.5806 8.28505 10.8117 8.51613 11.0968 8.51613Z'/><path d='M5.93548 11.3548C5.50791 11.3548 5.16129 11.7015 5.16129 12.129C5.16129 12.5566 5.50791 12.9032 5.93548 12.9032H10.0645C10.4921 12.9032 10.8387 12.5566 10.8387 12.129C10.8387 11.7015 10.4921 11.3548 10.0645 11.3548H5.93548Z'/><path fill-rule='evenodd' clip-rule='evenodd' d='M8.77419 0.774194C8.77419 0.346618 8.42758 0 8 0C7.57242 0 7.22581 0.346618 7.22581 0.774194V3.09677H4.90323C2.19525 3.09677 0 5.29202 0 8V11.0968C0 13.8048 2.19525 16 4.90323 16H11.0968C13.8048 16 16 13.8048 16 11.0968V8C16 5.29202 13.8048 3.09677 11.0968 3.09677H8.77419V0.774194ZM1.54839 8C1.54839 6.14717 3.0504 4.64516 4.90323 4.64516H11.0968C12.9496 4.64516 14.4516 6.14717 14.4516 8V11.0968C14.4516 12.9496 12.9496 14.4516 11.0968 14.4516H4.90323C3.0504 14.4516 1.54839 12.9496 1.54839 11.0968V8Z'/></svg>",
"supports": {
"align": true,
"alignWide": true,
"customClassName": true,
"className": true,
"html": false,
"multiple": false,
"reusable": false
},
"attributes": {
"askButtonLabel": {
"type": "string"
},
"placeholder": {
"type": "string"
},
"showCopy": {
"type": "boolean",
"default": true
},
"showFeedback": {
"type": "boolean",
"default": true
},
"showSources": {
"type": "boolean",
"default": true
}
},
"editorScript": "jetpack-blocks-editor"
}
@@ -0,0 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '81ef5d0ffaa9862552a1');
@@ -0,0 +1 @@
.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form{display:flex;flex-direction:row;flex-wrap:nowrap;margin-top:1rem}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form .jetpack-ai-chat-feedback-input{flex:auto;flex-grow:4}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form .jetpack-ai-chat-feedback-input input{font-size:16px;line-height:1.3;padding:15px 23px;width:100%}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form .jetpack-ai-chat-feedback-submit{flex:auto;flex-grow:1;height:53px;margin-left:10px;text-wrap:nowrap}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-answer-feedback-buttons a{border:none;border-radius:2px;cursor:pointer;margin-left:.5rem;padding:.5rem;transition:.3s}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-answer-feedback-buttons a svg{fill:var(--wp--preset--color--contrast);vertical-align:middle;width:20px}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-answer-feedback-buttons a:disabled{cursor:not-allowed;opacity:.5}.jetpack-ai-chat-copy-button-container{margin:1rem 0}.jetpack-ai-chat-copy-button-container button{background:none;border:none;color:var(--wp--preset--color--secondary);cursor:pointer;display:block;font-size:16px;padding:inherit;position:relative;transition:.3s}.jetpack-ai-chat-copy-button-container button:disabled{cursor:not-allowed;opacity:.5}.jetpack-ai-chat-copy-button-container button .copy-icon{margin-right:.5rem;vertical-align:middle}.jetpack-ai-chat-error-container{color:#dc3232;font-size:1rem;margin:1rem 0}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper{display:flex;flex-direction:row;flex-wrap:nowrap;margin-top:1rem}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-input{flex:auto;flex-grow:4}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-input input{font-size:16px;line-height:1.3;padding:15px 23px;width:100%}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-input .components-base-control__field{margin-bottom:0}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-button{display:block;flex:auto;flex-grow:1;height:53px;margin-left:10px;text-wrap:nowrap;white-space:-moz-pre-space}.wp-block-jetpack-ai-chat .jetpack-ai-chat-answer-references{font-size:1rem;margin-top:12px}.wp-block-jetpack-ai-chat .jetpack-ai-chat-answer-references hr{margin:1rem 0}
@@ -0,0 +1 @@
(()=>{var e={81730(){},7404(e,t,a){"use strict";a.d(t,{A:()=>l});var s=a(56427),c=a(29491),o=a(86087),r=a(27723),n=a(55163),i=a(10790);const __=r.__,_x=r._x;function l({answer:e}){const[t,a]=(0,o.useState)(!1),r=(new DOMParser).parseFromString(e,"text/html"),l=r.body.textContent||r.body.innerText||"",d=(0,c.useCopyToClipboard)(l,()=>{a(!0),setTimeout(()=>a(!1),3e3)});return(0,i.jsx)("div",{className:"jetpack-ai-chat-copy-button-container",children:(0,i.jsxs)(s.Button,{className:"jetpack-ai-chat-copy-button",disabled:t,label:__("Copy Response","jetpack"),variant:"has-text",ref:d,children:[(0,i.jsx)(s.Icon,{className:"copy-icon",icon:n.ui}),t?_x("Copied!","Copied to clipboard","jetpack"):_x("Copy Response","Copy to clipboard.","jetpack")]})})}},73829(e,t,a){"use strict";a.d(t,{A:()=>o});var s=a(27723),c=a(10790);const __=s.__;function o(){return(0,c.jsx)("div",{className:"jetpack-ai-chat-error-container",children:__("There was an error while generating the answer. Please try again later.","jetpack")})}},85443(e,t,a){"use strict";a.d(t,{A:()=>d});var s=a(56427),c=a(86087),o=a(27723),r=a(55163),n=a(89692),i=a(73829),l=a(10790);const __=o.__;function d({blogType:e,blogId:t,cacheKey:a,feedbackSubmitted:o,addFeedback:d}){const{isSubmittingFeedback:h,submitFeedback:u,feedbackError:p,setFeedbackError:b}=(0,n.A)(e,t);(0,c.useEffect)(()=>{a.startsWith("jp-search-ai-")&&(m({rank:"",comment:""}),j(!1),b(!1))},[a]);const[k,m]=(0,c.useState)({rank:"",comment:""}),[w,j]=(0,c.useState)(!1),x=o.includes(a),g=e=>{m({...k,rank:e}),j(!0)},f=!p&&!x;return(0,l.jsxs)("div",{className:"jetpack-ai-chat-feedback-container",children:[p&&(0,l.jsx)(i.A,{error:p}),x&&(0,l.jsx)("div",{className:"jetpack-ai-chat-feedback-submitted",children:__("Thanks for your feedback!","jetpack")}),f&&(0,l.jsxs)("div",{className:"jetpack-ai-chat-answer-feedback",children:[(0,l.jsx)("hr",{}),(0,l.jsxs)("div",{className:"jetpack-ai-chat-answer-feedback-buttons",children:[__("Was this helpful?","jetpack"),(0,l.jsx)("a",{role:"button",className:"thumbs-up",disabled:h||"thumbs-up"===k.rank,label:__("Thumbs up","jetpack"),onClick:()=>g("thumbs-up"),children:(0,l.jsx)(s.Icon,{icon:r.tw})}),(0,l.jsx)("a",{role:"button",className:"thumbs-down",disabled:h||"thumbs-down"===k.rank,label:__("Thumbs down","jetpack"),onClick:()=>g("thumbs-down"),children:(0,l.jsx)(s.Icon,{icon:r.Su})})]}),w&&(0,l.jsxs)("div",{className:"jetpack-ai-chat-feedback-form",children:[(0,l.jsx)(s.TextControl,{className:"jetpack-ai-chat-feedback-input",placeholder:"thumbs-up"===k.rank?__("What did you like about it?","jetpack"):__("What didn't you like about it? How could it be improved?","jetpack"),size:50,value:k.comment,disabled:h||x,onChange:e=>m({...k,comment:e}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(s.Button,{className:"wp-block-button__link jetpack-ai-chat-feedback-submit",onClick:()=>{u(k,a),d(a),u(k,a)},disabled:h||x,children:__("Submit","jetpack")})]})]})]})}},50443(e,t,a){"use strict";a.d(t,{G:()=>o,W:()=>c});var s=a(27723);const __=s.__,c=__("Ask","jetpack"),o=__("Ask a question about this site","jetpack")},55163(e,t,a){"use strict";a.d(t,{Su:()=>r,tw:()=>o,ui:()=>n});var s=a(56427),c=a(10790);const o=(0,c.jsx)(s.SVG,{viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(s.Path,{d:"M466.27 286.69C475.04 271.84 480 256 480 236.85c0-44.015-37.218-85.58-85.82-85.58H357.7c4.92-12.81 8.85-28.13 8.85-46.54C366.55 31.936 328.86 0 271.28 0c-61.607 0-58.093 94.933-71.76 108.6-22.747 22.747-49.615 66.447-68.76 83.4H32c-17.673 0-32 14.327-32 32v240c0 17.673 14.327 32 32 32h64c14.893 0 27.408-10.174 30.978-23.95 44.509 1.001 75.06 39.94 177.802 39.94 7.22 0 15.22.01 22.22.01 77.117 0 111.986-39.423 112.94-95.33 13.319-18.425 20.299-43.122 17.34-66.99 9.854-18.452 13.664-40.343 8.99-62.99zm-61.75 53.83c12.56 21.13 1.26 49.41-13.94 57.57 7.7 48.78-17.608 65.9-53.12 65.9h-37.82c-71.639 0-118.029-37.82-171.64-37.82V240h10.92c28.36 0 67.98-70.89 94.54-97.46 28.36-28.36 18.91-75.63 37.82-94.54 47.27 0 47.27 32.98 47.27 56.73 0 39.17-28.36 56.72-28.36 94.54h103.99c21.11 0 37.73 18.91 37.82 37.82.09 18.9-12.82 37.81-22.27 37.81 13.489 14.555 16.371 45.236-5.21 65.62zM88 432c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z"})}),r=(0,c.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,c.jsx)(s.Path,{d:"M466.27 225.31c4.674-22.647.864-44.538-8.99-62.99 2.958-23.868-4.021-48.565-17.34-66.99C438.986 39.423 404.117 0 327 0c-7 0-15 .01-22.22.01C201.195.01 168.997 40 128 40h-10.845c-5.64-4.975-13.042-8-21.155-8H32C14.327 32 0 46.327 0 64v240c0 17.673 14.327 32 32 32h64c11.842 0 22.175-6.438 27.708-16h7.052c19.146 16.953 46.013 60.653 68.76 83.4 13.667 13.667 10.153 108.6 71.76 108.6 57.58 0 95.27-31.936 95.27-104.73 0-18.41-3.93-33.73-8.85-46.54h36.48c48.602 0 85.82-41.565 85.82-85.58 0-19.15-4.96-34.99-13.73-49.84zM64 296c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 2Line truncated
@@ -0,0 +1 @@
.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form{display:flex;flex-direction:row;flex-wrap:nowrap;margin-top:1rem}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form .jetpack-ai-chat-feedback-input{flex:auto;flex-grow:4}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form .jetpack-ai-chat-feedback-input input{font-size:16px;line-height:1.3;padding:15px 23px;width:100%}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form .jetpack-ai-chat-feedback-submit{flex:auto;flex-grow:1;height:53px;margin-right:10px;text-wrap:nowrap}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-answer-feedback-buttons a{border:none;border-radius:2px;cursor:pointer;margin-right:.5rem;padding:.5rem;transition:.3s}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-answer-feedback-buttons a svg{fill:var(--wp--preset--color--contrast);vertical-align:middle;width:20px}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-answer-feedback-buttons a:disabled{cursor:not-allowed;opacity:.5}.jetpack-ai-chat-copy-button-container{margin:1rem 0}.jetpack-ai-chat-copy-button-container button{background:none;border:none;color:var(--wp--preset--color--secondary);cursor:pointer;display:block;font-size:16px;padding:inherit;position:relative;transition:.3s}.jetpack-ai-chat-copy-button-container button:disabled{cursor:not-allowed;opacity:.5}.jetpack-ai-chat-copy-button-container button .copy-icon{margin-left:.5rem;vertical-align:middle}.jetpack-ai-chat-error-container{color:#dc3232;font-size:1rem;margin:1rem 0}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper{display:flex;flex-direction:row;flex-wrap:nowrap;margin-top:1rem}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-input{flex:auto;flex-grow:4}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-input input{font-size:16px;line-height:1.3;padding:15px 23px;width:100%}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-input .components-base-control__field{margin-bottom:0}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-button{display:block;flex:auto;flex-grow:1;height:53px;margin-right:10px;text-wrap:nowrap;white-space:-moz-pre-space}.wp-block-jetpack-ai-chat .jetpack-ai-chat-answer-references{font-size:1rem;margin-top:12px}.wp-block-jetpack-ai-chat .jetpack-ai-chat-answer-references hr{margin:1rem 0}