@becomeopc/trendpublish 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dashboard/assets/-association-list-MaFlvvF5.js +1 -0
  2. package/dashboard/assets/-channel-templates-B0KzH4gz.js +6 -0
  3. package/dashboard/assets/-content-package-preview-Bc225W8p.js +1 -0
  4. package/dashboard/assets/-editor-page-DIrPd6Jj.js +1 -0
  5. package/dashboard/assets/-run-detail-view-CSb6Mp_W.js +12 -0
  6. package/dashboard/assets/-run-presentation-e-aAMUOA.js +1 -0
  7. package/dashboard/assets/AnimatePresence-dRKyi9jP.js +9 -0
  8. package/dashboard/assets/_app-C0k3Jpvj.js +1 -0
  9. package/dashboard/assets/app-dialog-CBRjH8y0.js +1 -0
  10. package/dashboard/assets/arrow-left-B1paVsKl.js +1 -0
  11. package/dashboard/assets/arrow-right-Bm6j4CRT.js +1 -0
  12. package/dashboard/assets/articles-CJ24swVV.js +1 -0
  13. package/dashboard/assets/automations-CSqhc87N.js +2 -0
  14. package/dashboard/assets/becomeopc-EvwYWHkB.js +1 -0
  15. package/dashboard/assets/check-_AvUITNy.js +1 -0
  16. package/dashboard/assets/chevron-down-CjEG9BtO.js +1 -0
  17. package/dashboard/assets/chevron-right-BcV2-ijN.js +1 -0
  18. package/dashboard/assets/connections-CUkG-3WF.js +1 -0
  19. package/dashboard/assets/content-plans-1_S1hkDo.js +1 -0
  20. package/dashboard/assets/content-plans_._planId.edit-2sqaHVmd.js +1 -0
  21. package/dashboard/assets/content-plans_.new-2sqaHVmd.js +1 -0
  22. package/dashboard/assets/copy-C4Adx2li.js +1 -0
  23. package/dashboard/assets/dropdown-menu-mpdg8__C.js +1 -0
  24. package/dashboard/assets/empty-state-B2PGtu_a.js +1 -0
  25. package/dashboard/assets/entity-list-B2WXTDDM.js +1 -0
  26. package/dashboard/assets/execution-Brd94hIY.js +1 -0
  27. package/dashboard/assets/external-link-B2pLgsIl.js +1 -0
  28. package/dashboard/assets/eye-DyaLFyNg.js +1 -0
  29. package/dashboard/assets/file-text-BqjzSiui.js +1 -0
  30. package/dashboard/assets/fingerprint-pattern-CVznkwfS.js +1 -0
  31. package/dashboard/assets/flask-conical-B9Pn4z-3.js +1 -0
  32. package/dashboard/assets/form-field-BJITE8Lh.js +1 -0
  33. package/dashboard/assets/identities-Bpb-f7oo.js +3 -0
  34. package/dashboard/assets/index-Bx1uywm3.js +51 -0
  35. package/dashboard/assets/index-ghPnBUnR.css +2 -0
  36. package/dashboard/assets/input-Br6N0XCJ.js +1 -0
  37. package/dashboard/assets/jobs-BiQwL4Yt.js +1 -0
  38. package/dashboard/assets/jobs_._runId-DQ9L-G8H.js +1 -0
  39. package/dashboard/assets/knowledge-BePtU9f6.js +1 -0
  40. package/dashboard/assets/layers-B6jc9X_5.js +1 -0
  41. package/dashboard/assets/layout-template-11JYpJ5n.js +1 -0
  42. package/dashboard/assets/library-BlLpV8Oh.js +1 -0
  43. package/dashboard/assets/newspaper-BF6EkBWC.js +1 -0
  44. package/dashboard/assets/notifications-wLr7xSyr.js +1 -0
  45. package/dashboard/assets/page-grid-BR5GG4AN.js +1 -0
  46. package/dashboard/assets/pagination-CEYfdE0s.js +1 -0
  47. package/dashboard/assets/play-DYoZjslk.js +1 -0
  48. package/dashboard/assets/plus-DewHiaw6.js +1 -0
  49. package/dashboard/assets/publication-destination-picker-DAgQcLxS.js +1 -0
  50. package/dashboard/assets/publishing-DOrwrfAd.js +1 -0
  51. package/dashboard/assets/publishing_.styles-DUnbtaS6.js +1 -0
  52. package/dashboard/assets/publishing_.templates-pMvBK24N.js +1 -0
  53. package/dashboard/assets/publishing_.templates_.sessions._sessionId-FkykBbtF.js +1 -0
  54. package/dashboard/assets/radio-tower-CS59Tvfq.js +1 -0
  55. package/dashboard/assets/react-OqyHmgtK.js +1 -0
  56. package/dashboard/assets/refresh-cw-BB9_0X86.js +1 -0
  57. package/dashboard/assets/rolldown-runtime-DoHqwKmD.js +1 -0
  58. package/dashboard/assets/routes-15GLqJa6.js +1 -0
  59. package/dashboard/assets/runs-Cbz28Mf6.js +1 -0
  60. package/dashboard/assets/select-9cx3otc_.js +1 -0
  61. package/dashboard/assets/settings-CeJjvt-K.js +1 -0
  62. package/dashboard/assets/sources-CsuPzTTH.js +1 -0
  63. package/dashboard/assets/sparkles-C9YU6Kr5.js +1 -0
  64. package/dashboard/assets/src-DVp5YM1T.js +1 -0
  65. package/dashboard/assets/sse-DQK6eHXZ.js +4 -0
  66. package/dashboard/assets/tabs-DdmTx_k0.js +1 -0
  67. package/dashboard/assets/textarea-zbjD4aac.js +1 -0
  68. package/dashboard/assets/trash-2-CcgFunKh.js +1 -0
  69. package/dashboard/assets/types-D57tnOAh.js +1 -0
  70. package/dashboard/assets/use-onboarding-fKNsbNhX.js +1 -0
  71. package/dashboard/assets/use-workspace-snapshot-MZKeTfAJ.js +1 -0
  72. package/dashboard/assets/useMutation-Xdq_89ou.js +1 -0
  73. package/dashboard/assets/workspace-XH4e6E59.js +1 -0
  74. package/dashboard/assets/wrench-C9HmhR9v.js +1 -0
  75. package/dashboard/favicon.svg +5 -0
  76. package/dashboard/index.html +15 -0
  77. package/dist/app.js +47724 -0
  78. package/dist/cli.js +11 -0
  79. package/drizzle/0000_zippy_juggernaut.sql +361 -0
  80. package/drizzle/0001_safe_green_goblin.sql +15 -0
  81. package/drizzle/meta/0000_snapshot.json +2221 -0
  82. package/drizzle/meta/0001_snapshot.json +2299 -0
  83. package/drizzle/meta/_journal.json +20 -0
  84. package/package.json +29 -4
  85. package/README.md +0 -3
