dev-process-kit 0.0.6 → 0.0.8
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/chunks/{shared-BF8AzhLw.js → shared-1AA-0t4O.js} +1 -1
- package/dist/chunks/shared-BAePwoKi.js +679 -0
- package/dist/chunks/{shared-DI7xrx1a.js → shared-BTlCV660.js} +4 -12
- package/dist/chunks/shared-BYZoeQ97.js +1963 -0
- package/dist/chunks/{shared-B_b3KXSe.js → shared-CSV1HkB2.js} +1 -1
- package/dist/chunks/{shared-nn8xc7-Q.js → shared-CaLe76va.js} +1 -1
- package/dist/chunks/{shared-Pli_DImS.js → shared-Csmm_KdH.js} +1 -1
- package/dist/chunks/{shared-DL7Zn-cH.js → shared-CupreHTH.js} +1 -1
- package/dist/chunks/{shared-CbTVavOV.js → shared-CwwZhA40.js} +216 -203
- package/dist/chunks/{shared-D9zBdXMP.js → shared-DEdm-PCj.js} +1 -1
- package/dist/chunks/{shared-DSF_A3cy.js → shared-DNk3phV5.js} +1 -1
- package/dist/chunks/{shared-vUXShHFm.js → shared-Dn4XK7mS.js} +27 -28
- package/dist/chunks/{shared-Blnsyn6U.js → shared-VNSWugEg.js} +1 -1
- package/dist/components.js +1 -1
- package/dist/index.js +1 -1
- package/dist/templates/delegation-poker.js +1 -1
- package/dist/templates/event-storming.js +1 -1
- package/dist/templates/example-mapping.js +1 -1
- package/dist/templates/grill.js +1 -1
- package/dist/templates/plain.js +1 -1
- package/dist/templates/prototype.js +1 -1
- package/dist/templates/slides.js +1 -1
- package/dist/templates/task-board.js +1 -1
- package/dist/templates/usm.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/shared-BN5XrMLt.js +0 -1874
- package/dist/chunks/shared-BZ71JLz_.js +0 -609
|
@@ -1,1874 +0,0 @@
|
|
|
1
|
-
const le=globalThis,Ae=le.ShadowRoot&&(le.ShadyCSS===void 0||le.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ce=Symbol(),lt=new WeakMap;let ct=class{constructor(e,n,s){if(this._$cssResult$=!0,s!==Ce)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(Ae&&e===void 0){const s=n!==void 0&&n.length===1;s&&(e=lt.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&<.set(n,e))}return e}toString(){return this.cssText}};const pt=t=>new ct(typeof t=="string"?t:t+"",void 0,Ce),R=(t,...e)=>{const n=t.length===1?t[0]:e.reduce((s,r,i)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[i+1],t[0]);return new ct(n,t,Ce)},Xn=(t,e)=>{if(Ae)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const s=document.createElement("style"),r=le.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=n.cssText,t.appendChild(s)}},ht=Ae?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const s of e.cssRules)n+=s.cssText;return pt(n)})(t):t,{is:es,defineProperty:ts,getOwnPropertyDescriptor:ns,getOwnPropertyNames:ss,getOwnPropertySymbols:rs,getPrototypeOf:is}=Object,ce=globalThis,ut=ce.trustedTypes,os=ut?ut.emptyScript:"",as=ce.reactiveElementPolyfillSupport,Q=(t,e)=>t,Se={toAttribute(t,e){switch(e){case Boolean:t=t?os:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},ft=(t,e)=>!es(t,e),gt={attribute:!0,type:String,converter:Se,reflect:!1,useDefault:!1,hasChanged:ft};Symbol.metadata??=Symbol("metadata"),ce.litPropertyMetadata??=new WeakMap;let B=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=gt){if(n.state&&(n.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((n=Object.create(n)).wrapped=!0),this.elementProperties.set(e,n),!n.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(e,s,n);r!==void 0&&ts(this.prototype,e,r)}}static getPropertyDescriptor(e,n,s){const{get:r,set:i}=ns(this.prototype,e)??{get(){return this[n]},set(o){this[n]=o}};return{get:r,set(o){const l=r?.call(this);i?.call(this,o),this.requestUpdate(e,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??gt}static _$Ei(){if(this.hasOwnProperty(Q("elementProperties")))return;const e=is(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Q("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Q("properties"))){const n=this.properties,s=[...ss(n),...rs(n)];for(const r of s)this.createProperty(r,n[r])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[s,r]of n)this.elementProperties.set(s,r)}this._$Eh=new Map;for(const[n,s]of this.elementProperties){const r=this._$Eu(n,s);r!==void 0&&this._$Eh.set(r,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const r of s)n.unshift(ht(r))}else e!==void 0&&n.push(ht(e));return n}static _$Eu(e,n){const s=n.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,n=this.constructor.elementProperties;for(const s of n.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Xn(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,n,s){this._$AK(e,s)}_$ET(e,n){const s=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,s);if(r!==void 0&&s.reflect===!0){const i=(s.converter?.toAttribute!==void 0?s.converter:Se).toAttribute(n,s.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,n){const s=this.constructor,r=s._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const i=s.getPropertyOptions(r),o=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Se;this._$Em=r;const l=o.fromAttribute(n,i.type);this[r]=l??this._$Ej?.get(r)??l,this._$Em=null}}requestUpdate(e,n,s,r=!1,i){if(e!==void 0){const o=this.constructor;if(r===!1&&(i=this[e]),s??=o.getPropertyOptions(e),!((s.hasChanged??ft)(i,n)||s.useDefault&&s.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,s))))return;this.C(e,n,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,n,{useDefault:s,reflect:r,wrapped:i},o){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??n??this[e]),i!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(n=void 0),this._$AL.set(e,n)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[r,i]of s){const{wrapped:o}=i,l=this[r];o!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,i,l)}}let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(n)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(n)}willUpdate(e){}_$AE(e){this._$EO?.forEach(n=>n.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(n=>this._$ET(n,this[n])),this._$EM()}updated(e){}firstUpdated(e){}};B.elementStyles=[],B.shadowRootOptions={mode:"open"},B[Q("elementProperties")]=new Map,B[Q("finalized")]=new Map,as?.({ReactiveElement:B}),(ce.reactiveElementVersions??=[]).push("2.1.2");const _e=globalThis,mt=t=>t,pe=_e.trustedTypes,vt=pe?pe.createPolicy("lit-html",{createHTML:t=>t}):void 0,bt="$lit$",M=`lit$${Math.random().toFixed(9).slice(2)}$`,kt="?"+M,ds=`<${kt}>`,L=document,X=()=>L.createComment(""),ee=t=>t===null||typeof t!="object"&&typeof t!="function",Ee=Array.isArray,ls=t=>Ee(t)||typeof t?.[Symbol.iterator]=="function",Te=`[
|
|
2
|
-
\f\r]`,te=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yt=/-->/g,xt=/>/g,N=RegExp(`>|${Te}(?:([^\\s"'>=/]+)(${Te}*=${Te}*(?:[^
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),wt=/'/g,$t=/"/g,At=/^(?:script|style|textarea|title)$/i,Ct=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),f=Ct(1),cs=Ct(2),P=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),St=new WeakMap,D=L.createTreeWalker(L,129);function _t(t,e){if(!Ee(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return vt!==void 0?vt.createHTML(e):e}const ps=(t,e)=>{const n=t.length-1,s=[];let r,i=e===2?"<svg>":e===3?"<math>":"",o=te;for(let l=0;l<n;l++){const a=t[l];let d,p,c=-1,h=0;for(;h<a.length&&(o.lastIndex=h,p=o.exec(a),p!==null);)h=o.lastIndex,o===te?p[1]==="!--"?o=yt:p[1]!==void 0?o=xt:p[2]!==void 0?(At.test(p[2])&&(r=RegExp("</"+p[2],"g")),o=N):p[3]!==void 0&&(o=N):o===N?p[0]===">"?(o=r??te,c=-1):p[1]===void 0?c=-2:(c=o.lastIndex-p[2].length,d=p[1],o=p[3]===void 0?N:p[3]==='"'?$t:wt):o===$t||o===wt?o=N:o===yt||o===xt?o=te:(o=N,r=void 0);const u=o===N&&t[l+1].startsWith("/>")?" ":"";i+=o===te?a+ds:c>=0?(s.push(d),a.slice(0,c)+bt+a.slice(c)+M+u):a+M+(c===-2?l:u)}return[_t(t,i+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};class de{constructor({strings:e,_$litType$:n},s){let r;this.parts=[];let i=0,o=0;const l=e.length-1,a=this.parts,[d,p]=ps(e,n);if(this.el=de.createElement(d,s),D.currentNode=this.el.content,n===2||n===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(r=D.nextNode())!==null&&a.length<l;){if(r.nodeType===1){if(r.hasAttributes())for(const c of r.getAttributeNames())if(c.endsWith(bt)){const h=p[o++],u=r.getAttribute(c).split(M),v=/([.?@])?(.*)/.exec(h);a.push({type:1,index:i,name:v[2],strings:u,ctor:v[1]==="."?us:v[1]==="?"?fs:v[1]==="@"?gs:he}),r.removeAttribute(c)}else c.startsWith(M)&&(a.push({type:6,index:i}),r.removeAttribute(c));if(At.test(r.tagName)){const c=r.textContent.split(M),h=c.length-1;if(h>0){r.textContent=pe?pe.emptyScript:"";for(let u=0;u<h;u++)r.append(c[u],X()),D.nextNode(),a.push({type:2,index:++i});r.append(c[h],X())}}}else if(r.nodeType===8)if(r.data===kt)a.push({type:2,index:i});else{let c=-1;for(;(c=r.data.indexOf(M,c+1))!==-1;)a.push({type:7,index:i}),c+=M.length-1}i++}}static createElement(e,n){const s=L.createElement("template");return s.innerHTML=e,s}}function H(t,e,n=t,s){if(e===P)return e;let r=s!==void 0?n._$Co?.[s]:n._$Cl;const i=ee(e)?void 0:e._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(t),r._$AT(t,n,s)),s!==void 0?(n._$Co??=[])[s]=r:n._$Cl=r),r!==void 0&&(e=H(t,r._$AS(t,e.values),r,s)),e}class hs{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:n},parts:s}=this._$AD,r=(e?.creationScope??L).importNode(n,!0);D.currentNode=r;let i=D.nextNode(),o=0,l=0,a=s[0];for(;a!==void 0;){if(o===a.index){let d;a.type===2?d=new Z(i,i.nextSibling,this,e):a.type===1?d=new a.ctor(i,a.name,a.strings,this,e):a.type===6&&(d=new ms(i,this,e)),this._$AV.push(d),a=s[++l]}o!==a?.index&&(i=D.nextNode(),o++)}return D.currentNode=L,r}p(e){let n=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,n),n+=s.strings.length-2):s._$AI(e[n])),n++}}class Z{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,n,s,r){this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&e?.nodeType===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=H(this,e,n),ee(e)?e===m||e==null||e===""?(this._$AH!==m&&this._$AR(),this._$AH=m):e!==this._$AH&&e!==P&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):ls(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==m&&ee(this._$AH)?this._$AA.nextSibling.data=e:this.T(L.createTextNode(e)),this._$AH=e}$(e){const{values:n,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=de.createElement(_t(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(n);else{const i=new hs(r,this),o=i.u(this.options);i.p(n),this.T(o),this._$AH=i}}_$AC(e){let n=St.get(e.strings);return n===void 0&&St.set(e.strings,n=new de(e)),n}k(e){Ee(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let s,r=0;for(const i of e)r===n.length?n.push(s=new Z(this.O(X()),this.O(X()),this,this.options)):s=n[r],s._$AI(i),r++;r<n.length&&(this._$AR(s&&s._$AB.nextSibling,r),n.length=r)}_$AR(e=this._$AA.nextSibling,n){for(this._$AP?.(!1,!0,n);e!==this._$AB;){const s=mt(e).nextSibling;mt(e).remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class he{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,s,r,i){this.type=1,this._$AH=m,this._$AN=void 0,this.element=e,this.name=n,this._$AM=r,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=m}_$AI(e,n=this,s,r){const i=this.strings;let o=!1;if(i===void 0)e=H(this,e,n,0),o=!ee(e)||e!==this._$AH&&e!==P,o&&(this._$AH=e);else{const l=e;let a,d;for(e=i[0],a=0;a<i.length-1;a++)d=H(this,l[s+a],n,a),d===P&&(d=this._$AH[a]),o||=!ee(d)||d!==this._$AH[a],d===m?e=m:e!==m&&(e+=(d??"")+i[a+1]),this._$AH[a]=d}o&&!r&&this.j(e)}j(e){e===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class us extends he{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===m?void 0:e}}class fs extends he{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==m)}}class gs extends he{constructor(e,n,s,r,i){super(e,n,s,r,i),this.type=5}_$AI(e,n=this){if((e=H(this,e,n,0)??m)===P)return;const s=this._$AH,r=e===m&&s!==m||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,i=e!==m&&(s===m||r);r&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class ms{constructor(e,n,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){H(this,e)}}const vs={I:Z},bs=_e.litHtmlPolyfillSupport;bs?.(de,Z),(_e.litHtmlVersions??=[]).push("3.3.3");const ks=(t,e,n)=>{const s=n?.renderBefore??e;let r=s._$litPart$;if(r===void 0){const i=n?.renderBefore??null;s._$litPart$=r=new Z(e.insertBefore(X(),i),i,void 0,n??{})}return r._$AI(t),r},Me=globalThis;let O=class extends B{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ks(n,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return P}};O._$litElement$=!0,O.finalized=!0,Me.litElementHydrateSupport?.({LitElement:O});const ys=Me.litElementPolyfillSupport;ys?.({LitElement:O}),(Me.litElementVersions??=[]).push("4.2.2");const Oe=t=>{let e=t;for(;e!==null;){if(e instanceof Element){const n=e.getAttribute("lang");if(n!==null)return n}e=e instanceof ShadowRoot?e.host:e.parentNode}return null},je=["en","ja"],Et="en",Tt=t=>je.some(e=>e===t),Re=t=>{const e=(t??"").split("-")[0]?.toLowerCase()??"";return Tt(e)?e:Et},Mt=t=>Re(Oe(t)),Le="dpk-locale-change",Ot=t=>typeof t=="string"&&Tt(t)?t:null,xs=t=>t.preference??t.authored,ws=(t,e)=>t===e?null:t,ue=t=>e=>e==="ja"?t.ja:t.en;class Ne{#e;#r;#s=Et;constructor(e,n=()=>{}){this.#e=e,this.#r=n,e.addController(this)}get locale(){return this.#s}hostConnected(){this.#s=Mt(this.#e),document.addEventListener(Le,this.#t)}hostDisconnected(){document.removeEventListener(Le,this.#t)}#t=()=>{const e=Mt(this.#e);e!==this.#s&&(this.#s=e,this.#r(),this.#e.requestUpdate())}}const $s={paper:["#f6f7f9","#0e1014"],"paper-raised":["#ffffff","#171a20"],"paper-sunken":["#eff1f4","#0a0b0e"],"paper-inset":["#e7eaef","#22262e"],ink:["#11141b","#eceef3"],"ink-soft":["#464e5f","#a9b0bd"],"ink-faint":["#788195","#737b8b"],rule:["rgba(17, 24, 39, 0.08)","rgba(226, 232, 244, 0.08)"],"rule-strong":["rgba(17, 24, 39, 0.13)","rgba(226, 232, 244, 0.14)"],"rule-hover":["rgba(17, 24, 39, 0.24)","rgba(226, 232, 244, 0.26)"],accent:["#e04e1f","#f26a3d"],"accent-strong":["#c63f12","#dc5226"],"accent-bright":["#f0652f","#ff8a5e"],"accent-soft":["rgba(224, 78, 31, 0.08)","rgba(242, 106, 61, 0.14)"],"accent-ink":["#ffffff","#ffffff"],blue:["#3563d9","#7aa2f7"],"blue-strong":["#2a4fb3","#5b86e8"],"blue-soft":["rgba(53, 99, 217, 0.09)","rgba(122, 162, 247, 0.15)"],green:["#15894a","#4cc787"],"green-soft":["rgba(21, 137, 74, 0.09)","rgba(76, 199, 135, 0.14)"],amber:["#b27406","#e9ae45"],"amber-soft":["rgba(178, 116, 6, 0.1)","rgba(233, 174, 69, 0.15)"],violet:["#7549d6","#ab90f5"],"violet-soft":["rgba(117, 73, 214, 0.09)","rgba(171, 144, 245, 0.15)"],danger:["#c11d38","#f5707f"],"danger-soft":["rgba(214, 53, 80, 0.09)","rgba(245, 112, 127, 0.14)"],shade:["rgb(17, 24, 39)","rgb(0, 0, 0)"],"shade-1":["rgba(17, 24, 39, 0.06)","rgba(0, 0, 0, 0.32)"],"shade-2":["rgba(17, 24, 39, 0.08)","rgba(0, 0, 0, 0.38)"],"shade-3":["rgba(17, 24, 39, 0.13)","rgba(0, 0, 0, 0.5)"],highlight:["rgba(255, 255, 255, 0.9)","rgba(255, 255, 255, 0.05)"]},jt=t=>pt(Object.entries($s).map(([e,[n,s]])=>`--dpk-${e}: ${t(n,s)};`).join(`
|
|
4
|
-
`)),fe=R`
|
|
5
|
-
:host {
|
|
6
|
-
/* Browsers without light-dark() stay light. */
|
|
7
|
-
${jt(t=>t)}
|
|
8
|
-
--dpk-display: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
9
|
-
--dpk-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
10
|
-
--dpk-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
|
|
11
|
-
|
|
12
|
-
/* Shape + elevation scale, so every surface reads as one system. */
|
|
13
|
-
--dpk-radius-xs: 6px;
|
|
14
|
-
--dpk-radius-sm: 8px;
|
|
15
|
-
--dpk-radius: 10px;
|
|
16
|
-
--dpk-radius-lg: 14px;
|
|
17
|
-
--dpk-radius-xl: 20px;
|
|
18
|
-
--dpk-bevel: inset 0 1px 0 var(--dpk-highlight);
|
|
19
|
-
--dpk-shadow-xs: 0 1px 2px var(--dpk-shade-1);
|
|
20
|
-
--dpk-shadow-sm: 0 1px 2px var(--dpk-shade-1), 0 3px 8px -2px var(--dpk-shade-2);
|
|
21
|
-
--dpk-shadow:
|
|
22
|
-
0 1px 2px var(--dpk-shade-1), 0 6px 16px -4px var(--dpk-shade-2), 0 14px 32px -12px var(--dpk-shade-3);
|
|
23
|
-
--dpk-shadow-lg:
|
|
24
|
-
0 2px 4px var(--dpk-shade-1), 0 12px 28px -6px var(--dpk-shade-2), 0 32px 64px -20px var(--dpk-shade-3);
|
|
25
|
-
--dpk-focus: 0 0 0 1px var(--dpk-paper-raised), 0 0 0 3.5px color-mix(in srgb, var(--dpk-blue) 45%, transparent);
|
|
26
|
-
--dpk-control-h: 32px;
|
|
27
|
-
--dpk-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
|
|
28
|
-
--dpk-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
29
|
-
/* Frosted chrome: headers and toolbars that float over scrolling content. */
|
|
30
|
-
--dpk-glass: color-mix(in srgb, var(--dpk-paper-raised) 78%, transparent);
|
|
31
|
-
/* Working surface behind boards and canvases: a quiet dot lattice. */
|
|
32
|
-
--dpk-dots: radial-gradient(circle at 1px 1px, var(--dpk-rule-strong) 1px, transparent 0) 0 0 / 20px 20px;
|
|
33
|
-
|
|
34
|
-
color: var(--dpk-ink);
|
|
35
|
-
font-family: var(--dpk-body);
|
|
36
|
-
font-size: 14px;
|
|
37
|
-
line-height: 1.5;
|
|
38
|
-
-webkit-font-smoothing: antialiased;
|
|
39
|
-
text-rendering: optimizeLegibility;
|
|
40
|
-
display: block;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@supports (color: light-dark(#000, #fff)) {
|
|
44
|
-
:host {
|
|
45
|
-
${jt((t,e)=>`light-dark(${t}, ${e})`)}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
*,
|
|
50
|
-
*::before,
|
|
51
|
-
*::after {
|
|
52
|
-
box-sizing: border-box;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
h1,
|
|
56
|
-
h2,
|
|
57
|
-
h3,
|
|
58
|
-
h4 {
|
|
59
|
-
font-family: var(--dpk-display);
|
|
60
|
-
font-weight: 660;
|
|
61
|
-
margin: 0;
|
|
62
|
-
line-height: 1.2;
|
|
63
|
-
letter-spacing: -0.015em;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
button {
|
|
67
|
-
font: inherit;
|
|
68
|
-
color: inherit;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
::selection {
|
|
72
|
-
background: color-mix(in srgb, var(--dpk-blue) 22%, transparent);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.dpk-mono,
|
|
76
|
-
.dpk-num {
|
|
77
|
-
font-variant-numeric: tabular-nums;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.dpk-label {
|
|
81
|
-
font-family: var(--dpk-mono);
|
|
82
|
-
font-size: 10px;
|
|
83
|
-
font-weight: 550;
|
|
84
|
-
letter-spacing: 0.1em;
|
|
85
|
-
text-transform: uppercase;
|
|
86
|
-
color: var(--dpk-ink-faint);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@media (prefers-reduced-motion: reduce) {
|
|
90
|
-
*,
|
|
91
|
-
*::before,
|
|
92
|
-
*::after {
|
|
93
|
-
animation-duration: 1ms !important;
|
|
94
|
-
animation-iteration-count: 1 !important;
|
|
95
|
-
transition-duration: 1ms !important;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
`,ge=R`
|
|
99
|
-
.dpk-btn {
|
|
100
|
-
display: inline-flex;
|
|
101
|
-
align-items: center;
|
|
102
|
-
justify-content: center;
|
|
103
|
-
gap: 6px;
|
|
104
|
-
min-height: 30px;
|
|
105
|
-
padding: 0 12px;
|
|
106
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
107
|
-
border-radius: var(--dpk-radius-sm);
|
|
108
|
-
background: var(--dpk-paper-raised);
|
|
109
|
-
color: var(--dpk-ink);
|
|
110
|
-
font-size: 12.5px;
|
|
111
|
-
font-weight: 550;
|
|
112
|
-
line-height: 1;
|
|
113
|
-
white-space: nowrap;
|
|
114
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
115
|
-
cursor: pointer;
|
|
116
|
-
transition:
|
|
117
|
-
background 160ms var(--dpk-ease),
|
|
118
|
-
border-color 160ms var(--dpk-ease),
|
|
119
|
-
box-shadow 160ms var(--dpk-ease),
|
|
120
|
-
color 160ms var(--dpk-ease),
|
|
121
|
-
transform 120ms var(--dpk-ease);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.dpk-btn:hover:not([disabled]) {
|
|
125
|
-
border-color: var(--dpk-rule-hover);
|
|
126
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-sm);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.dpk-btn:active:not([disabled]) {
|
|
130
|
-
transform: translateY(1px) scale(0.985);
|
|
131
|
-
box-shadow: none;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.dpk-btn:focus-visible {
|
|
135
|
-
outline: none;
|
|
136
|
-
box-shadow: var(--dpk-focus);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.dpk-btn[disabled] {
|
|
140
|
-
opacity: 0.45;
|
|
141
|
-
box-shadow: none;
|
|
142
|
-
cursor: not-allowed;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.dpk-btn--accent {
|
|
146
|
-
border-color: color-mix(in srgb, var(--dpk-accent-strong) 70%, transparent);
|
|
147
|
-
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent) 55%, var(--dpk-accent-strong));
|
|
148
|
-
color: var(--dpk-accent-ink);
|
|
149
|
-
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
|
|
150
|
-
box-shadow:
|
|
151
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.22),
|
|
152
|
-
0 1px 2px color-mix(in srgb, var(--dpk-accent) 30%, transparent),
|
|
153
|
-
0 4px 12px -4px color-mix(in srgb, var(--dpk-accent) 55%, transparent);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.dpk-btn--accent:hover:not([disabled]) {
|
|
157
|
-
border-color: color-mix(in srgb, var(--dpk-accent-strong) 70%, transparent);
|
|
158
|
-
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent-bright) 40%, var(--dpk-accent));
|
|
159
|
-
box-shadow:
|
|
160
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.25),
|
|
161
|
-
0 2px 4px color-mix(in srgb, var(--dpk-accent) 30%, transparent),
|
|
162
|
-
0 8px 20px -6px color-mix(in srgb, var(--dpk-accent) 65%, transparent);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/* Selection state, shared by every template's filter/nav controls. */
|
|
166
|
-
.dpk-btn--selected {
|
|
167
|
-
border-color: color-mix(in srgb, var(--dpk-blue-strong) 70%, transparent);
|
|
168
|
-
background: linear-gradient(180deg, var(--dpk-blue), var(--dpk-blue-strong));
|
|
169
|
-
color: #fff;
|
|
170
|
-
box-shadow:
|
|
171
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.2),
|
|
172
|
-
0 2px 8px -2px color-mix(in srgb, var(--dpk-blue) 60%, transparent);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.dpk-btn--selected:hover:not([disabled]) {
|
|
176
|
-
border-color: color-mix(in srgb, var(--dpk-blue-strong) 70%, transparent);
|
|
177
|
-
background: linear-gradient(180deg, var(--dpk-blue), var(--dpk-blue));
|
|
178
|
-
box-shadow:
|
|
179
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.22),
|
|
180
|
-
0 4px 12px -3px color-mix(in srgb, var(--dpk-blue) 65%, transparent);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.dpk-btn--ghost {
|
|
184
|
-
border-color: transparent;
|
|
185
|
-
background: transparent;
|
|
186
|
-
box-shadow: none;
|
|
187
|
-
color: var(--dpk-ink-soft);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.dpk-btn--ghost:hover:not([disabled]) {
|
|
191
|
-
background: var(--dpk-paper-inset);
|
|
192
|
-
border-color: transparent;
|
|
193
|
-
box-shadow: none;
|
|
194
|
-
color: var(--dpk-ink);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.dpk-icon-btn {
|
|
198
|
-
position: relative;
|
|
199
|
-
display: inline-flex;
|
|
200
|
-
align-items: center;
|
|
201
|
-
justify-content: center;
|
|
202
|
-
width: 26px;
|
|
203
|
-
height: 26px;
|
|
204
|
-
padding: 0;
|
|
205
|
-
border: 1px solid transparent;
|
|
206
|
-
border-radius: var(--dpk-radius-xs);
|
|
207
|
-
background: transparent;
|
|
208
|
-
color: var(--dpk-ink-faint);
|
|
209
|
-
font-size: 11px;
|
|
210
|
-
line-height: 1;
|
|
211
|
-
cursor: pointer;
|
|
212
|
-
transition:
|
|
213
|
-
background 160ms var(--dpk-ease),
|
|
214
|
-
color 160ms var(--dpk-ease),
|
|
215
|
-
transform 160ms var(--dpk-ease-spring);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.dpk-icon-btn:hover:not([disabled]) {
|
|
219
|
-
background: var(--dpk-paper-inset);
|
|
220
|
-
color: var(--dpk-ink);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.dpk-icon-btn:active:not([disabled]) {
|
|
224
|
-
transform: scale(0.92);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.dpk-icon-btn:focus-visible {
|
|
228
|
-
outline: none;
|
|
229
|
-
box-shadow: var(--dpk-focus);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.dpk-icon-btn[disabled] {
|
|
233
|
-
opacity: 0.35;
|
|
234
|
-
cursor: default;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.dpk-icon-btn[data-active='true'] {
|
|
238
|
-
background: var(--dpk-blue-soft);
|
|
239
|
-
color: var(--dpk-blue);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.dpk-icon-btn svg {
|
|
243
|
-
display: block;
|
|
244
|
-
width: 15px;
|
|
245
|
-
height: 15px;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/* Count badge for an icon-only control (comments on a card, drafts on the rail). */
|
|
249
|
-
.dpk-icon-badge {
|
|
250
|
-
position: absolute;
|
|
251
|
-
top: -5px;
|
|
252
|
-
right: -5px;
|
|
253
|
-
min-width: 16px;
|
|
254
|
-
height: 16px;
|
|
255
|
-
padding: 0 4px;
|
|
256
|
-
border: 1.5px solid var(--dpk-paper-raised);
|
|
257
|
-
border-radius: 999px;
|
|
258
|
-
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
259
|
-
color: var(--dpk-accent-ink);
|
|
260
|
-
font-family: var(--dpk-mono);
|
|
261
|
-
font-size: 9px;
|
|
262
|
-
font-weight: 650;
|
|
263
|
-
font-variant-numeric: tabular-nums;
|
|
264
|
-
line-height: 13px;
|
|
265
|
-
text-align: center;
|
|
266
|
-
box-shadow: 0 2px 6px -1px color-mix(in srgb, var(--dpk-accent) 55%, transparent);
|
|
267
|
-
animation: dpk-pop 260ms var(--dpk-ease-spring);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
@keyframes dpk-pop {
|
|
271
|
-
from {
|
|
272
|
-
transform: scale(0.4);
|
|
273
|
-
opacity: 0;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.dpk-input,
|
|
278
|
-
.dpk-textarea,
|
|
279
|
-
.dpk-select {
|
|
280
|
-
box-sizing: border-box;
|
|
281
|
-
width: 100%;
|
|
282
|
-
min-height: var(--dpk-control-h);
|
|
283
|
-
padding: 6px 10px;
|
|
284
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
285
|
-
border-radius: var(--dpk-radius-sm);
|
|
286
|
-
background: var(--dpk-paper-raised);
|
|
287
|
-
color: var(--dpk-ink);
|
|
288
|
-
font: inherit;
|
|
289
|
-
font-size: 12.5px;
|
|
290
|
-
box-shadow: inset 0 1px 2px var(--dpk-shade-1);
|
|
291
|
-
transition:
|
|
292
|
-
border-color 160ms var(--dpk-ease),
|
|
293
|
-
box-shadow 160ms var(--dpk-ease),
|
|
294
|
-
background 160ms var(--dpk-ease);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.dpk-input::placeholder,
|
|
298
|
-
.dpk-textarea::placeholder {
|
|
299
|
-
color: var(--dpk-ink-faint);
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
.dpk-input:hover,
|
|
303
|
-
.dpk-textarea:hover,
|
|
304
|
-
.dpk-select:hover {
|
|
305
|
-
border-color: var(--dpk-rule-hover);
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
.dpk-input:focus,
|
|
309
|
-
.dpk-textarea:focus,
|
|
310
|
-
.dpk-select:focus {
|
|
311
|
-
outline: none;
|
|
312
|
-
border-color: var(--dpk-blue);
|
|
313
|
-
box-shadow: var(--dpk-focus);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
.dpk-select {
|
|
317
|
-
appearance: none;
|
|
318
|
-
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23878e9e' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
|
|
319
|
-
background-repeat: no-repeat;
|
|
320
|
-
background-position: right 8px center;
|
|
321
|
-
padding-right: 28px;
|
|
322
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
323
|
-
cursor: pointer;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.dpk-textarea {
|
|
327
|
-
resize: vertical;
|
|
328
|
-
min-height: 64px;
|
|
329
|
-
line-height: 1.55;
|
|
330
|
-
}
|
|
331
|
-
`,As=R`
|
|
332
|
-
.comment-pop {
|
|
333
|
-
box-sizing: border-box;
|
|
334
|
-
overflow: auto;
|
|
335
|
-
position: fixed;
|
|
336
|
-
inset: auto;
|
|
337
|
-
margin: 0;
|
|
338
|
-
display: grid;
|
|
339
|
-
gap: 10px;
|
|
340
|
-
padding: 14px;
|
|
341
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
342
|
-
border-radius: var(--dpk-radius-lg);
|
|
343
|
-
background: var(--dpk-paper-raised);
|
|
344
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
345
|
-
color: var(--dpk-ink);
|
|
346
|
-
font-size: 12.5px;
|
|
347
|
-
animation: dpk-pop-in 180ms var(--dpk-ease);
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
@keyframes dpk-pop-in {
|
|
351
|
-
from {
|
|
352
|
-
opacity: 0;
|
|
353
|
-
transform: translateY(4px) scale(0.98);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.comment-pop .comment-list {
|
|
358
|
-
list-style: none;
|
|
359
|
-
margin: 0;
|
|
360
|
-
padding: 0;
|
|
361
|
-
display: grid;
|
|
362
|
-
gap: 6px;
|
|
363
|
-
max-height: 140px;
|
|
364
|
-
overflow: auto;
|
|
365
|
-
font-size: 12px;
|
|
366
|
-
color: var(--dpk-ink-soft);
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.comment-pop .comment-list li {
|
|
370
|
-
padding: 6px 10px;
|
|
371
|
-
border-radius: var(--dpk-radius-xs);
|
|
372
|
-
background: var(--dpk-accent-soft);
|
|
373
|
-
border-left: 2px solid var(--dpk-accent);
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
.comment-pop .dpk-textarea {
|
|
377
|
-
min-height: 54px;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.pop-actions {
|
|
381
|
-
display: flex;
|
|
382
|
-
gap: 4px;
|
|
383
|
-
align-items: center;
|
|
384
|
-
justify-content: flex-end;
|
|
385
|
-
}
|
|
386
|
-
`,F=(t,e)=>t instanceof e?t:null,Cs=ue({en:{clickToEdit:"Click to edit",unset:"Not set",edit:"Edit"},ja:{clickToEdit:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u7DE8\u96C6",unset:"\u672A\u8A2D\u5B9A",edit:"\u7DE8\u96C6"}});class Rt extends O{static{this.styles=[fe,ge,R`
|
|
387
|
-
:host {
|
|
388
|
-
display: inline;
|
|
389
|
-
/* Inherit the surrounding type scale instead of forcing the chrome size:
|
|
390
|
-
an inline edit inside a 17px heading must look like a 17px heading.
|
|
391
|
-
Color comes along too, so an edit on a colored card stays legible. */
|
|
392
|
-
font-family: inherit;
|
|
393
|
-
font-size: inherit;
|
|
394
|
-
font-weight: inherit;
|
|
395
|
-
line-height: inherit;
|
|
396
|
-
color: inherit;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
.view {
|
|
400
|
-
cursor: text;
|
|
401
|
-
border-bottom: 1px dashed transparent;
|
|
402
|
-
border-radius: var(--dpk-radius-xs);
|
|
403
|
-
padding: 1px 4px;
|
|
404
|
-
transition:
|
|
405
|
-
background 140ms var(--dpk-ease),
|
|
406
|
-
border-color 140ms var(--dpk-ease),
|
|
407
|
-
box-shadow 140ms var(--dpk-ease);
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
.view:hover {
|
|
411
|
-
border-bottom-color: var(--dpk-blue);
|
|
412
|
-
background: var(--dpk-blue-soft);
|
|
413
|
-
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dpk-blue) 22%, transparent);
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
.view[data-empty='true'] {
|
|
417
|
-
border-bottom-color: var(--dpk-rule-strong);
|
|
418
|
-
color: var(--dpk-ink-faint);
|
|
419
|
-
font-style: italic;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
.view[data-empty='true']:hover {
|
|
423
|
-
border-bottom-color: var(--dpk-blue);
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
input,
|
|
427
|
-
textarea {
|
|
428
|
-
font: inherit;
|
|
429
|
-
color: inherit;
|
|
430
|
-
background: var(--dpk-paper-raised);
|
|
431
|
-
border: 1px solid var(--dpk-blue);
|
|
432
|
-
border-radius: var(--dpk-radius-sm);
|
|
433
|
-
box-shadow: var(--dpk-focus);
|
|
434
|
-
padding: 3px 7px;
|
|
435
|
-
min-width: 0;
|
|
436
|
-
width: 100%;
|
|
437
|
-
transition: box-shadow 140ms var(--dpk-ease);
|
|
438
|
-
animation: dpk-inline-edit-in 140ms var(--dpk-ease) backwards;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
@keyframes dpk-inline-edit-in {
|
|
442
|
-
from {
|
|
443
|
-
opacity: 0;
|
|
444
|
-
transform: translateY(1px) scale(0.99);
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
textarea {
|
|
449
|
-
min-height: var(--dpk-inline-textarea-min-height, 90px);
|
|
450
|
-
resize: vertical;
|
|
451
|
-
font-family: var(--dpk-body);
|
|
452
|
-
line-height: 1.5;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
/* wrap: the field wraps like the text it replaces, and Enter still
|
|
456
|
-
commits, so a one-line value is edited without losing sight of it. */
|
|
457
|
-
:host([wrap]) textarea {
|
|
458
|
-
min-height: 0;
|
|
459
|
-
resize: none;
|
|
460
|
-
line-height: inherit;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
/* seamless: no field chrome at all — the text is edited where it sits.
|
|
464
|
-
The chrome theme paints fields with its own ink and size, so the
|
|
465
|
-
seamless field re-states the inherited type and color. */
|
|
466
|
-
:host([seamless]) input,
|
|
467
|
-
:host([seamless]) textarea {
|
|
468
|
-
padding: 0;
|
|
469
|
-
border: none;
|
|
470
|
-
border-radius: 0;
|
|
471
|
-
background: transparent;
|
|
472
|
-
box-shadow: none;
|
|
473
|
-
height: 100%;
|
|
474
|
-
min-height: 0;
|
|
475
|
-
overflow: auto;
|
|
476
|
-
resize: none;
|
|
477
|
-
font: inherit;
|
|
478
|
-
font-size: inherit;
|
|
479
|
-
line-height: inherit;
|
|
480
|
-
color: inherit;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
:host([seamless]) .view {
|
|
484
|
-
padding: 0;
|
|
485
|
-
}
|
|
486
|
-
`]}static{this.properties={value:{type:String},placeholder:{type:String},multiline:{type:Boolean},wrap:{type:Boolean,reflect:!0},seamless:{type:Boolean,reflect:!0},label:{type:String},editing:{state:!0}}}#e="";#r=0;#s=new Ne(this);connectedCallback(){super.connectedCallback(),this.#r+=1}constructor(){super(),this.value="",this.placeholder="",this.multiline=!1,this.wrap=!1,this.seamless=!1,this.label="",this.editing=!1,this.#e=""}startEditing(){this.#e=this.value,this.editing=!0}willUpdate(e){e.has("value")&&!this.editing&&(this.#e=this.value)}updated(){if(!this.editing)return;const e=this.renderRoot.querySelector("input, textarea"),n=this.renderRoot,s=n instanceof ShadowRoot?n.activeElement:document.activeElement;e&&s!==e&&(e.focus(),e.select())}render(){const e=Cs(this.#s.locale);if(!this.editing){const s=this.value.length===0;return f`<span
|
|
487
|
-
class="view"
|
|
488
|
-
data-empty=${String(s)}
|
|
489
|
-
role="button"
|
|
490
|
-
tabindex="0"
|
|
491
|
-
title=${e.clickToEdit}
|
|
492
|
-
@click=${this.#t}
|
|
493
|
-
@keydown=${this.#i}
|
|
494
|
-
>${s?this.placeholder||e.unset:this.value}</span
|
|
495
|
-
>`}const n=this.label||this.placeholder||e.edit;return f`
|
|
496
|
-
${this.multiline||this.wrap?f`<textarea
|
|
497
|
-
class="dpk-textarea"
|
|
498
|
-
.value=${this.#e}
|
|
499
|
-
aria-label=${n}
|
|
500
|
-
@input=${this.#n}
|
|
501
|
-
@keydown=${this.#o}
|
|
502
|
-
@blur=${this.#a}
|
|
503
|
-
></textarea>`:f`<input
|
|
504
|
-
class="dpk-input"
|
|
505
|
-
.value=${this.#e}
|
|
506
|
-
aria-label=${n}
|
|
507
|
-
@input=${this.#n}
|
|
508
|
-
@keydown=${this.#o}
|
|
509
|
-
@blur=${this.#a}
|
|
510
|
-
/>`}
|
|
511
|
-
`}#t=e=>{e.stopPropagation(),this.editing=!0};#i=e=>{e.isComposing||(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.editing=!0)};#n=e=>{const n=F(e.target,HTMLInputElement)??F(e.target,HTMLTextAreaElement);n!==null&&(this.#e=n.value)};#o=e=>{if(!e.isComposing){if(e.key==="Escape"){e.preventDefault(),this.#e=this.value,this.editing=!1;return}e.key==="Enter"&&(!this.multiline||this.wrap||e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.#d())}};#a=e=>{const n=e.currentTarget;if(!(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement))return;const s=this.#r,{selectionStart:r,selectionEnd:i}=n;queueMicrotask(()=>{!this.isConnected||!this.editing||(s!==this.#r?(n.focus(),n.setSelectionRange(r,i)):this.#d())})};#d=()=>{if(!this.editing)return;this.editing=!1;const n=(this.wrap?this.#e.replace(/\r?\n/g," "):this.#e).trim();n!==this.value&&this.dispatchEvent(new CustomEvent("dpk-commit",{detail:{value:n},bubbles:!0,composed:!0}))}}const Ss=()=>{customElements.get("dpk-component-inline-edit")||customElements.define("dpk-component-inline-edit",Rt)},_s={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function Pe(t){return _s}let Es;function Ts(t){return Es?.get(t)}let Ms;function Os(t){return Ms?.get(t)}let js;function Rs(t,e){return js?.get(t)?.get(e)}function ne(t){const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":e}function x(t,e,n,s,r){const i=r&&"input"in r?r.input:n.value,o=r?.expected??t.expects??null,l=r?.received??ne(i),a={kind:t.kind,type:t.type,input:i,expected:o,received:l,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${l}`,requirement:t.requirement,path:r?.path,issues:r?.issues,lang:s.lang,abortEarly:s.abortEarly,abortPipeEarly:s.abortPipeEarly},d=t.kind==="schema",p=r?.message??t.message??Rs(t.reference,a.lang)??(d?Os(a.lang):null)??s.message??Ts(a.lang);p!==void 0&&(a.message=typeof p=="function"?p(a):p),d&&(n.typed=!1),n.issues?n.issues.push(a):n.issues=[a]}function Ls(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function Ns(t,e){return Object.prototype.hasOwnProperty.call(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function De(t,e){const n=[...new Set(t)];return n.length>1?`(${n.join(` ${e} `)})`:n[0]??"never"}function w(t){return t["~standard"]={version:1,vendor:"valibot",validate:e=>t["~run"]({value:e},Pe())},t}var Ps=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function Lt(t){return{kind:"validation",type:"integer",reference:Lt,async:!1,expects:null,requirement:Number.isInteger,message:t,"~run"(e,n){return e.typed&&!this.requirement(e.value)&&x(this,"integer",e,n),e}}}function k(t,e){return{kind:"validation",type:"min_length",reference:k,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(n,s){return n.typed&&n.value.length<this.requirement&&x(this,"length",n,s,{received:`${n.value.length}`}),n}}}function Nt(t,e){return{kind:"validation",type:"min_value",reference:Nt,async:!1,expects:`>=${t instanceof Date?t.toJSON():ne(t)}`,requirement:t,message:e,"~run"(n,s){return n.typed&&!(n.value>=this.requirement)&&x(this,"value",n,s,{received:n.value instanceof Date?n.value.toJSON():ne(n.value)}),n}}}function I(t,e){return{kind:"validation",type:"regex",reference:I,async:!1,expects:`${t}`,requirement:t,message:e,"~run"(n,s){return n.typed&&!this.requirement.test(n.value)&&x(this,"format",n,s),n}}}function Ie(){return{kind:"transformation",type:"trim",reference:Ie,async:!1,"~run"(t){return t.value=t.value.trim(),t}}}const Ds={abortEarly:!0};function Pt(t,e,n){return typeof t.fallback=="function"?t.fallback(e,n):t.fallback}function me(t,e,n){return typeof t.default=="function"?t.default(e,n):t.default}function U(t,e){return w({kind:"schema",type:"array",reference:U,expects:"Array",async:!1,item:t,message:e,"~run"(n,s){const r=n.value;if(Array.isArray(r)){n.typed=!0,n.value=[];for(let i=0;i<r.length;i++){const o=r[i],l=this.item["~run"]({value:o},s);if(l.issues){const a={type:"array",origin:"value",input:r,key:i,value:o};for(const d of l.issues)d.path?d.path.unshift(a):d.path=[a],n.issues?.push(d);if(n.issues||(n.issues=l.issues),s.abortEarly){n.typed=!1;break}}l.typed||(n.typed=!1),n.value.push(l.value)}}else x(this,"type",n,s);return n}})}function Dt(t){return w({kind:"schema",type:"boolean",reference:Dt,expects:"boolean",async:!1,message:t,"~run"(e,n){return typeof e.value=="boolean"?e.typed=!0:x(this,"type",e,n),e}})}function S(t,e){return w({kind:"schema",type:"exact_optional",reference:S,expects:t.expects,async:!1,wrapped:t,default:e,"~run"(n,s){return this.wrapped["~run"](n,s)}})}function It(t){return w({kind:"schema",type:"lazy",reference:It,expects:"unknown",async:!1,getter:t,"~run"(e,n){return this.getter(e.value)["~run"](e,n)}})}function K(t,e){return w({kind:"schema",type:"literal",reference:K,expects:ne(t),async:!1,literal:t,message:e,"~run"(n,s){return Ls(n.value,this.literal)?n.typed=!0:x(this,"type",n,s),n}})}function Ut(t,e){return w({kind:"schema",type:"nullable",reference:Ut,expects:`(${t.expects} | null)`,async:!1,wrapped:t,default:e,"~run"(n,s){return n.value===null&&(this.default!==void 0&&(n.value=me(this,n,s)),n.value===null)?(n.typed=!0,n):this.wrapped["~run"](n,s)}})}function qt(t){return w({kind:"schema",type:"number",reference:qt,expects:"number",async:!1,message:t,"~run"(e,n){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:x(this,"type",e,n),e}})}function $(t,e){return w({kind:"schema",type:"object",reference:$,expects:"Object",async:!1,entries:t,message:e,"~run"(n,s){const r=n.value;if(r&&typeof r=="object"){n.typed=!0,n.value={};for(const i in this.entries){const o=this.entries[i];if(i in r||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){const l=i in r?r[i]:me(o),a=o["~run"]({value:l},s);if(a.issues){const d={type:"object",origin:"value",input:r,key:i,value:l};for(const p of a.issues)p.path?p.path.unshift(d):p.path=[d],n.issues?.push(p);if(n.issues||(n.issues=a.issues),s.abortEarly){n.typed=!1;break}}a.typed||(n.typed=!1),n.value[i]=a.value}else if(o.fallback!==void 0)n.value[i]=Pt(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(x(this,"key",n,s,{input:void 0,expected:`"${i}"`,path:[{type:"object",origin:"key",input:r,key:i,value:r[i]}]}),s.abortEarly))break}}else x(this,"type",n,s);return n}})}function ve(t,e){return w({kind:"schema",type:"optional",reference:ve,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,"~run"(n,s){return n.value===void 0&&(this.default!==void 0&&(n.value=me(this,n,s)),n.value===void 0)?(n.typed=!0,n):this.wrapped["~run"](n,s)}})}function be(t,e){return w({kind:"schema",type:"picklist",reference:be,expects:De(t.map(ne),"|"),async:!1,options:t,message:e,"~run"(n,s){return this.options.includes(n.value)?n.typed=!0:x(this,"type",n,s),n}})}function zt(t,e,n){return w({kind:"schema",type:"record",reference:zt,expects:"Object",async:!1,key:t,value:e,message:n,"~run"(s,r){const i=s.value;if(i&&typeof i=="object"){s.typed=!0,s.value={};for(const o in i)if(Ns(i,o)){const l=i[o],a=this.key["~run"]({value:o},r);if(a.issues){const p={type:"object",origin:"key",input:i,key:o,value:l};for(const c of a.issues)c.path=[p],s.issues?.push(c);if(s.issues||(s.issues=a.issues),r.abortEarly){s.typed=!1;break}}const d=this.value["~run"]({value:l},r);if(d.issues){const p={type:"object",origin:"value",input:i,key:o,value:l};for(const c of d.issues)c.path?c.path.unshift(p):c.path=[p],s.issues?.push(c);if(s.issues||(s.issues=d.issues),r.abortEarly){s.typed=!1;break}}(!a.typed||!d.typed)&&(s.typed=!1),a.typed&&(s.value[a.value]=d.value)}}else x(this,"type",s,r);return s}})}function J(t,e){return w({kind:"schema",type:"strict_object",reference:J,expects:"Object",async:!1,entries:t,message:e,"~run"(n,s){const r=n.value;if(r&&typeof r=="object"){n.typed=!0,n.value={};for(const i in this.entries){const o=this.entries[i];if(i in r||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){const l=i in r?r[i]:me(o),a=o["~run"]({value:l},s);if(a.issues){const d={type:"object",origin:"value",input:r,key:i,value:l};for(const p of a.issues)p.path?p.path.unshift(d):p.path=[d],n.issues?.push(p);if(n.issues||(n.issues=a.issues),s.abortEarly){n.typed=!1;break}}a.typed||(n.typed=!1),n.value[i]=a.value}else if(o.fallback!==void 0)n.value[i]=Pt(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(x(this,"key",n,s,{input:void 0,expected:`"${i}"`,path:[{type:"object",origin:"key",input:r,key:i,value:r[i]}]}),s.abortEarly))break}if(!n.issues||!s.abortEarly){for(const i in r)if(!Object.prototype.hasOwnProperty.call(this.entries,i)){x(this,"key",n,s,{input:i,expected:"never",path:[{type:"object",origin:"key",input:r,key:i,value:r[i]}]});break}}}else x(this,"type",n,s);return n}})}function g(t){return w({kind:"schema",type:"string",reference:g,expects:"string",async:!1,message:t,"~run"(e,n){return typeof e.value=="string"?e.typed=!0:x(this,"type",e,n),e}})}function Bt(t){let e;if(t)for(const n of t)if(e)for(const s of n.issues)e.push(s);else e=n.issues;return e}function Ht(t,e){return w({kind:"schema",type:"union",reference:Ht,expects:De(t.map(n=>n.expects),"|"),async:!1,options:t,message:e,"~run"(n,s){let r,i,o;for(const l of this.options){const a=l["~run"]({value:n.value},s);if(a.typed)if(a.issues)i?i.push(a):i=[a];else{r=a;break}else o?o.push(a):o=[a]}if(r)return r;if(i){if(i.length===1)return i[0];x(this,"type",n,s,{issues:Bt(i)}),n.typed=!0}else{if(o?.length===1)return o[0];x(this,"type",n,s,{issues:Bt(o)})}return n}})}function q(){return w({kind:"schema",type:"unknown",reference:q,expects:"unknown",async:!1,"~run"(t){return t.typed=!0,t}})}function Ft(t,e,n){return w({kind:"schema",type:"variant",reference:Ft,expects:"Object",async:!1,key:t,options:e,message:n,"~run"(s,r){const i=s.value;if(i&&typeof i=="object"){let o,l=0,a=this.key,d=[];const p=(c,h)=>{for(const u of c.options){if(u.type==="variant")p(u,new Set(h).add(u.key));else{let v=!0,C=0;for(const A of h){const j=u.entries[A];if(A in i?j["~run"]({typed:!1,value:i[A]},Ds).issues:j.type!=="exact_optional"&&j.type!=="optional"&&j.type!=="nullish"){v=!1,a!==A&&(l<C||l===C&&A in i&&!(a in i))&&(l=C,a=A,d=[]),a===A&&d.push(u.entries[A].expects);break}C++}if(v){const A=u["~run"]({value:i},r);(!o||!o.typed&&A.typed)&&(o=A)}}if(o&&!o.issues)break}};if(p(this,new Set([this.key])),o)return o;x(this,"type",s,r,{input:i[a],expected:De(d,"|"),path:[{type:"object",origin:"value",input:i,key:a,value:i[a]}]})}else x(this,"type",s,r);return s}})}function Kt(t,e,n){const s=t["~run"]({value:e},Pe());if(s.issues)throw new Ps(s.issues);return s.value}function b(...t){return w({...t[0],pipe:t,"~run"(e,n){for(const s of t)if(s.kind!=="metadata"){if(e.issues&&(s.kind==="schema"||s.kind==="transformation")){e.typed=!1;break}(!e.issues||!n.abortEarly&&!n.abortPipeEarly)&&(e=s["~run"](e,n))}return e}})}function y(t,e,n){const s=t["~run"]({value:e},Pe());return{typed:s.typed,success:!s.issues,output:s.value,issues:s.issues}}const ke=$({type:b(g(),k(1)),id:b(g(),k(1))}),Is=b(g(),k(1),I(/^[A-Za-z0-9_-]+$/,'ids may only contain letters, digits, "_" and "-" (a "." builds a path)')),Us=(t,e)=>{if(e===1)return t.includes(".")?null:[t];const n=t.split(".");return n.length===e&&n.every(s=>s.length>0)?n:null},V=$({id:b(g(),k(1)),type:b(g(),k(1)),target:ke,payload:q(),note:S(g()),createdAt:b(g(),k(1))}),qs=(t,e,n,s={})=>{const r=$({id:b(g(),k(1)),type:K(t),target:ke,payload:n,note:S(g()),createdAt:b(g(),k(1))}),i=o=>{const l=y(V,o);if(!l.success||l.output.type!==t)return null;const a=y(n,o.payload);return a.success?{id:l.output.id,type:t,target:l.output.target,payload:a.output,...l.output.note===void 0?{}:{note:l.output.note},createdAt:l.output.createdAt}:null};return{schema:r,mode:s.mode??"patch",targetType:e,actionType:t,payloadSchema:n,parse:i,...s.dedupeKey?{dedupeKey:s.dedupeKey}:{}}},zs=(t,e)=>{const n=ye(t,e.type);if(n===void 0)return null;const s=n.parse(e);return s===null?null:s},Bs=(t,e)=>{const n=y(t.payloadSchema,e.payload);if(!n.success)throw new Error(`invalid payload for action "${e.type}"`);return n.output},ye=(t,e)=>Object.hasOwn(t,e)?t[e]:void 0,Hs=t=>{throw new Error(`unhandled action: ${JSON.stringify(t)}`)},Fs=$({id:b(g(),k(1))}),Ks=t=>{const e=y(Fs,t.payload);return`${t.type}|${e.success?e.output.id:JSON.stringify(t.payload)}`},_=t=>`${t.type}:${t.id}`,Jt=t=>{const e=t.indexOf(":");return e<=0?{type:"unknown",id:t}:{type:t.slice(0,e),id:t.slice(e+1)}},Ue=(t,e)=>typeof t=="string"?Jt(t.includes(":")?t:`${e}:${t}`):{type:t.type,id:t.id},Js=(t,e)=>t.type===e.type&&t.id===e.id,Vt=t=>{const e=t.normalize("NFKD").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return e.length>0?e:"item"},Vs=(t,e)=>{const n=Vt(t),s=new Set(e);if(!s.has(n))return n;for(let r=2;r<1e3;r+=1){const i=`${n}-${r}`;if(!s.has(i))return i}return`${n}-${Math.random().toString(36).slice(2,8)}`},Wt=()=>{const t=globalThis.crypto;return t?.randomUUID?t.randomUUID():`a-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`},E="comment",se=t=>{const[e]=t;return{path:e?.path?.map(n=>String(n.key)).join(".")??"",message:e?.message??"invalid action"}},Yt=$({type:b(g(),k(1)),target:Ht([b(g(),k(1)),ke]),payload:ve(q()),note:S(g()),id:S(b(g(),k(1))),createdAt:S(b(g(),k(1)))}),Ws=(t,e)=>{const n=y(Yt,t);if(!n.success)return{ok:!1,issue:se(n.issues)};const s=n.output,r=Ue(s.target,e.targetType),i={id:s.id??Wt(),type:s.type,target:r,payload:s.payload??{},...s.note===void 0?{}:{note:s.note},createdAt:s.createdAt??new Date().toISOString()},o=y(e.schema,i);if(!o.success)return{ok:!1,issue:se(o.issues)};const l=y(V,o.output);return l.success?{ok:!0,action:l.output}:{ok:!1,issue:se(l.issues)}},qe=(t,e)=>e.dedupeKey?e.dedupeKey(t):e.mode!=="patch"?null:`${t.type}|${_(t.target)}`,ze=(t,e,n)=>{const s=qe(e,n);if(s===null)return[...t,e];const r=t.at(-1);return!r||qe(r,n)!==s||!Ys(r,e)?[...t,e]:[...t.slice(0,-1),e]},Ys=(t,e)=>Js(t.target,e.target),Be=t=>JSON.stringify(t.map(e=>({id:e.id,type:e.type,target:e.target,payload:e.payload,...e.note===void 0?{}:{note:e.note},createdAt:e.createdAt})),null,2),Gt=$({id:b(g(),k(1)),type:K(E),target:$({type:b(g(),k(1)),id:b(g(),k(1))}),payload:$({body:b(g(),k(1))}),note:S(g()),createdAt:b(g(),k(1))}),Zt={schema:Gt,mode:"append",targetType:"page"},Gs=$({body:g()}),xe=t=>{const e=y(Gs,t.payload);return e.success?e.output.body:""},He="element",Qt=b(g(),I(/^[A-Z][A-Z0-9_]*$/,"component action types are CONSTANT_CASE")),Xt=zt(g(),q()),Zs=$({type:K(He),id:b(g(),I(/^[^/]+\/.+/,"component references start with a provider id"))}),Qs=$({id:b(g(),k(1)),type:Qt,target:Zs,payload:Xt,note:S(g()),createdAt:b(g(),k(1))}),Xs={schema:Qs,mode:"sequence",targetType:He},er=J({type:Qt,target:b(g(),I(/^element:[^/]+\/.+/)),payload:ve(Xt,{})}),en=J({id:b(g(),k(1)),title:b(g(),k(1)),summary:S(g()),tone:S(be(["create","update","delete","move","meta"])),stale:S(be(["unsupported-action-type","target-missing","constraint-violated"]))}),Fe=t=>{if(t.type!==He)return null;const e=t.id.indexOf("/");if(e<=0)return null;try{return decodeURIComponent(t.id.slice(0,e))}catch{return null}},T=t=>t.type!==E&&Fe(t.target)!==null,tr=(t,e)=>t.filter(n=>T(n)&&Fe(n.target)===e),tn=(t,e)=>{const n=new Map(t.flatMap(s=>T(s)?[[s.id,Fe(s.target)]]:[]));return new Map(e.flatMap(s=>s.results.flatMap(r=>n.get(r.id)===s.id?[[r.id,r]]:[])))},Ke=Object.freeze({}),Je=t=>{const e=t.startsWith("#")?t.slice(1):t;if(e.length===0)return Ke;const n=new URLSearchParams(e.startsWith("?")?e.slice(1):e),s={};for(const[r,i]of n)r.length>0&&i.length>0&&(s[r]=i);return s},W=t=>{const e=new URLSearchParams;for(const s of Object.keys(t).sort((r,i)=>r<i?-1:r>i?1:0)){const r=t[s];r!=null&&r!==""&&e.set(s,r)}const n=e.toString();return n.length===0?"":`#${n}`},Ve=(t,e,n=[])=>{const s={...t},r=Object.keys(e).map(i=>n.indexOf(i)).filter(i=>i>=0);if(r.length>0)for(const i of n.slice(Math.min(...r)+1))Object.hasOwn(e,i)||delete s[i];for(const[i,o]of Object.entries(e))o==null||o===""?delete s[i]:s[i]=o;return s},nr=(t,e="json")=>`\`\`\`${e}
|
|
512
|
-
${t}
|
|
513
|
-
\`\`\``,sr=t=>JSON.stringify({type:t.type,target:t.target,payload:t.payload,...t.note===void 0?{}:{note:t.note}},null,2),We=(t,e,n)=>{const{actions:s,state:r}=t,i=new Set(t.stale.map(p=>p.action.id)),o=s.filter(p=>!i.has(p.id)),l=o.filter(p=>p.type===E),a=o.filter(p=>p.type!==E),d=[];if(d.push(`# Review draft \u2014 ${e.label}`),d.push(""),d.push(`- template: \`${e.name}\``),d.push(`- framework: \`dev-process-kit@${n}\``),d.push(`- navigation: \`${W(t.navigation)||"(none)"}\``),d.push(`- pending: ${a.length} change(s), ${l.length} comment(s)`),t.stale.length>0&&d.push(`- stale (not applicable to the current base): ${t.stale.length}`),d.push(""),d.push("## How to apply"),d.push(""),d.push("These are patches against the base HTML, not a command log. Apply the requested end state to the meaning model, keep the stable ids of surviving concepts, and keep the base JSON free of any draft envelope."),a.some(T)&&(d.push(""),d.push("Changes targeting `element:<id>/\u2026` belong to the component with that `id` (for example a diagram): apply them to that component's own JSON, following its documented action vocabulary.")),d.push(""),l.length>0){d.push(`## Comments (${l.length})`),d.push("");for(const[p,c]of l.entries()){const h=e.describe(c,r,t.base);d.push(`${p+1}. **${h.targetLabel}** \u2014 \`${_(c.target)}\``),d.push(` > ${xe(c).replace(/\n/g,`
|
|
514
|
-
> `)}`)}d.push("")}if(a.length>0){d.push(`## Requested changes (${a.length})`),d.push("");for(const[p,c]of a.entries()){const h=e.describe(c,r,t.base),u=h.summary?` \u2014 ${h.summary}`:"";d.push(`${p+1}. **${h.title}**${u}`),d.push(` target: \`${_(c.target)}\` (${c.target.type})`),d.push(` \`\`\`json
|
|
515
|
-
${sr(c).replace(/\n/g,`
|
|
516
|
-
`)}
|
|
517
|
-
\`\`\``)}d.push("")}if(a.length===0&&l.length===0&&(d.push("_No pending draft actions._"),d.push("")),t.stale.length>0){d.push(`## Not applicable to the current base (${t.stale.length})`),d.push(""),d.push("These actions were made against an earlier base and no longer fit it. Do not apply them; mention them if they still matter. The reader can remove them from the review rail."),d.push("");for(const[p,{action:c,reason:h}]of t.stale.entries()){const u=e.describe(c,r,t.base),v=c.type===E?xe(c):u.title;d.push(`${p+1}. \`${c.type}\` on \`${_(c.target)}\` (${h}) \u2014 ${v}`)}d.push("")}return d.push("## Canonical draft (JSON)"),d.push(""),d.push(nr(Be(s))),d.push(""),d.join(`
|
|
518
|
-
`)},Y="0.0.6",Ye=async t=>{try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}const e=document.activeElement,n=document.createElement("textarea");try{return n.value=t,n.setAttribute("readonly",""),n.style.position="fixed",n.style.opacity="0",document.body.append(n),n.select(),document.execCommand("copy")}catch{return!1}finally{n.remove(),e instanceof HTMLElement&&e.focus()}},nn=ue({en:{heading:"Review notes",rejected:"Action rejected.",commentLabel:"Review comment",commentPlaceholder:"What should change, or what you noticed (passed to the agent as an instruction)",detach:"Detach",attachTo:t=>`Attach to this ${t}`,addNote:"Add note",empty:"No draft actions yet.",emptyHint:"Comments and structural patches both land here, and survive reload via LocalStorage.",sendToClaude:"Send to Claude",copy:"Copy changes & comments",copyTitle:"Copy the review to paste it to the agent",clear:"Clear",deleteAction:"Delete this draft action",wholePage:"Whole page",comment:"Comment",sent:"Sent to Claude \u2713",copied:"Copied \u2713",copyFailed:"Could not copy"},ja:{heading:"\u30EC\u30D3\u30E5\u30FC\u30CE\u30FC\u30C8",rejected:"action \u3092\u53D7\u3051\u4ED8\u3051\u3089\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",commentLabel:"\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8",commentPlaceholder:"\u5909\u66F4\u3057\u305F\u3044\u3053\u3068 / \u6C17\u3065\u304D\u3092\u66F8\u304F\uFF08Agent \u3078\u306E\u6307\u793A\u3068\u3057\u3066\u6E21\u308B\uFF09",detach:"\u7D10\u3065\u3051\u3092\u89E3\u9664",attachTo:t=>`\u3053\u306E ${t} \u306B\u7D10\u3065\u3051\u308B`,addNote:"\u30CE\u30FC\u30C8\u3092\u8FFD\u52A0",empty:"draft action \u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",emptyHint:"\u30B3\u30E1\u30F3\u30C8\u3082\u69CB\u9020\u306E\u5909\u66F4\u3082\u3053\u3053\u306B\u96C6\u307E\u308A\u3001LocalStorage \u306B\u6B8B\u308B\u306E\u3067\u30EA\u30ED\u30FC\u30C9\u3057\u3066\u3082\u6D88\u3048\u307E\u305B\u3093\u3002",sendToClaude:"Claude \u306B\u9001\u308B",copy:"\u5909\u66F4\u30FB\u30B3\u30E1\u30F3\u30C8\u3092\u30B3\u30D4\u30FC",copyTitle:"Review \u3092\u30B3\u30D4\u30FC\u3057\u3066 Agent \u306B\u8CBC\u308A\u4ED8\u3051\u308B",clear:"\u30AF\u30EA\u30A2",deleteAction:"\u3053\u306E draft action \u3092\u524A\u9664",wholePage:"\u30DA\u30FC\u30B8\u5168\u4F53",comment:"\u30B3\u30E1\u30F3\u30C8",sent:"Claude \u306B\u9001\u308A\u307E\u3057\u305F \u2713",copied:"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F \u2713",copyFailed:"\u30B3\u30D4\u30FC\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F"}}),rr=()=>({body:"",attachment:{kind:"page"},copy:{kind:"idle"},copyRequest:0,send:{kind:"idle"},sendRequest:0}),sn=t=>t.kind==="explicit"?{kind:t.resume}:t,rn=(t,e)=>{switch(e.kind){case"input":return{...t,body:e.body};case"attach":return{...t,attachment:{kind:e.current?"current":"page"}};case"clear-target":return{...t,attachment:sn(t.attachment)};case"target-requested":return{...t,attachment:{kind:"explicit",ref:e.ref,resume:t.attachment.kind==="explicit"?t.attachment.resume:t.attachment.kind}};case"submitted":return{...t,body:"",attachment:sn(t.attachment),copy:{kind:"idle"},copyRequest:t.copyRequest+1,send:{kind:"idle"},sendRequest:t.sendRequest+1};case"copy-started":return{...t,copy:{kind:"pending"},copyRequest:t.copyRequest+1,send:{kind:"idle"},sendRequest:t.sendRequest+1};case"copy-finished":return e.request!==t.copyRequest||t.copy.kind!=="pending"?t:{...t,copy:{kind:e.ok?"copied":"failed"}};case"send-started":return{...t,send:{kind:"pending"},sendRequest:t.sendRequest+1,copy:{kind:"idle"},copyRequest:t.copyRequest+1};case"send-finished":return e.request!==t.sendRequest||t.send.kind!=="pending"?t:{...t,send:e.outcome.ok?{kind:"sent"}:{kind:"failed",reason:e.outcome.reason}}}},ir=(t,e)=>{const n=t.body.trim();return n===""?null:{target:e,body:n}},or={en:"English",ja:"\u65E5\u672C\u8A9E"},G=ue({en:{review:"Review",reviewToggle:"Review / comments",useLightTheme:"Switch to light theme",useDarkTheme:"Switch to dark theme",language:"Language",baseDataError:"Could not read the base data (showing an empty page)",handoffTooLarge:"The review is too long to send. Copy it and paste it instead",handoffConsent:"Commenting needs your permission. Allow it, then send again",handoffForbidden:"This page cannot send to Claude. Copy the review and paste it instead",handoffClaudeUnavailable:"Could not reach the Claude session. Copy the review and paste it instead",handoffRateLimited:"Too many sends in a row. Wait a moment, then send again",handoffStorage:"Could not save the review. Copy it and paste it instead",handoffError:"Could not send. Copy the review and paste it instead",handoffLabel:"Hand the review to the agent",handoffSend:"Send to Claude",handoffSending:"Sending\u2026",handoffSent:"Sent to Claude \u2713",handoffCopy:"Copy changes & comments",handoffCopyTitle:"Copy the review to paste it to the agent",handoffCopied:"Copied \u2713",handoffCopyFailed:"Could not copy"},ja:{review:"\u30EC\u30D3\u30E5\u30FC",reviewToggle:"\u30EC\u30D3\u30E5\u30FC / \u30B3\u30E1\u30F3\u30C8",useLightTheme:"\u30E9\u30A4\u30C8\u30C6\u30FC\u30DE\u306B\u3059\u308B",useDarkTheme:"\u30C0\u30FC\u30AF\u30C6\u30FC\u30DE\u306B\u3059\u308B",language:"\u8A00\u8A9E",baseDataError:"base data \u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F\uFF08\u7A7A\u306E\u30DA\u30FC\u30B8\u3068\u3057\u3066\u8868\u793A\u4E2D\uFF09",handoffTooLarge:"Review \u304C\u9577\u3059\u304E\u3066\u9001\u308C\u307E\u305B\u3093\u3002\u30B3\u30D4\u30FC\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044",handoffConsent:"\u30B3\u30E1\u30F3\u30C8\u306E\u8A31\u53EF\u304C\u5FC5\u8981\u3067\u3059\u3002\u8A31\u53EF\u3057\u3066\u304B\u3089\u3082\u3046\u4E00\u5EA6\u9001\u3063\u3066\u304F\u3060\u3055\u3044",handoffForbidden:"\u3053\u306E\u30DA\u30FC\u30B8\u304B\u3089\u306F\u9001\u308C\u307E\u305B\u3093\u3002\u30B3\u30D4\u30FC\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044",handoffClaudeUnavailable:"Claude \u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u306B\u5C4A\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30B3\u30D4\u30FC\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044",handoffRateLimited:"\u9001\u4FE1\u304C\u7D9A\u3044\u3066\u3044\u307E\u3059\u3002\u5C11\u3057\u5F85\u3063\u3066\u304B\u3089\u9001\u3063\u3066\u304F\u3060\u3055\u3044",handoffStorage:"Review \u3092\u4FDD\u5B58\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30B3\u30D4\u30FC\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044",handoffError:"\u9001\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30B3\u30D4\u30FC\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044",handoffLabel:"Review \u3092 Agent \u306B\u6E21\u3059",handoffSend:"Claude \u306B\u9001\u308B",handoffSending:"\u9001\u4FE1\u4E2D\u2026",handoffSent:"Claude \u306B\u9001\u308A\u307E\u3057\u305F \u2713",handoffCopy:"\u5909\u66F4\u30FB\u30B3\u30E1\u30F3\u30C8\u3092\u30B3\u30D4\u30FC",handoffCopyTitle:"Review \u3092\u30B3\u30D4\u30FC\u3057\u3066 Agent \u306B\u8CBC\u308A\u4ED8\u3051\u308B",handoffCopied:"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F \u2713",handoffCopyFailed:"\u30B3\u30D4\u30FC\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F"}}),ar=4096,dr="reviews",on="Review from the page (dev-process-kit). Apply it to the base data and republish this artifact. Then answer with ArtifactComments `reply` in this thread: the reader sees only this thread, and the page never shows anything written to the database.",lr=t=>new TextEncoder().encode(t).length,cr=t=>t.replace(/[\u0000-\u0008\u000B-\u001F\u007F]/g,""),pr=t=>{const e=`${on}
|
|
519
|
-
|
|
520
|
-
${cr(t)}`;return lr(e)<=ar?e:null},hr=t=>`${on}
|
|
521
|
-
|
|
522
|
-
The brief is too long for a comment, so it is stored in this artifact's database: read the document \`${t}\` (\`brief\` is the review, \`draft\` the raw draft JSON).`,ur={consent_required:"consent",forbidden:"forbidden",not_granted:"forbidden",capability_disabled:"forbidden",capability_removed:"forbidden",claude_unavailable:"claude_unavailable",rate_limited:"rate_limited"},fr=t=>{const e=typeof t=="object"&&t!==null&&"code"in t?t.code:void 0;return(typeof e=="string"?ur[e]:void 0)??"error"},gr={too_large:"handoffTooLarge",consent:"handoffConsent",forbidden:"handoffForbidden",claude_unavailable:"handoffClaudeUnavailable",rate_limited:"handoffRateLimited",storage:"handoffStorage",error:"handoffError"},Ge=(t,e)=>G(e)[gr[t]],an=t=>t.group?`${t.group} \xB7 ${t.label}`:t.label,dn=(t,e)=>{const{definition:n,state:s,navigation:r,derivation:i}=t,o=nn(t.locale),l=n.currentTarget?.(s,r)??null,a=e.attachment,d=a.kind==="explicit"?n.commentTargets(s,r).find(h=>h.value===a.ref):null,p=a.kind==="explicit"?{ref:a.ref,label:d?an(d):a.ref}:a.kind==="current"&&l?{ref:l.value,label:an(l)}:{ref:`page:${n.name}`,label:o.wholePage},c=new Map(i.stale.map(h=>[h.action.id,h.reason]));return{body:e.body,target:p,attachment:a.kind==="explicit"?{kind:"explicit"}:l?{kind:"checkbox",checked:a.kind==="current",group:l.group??""}:{kind:"none"},canSubmit:e.body.trim().length>0,items:i.actions.map(h=>{const u=n.describe(h,s,i.base),v=h.type==="comment";return{id:h.id,title:v?o.comment:u.title,targetLabel:u.targetLabel,tone:v?"comment":u.tone,text:{kind:v?"comment":"summary",body:v?xe(h):u.summary??""},code:n.serialize(h),stale:c.get(h.id)??null}}),issues:t.issues.map(h=>`${h.path?`${h.path}: `:""}${h.message}`),send:t.sendable!==!0?"hidden":i.actions.length===0||e.send.kind==="pending"?"disabled":"ready",flash:e.send.kind==="sent"?o.sent:e.send.kind==="failed"?Ge(e.send.reason,t.locale):e.copy.kind==="copied"?o.copied:e.copy.kind==="failed"?o.copyFailed:""}},mr=[fe,ge,R`
|
|
523
|
-
:host {
|
|
524
|
-
display: flex;
|
|
525
|
-
flex-direction: column;
|
|
526
|
-
min-height: 0;
|
|
527
|
-
width: 100%;
|
|
528
|
-
background: var(--dpk-paper-raised);
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
header {
|
|
532
|
-
position: relative;
|
|
533
|
-
z-index: 1;
|
|
534
|
-
display: flex;
|
|
535
|
-
align-items: center;
|
|
536
|
-
justify-content: space-between;
|
|
537
|
-
gap: 8px;
|
|
538
|
-
padding: 14px 16px 12px;
|
|
539
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
540
|
-
background: var(--dpk-glass);
|
|
541
|
-
backdrop-filter: blur(12px);
|
|
542
|
-
box-shadow: 0 1px 0 var(--dpk-highlight) inset;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
header h2 {
|
|
546
|
-
font-size: 13.5px;
|
|
547
|
-
font-weight: 660;
|
|
548
|
-
letter-spacing: -0.015em;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
.composer {
|
|
552
|
-
display: grid;
|
|
553
|
-
gap: 10px;
|
|
554
|
-
padding: 14px 16px 14px;
|
|
555
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
556
|
-
background: var(--dpk-paper-sunken);
|
|
557
|
-
box-shadow: inset 0 1px 3px var(--dpk-shade-1);
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
.composer textarea {
|
|
561
|
-
min-height: 62px;
|
|
562
|
-
background: var(--dpk-paper-raised);
|
|
563
|
-
border-radius: var(--dpk-radius);
|
|
564
|
-
box-shadow:
|
|
565
|
-
var(--dpk-bevel),
|
|
566
|
-
inset 0 1px 2px var(--dpk-shade-1);
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
.composer .row {
|
|
570
|
-
display: flex;
|
|
571
|
-
align-items: center;
|
|
572
|
-
gap: 8px;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
.composer .attach {
|
|
576
|
-
display: inline-flex;
|
|
577
|
-
align-items: center;
|
|
578
|
-
gap: 7px;
|
|
579
|
-
font-size: 12px;
|
|
580
|
-
color: var(--dpk-ink-soft);
|
|
581
|
-
cursor: pointer;
|
|
582
|
-
transition: color 140ms var(--dpk-ease);
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
.composer .attach:hover {
|
|
586
|
-
color: var(--dpk-ink);
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
.composer .attach input {
|
|
590
|
-
width: 14px;
|
|
591
|
-
height: 14px;
|
|
592
|
-
margin: 0;
|
|
593
|
-
accent-color: var(--dpk-accent);
|
|
594
|
-
cursor: pointer;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
.composer .chip {
|
|
598
|
-
display: inline-flex;
|
|
599
|
-
align-items: center;
|
|
600
|
-
gap: 6px;
|
|
601
|
-
padding: 3px 10px;
|
|
602
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
603
|
-
border-radius: 999px;
|
|
604
|
-
background: var(--dpk-paper-raised);
|
|
605
|
-
box-shadow: var(--dpk-shadow-xs);
|
|
606
|
-
font-size: 11.5px;
|
|
607
|
-
cursor: pointer;
|
|
608
|
-
transition:
|
|
609
|
-
border-color 140ms var(--dpk-ease),
|
|
610
|
-
box-shadow 140ms var(--dpk-ease),
|
|
611
|
-
transform 140ms var(--dpk-ease);
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
.composer .chip svg {
|
|
615
|
-
flex: none;
|
|
616
|
-
width: 12px;
|
|
617
|
-
height: 12px;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
.composer .chip:hover {
|
|
621
|
-
border-color: color-mix(in srgb, var(--dpk-accent) 45%, var(--dpk-rule-strong));
|
|
622
|
-
box-shadow: var(--dpk-shadow-sm);
|
|
623
|
-
transform: translateY(-1px);
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
.target-line {
|
|
627
|
-
margin-right: auto;
|
|
628
|
-
padding: 3px 9px;
|
|
629
|
-
border-radius: 999px;
|
|
630
|
-
background: var(--dpk-paper-inset);
|
|
631
|
-
font-family: var(--dpk-mono);
|
|
632
|
-
font-size: 10px;
|
|
633
|
-
letter-spacing: 0.03em;
|
|
634
|
-
color: var(--dpk-ink-faint);
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
.list {
|
|
638
|
-
list-style: none;
|
|
639
|
-
margin: 0;
|
|
640
|
-
padding: 10px 12px;
|
|
641
|
-
overflow: auto;
|
|
642
|
-
flex: 1;
|
|
643
|
-
min-height: 0;
|
|
644
|
-
display: grid;
|
|
645
|
-
gap: 8px;
|
|
646
|
-
align-content: start;
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
.item {
|
|
650
|
-
position: relative;
|
|
651
|
-
display: grid;
|
|
652
|
-
gap: 5px;
|
|
653
|
-
padding: 10px 12px 11px 16px;
|
|
654
|
-
border: 1px solid var(--dpk-rule);
|
|
655
|
-
border-radius: var(--dpk-radius);
|
|
656
|
-
background: var(--dpk-paper-raised);
|
|
657
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
658
|
-
transition:
|
|
659
|
-
box-shadow 160ms var(--dpk-ease),
|
|
660
|
-
border-color 160ms var(--dpk-ease),
|
|
661
|
-
transform 160ms var(--dpk-ease);
|
|
662
|
-
animation: dpk-item-in 200ms var(--dpk-ease) backwards;
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
@keyframes dpk-item-in {
|
|
666
|
-
from {
|
|
667
|
-
opacity: 0;
|
|
668
|
-
transform: translateY(3px);
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
.item:hover {
|
|
673
|
-
border-color: var(--dpk-rule-hover);
|
|
674
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-sm);
|
|
675
|
-
transform: translateY(-1px);
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
.item::before {
|
|
679
|
-
content: '';
|
|
680
|
-
position: absolute;
|
|
681
|
-
left: 0;
|
|
682
|
-
top: 10px;
|
|
683
|
-
bottom: 10px;
|
|
684
|
-
width: 3px;
|
|
685
|
-
border-radius: 0 2px 2px 0;
|
|
686
|
-
background: var(--tone, var(--dpk-ink-faint));
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
.item[data-tone='comment'] {
|
|
690
|
-
--tone: var(--dpk-accent);
|
|
691
|
-
background: linear-gradient(90deg, var(--dpk-accent-soft), transparent 55%), var(--dpk-paper-raised);
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
.item[data-tone='create'] {
|
|
695
|
-
--tone: var(--dpk-green);
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
.item[data-tone='update'] {
|
|
699
|
-
--tone: var(--dpk-blue);
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
.item[data-tone='delete'] {
|
|
703
|
-
--tone: var(--dpk-accent);
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
.item[data-tone='move'] {
|
|
707
|
-
--tone: var(--dpk-violet);
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
.item[data-stale='true'] {
|
|
711
|
-
opacity: 0.62;
|
|
712
|
-
border-style: dashed;
|
|
713
|
-
box-shadow: none;
|
|
714
|
-
transform: none;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
.item-head {
|
|
718
|
-
display: flex;
|
|
719
|
-
align-items: center;
|
|
720
|
-
gap: 7px;
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
.item-icon {
|
|
724
|
-
display: inline-flex;
|
|
725
|
-
flex: none;
|
|
726
|
-
align-items: center;
|
|
727
|
-
justify-content: center;
|
|
728
|
-
width: 18px;
|
|
729
|
-
height: 18px;
|
|
730
|
-
border-radius: var(--dpk-radius-xs);
|
|
731
|
-
background: color-mix(in srgb, var(--tone, var(--dpk-ink-faint)) 16%, transparent);
|
|
732
|
-
color: var(--tone, var(--dpk-ink-faint));
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
.item-icon svg {
|
|
736
|
-
display: block;
|
|
737
|
-
width: 11px;
|
|
738
|
-
height: 11px;
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
.item-title {
|
|
742
|
-
font-size: 12.5px;
|
|
743
|
-
font-weight: 600;
|
|
744
|
-
letter-spacing: -0.005em;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
.stale-badge {
|
|
748
|
-
padding: 1px 7px;
|
|
749
|
-
border: 1px solid color-mix(in srgb, var(--dpk-amber) 40%, transparent);
|
|
750
|
-
border-radius: 999px;
|
|
751
|
-
background: var(--dpk-amber-soft);
|
|
752
|
-
font-family: var(--dpk-mono);
|
|
753
|
-
font-size: 9px;
|
|
754
|
-
letter-spacing: 0.06em;
|
|
755
|
-
text-transform: uppercase;
|
|
756
|
-
color: var(--dpk-amber);
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
.item-head .dpk-icon-btn {
|
|
760
|
-
margin-left: auto;
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
.item-target {
|
|
764
|
-
display: inline-flex;
|
|
765
|
-
align-items: center;
|
|
766
|
-
width: fit-content;
|
|
767
|
-
padding: 1px 7px;
|
|
768
|
-
border-radius: var(--dpk-radius-xs);
|
|
769
|
-
background: var(--dpk-paper-sunken);
|
|
770
|
-
font-family: var(--dpk-mono);
|
|
771
|
-
font-size: 10px;
|
|
772
|
-
color: var(--dpk-ink-faint);
|
|
773
|
-
overflow-wrap: anywhere;
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
.item-summary {
|
|
777
|
-
font-size: 12px;
|
|
778
|
-
color: var(--dpk-ink-soft);
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
.item-body {
|
|
782
|
-
margin: 2px 0 0;
|
|
783
|
-
padding-left: 9px;
|
|
784
|
-
border-left: 2px solid var(--dpk-accent);
|
|
785
|
-
font-size: 12.5px;
|
|
786
|
-
white-space: pre-wrap;
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
.item-code {
|
|
790
|
-
margin-top: 2px;
|
|
791
|
-
padding: 5px 7px;
|
|
792
|
-
border-radius: var(--dpk-radius-xs);
|
|
793
|
-
background: var(--dpk-paper-sunken);
|
|
794
|
-
font-family: var(--dpk-mono);
|
|
795
|
-
font-size: 10px;
|
|
796
|
-
color: var(--dpk-ink-faint);
|
|
797
|
-
overflow-wrap: anywhere;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
.empty {
|
|
801
|
-
padding: 4px;
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
.empty-box {
|
|
805
|
-
display: grid;
|
|
806
|
-
justify-items: center;
|
|
807
|
-
gap: 6px;
|
|
808
|
-
padding: 26px 16px;
|
|
809
|
-
border: 1px dashed var(--dpk-rule-strong);
|
|
810
|
-
border-radius: var(--dpk-radius-lg);
|
|
811
|
-
background: var(--dpk-paper-sunken);
|
|
812
|
-
text-align: center;
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
.empty-box svg {
|
|
816
|
-
width: 20px;
|
|
817
|
-
height: 20px;
|
|
818
|
-
color: var(--dpk-ink-faint);
|
|
819
|
-
opacity: 0.7;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
.empty-box p {
|
|
823
|
-
margin: 0;
|
|
824
|
-
font-size: 12px;
|
|
825
|
-
line-height: 1.6;
|
|
826
|
-
color: var(--dpk-ink-soft);
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
.empty-box .empty-hint {
|
|
830
|
-
max-width: 30ch;
|
|
831
|
-
color: var(--dpk-ink-faint);
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
.issues {
|
|
835
|
-
margin: 10px 12px 0;
|
|
836
|
-
padding: 9px 11px 9px 13px;
|
|
837
|
-
border: 1px solid color-mix(in srgb, var(--dpk-danger) 35%, transparent);
|
|
838
|
-
border-radius: var(--dpk-radius-sm);
|
|
839
|
-
background: linear-gradient(90deg, var(--dpk-danger) 0 3px, transparent 3px), var(--dpk-danger-soft);
|
|
840
|
-
font-size: 11.5px;
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
.issues strong {
|
|
844
|
-
color: var(--dpk-danger);
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
.issues ul {
|
|
848
|
-
margin: 4px 0 0;
|
|
849
|
-
padding-left: 16px;
|
|
850
|
-
color: var(--dpk-ink-soft);
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
footer {
|
|
854
|
-
display: flex;
|
|
855
|
-
flex-wrap: wrap;
|
|
856
|
-
align-items: center;
|
|
857
|
-
gap: 8px;
|
|
858
|
-
padding: 12px 16px;
|
|
859
|
-
border-top: 1px solid var(--dpk-rule);
|
|
860
|
-
background: var(--dpk-glass);
|
|
861
|
-
backdrop-filter: blur(12px);
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
.footer-actions {
|
|
865
|
-
display: flex;
|
|
866
|
-
align-items: center;
|
|
867
|
-
gap: 6px;
|
|
868
|
-
flex-wrap: wrap;
|
|
869
|
-
margin-left: auto;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
.flash {
|
|
873
|
-
font-family: var(--dpk-mono);
|
|
874
|
-
font-size: 10px;
|
|
875
|
-
letter-spacing: 0.04em;
|
|
876
|
-
color: var(--dpk-green);
|
|
877
|
-
}
|
|
878
|
-
`],vr={CHILD:2},ln=t=>(...e)=>({_$litDirective$:t,values:e});let cn=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,s){this._$Ct=e,this._$AM=n,this._$Ci=s}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}};const{I:br}=vs,pn=t=>t,hn=()=>document.createComment(""),re=(t,e,n)=>{const s=t._$AA.parentNode,r=e===void 0?t._$AB:e._$AA;if(n===void 0){const i=s.insertBefore(hn(),r),o=s.insertBefore(hn(),r);n=new br(i,o,t,t.options)}else{const i=n._$AB.nextSibling,o=n._$AM,l=o!==t;if(l){let a;n._$AQ?.(t),n._$AM=t,n._$AP!==void 0&&(a=t._$AU)!==o._$AU&&n._$AP(a)}if(i!==r||l){let a=n._$AA;for(;a!==i;){const d=pn(a).nextSibling;pn(s).insertBefore(a,r),a=d}}}return n},z=(t,e,n=t)=>(t._$AI(e,n),t),kr={},un=(t,e=kr)=>t._$AH=e,yr=t=>t._$AH,Ze=t=>{t._$AR(),t._$AA.remove()},fn=(t,e,n)=>{const s=new Map;for(let r=e;r<=n;r++)s.set(t[r],r);return s},gn=ln(class extends cn{constructor(t){if(super(t),t.type!==vr.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,n){let s;n===void 0?n=e:e!==void 0&&(s=e);const r=[],i=[];let o=0;for(const l of t)r[o]=s?s(l,o):o,i[o]=n(l,o),o++;return{values:i,keys:r}}render(t,e,n){return this.dt(t,e,n).values}update(t,[e,n,s]){const r=yr(t),{values:i,keys:o}=this.dt(e,n,s);if(!Array.isArray(r))return this.ut=o,i;const l=this.ut??=[],a=[];let d,p,c=0,h=r.length-1,u=0,v=i.length-1;for(;c<=h&&u<=v;)if(r[c]===null)c++;else if(r[h]===null)h--;else if(l[c]===o[u])a[u]=z(r[c],i[u]),c++,u++;else if(l[h]===o[v])a[v]=z(r[h],i[v]),h--,v--;else if(l[c]===o[v])a[v]=z(r[c],i[v]),re(t,a[v+1],r[c]),c++,v--;else if(l[h]===o[u])a[u]=z(r[h],i[u]),re(t,r[c],r[h]),h--,u++;else if(d===void 0&&(d=fn(o,u,v),p=fn(l,c,h)),d.has(l[c]))if(d.has(l[h])){const C=p.get(o[u]),A=C!==void 0?r[C]:null;if(A===null){const j=re(t,r[c]);z(j,i[u]),a[u]=j}else a[u]=z(A,i[u]),re(t,r[c],A),r[C]=null;u++}else Ze(r[h]),h--;else Ze(r[c]),c++;for(;u<=v;){const C=re(t,a[v+1]);z(C,i[u]),a[u++]=C}for(;c<=h;){const C=r[c++];C!==null&&Ze(C)}return this.ut=o,un(t,a),P}}),Qe=()=>f`<svg
|
|
879
|
-
viewBox="0 0 16 16"
|
|
880
|
-
fill="none"
|
|
881
|
-
stroke="currentColor"
|
|
882
|
-
stroke-width="1.5"
|
|
883
|
-
stroke-linecap="round"
|
|
884
|
-
stroke-linejoin="round"
|
|
885
|
-
aria-hidden="true"
|
|
886
|
-
focusable="false"
|
|
887
|
-
>
|
|
888
|
-
<path d="M4 4l8 8M12 4l-8 8" />
|
|
889
|
-
</svg>`,mn=()=>f`<svg
|
|
890
|
-
viewBox="0 0 16 16"
|
|
891
|
-
fill="none"
|
|
892
|
-
stroke="currentColor"
|
|
893
|
-
stroke-width="1.5"
|
|
894
|
-
stroke-linecap="round"
|
|
895
|
-
stroke-linejoin="round"
|
|
896
|
-
aria-hidden="true"
|
|
897
|
-
focusable="false"
|
|
898
|
-
>
|
|
899
|
-
<path d="M3.5 5h9M5.5 5V3.5a1 1 0 011-1h3a1 1 0 011 1V5" />
|
|
900
|
-
<path d="M5 5l.5 7.5h5L11 5" />
|
|
901
|
-
<path d="M6.8 7.5v3.5M9.2 7.5v3.5" />
|
|
902
|
-
</svg>`,vn=()=>f`<svg
|
|
903
|
-
viewBox="0 0 16 16"
|
|
904
|
-
fill="none"
|
|
905
|
-
stroke="currentColor"
|
|
906
|
-
stroke-width="1.5"
|
|
907
|
-
stroke-linecap="round"
|
|
908
|
-
stroke-linejoin="round"
|
|
909
|
-
aria-hidden="true"
|
|
910
|
-
focusable="false"
|
|
911
|
-
>
|
|
912
|
-
<path d="M3 13l1.5-1.5M11.3 2.7a1.5 1.5 0 012.1 2.1L5.5 12.7l-3 .8.8-3z" />
|
|
913
|
-
</svg>`,Xe=()=>f`<svg
|
|
914
|
-
viewBox="0 0 16 16"
|
|
915
|
-
fill="none"
|
|
916
|
-
stroke="currentColor"
|
|
917
|
-
stroke-width="1.5"
|
|
918
|
-
stroke-linecap="round"
|
|
919
|
-
stroke-linejoin="round"
|
|
920
|
-
aria-hidden="true"
|
|
921
|
-
focusable="false"
|
|
922
|
-
>
|
|
923
|
-
<path d="M3.5 3.5h9a1 1 0 011 1v5a1 1 0 01-1 1H8.2l-2.7 2.2v-2.2H3.5a1 1 0 01-1-1v-5a1 1 0 011-1z" />
|
|
924
|
-
</svg>`,bn=()=>f`<svg
|
|
925
|
-
viewBox="0 0 16 16"
|
|
926
|
-
fill="none"
|
|
927
|
-
stroke="currentColor"
|
|
928
|
-
stroke-width="1.5"
|
|
929
|
-
stroke-linecap="round"
|
|
930
|
-
stroke-linejoin="round"
|
|
931
|
-
aria-hidden="true"
|
|
932
|
-
focusable="false"
|
|
933
|
-
>
|
|
934
|
-
<path d="M6.5 9.5l3-3" />
|
|
935
|
-
<path d="M7 5.5l1-1a2.1 2.1 0 013 3l-1 1" />
|
|
936
|
-
<path d="M9 10.5l-1 1a2.1 2.1 0 01-3-3l1-1" />
|
|
937
|
-
</svg>`,xr=()=>f`<svg
|
|
938
|
-
viewBox="0 0 16 16"
|
|
939
|
-
fill="none"
|
|
940
|
-
stroke="currentColor"
|
|
941
|
-
stroke-width="1.5"
|
|
942
|
-
stroke-linecap="round"
|
|
943
|
-
stroke-linejoin="round"
|
|
944
|
-
aria-hidden="true"
|
|
945
|
-
focusable="false"
|
|
946
|
-
>
|
|
947
|
-
<rect x="5.5" y="5.5" width="7" height="7" rx="1.5" />
|
|
948
|
-
<path d="M10.5 5.5V4.5a1 1 0 00-1-1h-5a1 1 0 00-1 1v5a1 1 0 001 1h1" />
|
|
949
|
-
</svg>`,wr=()=>f`<svg
|
|
950
|
-
viewBox="0 0 16 16"
|
|
951
|
-
fill="none"
|
|
952
|
-
stroke="currentColor"
|
|
953
|
-
stroke-width="1.5"
|
|
954
|
-
stroke-linecap="round"
|
|
955
|
-
stroke-linejoin="round"
|
|
956
|
-
aria-hidden="true"
|
|
957
|
-
focusable="false"
|
|
958
|
-
>
|
|
959
|
-
<path d="M3.5 8.5l3 3 6-7" />
|
|
960
|
-
</svg>`,kn=()=>f`<svg
|
|
961
|
-
viewBox="0 0 16 16"
|
|
962
|
-
fill="none"
|
|
963
|
-
stroke="currentColor"
|
|
964
|
-
stroke-width="1.5"
|
|
965
|
-
stroke-linecap="round"
|
|
966
|
-
stroke-linejoin="round"
|
|
967
|
-
aria-hidden="true"
|
|
968
|
-
focusable="false"
|
|
969
|
-
>
|
|
970
|
-
<path d="M8 3.5v9M3.5 8h9" />
|
|
971
|
-
</svg>`,$r=()=>f`<svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" focusable="false">
|
|
972
|
-
<circle cx="6.5" cy="4.5" r="1" />
|
|
973
|
-
<circle cx="9.5" cy="4.5" r="1" />
|
|
974
|
-
<circle cx="6.5" cy="8" r="1" />
|
|
975
|
-
<circle cx="9.5" cy="8" r="1" />
|
|
976
|
-
<circle cx="6.5" cy="11.5" r="1" />
|
|
977
|
-
<circle cx="9.5" cy="11.5" r="1" />
|
|
978
|
-
</svg>`,yn=()=>f`<svg
|
|
979
|
-
viewBox="0 0 16 16"
|
|
980
|
-
fill="none"
|
|
981
|
-
stroke="currentColor"
|
|
982
|
-
stroke-width="1.5"
|
|
983
|
-
stroke-linecap="round"
|
|
984
|
-
stroke-linejoin="round"
|
|
985
|
-
aria-hidden="true"
|
|
986
|
-
focusable="false"
|
|
987
|
-
>
|
|
988
|
-
<path
|
|
989
|
-
d="M8 2.5v11M8 2.5L5.5 5M8 2.5l2.5 2.5M8 13.5l-2.5-2.5M8 13.5l2.5-2.5M2.5 8h11M2.5 8L5 5.5M2.5 8l2.5 2.5M13.5 8L11 5.5M13.5 8L11 10.5"
|
|
990
|
-
/>
|
|
991
|
-
</svg>`,Ar=()=>f`<svg
|
|
992
|
-
viewBox="0 0 16 16"
|
|
993
|
-
fill="none"
|
|
994
|
-
stroke="currentColor"
|
|
995
|
-
stroke-width="1.5"
|
|
996
|
-
stroke-linecap="round"
|
|
997
|
-
stroke-linejoin="round"
|
|
998
|
-
aria-hidden="true"
|
|
999
|
-
focusable="false"
|
|
1000
|
-
>
|
|
1001
|
-
<path d="M8 12.5V3.5M4.5 7L8 3.5 11.5 7" />
|
|
1002
|
-
</svg>`,Cr=()=>f`<svg
|
|
1003
|
-
viewBox="0 0 16 16"
|
|
1004
|
-
fill="none"
|
|
1005
|
-
stroke="currentColor"
|
|
1006
|
-
stroke-width="1.5"
|
|
1007
|
-
stroke-linecap="round"
|
|
1008
|
-
stroke-linejoin="round"
|
|
1009
|
-
aria-hidden="true"
|
|
1010
|
-
focusable="false"
|
|
1011
|
-
>
|
|
1012
|
-
<path d="M8 3.5v9M4.5 9L8 12.5 11.5 9" />
|
|
1013
|
-
</svg>`,Sr=()=>f`<svg
|
|
1014
|
-
viewBox="0 0 16 16"
|
|
1015
|
-
fill="none"
|
|
1016
|
-
stroke="currentColor"
|
|
1017
|
-
stroke-width="1.5"
|
|
1018
|
-
stroke-linecap="round"
|
|
1019
|
-
stroke-linejoin="round"
|
|
1020
|
-
aria-hidden="true"
|
|
1021
|
-
focusable="false"
|
|
1022
|
-
>
|
|
1023
|
-
<path d="M10 3.5L5.5 8 10 12.5" />
|
|
1024
|
-
</svg>`,_r=()=>f`<svg
|
|
1025
|
-
viewBox="0 0 16 16"
|
|
1026
|
-
fill="none"
|
|
1027
|
-
stroke="currentColor"
|
|
1028
|
-
stroke-width="1.5"
|
|
1029
|
-
stroke-linecap="round"
|
|
1030
|
-
stroke-linejoin="round"
|
|
1031
|
-
aria-hidden="true"
|
|
1032
|
-
focusable="false"
|
|
1033
|
-
>
|
|
1034
|
-
<path d="M6 3.5L10.5 8 6 12.5" />
|
|
1035
|
-
</svg>`,Er=()=>f`<svg
|
|
1036
|
-
viewBox="0 0 16 16"
|
|
1037
|
-
fill="none"
|
|
1038
|
-
stroke="currentColor"
|
|
1039
|
-
stroke-width="1.5"
|
|
1040
|
-
stroke-linecap="round"
|
|
1041
|
-
stroke-linejoin="round"
|
|
1042
|
-
aria-hidden="true"
|
|
1043
|
-
focusable="false"
|
|
1044
|
-
>
|
|
1045
|
-
<path d="M9.5 2.5h4v4M6.5 13.5h-4v-4M13.5 2.5L9 7M2.5 13.5L7 9" />
|
|
1046
|
-
</svg>`,Tr=()=>f`<svg
|
|
1047
|
-
viewBox="0 0 16 16"
|
|
1048
|
-
fill="none"
|
|
1049
|
-
stroke="currentColor"
|
|
1050
|
-
stroke-width="1.5"
|
|
1051
|
-
stroke-linecap="round"
|
|
1052
|
-
stroke-linejoin="round"
|
|
1053
|
-
aria-hidden="true"
|
|
1054
|
-
focusable="false"
|
|
1055
|
-
>
|
|
1056
|
-
<path d="M13.5 7h-4.5v-4.5M2.5 9h4.5v4.5M9 7l4.5-4.5M7 9l-4.5 4.5" />
|
|
1057
|
-
</svg>`,Mr=()=>f`<svg
|
|
1058
|
-
viewBox="0 0 16 16"
|
|
1059
|
-
fill="none"
|
|
1060
|
-
stroke="currentColor"
|
|
1061
|
-
stroke-width="1.5"
|
|
1062
|
-
stroke-linecap="round"
|
|
1063
|
-
stroke-linejoin="round"
|
|
1064
|
-
aria-hidden="true"
|
|
1065
|
-
focusable="false"
|
|
1066
|
-
>
|
|
1067
|
-
<circle cx="8" cy="8" r="2.75" />
|
|
1068
|
-
<path
|
|
1069
|
-
d="M8 1.5v1.5M8 13v1.5M1.5 8H3M13 8h1.5M3.4 3.4l1.06 1.06M11.54 11.54l1.06 1.06M3.4 12.6l1.06-1.06M11.54 4.46l1.06-1.06"
|
|
1070
|
-
/>
|
|
1071
|
-
</svg>`,Or=()=>f`<svg
|
|
1072
|
-
viewBox="0 0 16 16"
|
|
1073
|
-
fill="none"
|
|
1074
|
-
stroke="currentColor"
|
|
1075
|
-
stroke-width="1.5"
|
|
1076
|
-
stroke-linecap="round"
|
|
1077
|
-
stroke-linejoin="round"
|
|
1078
|
-
aria-hidden="true"
|
|
1079
|
-
focusable="false"
|
|
1080
|
-
>
|
|
1081
|
-
<path d="M13.5 9.6A5.75 5.75 0 016.4 2.5a5.75 5.75 0 107.1 7.1z" />
|
|
1082
|
-
</svg>`,jr=t=>{switch(t){case"comment":return Xe();case"create":return kn();case"update":return vn();case"delete":return mn();case"move":return yn();default:return bn()}},Rr=(t,e,n,s=!1)=>f`
|
|
1083
|
-
${s?m:f`<header><h2>${t.heading}</h2></header>`}
|
|
1084
|
-
${e.issues.length>0?f`<div class="issues" role="alert">
|
|
1085
|
-
<strong>${t.rejected}</strong>
|
|
1086
|
-
<ul>
|
|
1087
|
-
${e.issues.map(r=>f`<li>${r}</li>`)}
|
|
1088
|
-
</ul>
|
|
1089
|
-
</div>`:m}
|
|
1090
|
-
<div class="composer">
|
|
1091
|
-
<textarea
|
|
1092
|
-
class="dpk-textarea"
|
|
1093
|
-
aria-label=${t.commentLabel}
|
|
1094
|
-
placeholder=${t.commentPlaceholder}
|
|
1095
|
-
.value=${e.body}
|
|
1096
|
-
@input=${r=>{r.currentTarget instanceof HTMLTextAreaElement&&n({kind:"input",body:r.currentTarget.value})}}
|
|
1097
|
-
@keydown=${r=>{!r.isComposing&&r.key==="Enter"&&(r.metaKey||r.ctrlKey)&&(r.preventDefault(),n({kind:"submit"}))}}
|
|
1098
|
-
></textarea>
|
|
1099
|
-
${e.attachment.kind==="explicit"?f`<div class="row">
|
|
1100
|
-
<button class="chip" type="button" aria-label=${t.detach} @click=${()=>n({kind:"clear-target"})}>
|
|
1101
|
-
${e.target.label} ${Qe()}
|
|
1102
|
-
</button>
|
|
1103
|
-
</div>`:e.attachment.kind==="checkbox"?f`<div class="row">
|
|
1104
|
-
<label class="attach">
|
|
1105
|
-
<input
|
|
1106
|
-
type="checkbox"
|
|
1107
|
-
.checked=${e.attachment.checked}
|
|
1108
|
-
@change=${r=>{r.currentTarget instanceof HTMLInputElement&&n({kind:"attach",current:r.currentTarget.checked})}}
|
|
1109
|
-
/>
|
|
1110
|
-
<span>${t.attachTo(e.attachment.group)}</span>
|
|
1111
|
-
</label>
|
|
1112
|
-
</div>`:m}
|
|
1113
|
-
<div class="row">
|
|
1114
|
-
<span class="target-line">→ ${e.target.label}</span>
|
|
1115
|
-
<button
|
|
1116
|
-
class="dpk-btn dpk-btn--accent"
|
|
1117
|
-
type="button"
|
|
1118
|
-
?disabled=${!e.canSubmit}
|
|
1119
|
-
@click=${()=>n({kind:"submit"})}
|
|
1120
|
-
>
|
|
1121
|
-
${t.addNote}
|
|
1122
|
-
</button>
|
|
1123
|
-
</div>
|
|
1124
|
-
</div>
|
|
1125
|
-
<ul class="list">
|
|
1126
|
-
${e.items.length===0?f`<li class="empty">
|
|
1127
|
-
<div class="empty-box">
|
|
1128
|
-
${Xe()}
|
|
1129
|
-
<p>${t.empty}</p>
|
|
1130
|
-
<p class="empty-hint">${t.emptyHint}</p>
|
|
1131
|
-
</div>
|
|
1132
|
-
</li>`:gn(e.items,r=>r.id,r=>Lr(t,r,n))}
|
|
1133
|
-
</ul>
|
|
1134
|
-
<footer>
|
|
1135
|
-
${s||e.send==="hidden"?m:f`<button
|
|
1136
|
-
class="dpk-btn dpk-btn--accent"
|
|
1137
|
-
type="button"
|
|
1138
|
-
?disabled=${e.send==="disabled"}
|
|
1139
|
-
@click=${()=>n({kind:"send"})}
|
|
1140
|
-
>
|
|
1141
|
-
${t.sendToClaude}
|
|
1142
|
-
</button>`}
|
|
1143
|
-
<div class="footer-actions">
|
|
1144
|
-
${s?m:f`<button
|
|
1145
|
-
class=${e.send==="hidden"?"dpk-btn dpk-btn--accent":"dpk-btn"}
|
|
1146
|
-
type="button"
|
|
1147
|
-
title=${t.copyTitle}
|
|
1148
|
-
?disabled=${e.items.length===0}
|
|
1149
|
-
@click=${()=>n({kind:"copy"})}
|
|
1150
|
-
>
|
|
1151
|
-
${t.copy}
|
|
1152
|
-
</button>`}
|
|
1153
|
-
<button
|
|
1154
|
-
class="dpk-btn dpk-btn--ghost"
|
|
1155
|
-
type="button"
|
|
1156
|
-
?disabled=${e.items.length===0}
|
|
1157
|
-
@click=${()=>n({kind:"clear"})}
|
|
1158
|
-
>
|
|
1159
|
-
${t.clear}
|
|
1160
|
-
</button>
|
|
1161
|
-
</div>
|
|
1162
|
-
${e.flash?f`<span class="flash" role="status">${e.flash}</span>`:m}
|
|
1163
|
-
</footer>
|
|
1164
|
-
`,Lr=(t,e,n)=>f`
|
|
1165
|
-
<li class="item" data-tone=${e.tone} data-stale=${String(e.stale!==null)}>
|
|
1166
|
-
<div class="item-head">
|
|
1167
|
-
<span class="item-icon">${jr(e.tone)}</span>
|
|
1168
|
-
<span class="item-title">${e.title}</span>
|
|
1169
|
-
${e.stale?f`<span class="stale-badge">${e.stale}</span>`:m}
|
|
1170
|
-
<button
|
|
1171
|
-
class="dpk-icon-btn"
|
|
1172
|
-
type="button"
|
|
1173
|
-
aria-label=${t.deleteAction}
|
|
1174
|
-
@click=${()=>n({kind:"delete",id:e.id})}
|
|
1175
|
-
>
|
|
1176
|
-
${Qe()}
|
|
1177
|
-
</button>
|
|
1178
|
-
</div>
|
|
1179
|
-
<div class="item-target">${e.targetLabel}</div>
|
|
1180
|
-
${e.text.kind==="comment"?f`<p class="item-body">${e.text.body}</p>`:e.text.body?f`<div class="item-summary">${e.text.body}</div>`:m}
|
|
1181
|
-
<code class="item-code">${e.code}</code>
|
|
1182
|
-
</li>
|
|
1183
|
-
`;class xn extends O{static{this.styles=mr}static{this.properties={definition:{attribute:!1},state:{attribute:!1},navigation:{attribute:!1},derivation:{attribute:!1},issues:{attribute:!1},pendingTarget:{attribute:!1},onDelete:{attribute:!1},onClear:{attribute:!1},onComment:{attribute:!1},exportBrief:{attribute:!1},sendToClaude:{attribute:!1},embedded:{type:Boolean}}}#e=rr();#r=new Ne(this);constructor(){super(),this.embedded=!1,this.definition=null,this.state=void 0,this.navigation={},this.derivation=null,this.issues=[],this.pendingTarget=null}willUpdate(e){e.has("pendingTarget")&&this.pendingTarget&&(this.#e=rn(this.#e,{kind:"target-requested",ref:this.pendingTarget}))}updated(e){e.has("pendingTarget")&&this.pendingTarget&&this.isConnected&&this.renderRoot.querySelector("textarea")?.focus()}#s(){return!this.definition||!this.derivation?null:{definition:this.definition,state:this.state,navigation:this.navigation,derivation:this.derivation,issues:this.issues,sendable:this.sendToClaude!==void 0,locale:this.#r.locale}}render(){const e=this.#s();return e?Rr(nn(this.#r.locale),dn(e,this.#e),this.#i,this.embedded):m}#t(e){this.#e=rn(this.#e,e),this.requestUpdate()}#i=e=>{switch(e.kind){case"delete":this.onDelete?.(e.id);return;case"clear":this.onClear?.();return;case"copy":this.#o();return;case"send":this.#n();return;case"submit":{const n=this.#s();if(!n||!this.onComment)return;const s=ir(this.#e,dn(n,this.#e).target.ref);if(!s||!this.onComment(s.target,s.body).ok)return;this.#t({kind:"submitted"});return}default:this.#t(e)}};async#n(){const e=this.sendToClaude;if(!e||this.#e.send.kind==="pending")return;this.#t({kind:"send-started"});const n=this.#e.sendRequest,s=await e().catch(()=>({ok:!1,reason:"error"}));this.isConnected&&this.#t({kind:"send-finished",request:n,outcome:s})}async#o(){const e=this.#s();if(!e)return;this.#t({kind:"copy-started"});const n=this.#e.copyRequest;try{const s=this.exportBrief?.()??We({...e.derivation,navigation:e.navigation,issues:e.issues},e.definition,Y),r=await Ye(s);this.isConnected&&this.#t({kind:"copy-finished",request:n,ok:r})}catch{this.isConnected&&this.#t({kind:"copy-finished",request:n,ok:!1})}}}const Nr=()=>{customElements.get("dpk-component-comment-panel")||customElements.define("dpk-component-comment-panel",xn)},Pr=$({value:g()}),Dr=t=>e=>{if(!(e instanceof CustomEvent))return;const n=y(Pr,e.detail);n.success&&t(n.output.value)},wn=t=>e=>{const n=F(e.target,HTMLSelectElement);n!==null&&t(n.value)},Ir=t=>e=>{const n=F(e.target,HTMLInputElement);n!==null&&t(n.checked)},ie=t=>t==="light"||t==="dark"?t:null,$n=t=>t.authored??t.environment,An=t=>t.preference??$n(t),Ur=t=>{const e=An(t)==="dark"?"light":"dark";return e===$n(t)?null:e},Cn=U(J({value:b(g(),I(/^element:.+/)),label:b(g(),k(1)),group:S(g())})),qr=$({targets:Cn,providers:U($({id:b(g(),k(1)),results:U(en)}))}),zr=J({target:b(g(),I(/^element:.+/)),body:b(g(),Ie(),k(1))}),Sn=t=>t.group?`${t.group} \xB7 ${t.label}`:t.label,_n=(t,e,n)=>{const s=new Map(e.map(r=>[r.value,r]));return{...t,hasTarget:(r,i)=>t.hasTarget(r,i)||s.has(_(i)),commentTargets:(r,i)=>{const o=t.commentTargets(r,i),l=new Set(o.map(a=>a.value));return[...o,...e.filter(a=>!l.has(a.value))]},describe:(r,i,o)=>{if(T(r)){const d=n.get(r.id),p=s.get(_(r.target));return{title:d?.title??r.type,...d?.summary===void 0?{}:{summary:d.summary},tone:d?.tone??"update",targetLabel:p?Sn(p):r.target.id}}const l=t.describe(r,i,o),a=r.type==="comment"&&!t.hasTarget(i,r.target)?s.get(_(r.target)):void 0;return a===void 0?l:{...l,targetLabel:Sn(a)}},serialize:r=>T(r)?`${r.type} ${_(r.target)} ${JSON.stringify(r.payload)}`:t.serialize(r)}},En=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function Tn(t){return typeof En.Buffer<"u"&&En.Buffer.isBuffer(t)}function Mn(t){if(!t||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)==="[object Object]":!1}function On(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function jn(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Br="[object RegExp]",Hr="[object String]",Fr="[object Number]",Kr="[object Boolean]",Jr="[object Symbol]",Vr="[object Date]",Wr="[object Map]",Yr="[object Set]",Gr="[object Array]",Zr="[object Function]",Qr="[object ArrayBuffer]",et="[object Object]",Xr="[object Error]",ei="[object DataView]",ti="[object Uint8Array]",ni="[object Uint8ClampedArray]",si="[object Uint16Array]",ri="[object Uint32Array]",ii="[object BigUint64Array]",oi="[object Int8Array]",ai="[object Int16Array]",di="[object Int32Array]",li="[object BigInt64Array]",ci="[object Float32Array]",pi="[object Float64Array]";function hi(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function ui(t,e,n){return oe(t,e,void 0,void 0,void 0,void 0,n)}function oe(t,e,n,s,r,i,o){const l=o(t,e,n,s,r,i);if(l!==void 0)return l;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return t===e;case"number":return t===e||Object.is(t,e);case"function":return t===e;case"object":return ae(t,e,i,o)}return ae(t,e,i,o)}function ae(t,e,n,s){if(Object.is(t,e))return!0;let r=jn(t),i=jn(e);if(r==="[object Arguments]"&&(r=et),i==="[object Arguments]"&&(i=et),r!==i)return!1;switch(r){case Hr:return t.toString()===e.toString();case Fr:return hi(t.valueOf(),e.valueOf());case Kr:case Vr:case Jr:return Object.is(t.valueOf(),e.valueOf());case Br:return t.source===e.source&&t.flags===e.flags;case Zr:return t===e}n=n??new Map;const o=n.get(t),l=n.get(e);if(o!=null&&l!=null)return o===e;n.set(t,e),n.set(e,t);try{switch(r){case Wr:if(t.size!==e.size)return!1;for(const[a,d]of t.entries())if(!e.has(a)||!oe(d,e.get(a),a,t,e,n,s))return!1;return!0;case Yr:{if(t.size!==e.size)return!1;const a=Array.from(t.values()),d=Array.from(e.values());for(let p=0;p<a.length;p++){const c=a[p],h=d.findIndex(u=>oe(c,u,void 0,t,e,n,s));if(h===-1)return!1;d.splice(h,1)}return!0}case Gr:case ti:case ni:case si:case ri:case ii:case oi:case ai:case di:case li:case ci:case pi:if(Tn(t)!==Tn(e)||t.length!==e.length)return!1;for(let a=0;a<t.length;a++)if(!oe(t[a],e[a],a,t,e,n,s))return!1;return!0;case Qr:return t.byteLength!==e.byteLength?!1:ae(new Uint8Array(t),new Uint8Array(e),n,s);case ei:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:ae(new Uint8Array(t),new Uint8Array(e),n,s);case Xr:return t.name===e.name&&t.message===e.message;case et:{if(!(ae(t.constructor,e.constructor,n,s)||Mn(t)&&Mn(e)))return!1;const a=[...Object.keys(t),...On(t)],d=[...Object.keys(e),...On(e)];if(a.length!==d.length)return!1;for(let p=0;p<a.length;p++){const c=a[p],h=t[c];if(!Object.hasOwn(e,c))return!1;const u=e[c];if(!oe(h,u,c,t,e,n,s))return!1}return!0}default:return!1}}finally{n.delete(t),n.delete(e)}}function fi(){}function we(t,e){return ui(t,e,fi)}const Rn="page",Ln=t=>_(t),Nn=(t,e,n,s=new Map)=>{let r=e;const i=[],o=[],l=[],a=[],d=new Map;for(const c of n){if(c.type===E)continue;if(T(c)){const v=s.get(c.id);v===void 0||v.stale!==void 0?o.push({action:c,reason:v?.stale??"target-missing"}):i.push(c);continue}const h=ye(t.actions,c.type);if(!h){o.push({action:c,reason:"unsupported-action-type"});continue}const u=t.apply(r,c);if(u===null){o.push({action:c,reason:t.hasTarget(r,c.target)?"constraint-violated":"target-missing"});continue}if(h.mode!=="append"&&tt(t,r,u)){l.push(c);continue}r=u,i.push(c)}for(const c of n){if(c.type!==E)continue;if(c.target.type!==Rn&&!t.hasTarget(r,c.target)){o.push({action:c,reason:"target-missing"});continue}a.push(c);const h=Ln(c.target);d.set(h,[...d.get(h)??[],c])}const p=new Map(n.map((c,h)=>[c.id,h]));return o.sort((c,h)=>(p.get(c.action.id)??0)-(p.get(h.action.id)??0)),{base:e,state:r,actions:n,applied:i,stale:o,obsolete:l,comments:a,commentsByTarget:d}},tt=(t,e,n)=>e===n?!0:t.canonicalState===void 0?we(e,n):we(t.canonicalState(e),t.canonicalState(n)),Pn=t=>{const e=new Set(t.obsolete.map(n=>n.id));return t.actions.filter(n=>!e.has(n.id))},gi=(t,e,n,s)=>{let r=e;const i=s??Dn(r).map(o=>o.id);for(const o of[...i].reverse())r=mi(t,r,n,o,s!==void 0)??r;return r},Dn=t=>t.applied.filter(e=>!T(e)),mi=(t,e,n,s,r)=>{const i=Dn(e),o=i.findIndex(h=>h.id===s),l=i[o];if(l===void 0)return null;const a=i.slice(0,o),d=[...r?vi(t,e.base,i,o):[],...bi(t,a,l)],p=new Set,c=d.filter(h=>{const u=h.join(" ");return p.has(u)?!1:(p.add(u),!0)}).sort((h,u)=>u.length-h.length);for(const h of c){const u=ki(t,e,n,h);if(u!==null)return u}return null},vi=(t,e,n,s)=>{const r=[];let i=e;for(const o of n.slice(0,s+1))r.push(i),i=t.apply(i,o)??i;return r.flatMap((o,l)=>tt(t,o,i)?[n.slice(l,s+1).map(a=>a.id)]:[])},bi=(t,e,n)=>{const s=In(n),r=e.filter(a=>In(a).some(d=>s.includes(d))),i=Un(t,n),o=r.filter(a=>Un(t,a)===i),l=a=>a.map((d,p)=>[...a.slice(p).map(c=>c.id),n.id]);return[...l(r),...l(o),...r.map(a=>[a.id,n.id]),...r.map(a=>[a.id])]},In=t=>{const e=t.target.type===Rn?[]:t.target.id.split("."),n=typeof t.payload=="object"&&t.payload!==null?Object.values(t.payload).filter(s=>typeof s=="string"&&s!==""):[];return[...e,...n]},Un=(t,e)=>ye(t.actions,e.type)?.mode,ki=(t,e,n,s)=>{const r=new Set(e.stale.map(o=>o.action.id)),i=new Set(s);for(;;){const o=n(e.actions.filter(a=>!i.has(a.id))),l=o.stale.filter(a=>!r.has(a.action.id)).map(a=>a.action);if(l.length===0)return tt(t,o.state,e.state)?o:null;if(l.some(a=>a.type===E||T(a)))return null;for(const a of l)i.add(a.id)}},yi=$({v:K(1),template:b(g(),k(1)),actions:U(q())});class nt{constructor(e){this.storage=e}load(e,n){try{const s=this.storage.getItem(e);if(s===null)return[];const r=y(yi,JSON.parse(s));return!r.success||r.output.template!==n?[]:r.output.actions.flatMap(i=>{const o=y(V,i);return o.success?[o.output]:[]})}catch{return[]}}save(e,n,s){const r={v:1,template:n,actions:s};try{this.storage.setItem(e,JSON.stringify(r))}catch{}}clear(e){try{this.storage.removeItem(e)}catch{}}}class st{constructor(){this.store=new Map}load(e,n){return new nt({getItem:s=>this.store.get(s)??null,setItem:(s,r)=>{this.store.set(s,r)},removeItem:s=>{this.store.delete(s)}}).load(e,n)}save(e,n,s){this.store.set(e,JSON.stringify({v:1,template:n,actions:s}))}clear(e){this.store.delete(e)}}const rt=()=>{try{if(typeof localStorage<"u")return new nt(localStorage)}catch{}return new st},qn=t=>`dev-process-kit:draft:${typeof location>"u"?"local":`${location.pathname}${location.search}`}:${t}`,xi=U(q());class zn{#e;#r;#s={targets:[],providers:[]};#t=new Map;#i;#n;#o;#a;#d;#p=new Set;#m=[];#f=0;constructor(e){this.#e=e.definition,this.#r=_n(e.definition,[],this.#t),this.#i=e.base,this.#d=e.storageKey??qn(e.definition.name),this.#a=e.storage===void 0?rt():e.storage;const n=e.initialActions??this.#a?.load(this.#d,this.definition.name)??[];this.#n=Hn(this.definition,n),this.#o=this.#l(this.#n),this.#w()&&this.#y()}get definition(){return this.#r}setComponentSnapshot(e){const n=Kt(qr,e);if(!we(n,this.#s)){this.#s=n,this.#g(),this.#o=this.#l(this.#n);for(const s of this.#p)s()}}setTemplate(e){this.#e=e,this.#g(),this.#o=this.#l(this.#n);for(const n of this.#p)n()}#g(){this.#t=tn(this.#n,this.#s.providers),this.#r=_n(this.#e,this.#s.targets,this.#t)}#l(e){return Nn(this.definition,this.#i,e,tn(e,this.#s.providers))}get base(){return this.#i}get actions(){return this.#n}get derivation(){return this.#o}get lastIssues(){return this.#m}get prunedCount(){return this.#f}descriptorFor(e,n){return Bn(this.definition,e,n)}dispatch(e){const n=this.#v(e,this.#o.state);if(!n.ok)return this.#c([n.issue]);const s=this.descriptorFor(n.action.type,n.action.target);return s?(this.#h(ze(this.#n,n.action,s),[n.action.id]),{ok:!0,id:n.action.id}):this.#c([{path:"type",message:"unknown action type"}])}dispatchBatch(e){const n=y(xi,e);if(!n.success)return this.#c([se(n.issues)]);const s=n.output;if(s.length===0)return{ok:!0,ids:[]};let r=this.#n,i=this.#o.state;const o=[];for(const l of s){const a=this.#v(l,i);if(!a.ok)return this.#c([a.issue]);const d=a.action,p=this.descriptorFor(d.type,d.target);if(!p)return this.#c([{path:"type",message:"unknown action type"}]);if((d.type==="comment"||T(d)?d.target.type==="page"||this.definition.hasTarget(i,d.target)?i:null:this.definition.apply(i,d))===null)return this.#c([{path:"target",message:"batch action is not applicable"}]);r=ze(r,d,p),i=this.#l(r).state,o.push(d.id)}return this.#h(r,o),{ok:!0,ids:o}}#v(e,n){const s=y(Yt,e);if(!s.success)return{ok:!1,issue:se(s.issues)};const r=this.descriptorFor(s.output.type,typeof s.output.target=="string"?Ue(s.output.target,"page"):s.output.target);if(!r)return{ok:!1,issue:{path:"type",message:`unknown action type "${s.output.type}"`}};const i=Ws(s.output,r);if(!i.ok)return i;const o=this.definition.canonicalTarget?.(n,i.action.target)??i.action.target;return{ok:!0,action:{...i.action,target:o}}}#c(e){return this.#m=e,{ok:!1,issues:e}}removeAction(e){const n=this.#n.filter(s=>s.id!==e);n.length!==this.#n.length&&this.#h(n)}clearActions(){this.#n.length>0&&this.#h([])}replaceActions(e){this.#h(Hn(this.definition,e))}setBase(e){this.#i=e,this.#h(this.#n)}subscribe(e){return this.#p.add(e),()=>{this.#p.delete(e)}}exportDraft(e){return{template:this.definition.name,frameworkVersion:e,exportedAt:new Date().toISOString(),actions:this.#n}}#h(e,n){this.#m=[],this.#n=e,this.#g(),this.#o=this.#l(this.#n),this.#w(n),this.#y();for(const s of this.#p)s()}#w(e){const n=this.#k(),s=gi(this.definition,this.#o,r=>this.#l(r),e);return s===this.#o?n:(this.#f+=this.#n.length-s.actions.length,this.#n=[...s.actions],this.#g(),this.#o=this.#l(this.#n),this.#k(),!0)}#k(){return this.#o.obsolete.length===0?!1:(this.#f+=this.#o.obsolete.length,this.#n=Pn(this.#o),this.#g(),this.#o=this.#l(this.#n),!0)}#y(){this.#a?.save(this.#d,this.definition.name,this.#n)}}const Bn=(t,e,n)=>e==="comment"?Zt:n!==void 0&&T({type:e,target:n})?Xs:ye(t.actions,e),Hn=(t,e)=>e.flatMap(n=>{const s=y(V,n);if(!s.success)return[];const r=s.output,i=Bn(t,r.type,r.target);if(!i)return[];const o=y(i.schema,r);if(!o.success)return[];const l=y(V,o.output);return l.success?[l.output]:[]}),wi=()=>({status:{kind:"idle"},request:0}),$i=(t,e)=>{switch(e.kind){case"copy-started":return{status:{kind:"copying"},request:t.request+1};case"send-started":return{status:{kind:"sending"},request:t.request+1};case"copy-finished":return e.request!==t.request||t.status.kind!=="copying"?t:{...t,status:{kind:e.ok?"copied":"copy-failed"}};case"send-finished":return e.request!==t.request||t.status.kind!=="sending"?t:{...t,status:e.outcome.ok?{kind:"sent"}:{kind:"send-failed",reason:e.outcome.reason}};case"settled":return e.request===t.request?{...t,status:{kind:"idle"}}:t}},Ai=(t,e)=>{if(t.actions===0||t.railOpen)return null;const n=G(t.locale),s=e.status;return{send:t.sendable?{label:s.kind==="sending"?n.handoffSending:s.kind==="sent"?n.handoffSent:n.handoffSend,disabled:s.kind==="sending"}:null,copy:s.kind==="copied"?{label:n.handoffCopied,status:"copied"}:s.kind==="copy-failed"?{label:n.handoffCopyFailed,status:"failed"}:{label:n.handoffCopy,status:"idle"},note:s.kind==="send-failed"?Ge(s.reason,t.locale):null}},Fn=t=>{const e=t.derivation();return{base:e.base,state:e.state,navigation:t.navigation(),actions:t.controller().actions,comments:e.comments,stale:e.stale,issues:t.issues()}},Ci=t=>{const e=t.derivation();return{state:e.state,base:e.base,navigation:t.navigation(),actions:t.controller().actions,comments:e.comments,stale:e.stale,commentCount:n=>{const s=typeof n=="string"?n:_(n);return e.commentsByTarget.get(s)?.length??0},dispatch:n=>t.dispatch(n),dispatchBatch:n=>t.dispatchBatch(n),navigate:(n,s)=>t.navigate(n,s),hashFor:n=>t.hashFor(n),requestComment:n=>t.requestComment(n)}},Si=(t,e)=>{const n=()=>Fn(t);return{version:Y,template:t.definition.name,host:e,ready:t.ready,get base(){return t.controller().base},get state(){return t.derivation().state},get navigation(){return t.navigation()},get actions(){return t.controller().actions},get comments(){return t.derivation().comments},get stale(){return t.derivation().stale},get issues(){return t.issues()},dispatch:s=>t.dispatch(s),dispatchBatch:s=>t.dispatchBatch(s),comment:(s,r)=>t.dispatch({type:E,target:s,payload:{body:r}}),removeAction:s=>t.removeAction(s),clearActions:()=>t.clearActions(),importDraft:s=>t.controller().replaceActions(s),navigate:(s,r)=>t.navigate(s,r),hashFor:s=>t.hashFor(s),snapshot:n,exportDraft:()=>t.controller().exportDraft(Y),exportBrief:()=>We(n(),t.controller().definition,Y),subscribe:s=>t.subscribe(s)}},it=(t,e)=>typeof t=="object"&&t!==null&&e.every(n=>typeof Reflect.get(t,n)=="function"),_i=t=>it(t,["use"]),Ei=t=>it(t,["anchorFor","canSendToClaude","sendToClaude"]),Ti=t=>it(t,["collection"]),Kn=async(t,e)=>{try{return await t.use(e)}catch{return null}},Mi=(t,e)=>({async canSend(){try{return await t.canSendToClaude()==="available"}catch{return!1}},async send({brief:n,draft:s,anchor:r}){let i=pr(n);if(i===null){if(e===null)return{ok:!1,reason:"too_large"};try{const o=e.collection(dr).doc();await o.set({brief:n,draft:s,createdAt:new Date().toISOString()}),i=hr(o.path)}catch{return{ok:!1,reason:"storage"}}}try{return await t.sendToClaude({anchor:await t.anchorFor(r),text:i}),{ok:!0}}catch(o){return{ok:!1,reason:fr(o)}}}}),Oi=async t=>{if(!_i(t))return null;const[e,n]=await Promise.all([Kn(t,"comments"),Kn(t,"db")]);return Ei(e)?Mi(e,Ti(n)?n:null):null},ji=()=>Reflect.get(globalThis,"claude");class Ri{#e;#r;#s=null;#t=!1;constructor(e,n=ji){this.#e=e,this.#r=n,e.addController(this)}get available(){return this.#t}hostConnected(){this.#s??=Oi(this.#r()),this.#i(),window.addEventListener("focus",this.#i)}hostDisconnected(){window.removeEventListener("focus",this.#i)}async send(e){const n=await this.#s;if(!n)return{ok:!1,reason:"forbidden"};const s=await n.send(e);return this.#i(),s}#i=async()=>{const e=await this.#s,n=e?await e.canSend():!1;n!==this.#t&&(this.#t=n,this.#e.requestUpdate())}}const Jn=(t,e)=>({read(n){try{const s=t.getItem(n);return s===null?null:e(JSON.parse(s))}catch{return null}},write(n,s){try{return t.setItem(n,JSON.stringify(s)),!0}catch{return!1}},remove(n){try{t.removeItem(n)}catch{}}}),$e=t=>{const e=new Map;return Jn({getItem:n=>e.get(n)??null,setItem:(n,s)=>{e.set(n,s)},removeItem:n=>{e.delete(n)}},t)},ot=t=>{try{if(typeof localStorage<"u")return Jn(localStorage,t)}catch{}return $e(t)},at="dev-process-kit:color-scheme",Li="(prefers-color-scheme: dark)",Vn=()=>typeof matchMedia=="function"?matchMedia(Li):null,Wn=()=>ie(document.documentElement.dataset.theme)??(Vn()?.matches===!0?"dark":"light");class Ni{#e;#r;#s=null;#t=null;#i="light";#n=null;#o=null;constructor(e,n){this.#e=e,this.#r=n,e.addController(this)}hostConnected(){this.#s===null&&(this.#s=this.#r()?ot(ie):$e(ie),this.#t=this.#s.read(at)),this.#i=Wn(),this.#n=Vn(),this.#n?.addEventListener("change",this.#d),this.#o=new MutationObserver(this.#d),this.#o.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}hostDisconnected(){this.#n?.removeEventListener("change",this.#d),this.#n=null,this.#o?.disconnect(),this.#o=null}resolve(e){return An(this.#a(e))}toggle(e){this.#t=Ur(this.#a(e)),this.#t===null?this.#s?.remove(at):this.#s?.write(at,this.#t),this.#e.requestUpdate()}#a(e){return{preference:this.#t,authored:e,environment:this.#i}}#d=()=>{const e=Wn();e!==this.#i&&(this.#i=e,this.#e.requestUpdate())}}const Pi=(t,e)=>{const n=[],s=r=>{(r===t||r instanceof ShadowRoot)&&e?.(r);for(const i of r.children)i.hasAttribute("data-template")||(("commentTargets"in i||"elementActions"in i)&&n.push(i),s(i),i.shadowRoot&&s(i.shadowRoot))};return s(t),n},Yn=(t,e)=>{const n=new Map;for(const s of t)n.set(e(s),(n.get(e(s))??0)+1);return t.filter(s=>n.get(e(s))===1)},Gn=t=>Yn(t.filter(e=>"elementActions"in e&&e.id.length>0),e=>e.id),Zn=(t,e)=>{for(const n of Gn(t)){const s=tr(e,n.id),r=Reflect.get(n,"elementActions");Array.isArray(r)&&r.length===s.length&&s.every((o,l)=>{const a=r[l];return typeof a=="object"&&a!==null&&"id"in a&&a.id===o.id})||Reflect.set(n,"elementActions",s)}},Di=t=>{const e=Reflect.get(t,"elementActionResults");return Array.isArray(e)?e.flatMap(n=>{const s=y(en,n);return s.success?[s.output]:[]}):[]},Ii=t=>{const e=[];for(const n of t){if(!("commentTargets"in n))continue;const s=y(Cn,n.commentTargets);s.success&&e.push(...s.output)}return{targets:Yn(e,n=>n.value),providers:Gn(t).map(n=>({id:n.id,results:Di(n)}))}},Ui=2400;class qi{#e=wi();#r=null;#s;constructor(e){this.#s=e,e.addController(this)}get state(){return this.#e}hostDisconnected(){this.#n()}async copy(e){this.#t({kind:"copy-started"});const n=this.#e.request,s=await Ye(e()).catch(()=>!1);this.#t({kind:"copy-finished",request:n,ok:s}),this.#i(n)}async send(e){if(this.#e.status.kind==="sending")return;this.#t({kind:"send-started"});const n=this.#e.request,s=await e().catch(()=>({ok:!1,reason:"error"}));this.#t({kind:"send-finished",request:n,outcome:s}),s.ok&&this.#i(n)}#t(e){(e.kind==="copy-started"||e.kind==="send-started")&&this.#n(),this.#e=$i(this.#e,e),this.#s.requestUpdate()}#i(e){e===this.#e.request&&(this.#n(),this.#r=setTimeout(()=>{this.#r=null,this.#t({kind:"settled",request:e})},Ui))}#n(){this.#r!==null&&clearTimeout(this.#r),this.#r=null}}const dt="dev-process-kit:locale";class zi{#e;#r;#s;#t=null;#i=null;#n;#o;constructor(e,n,s){this.#e=e,this.#r=n,this.#s=s,e.addController(this)}get authored(){if(this.#n===void 0)return Re(Oe(this.#e));const e=this.#e.parentNode;return Re(this.#n??(e===null?null:Oe(e)))}get locale(){return this.#o??this.#a()}#a(){return xs({preference:this.#i,authored:this.authored})}hostConnected(){this.#t===null&&(this.#t=this.#r()?ot(Ot):$e(Ot),this.#i=this.#t.read(dt)),this.#n??=this.#e.getAttribute("lang"),this.#d()}pick(e){this.#i=ws(e,this.authored),this.#i===null?this.#t?.remove(dt):this.#t?.write(dt,this.#i),this.#d(),this.#e.requestUpdate()}#d(){const e=this.#i??this.#n??null;e===null?this.#e.removeAttribute("lang"):this.#e.getAttribute("lang")!==e&&this.#e.setAttribute("lang",e);const n=this.#a();if(n===this.#o)return;const s=this.#o===void 0;this.#o=n,this.#s(),(!s||this.#i!==null)&&document.dispatchEvent(new Event(Le))}}const Qn=()=>Je(typeof location>"u"?"":location.hash),Bi=(t,e)=>{if(typeof history>"u")return;const n=`${location.pathname}${location.search}${W(t)}`;`${location.pathname}${location.search}${location.hash}`!==n&&(e?history.replaceState(null,"",n):history.pushState(null,"",n))};class Hi{#e;#r=null;#s=0;constructor(e){this.#e=e}get orphans(){return this.#s}route(){const e=this.#e.renderRoot,n=F(e.querySelector('slot[name="preview"]'),HTMLSlotElement);if(n===null)return;this.#r!==n&&(this.#r=n,n.addEventListener("slotchange",this.#t));const s=new Set(Array.from(e.querySelectorAll("slot")).map(i=>i.getAttribute("name")??"")),r=n.assignedElements();for(const i of r){const o=i.getAttribute("data-preview-id");if(!o)continue;const l=`preview:${o}`;i.getAttribute("slot")!==l&&s.has(l)&&i.setAttribute("slot",l)}r.length!==this.#s&&(this.#s=r.length,queueMicrotask(()=>this.#e.requestUpdate()))}#t=()=>{queueMicrotask(()=>this.route())}}const Fi=[fe,ge,R`
|
|
1184
|
-
:host {
|
|
1185
|
-
display: block;
|
|
1186
|
-
min-height: 100%;
|
|
1187
|
-
background: var(--dpk-paper);
|
|
1188
|
-
color-scheme: light;
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
/* The element stamps its resolved scheme; nested components inherit it. */
|
|
1192
|
-
:host([data-theme='dark']) {
|
|
1193
|
-
color-scheme: dark;
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
.dpk-shell {
|
|
1197
|
-
display: grid;
|
|
1198
|
-
/* One column no wider than the host: a truncated title must not widen
|
|
1199
|
-
the page past a phone screen. */
|
|
1200
|
-
grid-template-columns: minmax(0, 1fr);
|
|
1201
|
-
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
1202
|
-
min-height: 100%;
|
|
1203
|
-
max-height: 100%;
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
/* ------------------------------------------------------------- header */
|
|
1207
|
-
|
|
1208
|
-
.dpk-header {
|
|
1209
|
-
position: relative;
|
|
1210
|
-
z-index: 20;
|
|
1211
|
-
display: flex;
|
|
1212
|
-
align-items: center;
|
|
1213
|
-
gap: 14px;
|
|
1214
|
-
min-height: 60px;
|
|
1215
|
-
/* Right padding keeps the header content clear of the fixed review button. */
|
|
1216
|
-
padding: 10px 72px 10px 16px;
|
|
1217
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
1218
|
-
background: var(--dpk-glass);
|
|
1219
|
-
backdrop-filter: saturate(1.6) blur(14px);
|
|
1220
|
-
box-shadow: 0 1px 0 var(--dpk-highlight) inset;
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
/* A hairline of the accent along the bottom edge, fading out to the right. */
|
|
1224
|
-
.dpk-header::after {
|
|
1225
|
-
content: '';
|
|
1226
|
-
position: absolute;
|
|
1227
|
-
left: 0;
|
|
1228
|
-
right: 0;
|
|
1229
|
-
bottom: -1px;
|
|
1230
|
-
height: 1px;
|
|
1231
|
-
background: linear-gradient(
|
|
1232
|
-
90deg,
|
|
1233
|
-
color-mix(in srgb, var(--dpk-accent) 70%, transparent),
|
|
1234
|
-
color-mix(in srgb, var(--dpk-accent) 0%, transparent) 38%
|
|
1235
|
-
);
|
|
1236
|
-
pointer-events: none;
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
/* Kit mark: a stack of pages, the single HTML page the agent wrote. */
|
|
1240
|
-
.dpk-brand {
|
|
1241
|
-
position: relative;
|
|
1242
|
-
flex: none;
|
|
1243
|
-
width: 32px;
|
|
1244
|
-
height: 32px;
|
|
1245
|
-
border-radius: 9px;
|
|
1246
|
-
background:
|
|
1247
|
-
radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 60%),
|
|
1248
|
-
linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
1249
|
-
box-shadow:
|
|
1250
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.3),
|
|
1251
|
-
inset 0 -1px 0 rgba(0, 0, 0, 0.12),
|
|
1252
|
-
0 4px 12px -4px color-mix(in srgb, var(--dpk-accent) 70%, transparent);
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
.dpk-brand::before,
|
|
1256
|
-
.dpk-brand::after {
|
|
1257
|
-
content: '';
|
|
1258
|
-
position: absolute;
|
|
1259
|
-
width: 12px;
|
|
1260
|
-
height: 15px;
|
|
1261
|
-
border-radius: 3px;
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
.dpk-brand::before {
|
|
1265
|
-
left: 12px;
|
|
1266
|
-
top: 7px;
|
|
1267
|
-
background: rgba(255, 255, 255, 0.4);
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
.dpk-brand::after {
|
|
1271
|
-
left: 8px;
|
|
1272
|
-
top: 10px;
|
|
1273
|
-
background:
|
|
1274
|
-
linear-gradient(var(--dpk-accent), var(--dpk-accent)) 3px 4px / 6px 1.5px no-repeat,
|
|
1275
|
-
linear-gradient(var(--dpk-accent), var(--dpk-accent)) 3px 7.5px / 4px 1.5px no-repeat,
|
|
1276
|
-
#fff;
|
|
1277
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
.dpk-title {
|
|
1281
|
-
display: flex;
|
|
1282
|
-
flex-direction: column;
|
|
1283
|
-
gap: 3px;
|
|
1284
|
-
min-width: 0;
|
|
1285
|
-
}
|
|
1286
|
-
|
|
1287
|
-
.dpk-title h1 {
|
|
1288
|
-
font-size: 16px;
|
|
1289
|
-
font-weight: 680;
|
|
1290
|
-
letter-spacing: -0.02em;
|
|
1291
|
-
white-space: nowrap;
|
|
1292
|
-
overflow: hidden;
|
|
1293
|
-
text-overflow: ellipsis;
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
.dpk-template-mark {
|
|
1297
|
-
align-self: flex-start;
|
|
1298
|
-
font-family: var(--dpk-mono);
|
|
1299
|
-
font-size: 9.5px;
|
|
1300
|
-
font-weight: 600;
|
|
1301
|
-
letter-spacing: 0.14em;
|
|
1302
|
-
line-height: 1;
|
|
1303
|
-
text-transform: uppercase;
|
|
1304
|
-
color: var(--dpk-accent);
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
.dpk-header-slot {
|
|
1308
|
-
flex: 1;
|
|
1309
|
-
min-width: 0;
|
|
1310
|
-
display: flex;
|
|
1311
|
-
align-items: center;
|
|
1312
|
-
gap: 10px;
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
.dpk-header-meta {
|
|
1316
|
-
display: flex;
|
|
1317
|
-
align-items: center;
|
|
1318
|
-
gap: 0;
|
|
1319
|
-
margin-left: auto;
|
|
1320
|
-
padding: 3px;
|
|
1321
|
-
border-radius: 999px;
|
|
1322
|
-
border: 1px solid var(--dpk-rule);
|
|
1323
|
-
background: var(--dpk-paper-sunken);
|
|
1324
|
-
font-family: var(--dpk-mono);
|
|
1325
|
-
font-size: 10px;
|
|
1326
|
-
letter-spacing: 0.02em;
|
|
1327
|
-
color: var(--dpk-ink-faint);
|
|
1328
|
-
white-space: nowrap;
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
|
-
.dpk-header-meta span {
|
|
1332
|
-
padding: 3px 9px;
|
|
1333
|
-
}
|
|
1334
|
-
|
|
1335
|
-
.dpk-header-meta span + span {
|
|
1336
|
-
border-left: 1px solid var(--dpk-rule);
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
.dpk-header-meta .dpk-meta-count {
|
|
1340
|
-
margin-left: 2px;
|
|
1341
|
-
border-left: 0;
|
|
1342
|
-
border-radius: 999px;
|
|
1343
|
-
background: var(--dpk-paper-raised);
|
|
1344
|
-
color: var(--dpk-ink-soft);
|
|
1345
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
.dpk-header-meta .dpk-meta-count[data-active='true'] {
|
|
1349
|
-
background: var(--dpk-accent-soft);
|
|
1350
|
-
color: var(--dpk-accent);
|
|
1351
|
-
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dpk-accent) 25%, transparent);
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
.dpk-header-tools {
|
|
1355
|
-
display: flex;
|
|
1356
|
-
flex: none;
|
|
1357
|
-
align-items: center;
|
|
1358
|
-
gap: 2px;
|
|
1359
|
-
padding: 3px;
|
|
1360
|
-
border: 1px solid var(--dpk-rule);
|
|
1361
|
-
border-radius: 999px;
|
|
1362
|
-
background: var(--dpk-paper-sunken);
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
.dpk-lang-select {
|
|
1366
|
-
flex: none;
|
|
1367
|
-
height: 26px;
|
|
1368
|
-
padding: 0 24px 0 10px;
|
|
1369
|
-
border: 0;
|
|
1370
|
-
border-radius: 999px;
|
|
1371
|
-
background: transparent
|
|
1372
|
-
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'><path d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23878e9e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>")
|
|
1373
|
-
no-repeat right 8px center;
|
|
1374
|
-
appearance: none;
|
|
1375
|
-
color: var(--dpk-ink-soft);
|
|
1376
|
-
font: inherit;
|
|
1377
|
-
font-size: 12px;
|
|
1378
|
-
font-weight: 520;
|
|
1379
|
-
cursor: pointer;
|
|
1380
|
-
transition:
|
|
1381
|
-
color 160ms var(--dpk-ease),
|
|
1382
|
-
background-color 160ms var(--dpk-ease);
|
|
1383
|
-
}
|
|
1384
|
-
|
|
1385
|
-
.dpk-lang-select:hover {
|
|
1386
|
-
color: var(--dpk-ink);
|
|
1387
|
-
background-color: var(--dpk-paper-raised);
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
.dpk-lang-select:focus-visible {
|
|
1391
|
-
outline: none;
|
|
1392
|
-
box-shadow: var(--dpk-focus);
|
|
1393
|
-
}
|
|
1394
|
-
|
|
1395
|
-
.dpk-theme-toggle {
|
|
1396
|
-
display: inline-flex;
|
|
1397
|
-
flex: none;
|
|
1398
|
-
align-items: center;
|
|
1399
|
-
justify-content: center;
|
|
1400
|
-
width: 26px;
|
|
1401
|
-
height: 26px;
|
|
1402
|
-
padding: 0;
|
|
1403
|
-
border: 0;
|
|
1404
|
-
border-radius: 999px;
|
|
1405
|
-
background: transparent;
|
|
1406
|
-
color: var(--dpk-ink-soft);
|
|
1407
|
-
cursor: pointer;
|
|
1408
|
-
transition:
|
|
1409
|
-
color 160ms var(--dpk-ease),
|
|
1410
|
-
background 160ms var(--dpk-ease),
|
|
1411
|
-
transform 300ms var(--dpk-ease-spring);
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
.dpk-theme-toggle svg {
|
|
1415
|
-
width: 14px;
|
|
1416
|
-
height: 14px;
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
.dpk-theme-toggle:hover {
|
|
1420
|
-
color: var(--dpk-ink);
|
|
1421
|
-
background: var(--dpk-paper-raised);
|
|
1422
|
-
transform: rotate(-18deg);
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
.dpk-theme-toggle:focus-visible {
|
|
1426
|
-
outline: none;
|
|
1427
|
-
box-shadow: var(--dpk-focus);
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
/* --------------------------------------------------------------- body */
|
|
1431
|
-
|
|
1432
|
-
.dpk-body {
|
|
1433
|
-
display: flex;
|
|
1434
|
-
min-height: 0;
|
|
1435
|
-
}
|
|
1436
|
-
|
|
1437
|
-
.dpk-sidebar {
|
|
1438
|
-
width: 260px;
|
|
1439
|
-
flex: 0 0 auto;
|
|
1440
|
-
border-right: 1px solid var(--dpk-rule);
|
|
1441
|
-
background: var(--dpk-paper-sunken);
|
|
1442
|
-
overflow: auto;
|
|
1443
|
-
padding: 18px 14px;
|
|
1444
|
-
scrollbar-width: thin;
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
|
-
.dpk-sidebar[hidden] {
|
|
1448
|
-
display: none;
|
|
1449
|
-
}
|
|
1450
|
-
|
|
1451
|
-
.dpk-main {
|
|
1452
|
-
flex: 1 1 0%;
|
|
1453
|
-
display: flex;
|
|
1454
|
-
flex-direction: column;
|
|
1455
|
-
min-width: 0;
|
|
1456
|
-
overflow: auto;
|
|
1457
|
-
/* A faint wash of the accent from the top left corner gives the ground some depth. */
|
|
1458
|
-
background:
|
|
1459
|
-
radial-gradient(
|
|
1460
|
-
ellipse 900px 360px at 0% 0%,
|
|
1461
|
-
color-mix(in srgb, var(--dpk-accent) 5%, transparent),
|
|
1462
|
-
transparent 70%
|
|
1463
|
-
),
|
|
1464
|
-
radial-gradient(
|
|
1465
|
-
ellipse 700px 320px at 100% 0%,
|
|
1466
|
-
color-mix(in srgb, var(--dpk-blue) 4%, transparent),
|
|
1467
|
-
transparent 70%
|
|
1468
|
-
),
|
|
1469
|
-
var(--dpk-paper);
|
|
1470
|
-
background-attachment: local;
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
.dpk-main-body {
|
|
1474
|
-
flex: 1 0 auto;
|
|
1475
|
-
display: grid;
|
|
1476
|
-
align-content: start;
|
|
1477
|
-
gap: 16px;
|
|
1478
|
-
min-width: 0;
|
|
1479
|
-
padding: 24px;
|
|
1480
|
-
animation: dpk-rise 420ms var(--dpk-ease) backwards;
|
|
1481
|
-
}
|
|
1482
|
-
|
|
1483
|
-
@keyframes dpk-rise {
|
|
1484
|
-
from {
|
|
1485
|
-
opacity: 0;
|
|
1486
|
-
transform: translateY(6px);
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
/*
|
|
1491
|
-
* Author memo. It sits at the end of the main column and sticks to the
|
|
1492
|
-
* bottom of the scrollport: always visible, floating over whatever scrolls
|
|
1493
|
-
* behind it, and never stealing height from the preview.
|
|
1494
|
-
*/
|
|
1495
|
-
.dpk-memo {
|
|
1496
|
-
position: sticky;
|
|
1497
|
-
bottom: 0;
|
|
1498
|
-
z-index: 5;
|
|
1499
|
-
/* Clear of the hand-off dock at the bottom right while it is shown. */
|
|
1500
|
-
padding: 0 calc(20px + var(--dpk-dock-space, 0px)) 20px 20px;
|
|
1501
|
-
pointer-events: none;
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
.dpk-memo[hidden] {
|
|
1505
|
-
display: none;
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
.dpk-memo ::slotted(*) {
|
|
1509
|
-
display: block;
|
|
1510
|
-
max-width: 100%;
|
|
1511
|
-
padding: 12px 16px 12px 18px;
|
|
1512
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
1513
|
-
border-radius: var(--dpk-radius-lg);
|
|
1514
|
-
background:
|
|
1515
|
-
linear-gradient(90deg, var(--dpk-amber) 0 3px, transparent 3px),
|
|
1516
|
-
color-mix(in srgb, var(--dpk-paper-raised) 88%, transparent);
|
|
1517
|
-
backdrop-filter: blur(12px);
|
|
1518
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
1519
|
-
font-size: 12.5px;
|
|
1520
|
-
line-height: 1.7;
|
|
1521
|
-
color: var(--dpk-ink-soft);
|
|
1522
|
-
pointer-events: auto;
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
.dpk-orphans {
|
|
1526
|
-
margin-top: 16px;
|
|
1527
|
-
border: 1px dashed var(--dpk-rule-strong);
|
|
1528
|
-
border-radius: var(--dpk-radius);
|
|
1529
|
-
padding: 12px;
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
.dpk-banner {
|
|
1533
|
-
display: grid;
|
|
1534
|
-
gap: 4px;
|
|
1535
|
-
margin-bottom: 14px;
|
|
1536
|
-
border: 1px solid color-mix(in srgb, var(--dpk-danger) 35%, transparent);
|
|
1537
|
-
border-radius: var(--dpk-radius);
|
|
1538
|
-
background: linear-gradient(90deg, var(--dpk-danger) 0 3px, transparent 3px), var(--dpk-danger-soft);
|
|
1539
|
-
padding: 12px 14px 12px 17px;
|
|
1540
|
-
max-width: 900px;
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
.dpk-banner strong {
|
|
1544
|
-
font-size: 13px;
|
|
1545
|
-
color: var(--dpk-danger);
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
.dpk-banner code {
|
|
1549
|
-
font-family: var(--dpk-mono);
|
|
1550
|
-
font-size: 11px;
|
|
1551
|
-
color: var(--dpk-ink-soft);
|
|
1552
|
-
overflow-wrap: anywhere;
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
|
-
.dpk-notes {
|
|
1556
|
-
flex: 0 0 auto;
|
|
1557
|
-
width: 360px;
|
|
1558
|
-
border-left: 1px solid var(--dpk-rule);
|
|
1559
|
-
background: var(--dpk-paper-raised);
|
|
1560
|
-
box-shadow: -12px 0 32px -24px var(--dpk-shade-3);
|
|
1561
|
-
overflow: hidden;
|
|
1562
|
-
display: flex;
|
|
1563
|
-
animation: dpk-slide-in 260ms var(--dpk-ease) backwards;
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
@keyframes dpk-slide-in {
|
|
1567
|
-
from {
|
|
1568
|
-
opacity: 0;
|
|
1569
|
-
transform: translateX(16px);
|
|
1570
|
-
}
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
|
-
.dpk-notes[hidden] {
|
|
1574
|
-
display: none;
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
/* ------------------------------------------------------------- footer */
|
|
1578
|
-
|
|
1579
|
-
.dpk-footer {
|
|
1580
|
-
border-top: 1px solid var(--dpk-rule);
|
|
1581
|
-
padding: 10px 20px;
|
|
1582
|
-
display: flex;
|
|
1583
|
-
gap: 12px;
|
|
1584
|
-
align-items: center;
|
|
1585
|
-
background: var(--dpk-glass);
|
|
1586
|
-
backdrop-filter: blur(12px);
|
|
1587
|
-
font-size: 12px;
|
|
1588
|
-
color: var(--dpk-ink-faint);
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
|
-
/* --------------------------------------------------- floating review */
|
|
1592
|
-
|
|
1593
|
-
/* Review toggle: pinned to the top right corner, always in the same place. */
|
|
1594
|
-
.dpk-fab {
|
|
1595
|
-
position: fixed;
|
|
1596
|
-
top: 12px;
|
|
1597
|
-
right: 16px;
|
|
1598
|
-
z-index: 60;
|
|
1599
|
-
display: inline-flex;
|
|
1600
|
-
align-items: center;
|
|
1601
|
-
justify-content: center;
|
|
1602
|
-
width: 36px;
|
|
1603
|
-
height: 36px;
|
|
1604
|
-
padding: 0;
|
|
1605
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
1606
|
-
border-radius: 11px;
|
|
1607
|
-
background: var(--dpk-paper-raised);
|
|
1608
|
-
color: var(--dpk-ink-soft);
|
|
1609
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-sm);
|
|
1610
|
-
cursor: pointer;
|
|
1611
|
-
transition:
|
|
1612
|
-
color 180ms var(--dpk-ease),
|
|
1613
|
-
background 180ms var(--dpk-ease),
|
|
1614
|
-
border-color 180ms var(--dpk-ease),
|
|
1615
|
-
box-shadow 180ms var(--dpk-ease),
|
|
1616
|
-
transform 220ms var(--dpk-ease-spring);
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
.dpk-fab:hover {
|
|
1620
|
-
color: var(--dpk-ink);
|
|
1621
|
-
border-color: var(--dpk-rule-hover);
|
|
1622
|
-
transform: translateY(-1px);
|
|
1623
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow);
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1626
|
-
.dpk-fab:active {
|
|
1627
|
-
transform: translateY(0) scale(0.95);
|
|
1628
|
-
box-shadow: var(--dpk-shadow-xs);
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
.dpk-fab:focus-visible {
|
|
1632
|
-
outline: none;
|
|
1633
|
-
box-shadow: var(--dpk-focus);
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
|
-
.dpk-fab[aria-expanded='true'] {
|
|
1637
|
-
color: var(--dpk-accent-ink);
|
|
1638
|
-
border-color: color-mix(in srgb, var(--dpk-accent-strong) 70%, transparent);
|
|
1639
|
-
background: linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
1640
|
-
box-shadow:
|
|
1641
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.25),
|
|
1642
|
-
0 6px 16px -6px color-mix(in srgb, var(--dpk-accent) 70%, transparent);
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1645
|
-
.dpk-fab[aria-expanded='true']:hover {
|
|
1646
|
-
box-shadow:
|
|
1647
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.25),
|
|
1648
|
-
0 10px 22px -8px color-mix(in srgb, var(--dpk-accent) 80%, transparent);
|
|
1649
|
-
}
|
|
1650
|
-
|
|
1651
|
-
.dpk-fab-icon {
|
|
1652
|
-
position: relative;
|
|
1653
|
-
display: block;
|
|
1654
|
-
width: 16px;
|
|
1655
|
-
height: 12px;
|
|
1656
|
-
border: 1.6px solid currentColor;
|
|
1657
|
-
border-radius: 4px;
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
.dpk-fab-icon::after {
|
|
1661
|
-
content: '';
|
|
1662
|
-
position: absolute;
|
|
1663
|
-
left: 2px;
|
|
1664
|
-
bottom: -4px;
|
|
1665
|
-
border-left: 3.5px solid transparent;
|
|
1666
|
-
border-right: 3.5px solid transparent;
|
|
1667
|
-
border-top: 4px solid currentColor;
|
|
1668
|
-
}
|
|
1669
|
-
|
|
1670
|
-
.dpk-fab-badge {
|
|
1671
|
-
position: absolute;
|
|
1672
|
-
top: -6px;
|
|
1673
|
-
right: -6px;
|
|
1674
|
-
min-width: 18px;
|
|
1675
|
-
height: 18px;
|
|
1676
|
-
padding: 0 4px;
|
|
1677
|
-
border: 2px solid var(--dpk-paper);
|
|
1678
|
-
border-radius: 999px;
|
|
1679
|
-
background: linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
1680
|
-
color: var(--dpk-accent-ink);
|
|
1681
|
-
font-family: var(--dpk-mono);
|
|
1682
|
-
font-size: 9.5px;
|
|
1683
|
-
font-weight: 650;
|
|
1684
|
-
font-variant-numeric: tabular-nums;
|
|
1685
|
-
line-height: 14px;
|
|
1686
|
-
text-align: center;
|
|
1687
|
-
box-shadow: 0 3px 8px -2px color-mix(in srgb, var(--dpk-accent) 60%, transparent);
|
|
1688
|
-
animation: dpk-pop 260ms var(--dpk-ease-spring);
|
|
1689
|
-
}
|
|
1690
|
-
|
|
1691
|
-
@keyframes dpk-pop {
|
|
1692
|
-
from {
|
|
1693
|
-
transform: scale(0.4);
|
|
1694
|
-
opacity: 0;
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
|
-
|
|
1698
|
-
/* ------------------------------------------------------ hand-off dock */
|
|
1699
|
-
|
|
1700
|
-
.dpk-dock {
|
|
1701
|
-
position: fixed;
|
|
1702
|
-
right: 16px;
|
|
1703
|
-
bottom: 16px;
|
|
1704
|
-
z-index: 60;
|
|
1705
|
-
display: flex;
|
|
1706
|
-
flex-direction: column;
|
|
1707
|
-
align-items: flex-end;
|
|
1708
|
-
gap: 8px;
|
|
1709
|
-
max-width: calc(100vw - 32px);
|
|
1710
|
-
animation: dpk-dock-in 260ms var(--dpk-ease) backwards;
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
|
-
@keyframes dpk-dock-in {
|
|
1714
|
-
from {
|
|
1715
|
-
transform: translateY(8px);
|
|
1716
|
-
opacity: 0;
|
|
1717
|
-
}
|
|
1718
|
-
}
|
|
1719
|
-
|
|
1720
|
-
.dpk-dock-actions {
|
|
1721
|
-
display: flex;
|
|
1722
|
-
gap: 6px;
|
|
1723
|
-
padding: 6px;
|
|
1724
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
1725
|
-
border-radius: var(--dpk-radius-lg);
|
|
1726
|
-
background: var(--dpk-glass);
|
|
1727
|
-
backdrop-filter: blur(12px);
|
|
1728
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
.dpk-dock-note {
|
|
1732
|
-
max-width: 320px;
|
|
1733
|
-
margin: 0;
|
|
1734
|
-
padding: 8px 12px;
|
|
1735
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
1736
|
-
border-radius: var(--dpk-radius);
|
|
1737
|
-
background: var(--dpk-paper-raised);
|
|
1738
|
-
box-shadow: var(--dpk-shadow);
|
|
1739
|
-
color: var(--dpk-ink-soft);
|
|
1740
|
-
font-size: 12px;
|
|
1741
|
-
line-height: 1.6;
|
|
1742
|
-
}
|
|
1743
|
-
|
|
1744
|
-
@media (max-width: 720px) {
|
|
1745
|
-
.dpk-header-meta {
|
|
1746
|
-
display: none;
|
|
1747
|
-
}
|
|
1748
|
-
|
|
1749
|
-
.dpk-brand {
|
|
1750
|
-
display: none;
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
|
-
`];class Ki extends O{static{this.styles=Fi}static{this.properties={storageKey:{type:String,attribute:"storage-key"},storage:{type:String},notes:{type:String},theme:{type:String},notesOpen:{state:!0}}}#e=!1;#r=new Hi(this);#s=new Ni(this,()=>this.storage!=="off"&&this.storage!=="memory");#t=new Ri(this);#i=new qi(this);#n=new zi(this,()=>this.storage!=="off"&&this.storage!=="memory",()=>this.#a?.setTemplate(this.definition));#o;#a;#d=Ke;#p=null;#m=new Set;#f=null;#g;#l;#v;#c=[];#h;#w=new Promise(e=>{this.#h=e});#k;get locale(){return this.#n.locale}get definition(){const e=this.locale;return this.#o?.locale!==e&&(this.#o={locale:e,value:this.definitionFor(e)}),this.#o.value}connectedCallback(){super.connectedCallback(),this.dataset.template=this.definition.name,this.#e||(this.#e=!0,this.notesOpen=this.notes==="on"||this.notes==="open"),this.#y(),window.addEventListener("hashchange",this.#E),this.addEventListener("click",this.#j),this.addEventListener("dpk-comment-targets-change",this.#u),this.addEventListener("dpk-comment-request",this.#T),this.addEventListener("dpk-comment-submit",this.#M),this.addEventListener("dpk-element-action",this.#O),this.#v??=new MutationObserver(this.#u),this.#u()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("hashchange",this.#E),this.removeEventListener("click",this.#j),this.#l?.disconnect(),this.#v?.disconnect(),this.removeEventListener("dpk-comment-targets-change",this.#u),this.removeEventListener("dpk-comment-request",this.#T),this.removeEventListener("dpk-comment-submit",this.#M),this.removeEventListener("dpk-element-action",this.#O)}#y(e=0){if(this.#a){this.#C();return}if(this.childNodes.length===0&&e<2){queueMicrotask(()=>this.#y(e+1));return}this.#D()}#C(){this.#g||(this.#g=this.#a?.subscribe(()=>this.#z()))}willUpdate(){this.dataset.theme=this.#s.resolve(ie(this.theme))}updated(){this.#H(),this.#B()}get api(){return this.#k??=this.#P(),this.#k}get controller(){if(!this.#a)throw new Error(`<${this.tagName.toLowerCase()}> is not initialized yet`);return this.#a}get derivation(){return this.controller.derivation}get navigation(){return this.#d}dispatch(e){const n=this.controller.dispatch(e);return n.ok||(this.requestUpdate(),this.dispatchEvent(new CustomEvent("dpk-error",{detail:{issues:n.issues},bubbles:!0,composed:!0})),this.#b()),n}dispatchBatch(e){const n=this.controller.dispatchBatch(e);return n.ok||(this.requestUpdate(),this.dispatchEvent(new CustomEvent("dpk-error",{detail:{issues:n.issues},bubbles:!0,composed:!0})),this.#b()),n}removeAction(e){this.controller.removeAction(e)}clearActions(){this.controller.clearActions()}navigate(e,n={}){const s=W(this.#x());this.#d=Ve(this.#d,e,this.definition.navigationHierarchy),this.#$(n.replace??!1);const r=W(this.#x());this.requestUpdate(),s!==r&&(this.#b(),this.dispatchEvent(new CustomEvent("dpk-navigate",{detail:{navigation:this.#d},bubbles:!0,composed:!0})))}hashFor(e){const n=this.#x();return W(this.definition.resolveNavigation(this.derivation.state,Ve(n,e,this.definition.navigationHierarchy)))}requestComment(e){this.#p=typeof e=="string"?e:_(e),this.notesOpen=!0,this.requestUpdate()}get integratedReview(){return!1}get canSendToClaude(){return this.#t.available}sendToClaude(){return this.#t.send({brief:this.api.exportBrief(),draft:Be(this.derivation.actions),anchor:this})}renderReviewPanel(e){return f`<dpk-component-comment-panel
|
|
1754
|
-
.definition=${this.controller.definition}
|
|
1755
|
-
.state=${e.state}
|
|
1756
|
-
.navigation=${e.navigation}
|
|
1757
|
-
.derivation=${this.derivation}
|
|
1758
|
-
.issues=${this.controller.lastIssues}
|
|
1759
|
-
.exportBrief=${()=>this.api.exportBrief()}
|
|
1760
|
-
.sendToClaude=${this.canSendToClaude?()=>this.sendToClaude():void 0}
|
|
1761
|
-
.pendingTarget=${this.#p}
|
|
1762
|
-
.embedded=${this.integratedReview}
|
|
1763
|
-
.onDelete=${n=>this.removeAction(n)}
|
|
1764
|
-
.onClear=${()=>this.clearActions()}
|
|
1765
|
-
.onComment=${(n,s)=>{const r=this.dispatch({type:E,target:n,payload:{body:s}});return r.ok&&(this.#p=null),r}}
|
|
1766
|
-
></dpk-component-comment-panel>`}renderChrome(e,n){const s=e.actions.length,r=e.comments.length,i=G(this.locale);return f`
|
|
1767
|
-
<div class="dpk-shell">
|
|
1768
|
-
<header class="dpk-header">
|
|
1769
|
-
<span class="dpk-brand" aria-hidden="true"></span>
|
|
1770
|
-
<div class="dpk-title">
|
|
1771
|
-
<span class="dpk-template-mark">${this.definition.label}</span>
|
|
1772
|
-
<h1>${this.definition.title(e.state)}</h1>
|
|
1773
|
-
</div>
|
|
1774
|
-
<div class="dpk-header-slot">
|
|
1775
|
-
${n.header??m}
|
|
1776
|
-
<slot name="header"></slot>
|
|
1777
|
-
</div>
|
|
1778
|
-
<div class="dpk-header-meta">
|
|
1779
|
-
<span>dev-process-kit@${Y}</span>
|
|
1780
|
-
<span>${this.definition.name}</span>
|
|
1781
|
-
<span class="dpk-meta-count" data-active=${s>0?"true":"false"}>
|
|
1782
|
-
${s} draft · ${r} note
|
|
1783
|
-
</span>
|
|
1784
|
-
</div>
|
|
1785
|
-
<div class="dpk-header-tools">${this.#L()} ${this.#N()}</div>
|
|
1786
|
-
</header>
|
|
1787
|
-
<div class="dpk-body">
|
|
1788
|
-
<aside
|
|
1789
|
-
class="dpk-sidebar"
|
|
1790
|
-
?hidden=${n.sidebarHidden||!n.sidebar&&!this.hasSidebarContent()}
|
|
1791
|
-
>
|
|
1792
|
-
${n.sidebar??m}
|
|
1793
|
-
<slot name="sidebar"></slot>
|
|
1794
|
-
</aside>
|
|
1795
|
-
<main class="dpk-main">
|
|
1796
|
-
<div class="dpk-main-body">
|
|
1797
|
-
${this.#f?f`<div class="dpk-banner" role="alert">
|
|
1798
|
-
<strong>${i.baseDataError}</strong>
|
|
1799
|
-
<code>${this.#f}</code>
|
|
1800
|
-
</div>`:m}
|
|
1801
|
-
${n.main??m}
|
|
1802
|
-
<slot name="main"></slot>
|
|
1803
|
-
<section class="dpk-orphans" ?hidden=${this.#r.orphans===0}>
|
|
1804
|
-
<p class="dpk-label">previews without metadata</p>
|
|
1805
|
-
<slot name="preview"></slot>
|
|
1806
|
-
</section>
|
|
1807
|
-
</div>
|
|
1808
|
-
<div class="dpk-memo" ?hidden=${!this.hasMemoContent()}>
|
|
1809
|
-
<slot name="memo"></slot>
|
|
1810
|
-
</div>
|
|
1811
|
-
</main>
|
|
1812
|
-
${this.integratedReview?m:f`<aside class="dpk-notes" ?hidden=${!this.notesOpen}>${this.renderReviewPanel(e)}</aside>`}
|
|
1813
|
-
</div>
|
|
1814
|
-
${n.footer||this.hasFooterContent()?f`<footer class="dpk-footer">
|
|
1815
|
-
${n.footer??m}
|
|
1816
|
-
<slot name="footer"></slot>
|
|
1817
|
-
</footer>`:m}
|
|
1818
|
-
${this.integratedReview?m:f`<button
|
|
1819
|
-
class="dpk-fab"
|
|
1820
|
-
type="button"
|
|
1821
|
-
aria-expanded=${this.notesOpen?"true":"false"}
|
|
1822
|
-
title=${i.reviewToggle}
|
|
1823
|
-
@click=${()=>{this.notesOpen=!this.notesOpen}}
|
|
1824
|
-
>
|
|
1825
|
-
<span class="dpk-fab-icon" aria-hidden="true"></span>
|
|
1826
|
-
<span
|
|
1827
|
-
class="dpk-label"
|
|
1828
|
-
style="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"
|
|
1829
|
-
>
|
|
1830
|
-
${i.review}
|
|
1831
|
-
</span>
|
|
1832
|
-
${s>0?f`<span class="dpk-fab-badge">${s}</span>`:m}
|
|
1833
|
-
</button>`}
|
|
1834
|
-
${this.integratedReview?m:this.#R(s)}
|
|
1835
|
-
</div>
|
|
1836
|
-
`}#R(e){const n=Ai({actions:e,railOpen:this.notesOpen,sendable:this.canSendToClaude,locale:this.locale},this.#i.state);if(!n)return m;const s=G(this.locale);return f`<div class="dpk-dock" role="group" aria-label=${s.handoffLabel}>
|
|
1837
|
-
${n.note?f`<p class="dpk-dock-note" role="alert">${n.note}</p>`:m}
|
|
1838
|
-
<div class="dpk-dock-actions">
|
|
1839
|
-
${n.send?f`<button
|
|
1840
|
-
class="dpk-btn dpk-btn--accent"
|
|
1841
|
-
type="button"
|
|
1842
|
-
?disabled=${n.send.disabled}
|
|
1843
|
-
@click=${()=>{this.#i.send(()=>this.sendToClaude())}}
|
|
1844
|
-
>
|
|
1845
|
-
${n.send.label}
|
|
1846
|
-
</button>`:m}
|
|
1847
|
-
<button
|
|
1848
|
-
class=${n.send?"dpk-btn":"dpk-btn dpk-btn--accent"}
|
|
1849
|
-
type="button"
|
|
1850
|
-
data-status=${n.copy.status}
|
|
1851
|
-
title=${s.handoffCopyTitle}
|
|
1852
|
-
@click=${()=>{this.#i.copy(()=>this.api.exportBrief())}}
|
|
1853
|
-
>
|
|
1854
|
-
${n.copy.label}
|
|
1855
|
-
</button>
|
|
1856
|
-
</div>
|
|
1857
|
-
</div>`}#L(){const e=this.locale,n=G(e).language;return f`<select
|
|
1858
|
-
class="dpk-lang-select"
|
|
1859
|
-
aria-label=${n}
|
|
1860
|
-
title=${n}
|
|
1861
|
-
@change=${wn(s=>{const r=je.find(i=>i===s);r!==void 0&&this.#n.pick(r)})}
|
|
1862
|
-
>
|
|
1863
|
-
${je.map(s=>f`<option value=${s} lang=${s} ?selected=${s===e}>
|
|
1864
|
-
${or[s]}
|
|
1865
|
-
</option>`)}
|
|
1866
|
-
</select>`}#N(){const e=this.dataset.theme==="dark",n=G(this.locale),s=e?n.useLightTheme:n.useDarkTheme;return f`<button
|
|
1867
|
-
class="dpk-theme-toggle"
|
|
1868
|
-
type="button"
|
|
1869
|
-
aria-label=${s}
|
|
1870
|
-
title=${s}
|
|
1871
|
-
@click=${()=>this.#s.toggle(ie(this.theme))}
|
|
1872
|
-
>
|
|
1873
|
-
${e?Mr():Or()}
|
|
1874
|
-
</button>`}render(){if(!this.#a)return m;const e=this.#_();return this.renderChrome(e,this.renderRegions(e))}hasSidebarContent(){return this.querySelector('[slot="sidebar"]')!==null}hasMemoContent(){return this.querySelector('[slot="memo"]')!==null}hasFooterContent(){return this.querySelector('[slot="footer"]')!==null}context(){return this.#_()}#A(){return{definition:this.definition,controller:()=>this.controller,derivation:()=>this.derivation,ready:this.#w,navigation:()=>this.#x(),issues:()=>this.controller.lastIssues,dispatch:e=>this.dispatch(e),dispatchBatch:e=>this.dispatchBatch(e),subscribe:e=>(this.#m.add(e),()=>{this.#m.delete(e)}),removeAction:e=>this.removeAction(e),clearActions:()=>this.clearActions(),navigate:(e,n)=>this.navigate(e,n),hashFor:e=>this.hashFor(e),requestComment:e=>this.requestComment(e)}}#P(){return Si(this.#A(),this)}#S(){return Fn(this.#A())}#_(){return Ci(this.#A())}#x(){return this.definition.resolveNavigation(this.derivation.state,this.#d)}#D(){const e=this.#U();this.#d=Qn();const n=this.storageKey;this.#a=new zn({definition:this.definition,base:e,storage:this.#I(),...typeof n=="string"?{storageKey:n}:{}}),this.#C(),this.#u(),this.#$(!0),this.#h?.(),this.#q(),this.requestUpdate()}#I(){return this.storage==="off"?null:this.storage==="memory"?new st:rt()}#U(){const e=this.querySelector('script[type="application/json"]');if(!e?.textContent||e.textContent.trim().length===0)return console.warn(`[dev-process-kit] <${this.tagName.toLowerCase()}> has no base JSON; starting from an empty state.`),this.#f='no <script type="application/json"> child found',this.definition.emptyBase();try{return this.definition.parseBase(JSON.parse(e.textContent))}catch(n){return console.error("[dev-process-kit] invalid base data:",n),this.#f=n instanceof Error?n.message:String(n),this.definition.emptyBase()}}#q(){this.querySelector('script[type="application/json"]')||(this.#l=new MutationObserver(()=>{const e=this.querySelector('script[type="application/json"]');if(e){this.#l?.disconnect(),this.#l=void 0;try{this.controller.setBase(this.definition.parseBase(JSON.parse(e.textContent??"null")))}catch(n){console.error("[dev-process-kit] invalid base data:",n)}}}),this.#l.observe(this,{childList:!0,subtree:!0}))}#b(){const e=this.#S();for(const n of this.#m)n(e)}#z(){if(!this.isConnected){this.requestUpdate(),this.#b();return}this.#$(!0),Zn(this.#c,this.controller.actions),queueMicrotask(this.#u),this.requestUpdate(),this.#b(),this.dispatchEvent(new CustomEvent("dpk-change",{detail:this.#S(),bubbles:!0,composed:!0}))}#$(e){const n=this.#x();this.#d=n,Bi(n,e)}#E=()=>{this.#d=Qn(),this.#$(!0),this.requestUpdate(),this.#b(),this.dispatchEvent(new CustomEvent("dpk-navigate",{detail:{navigation:this.#d},bubbles:!0,composed:!0}))};#u=()=>{this.#v?.disconnect(),this.#c=Pi(this,e=>{this.isConnected&&this.#v?.observe(e,{childList:!0,subtree:!0})}),this.#a&&(Zn(this.#c,this.#a.actions),this.#a.setComponentSnapshot(Ii(this.#c)))};#T=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!this.#a)return;const n=e.detail;typeof n!="object"||n===null||!("target"in n)||typeof n.target!="string"||(this.#u(),!this.controller.definition.commentTargets(this.derivation.state,this.navigation).some(r=>r.value===n.target))||this.requestComment(n.target)};#M=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!e.cancelable||!this.#a)return;const n=y(zr,e.detail);if(!n.success)return;this.#u();const{target:s,body:r}=n.output;if(!this.controller.definition.commentTargets(this.derivation.state,this.navigation).some(l=>l.value===s))return;this.dispatch({type:E,target:s,payload:{body:r}}).ok&&e.preventDefault()};#O=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!e.cancelable||!this.#a)return;const n=y(er,e.detail);if(!n.success)return;this.#u();const{type:s,target:r,payload:i}=n.output;if(!this.controller.definition.commentTargets(this.derivation.state,this.navigation).some(a=>a.value===r))return;this.dispatch({type:s,target:r,payload:i}).ok&&e.preventDefault()};#j=e=>{for(const n of e.composedPath()){if(!(n instanceof Element))continue;if(n===this||n.hasAttribute("data-template"))break;const s=n.getAttribute("data-dpk-navigate");if(s!==null){e.preventDefault(),this.navigate(Je(s.includes("=")?s:`step=${s}`));return}const r=n.getAttribute("data-dpk-comment");if(r!==null){e.preventDefault(),this.requestComment(r);return}}};#B(){const e=this.renderRoot.querySelector(".dpk-shell"),n=this.renderRoot.querySelector(".dpk-dock-actions");e&&(n?e.style.setProperty("--dpk-dock-space",`${n.offsetWidth+8}px`):e.style.removeProperty("--dpk-dock-space"))}#H(){this.#r.route()}}const Ji=(t,e)=>{typeof window>"u"||Object.assign(window,{devProcessKit:{version:t,templates:e}})};export{As as $,Xe as A,$r as B,E as C,xn as D,Ke as E,Y as F,bn as G,yn as H,vn as I,kn as J,mn as K,Pn as L,st as M,Je as N,Jt as O,zs as P,Ve as Q,Bs as R,Be as S,Ki as T,Vt as U,_ as V,nt as W,ke as X,Ue as Y,fe as Z,ue as _,Ji as a,R as a0,m as a1,f as a2,gn as a3,cs as a4,O as a5,Ne as a6,Er as a7,Tr as a8,Kt as a9,Ir as aA,we as aB,F as aC,Ge as aD,Ye as aE,Us as aF,ln as aG,cn as aH,un as aI,Sr as aJ,wr as aK,xr as aL,J as aa,ve as ab,U as ac,g as ad,be as ae,b as af,k as ag,qt as ah,Ft as ai,q as aj,K as ak,Dt as al,y as am,$ as an,It as ao,Ie as ap,Nt as aq,Lt as ar,Ut as as,Is as at,_r as au,S as av,ot as aw,$e as ax,Dr as ay,wn as az,Zt as b,Rt as c,zn as d,ze as e,Hs as f,We as g,Gt as h,xe as i,Ln as j,ge as k,Wt as l,Vs as m,qe as n,rt as o,qn as p,qs as q,Nr as r,Ss as s,Nn as t,V as u,Ks as v,W as w,Cr as x,Ar as y,Qe as z};
|