@@ -0,0 +1 @@
1
+ import{K as e,ln as t,nt as n}from"./index-Bx1uywm3.js";var r=t();function i({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`empty`,className:n(`flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12`,e),...t})}function a({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`empty-header`,className:n(`flex max-w-sm flex-col items-center gap-2 text-center`,e),...t})}e(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6`}},defaultVariants:{variant:`default`}});function o({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`empty-title`,className:n(`text-lg font-medium tracking-tight`,e),...t})}function s({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`empty-description`,className:n(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function c({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`empty-content`,className:n(`flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance`,e),...t})}function l({title:e=`暂无数据`,description:t,action:l,className:u}){return(0,r.jsxs)(i,{className:n(`min-h-36 bg-[var(--surface)] px-5 py-8`,u),children:[(0,r.jsxs)(a,{children:[(0,r.jsx)(o,{className:`text-sm font-semibold text-[var(--ink)]`,children:e}),t?(0,r.jsx)(s,{className:`max-w-md text-sm leading-6 text-[var(--muted-strong)]`,children:t}):null]}),l?(0,r.jsx)(c,{children:l}):null]})}export{l as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-DoHqwKmD.js";import{n as t,t as n}from"./notifications-wLr7xSyr.js";import{At as r,Ct as i,Dt as a,Et as o,Nt as s,Ot as c,Pt as l,St as u,Tt as d,U as f,_t as p,at as m,bt as h,dn as g,gt as _,ht as v,it as y,jt as b,ln as x,nt as S,ot as C,st as w,vt as T,xt as E,yt as D}from"./index-Bx1uywm3.js";import{t as O}from"./empty-state-B2PGtu_a.js";var k=e(g(),1),A=x(),j=Object.defineProperty,M=(e,t)=>j(e,`name`,{value:t,configurable:!0}),N=`Popover`,[P,ee]=r(N,[w]),F=w(),[te,I]=P(N),L=M(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!1}=e,c=F(t),l=k.useRef(null),[u,f]=k.useState(!1),[p,m]=k.useState(0),[h,g]=k.useState(0),[_,v]=a({prop:r,defaultProp:i??!1,onChange:o,caller:N});return(0,A.jsx)(y,{...c,children:(0,A.jsx)(te,{scope:t,contentId:d(),titleId:d(),descriptionId:d(),titlePresent:p>0,descriptionPresent:h>0,setTitleCount:m,setDescriptionCount:g,triggerRef:l,open:_,onOpenChange:v,onOpenToggle:k.useCallback(()=>v(e=>!e),[v]),hasCustomAnchor:u,onCustomAnchorAdd:k.useCallback(()=>f(!0),[]),onCustomAnchorRemove:k.useCallback(()=>f(!1),[]),modal:s,children:n})})},`Popover`),R=`PopoverTrigger`,z=k.forwardRef(M(function(e,t){let{__scopePopover:n,...r}=e,i=I(R,n),a=F(n),o=l(t,i.triggerRef),s=(0,A.jsx)(b.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":X(i.open),...r,ref:o,onClick:c(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,A.jsx)(m,{asChild:!0,...a,children:s})},`PopoverTrigger`)),B=`PopoverPortal`,[V,H]=P(B,{forceMount:void 0}),U=M(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=I(B,t);return(0,A.jsx)(V,{scope:t,forceMount:n,children:(0,A.jsx)(o,{present:n||a.open,children:(0,A.jsx)(T,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),W=`PopoverContent`,G=k.forwardRef(M(function(e,t){let n=H(W,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=I(W,e.__scopePopover);return(0,A.jsx)(o,{present:r||a.open,children:a.modal?(0,A.jsx)(q,{...i,ref:t}):(0,A.jsx)(J,{...i,ref:t})})},`PopoverContent`)),K=s(`PopoverContent.RemoveScroll`),q=k.forwardRef(M(function(e,t){let n=I(W,e.__scopePopover),r=k.useRef(null),i=l(t,r),a=k.useRef(!1),{nodes:o,registry:s}=u();return k.useEffect(()=>{let e=r.current;if(e)return v(e)},[]),(0,A.jsx)(_,{as:K,allowPinchZoom:!0,shards:k.useMemo(()=>[r,...o.map(e=>({current:e}))],[r,o]),children:(0,A.jsx)(Y,{...e,ref:i,branchNodes:o,branchRegistry:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:c(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:c(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:c(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),J=k.forwardRef(M(function(e,t){let n=I(W,e.__scopePopover),r=k.useRef(!1),i=k.useRef(!1);return(0,A.jsx)(Y,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),Y=k.forwardRef(M(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,"aria-describedby":m,branchNodes:g,branchRegistry:_,...v}=e,y=I(W,n),b=F(n),[x,S]=k.useState(null),w=l(t,S);return E(x),p(),(0,A.jsx)(h,{registry:_,children:(0,A.jsx)(D,{asChild:!0,loop:!0,trapped:r,branches:g,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,A.jsx)(i,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>y.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,A.jsx)(C,{"data-state":X(y.open),role:`dialog`,id:y.contentId,"aria-labelledby":y.titlePresent?y.titleId:void 0,"aria-describedby":y.descriptionPresent?Z(m,y.descriptionId):m,...b,...v,ref:w,style:{...v.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})})},`PopoverContentImpl`));function X(e){return e?`open`:`closed`}M(X,`getState`);function Z(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}M(Z,`concatAriaDescribedby`);function Q({title:e,description:t,action:n,toolbar:r,compact:i,summary:a,children:o,className:s}){return(0,A.jsxs)(`section`,{"aria-label":e,className:S(`min-w-0 overflow-hidden rounded-[var(--radius)] border border-[var(--border)] bg-[var(--surface)]`,s),children:[(0,A.jsxs)(`div`,{className:`grid gap-3 border-b border-[var(--border)] px-4 py-3.5 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center sm:px-5`,children:[i?(0,A.jsxs)(`div`,{className:`min-w-0`,children:[(0,A.jsx)(`h2`,{className:`sr-only`,children:e}),(0,A.jsx)(`p`,{className:`sr-only`,children:t}),(0,A.jsx)(`p`,{className:`text-xs font-medium text-[var(--muted-strong)]`,children:a??e})]}):(0,A.jsxs)(`div`,{className:`min-w-0`,children:[(0,A.jsx)(`h2`,{className:`text-sm font-semibold text-[var(--ink)]`,children:e}),(0,A.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-[var(--muted-strong)]`,children:t})]}),(r||n)&&(0,A.jsxs)(`div`,{className:`flex min-w-0 flex-wrap gap-2 lg:justify-end`,children:[r,n]})]}),(0,A.jsx)(`div`,{className:`divide-y divide-[var(--border)]`,children:o})]})}function ne(e){return(0,A.jsx)(L,{"data-slot":`popover`,...e})}function re(e){return(0,A.jsx)(z,{"data-slot":`popover-trigger`,...e})}function ie({className:e,align:t=`center`,sideOffset:n=6,...r}){return(0,A.jsx)(U,{children:(0,A.jsx)(G,{"data-slot":`popover-content`,align:t,sideOffset:n,className:S(`dropdown-content-motion z-50 w-72 origin-[var(--radix-popover-content-transform-origin)] rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface)] p-3 text-[var(--ink)] shadow-[var(--shadow-raised)] outline-none`,e),...r})})}function ae({name:e,description:t,onConfirm:r}){let[i,a]=(0,k.useState)(!1),[o,s]=(0,k.useState)(!1),c=e=>{o||a(e)},l=async()=>{if(!o){s(!0);try{await r(),a(!1),n.success(`删除成功`,`“${e}”已删除。`)}catch(e){n.error(`删除失败`,e)}finally{s(!1)}}};return(0,A.jsxs)(ne,{open:i,onOpenChange:c,children:[(0,A.jsx)(re,{asChild:!0,children:(0,A.jsx)(f,{variant:`ghost`,children:`删除`})}),(0,A.jsx)(ie,{align:`end`,side:`top`,collisionPadding:12,children:(0,A.jsxs)(`div`,{className:`grid gap-3`,children:[(0,A.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(0,A.jsxs)(`p`,{className:`break-words text-sm font-semibold`,children:[`删除“`,e,`”?`]}),(0,A.jsx)(`p`,{className:`break-words text-xs leading-5 text-[var(--muted-strong)]`,children:t??`删除后无法恢复。`})]}),(0,A.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,A.jsx)(f,{size:`sm`,disabled:o,onClick:()=>c(!1),children:`取消`}),(0,A.jsx)(f,{size:`sm`,variant:`destructive`,loading:o,onClick:()=>void l(),children:`确认删除`})]})]})})]})}function oe({title:e,description:t,action:n,compact:r,summary:i,empty:a,emptyTitle:o,emptyDescription:s,emptyAction:c,pagination:l,children:u}){return(0,A.jsxs)(Q,{title:e,description:t,action:n,compact:r,summary:i,children:[a?(0,A.jsx)(O,{title:o??`暂无内容`,description:s??`创建第一个对象后会显示在这里。`,action:c}):u,l]})}function se({title:e,description:t,status:n,meta:r,onOpen:i,onEdit:a,onDelete:o,deleteDescription:s,children:c}){return(0,A.jsxs)(`div`,{className:`grid min-w-0 gap-3 px-4 py-3.5 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center sm:px-5`,children:[i?(0,A.jsx)(`button`,{type:`button`,className:`min-w-0 rounded-[var(--radius-xs)] text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus)]`,onClick:i,children:(0,A.jsx)($,{title:e,description:t,status:n,meta:r})}):(0,A.jsx)(`div`,{className:`min-w-0`,children:(0,A.jsx)($,{title:e,description:t,status:n,meta:r})}),(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 lg:justify-end [&_button]:min-h-8 [&_button]:px-2.5 [&_button]:text-xs`,children:[c,a?(0,A.jsx)(f,{variant:`ghost`,onClick:a,children:`编辑`}):null,o?(0,A.jsx)(ae,{name:e,description:s,onConfirm:o}):null]})]})}function $({title:e,description:n,status:r,meta:i}){return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,A.jsx)(`h3`,{className:`truncate text-sm font-semibold text-[var(--ink)]`,children:e}),r&&r!==`ready`?(0,A.jsx)(t,{tone:r===`warning`?`warning`:`neutral`,children:r===`warning`?`需处理`:`已停用`}):null,i]}),(0,A.jsx)(`p`,{className:`mt-1 max-w-[90ch] text-xs leading-5 text-[var(--muted-strong)]`,children:n})]})}export{se as n,oe as t};
@@ -0,0 +1 @@
1
+ var e={GenerateArticle:`article.generate`,CompleteArticle:`article.complete`,PublishContent:`content.publish`,RunAutomation:`automation.run`},t={Queued:`queued`,Running:`running`,Succeeded:`succeeded`,Degraded:`degraded`,Failed:`failed`,NeedsAttention:`needs_attention`},n={Queued:`queued`,Running:`running`,Succeeded:`succeeded`,Partial:`partial`,Failed:`failed`,NeedsAttention:`needs_attention`},r={Main:`main`,Publication:`publication`},i={Session:`session`,ModelTurn:`model_turn`,ToolCall:`tool_call`,Submission:`submission`,Prepare:`prepare`,Validate:`validate`,Upload:`upload`,Publish:`publish`,Receipt:`receipt`,HistoricalTask:`historical_task`},a={Running:`running`,Succeeded:`succeeded`,Failed:`failed`,NeedsAttention:`needs_attention`};export{r as a,a as i,e as n,n as o,i as r,t};
@@ -0,0 +1 @@
1
+ import{X as e}from"./index-Bx1uywm3.js";var t=e(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{X as e}from"./index-Bx1uywm3.js";var t=e(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{X as e}from"./index-Bx1uywm3.js";var t=e(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{X as e}from"./index-Bx1uywm3.js";var t=e(`fingerprint-pattern`,[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`,key:`1nerag`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`,key:`o46ks0`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`,key:`ptglia`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`,key:`ydlgp0`}],[`path`,{d:`M2 16h.01`,key:`1gqxmh`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`,key:`drycrb`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`,key:`1tidbn`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`,key:`13wd9y`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`,key:`1fr1j5`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{X as e}from"./index-Bx1uywm3.js";var t=e(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{ln as e,nt as t}from"./index-Bx1uywm3.js";var n=e();function r({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`field`,className:t(`grid gap-2 text-sm`,e),...r})}function i({className:e,...r}){return(0,n.jsx)(`label`,{"data-slot":`field-label`,className:t(`text-xs font-semibold uppercase text-[var(--muted)]`,e),...r})}function a({className:e,...r}){return(0,n.jsx)(`p`,{"data-slot":`field-description`,className:t(`text-xs leading-5 text-[var(--muted-strong)]`,e),...r})}function o({className:e,...r}){return(0,n.jsx)(`p`,{"data-slot":`field-error`,className:t(`text-xs leading-5 text-[var(--danger)]`,e),...r})}function s({label:e,children:s,htmlFor:c,required:l,helper:u,error:d,className:f}){return(0,n.jsxs)(r,{className:t(`gap-1.5`,f),children:[(0,n.jsxs)(i,{htmlFor:c,className:`flex items-center gap-1`,children:[e,l?(0,n.jsx)(`span`,{"aria-hidden":`true`,className:`text-[var(--danger)]`,children:`*`}):null]}),s,u||d?(0,n.jsx)(`div`,{className:`min-h-5`,"aria-live":`polite`,children:d?(0,n.jsx)(o,{children:d}):u?(0,n.jsx)(a,{children:u}):null}):null]})}export{s as t};
@@ -0,0 +1,3 @@
1
+ import{a as e}from"./rolldown-runtime-DoHqwKmD.js";import{t}from"./useMutation-Xdq_89ou.js";import{r as n,t as r}from"./notifications-wLr7xSyr.js";import{C as i,E as a,Lt as o,S as s,T as c,U as l,V as u,dn as d,ln as f,rt as p,w as m,x as h}from"./index-Bx1uywm3.js";import{t as g}from"./plus-DewHiaw6.js";import{t as _}from"./input-Br6N0XCJ.js";import{t as v}from"./textarea-zbjD4aac.js";import{n as y,t as b}from"./app-dialog-CBRjH8y0.js";import{t as x}from"./form-field-BJITE8Lh.js";import{n as S,t as C}from"./entity-list-B2WXTDDM.js";import{t as w}from"./pagination-CEYfdE0s.js";import{t as T}from"./page-grid-BR5GG4AN.js";var E=e(d()),D=f(),O=20;function k(e=1){return n({queryKey:[...s(),e],queryFn:()=>c(e,O)})}function A(){let e=o();return t({mutationFn:e=>m(e),onSuccess:()=>e.invalidateQueries({queryKey:s()})})}function j(){let e=o();return t({mutationFn:({id:e,body:t})=>e?a(e,t):i(t),onSuccess:()=>e.invalidateQueries({queryKey:s()})})}var M={name:``,enabled:!0,positioning:``,audience:``,tone:``,forbiddenTopics:[]};function N(){let{page:e}=h.useSearch(),t=h.useNavigate(),{data:n}=k(e),[i,a]=(0,E.useState)(null),o=j(),s=A(),c=n?.items??[];return(0,D.jsxs)(T,{children:[(0,D.jsx)(C,{title:`身份列表`,description:`一个内容身份可以由不同内容方案发布到多个渠道账号。`,compact:!0,summary:`共 ${n?.total??0} 个身份`,action:(0,D.jsxs)(l,{variant:`primary`,onClick:()=>a(`new`),children:[(0,D.jsx)(g,{className:`size-4`}),`新建身份`]}),empty:!c.length,pagination:(0,D.jsx)(w,{page:e,pageSize:O,total:n?.total??0,onChange:e=>t({search:t=>({...t,page:e})})}),children:c.map(e=>(0,D.jsx)(S,{title:e.name,description:`${e.positioning} · 面向 ${e.audience} · ${e.tone}`,status:e.enabled?`ready`:`disabled`,onEdit:()=>a(e),onDelete:()=>s.mutateAsync(e.id)},e.id))}),(0,D.jsx)(P,{identity:i,open:!!i,onOpenChange:e=>!e&&a(null),onSave:e=>o.mutate({id:i===`new`?void 0:i.id,body:e},{onSuccess:()=>{a(null),r.success(`内容身份已保存`,`“${e.name}”已可用于内容方案。`)},onError:e=>r.error(`保存内容身份失败`,e)}),saving:o.isPending,error:o.error})]})}function P({identity:e,open:t,onOpenChange:n,onSave:r,saving:i,error:a}){let[o,s]=(0,E.useState)(M),[c,d]=(0,E.useState)(``);return(0,E.useEffect)(()=>{if(!e)return;let t=e===`new`?M:{...e,revision:e.revision};s(t),d(t.forbiddenTopics.join(`
2
+ `))},[e]),(0,D.jsxs)(b,{open:t,onOpenChange:n,title:e===`new`?`新建内容身份`:`编辑内容身份`,description:`只维护内容表达,不在这里绑定发布账号。`,size:`wide`,children:[(0,D.jsxs)(`div`,{className:`grid gap-5`,children:[(0,D.jsx)(F,{title:`基础信息`,children:(0,D.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,D.jsx)(x,{label:`名称`,required:!0,children:(0,D.jsx)(_,{value:o.name,onChange:e=>s({...o,name:e.target.value}),placeholder:`例如:工程观察`})}),(0,D.jsx)(x,{label:`语气`,required:!0,children:(0,D.jsx)(_,{value:o.tone,onChange:e=>s({...o,tone:e.target.value}),placeholder:`克制、直接、重证据`})}),(0,D.jsx)(x,{label:`定位`,required:!0,children:(0,D.jsx)(v,{className:`min-h-24`,value:o.positioning,onChange:e=>s({...o,positioning:e.target.value}),placeholder:`长期输出什么内容,以及坚持什么判断标准`})}),(0,D.jsx)(x,{label:`受众`,required:!0,children:(0,D.jsx)(v,{className:`min-h-24`,value:o.audience,onChange:e=>s({...o,audience:e.target.value}),placeholder:`读者是谁,以及他们为什么会持续关注`})})]})}),(0,D.jsx)(F,{title:`内容边界`,children:(0,D.jsx)(`div`,{className:`max-w-2xl`,children:(0,D.jsx)(x,{label:`禁止主题`,helper:`每行一条;主内容 Agent 与写作风格改写都会遵守这些边界。`,children:(0,D.jsx)(v,{className:`min-h-28`,value:c,onChange:e=>d(e.target.value),placeholder:`泛泛融资新闻
3
+ 无技术细节的营销稿`})})})}),(0,D.jsx)(u,{error:a})]}),(0,D.jsxs)(y,{className:`flex justify-end gap-2`,children:[(0,D.jsx)(l,{onClick:()=>n(!1),children:`取消`}),(0,D.jsx)(l,{variant:`primary`,loading:i,disabled:!o.name.trim()||!o.positioning.trim()||!o.audience.trim()||!o.tone.trim(),onClick:()=>r({...o,forbiddenTopics:p(c)}),children:`保存`})]})]})}function F({title:e,children:t}){return(0,D.jsxs)(`section`,{className:`grid gap-3 border-t border-[var(--border)] pt-4 first:border-t-0 first:pt-0`,children:[(0,D.jsx)(`h3`,{className:`text-sm font-semibold text-[var(--ink)]`,children:e}),t]})}export{N as component,A as useDeleteIdentity,k as useIdentities,j as useSaveIdentity};