@plumix/admin 0.1.0

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 (137) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +152 -0
  3. package/dist/assets/-errors-D-cmkYbY.js +1 -0
  4. package/dist/assets/-locale-param-R7YAVhAm.js +1 -0
  5. package/dist/assets/_-BgcFcUpb.js +1 -0
  6. package/dist/assets/_auth-DwSMg4I8.js +1 -0
  7. package/dist/assets/_authenticated-B2GjUlkG.js +1 -0
  8. package/dist/assets/_authenticated-DabO2Qyv.js +1 -0
  9. package/dist/assets/_editor-Cj750bOw.js +1 -0
  10. package/dist/assets/_name-4UEpyf0-.js +1 -0
  11. package/dist/assets/_page-B65xT7CY.js +1 -0
  12. package/dist/assets/_page-CW9_6SD1.js +1 -0
  13. package/dist/assets/_slug-B4JG-9fs.js +1 -0
  14. package/dist/assets/_token-DbYWXSFn.js +1 -0
  15. package/dist/assets/alert-cwX3fWUu.js +1 -0
  16. package/dist/assets/allowed-domains-DYhKp_Ib.js +1 -0
  17. package/dist/assets/ar-2V_CUREp.js +1 -0
  18. package/dist/assets/ar-9HCIfmBz.js +1 -0
  19. package/dist/assets/ar-Buhn3_h1.js +1 -0
  20. package/dist/assets/ar-Cw7lVEca.js +1 -0
  21. package/dist/assets/ar-DAS2VDOL.js +1 -0
  22. package/dist/assets/ar-Dlr9PmMq.js +1 -0
  23. package/dist/assets/ar-Dlvpw6lg.js +1 -0
  24. package/dist/assets/ar-b8X4U-Yj.js +1 -0
  25. package/dist/assets/arrow-left-CWzmtp8T.js +1 -0
  26. package/dist/assets/bootstrap-DJz3cWv9.js +1 -0
  27. package/dist/assets/breadcrumb-TUgLmtOo.js +1 -0
  28. package/dist/assets/card-L2-kK5VK.js +1 -0
  29. package/dist/assets/chevrons-up-down-DmmG8bmI.js +1 -0
  30. package/dist/assets/clipboard-D6ZMYUE8.js +1 -0
  31. package/dist/assets/create-BBUSAO26.js +1 -0
  32. package/dist/assets/create-CoSsIQco.js +1 -0
  33. package/dist/assets/create-GWJoFtGc.js +1 -0
  34. package/dist/assets/createLucideIcon-C0O-yxZG.js +1 -0
  35. package/dist/assets/dates-CSmOj6E-.js +1 -0
  36. package/dist/assets/de-BYwSm4O1.js +1 -0
  37. package/dist/assets/de-CN1uSHLH.js +1 -0
  38. package/dist/assets/de-CvzTts2_.js +1 -0
  39. package/dist/assets/de-Cw7lVEca.js +1 -0
  40. package/dist/assets/de-D0IUVgz1.js +1 -0
  41. package/dist/assets/de-DIaivdrP.js +1 -0
  42. package/dist/assets/de-OLYk7yVD.js +1 -0
  43. package/dist/assets/de-v78Axzn1.js +1 -0
  44. package/dist/assets/device-EMoc4lMH.js +1 -0
  45. package/dist/assets/dist-B66OmIyr.js +1 -0
  46. package/dist/assets/dist-BL2bKHuR.js +1 -0
  47. package/dist/assets/dist-Bdi1pykC.js +46 -0
  48. package/dist/assets/dist-ClOzYsk5.js +1 -0
  49. package/dist/assets/edit-BsC2RNOq.js +1 -0
  50. package/dist/assets/edit-Bz9riMHP.js +1 -0
  51. package/dist/assets/edit-C1985Bqy.js +1 -0
  52. package/dist/assets/edit-CG12fZGb.js +2 -0
  53. package/dist/assets/edit-DR0NupUB.js +1 -0
  54. package/dist/assets/edit-DlHnrl_y.js +1 -0
  55. package/dist/assets/en-0MUT7HwI.js +1 -0
  56. package/dist/assets/en-8mtHvgf_.js +1 -0
  57. package/dist/assets/en-B2WjeApp.js +1 -0
  58. package/dist/assets/en-Cw7lVEca.js +1 -0
  59. package/dist/assets/en-DG5AvC9g.js +1 -0
  60. package/dist/assets/en-DSzDoXek.js +1 -0
  61. package/dist/assets/en-GstVzXkR.js +1 -0
  62. package/dist/assets/en-phTuN5O3.js +1 -0
  63. package/dist/assets/entries-MizUUcD8.js +1 -0
  64. package/dist/assets/esm-DfD3iRfG.js +1 -0
  65. package/dist/assets/form-BhMVtuYF.js +1 -0
  66. package/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  67. package/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  68. package/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  69. package/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  70. package/dist/assets/geist-mono-cyrillic-ext-wght-normal-I4S5GZfc.woff2 +0 -0
  71. package/dist/assets/geist-mono-cyrillic-wght-normal-BmXc_FBt.woff2 +0 -0
  72. package/dist/assets/geist-mono-latin-ext-wght-normal-DrnZ1wKl.woff2 +0 -0
  73. package/dist/assets/geist-mono-latin-wght-normal-B_7UjwxQ.woff2 +0 -0
  74. package/dist/assets/geist-mono-symbols2-wght-normal-GZpp1pK2.woff2 +0 -0
  75. package/dist/assets/geist-mono-vietnamese-wght-normal-D8KDMBhC.woff2 +0 -0
  76. package/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  77. package/dist/assets/index-BtnQdcjJ.css +1 -0
  78. package/dist/assets/index-bWipSZdM.js +26 -0
  79. package/dist/assets/input-xYuLUQID.js +1 -0
  80. package/dist/assets/json-highlight-BbhGhG56.js +1 -0
  81. package/dist/assets/jsx-runtime-DUAcabCT.js +1 -0
  82. package/dist/assets/login-Cky2mine.js +1 -0
  83. package/dist/assets/mailer-CnGqwCP4.js +1 -0
  84. package/dist/assets/meta-box-CjxoPlkT.js +1 -0
  85. package/dist/assets/meta-box-field-Cgn0DXDv.js +1 -0
  86. package/dist/assets/meta-box-grid-DJBtTRhe.js +1 -0
  87. package/dist/assets/orpc-DURDArDu.js +15 -0
  88. package/dist/assets/orpc-errors-DWk96ZMY.js +1 -0
  89. package/dist/assets/passkey-C_CqNV1S.js +1 -0
  90. package/dist/assets/plugin-error-boundary-3Oze9sdd.js +1 -0
  91. package/dist/assets/puzzle-CkL6fcG1.js +1 -0
  92. package/dist/assets/react-DbyrFoBd.js +1 -0
  93. package/dist/assets/react-dom-i-Mcm3wj.js +1 -0
  94. package/dist/assets/rich-text-field-DGbPE_N0.js +130 -0
  95. package/dist/assets/scopes-C_7AiPdH.js +1 -0
  96. package/dist/assets/search-input-BpOKuC8D.js +4 -0
  97. package/dist/assets/separator-DCQAFSsS.js +1 -0
  98. package/dist/assets/settings-DCqQvJiy.js +1 -0
  99. package/dist/assets/settings-K6TF73jB.js +1 -0
  100. package/dist/assets/skeleton-BnBM1862.js +1 -0
  101. package/dist/assets/slugify-DglnCNxs.js +1 -0
  102. package/dist/assets/style-emitter-CDGtTiRG.js +1 -0
  103. package/dist/assets/tablet-BnclzXSX.js +1 -0
  104. package/dist/assets/textarea-BoWLuA0I.js +1 -0
  105. package/dist/assets/toast-CQk_AYCo.js +1 -0
  106. package/dist/assets/toggle-Bfw56q6s.js +1 -0
  107. package/dist/assets/tooltip-Pch4JgRX.js +1 -0
  108. package/dist/assets/trash-2-Bn-rv3EX.js +1 -0
  109. package/dist/assets/tree-BUpunTXw.js +1 -0
  110. package/dist/assets/type-labels-DEpt0nSb.js +1 -0
  111. package/dist/assets/uk-BzAywoVV.js +1 -0
  112. package/dist/assets/uk-CFwH6F6c.js +1 -0
  113. package/dist/assets/uk-CO1j-3uB.js +1 -0
  114. package/dist/assets/uk-Cw7lVEca.js +1 -0
  115. package/dist/assets/uk-DBaZCcmT.js +1 -0
  116. package/dist/assets/uk-DM9J8Vuo.js +1 -0
  117. package/dist/assets/uk-DVE7aazP.js +1 -0
  118. package/dist/assets/uk-ne9mbIup.js +1 -0
  119. package/dist/assets/underline-CoVrqZEk.js +1 -0
  120. package/dist/assets/use-formatters-BlYPsMo8.js +1 -0
  121. package/dist/assets/use-label-CykSHq9A.js +1 -0
  122. package/dist/assets/users-CYvrBtzp.js +1 -0
  123. package/dist/assets/utils-BBTvNyQG.js +5 -0
  124. package/dist/assets/utils-DKOQrNEG.js +1 -0
  125. package/dist/assets/valibot-BKzEbLVK.js +1 -0
  126. package/dist/assets/validation-CwFumc7a.js +1 -0
  127. package/dist/assets/with-selector-Bf4HMdmS.js +1 -0
  128. package/dist/assets/zh-CN--OEUZ0F-.js +1 -0
  129. package/dist/assets/zh-CN-B-X6nxCi.js +1 -0
  130. package/dist/assets/zh-CN-BoFMJmlb.js +1 -0
  131. package/dist/assets/zh-CN-Cw7lVEca.js +1 -0
  132. package/dist/assets/zh-CN-DA1Ls1Dj.js +1 -0
  133. package/dist/assets/zh-CN-Db7vQndL.js +1 -0
  134. package/dist/assets/zh-CN-gCCQNrSp.js +1 -0
  135. package/dist/assets/zh-CN-iir6sd5N.js +1 -0
  136. package/dist/index.html +34 -0
  137. package/package.json +106 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Plumix Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,152 @@
1
+ # @plumix/admin
2
+
3
+ Pre-built React SPA published as its own package and depended on by
4
+ [`plumix`](../plumix). The admin compiles once into `dist/`, and the plumix
5
+ Vite plugin resolves this package from `node_modules` and stages it into the
6
+ consumer's `.plumix/public/_plumix/admin/` directory so the active runtime
7
+ adapter serves it at `/_plumix/admin/*` with no per-consumer rebuild.
8
+
9
+ ## Dev workflows
10
+
11
+ Two supported loops, pick whichever matches what you're iterating on.
12
+
13
+ ### Consumer-style: `plumix dev` only (single origin)
14
+
15
+ Once the consumer has wired static-asset serving for their chosen runtime
16
+ (the example app's config shows the right binding for that runtime),
17
+ running the backend serves admin too — no second process:
18
+
19
+ ```bash
20
+ cd examples/minimal
21
+ pnpm dev # :5173
22
+ # open http://localhost:5173/_plumix/admin/
23
+ ```
24
+
25
+ This mode exercises the same serving path production uses (the runtime's
26
+ asset layer in front of the request handler). Best for "does my feature
27
+ work end-to-end?" checks.
28
+
29
+ ### Admin-authoring: `pnpm dev` in both workspaces (two ports, HMR)
30
+
31
+ When iterating on admin source, Vite's HMR against admin source files is
32
+ faster than rebuilding + restaging. Two terminals:
33
+
34
+ ```bash
35
+ # terminal 1 — backend
36
+ cd examples/minimal && pnpm dev # :5173
37
+
38
+ # terminal 2 — admin with HMR
39
+ cd packages/admin && pnpm dev # :5174
40
+ # open http://localhost:5174/_plumix/admin/
41
+ ```
42
+
43
+ Admin's Vite dev server proxies `/_plumix/rpc` and `/_plumix/auth` to
44
+ `:5173`, so RPC and auth still hit the real backend. Best for "I'm tweaking
45
+ a component, want hot reload."
46
+
47
+ Override the proxy target for a remote/non-default backend:
48
+
49
+ ```bash
50
+ PLUMIX_BACKEND_URL=http://192.168.1.10:5173 pnpm dev
51
+ ```
52
+
53
+ ### Turbo shortcut: `pnpm dev` from repo root
54
+
55
+ Runs both workspaces in parallel via `turbo watch dev --continue`. Same
56
+ two-port layout as the two-terminal variant but in one shell.
57
+
58
+ ### First-time setup
59
+
60
+ Before RPC endpoints work, the dev database needs migrations applied —
61
+ the specifics depend on the database adapter the example app uses. From
62
+ your example app (e.g. `examples/minimal`):
63
+
64
+ ```bash
65
+ cd examples/minimal
66
+ pnpm plumix migrate apply
67
+ ```
68
+
69
+ ### End-to-end tests (Playwright + axe-core)
70
+
71
+ `pnpm test:e2e` launches a dedicated Vite server on `:5180` and runs the
72
+ Playwright suite against it. First-time setup needs Chromium installed:
73
+
74
+ ```bash
75
+ pnpm exec playwright install --with-deps chromium # once
76
+ pnpm test:e2e # each run
77
+ ```
78
+
79
+ The default suite is an accessibility baseline — axe-core with WCAG 2.1 AA
80
+ tags run against the landing page. Every new route or feature should add a
81
+ spec under `e2e/`.
82
+
83
+ ### Workspace-local scripts
84
+
85
+ From `packages/admin/`:
86
+
87
+ ```bash
88
+ pnpm dev # Vite dev server on http://localhost:5174/_plumix/admin/
89
+ pnpm build # emits static assets to dist/
90
+ pnpm test # vitest (jsdom + React Testing Library)
91
+ pnpm test:e2e # playwright + axe-core (needs chromium installed once)
92
+ pnpm typecheck
93
+ pnpm lint
94
+ ```
95
+
96
+ ## Stack
97
+
98
+ - **React 19** + TypeScript
99
+ - **TanStack Router** (file-based, with `@tanstack/router-plugin` in Vite)
100
+ - **TanStack Query** + `@orpc/tanstack-query` for RPC against the plumix backend
101
+ - **Tailwind CSS v4** (`@tailwindcss/vite`) + **shadcn/ui** (new-york style, neutral base)
102
+ - **Geist Variable** + **Geist Mono Variable** via `@fontsource-variable/*`
103
+ - Vitest + React Testing Library for component tests
104
+ - Playwright + @axe-core/playwright for e2e and accessibility baseline
105
+
106
+ ## Directory layout
107
+
108
+ ```
109
+ src/
110
+ App.tsx root component
111
+ main.tsx Vite entry
112
+ routeTree.gen.ts generated by @tanstack/router-plugin
113
+ types.d.ts ambient declarations (fontsource, etc.)
114
+
115
+ lib/ non-React utilities
116
+ constants.ts ADMIN_BASE_PATH and similar
117
+ orpc.ts typed oRPC client singleton
118
+ utils.ts cn() helper for shadcn components
119
+
120
+ providers/ React provider wiring
121
+ query-client.ts createQueryClient factory
122
+ router.ts createRouter factory
123
+ theme.tsx ThemeProvider (light/dark/system)
124
+ index.ts barrel re-export for App.tsx
125
+
126
+ components/
127
+ ui/ shadcn-vendored primitives (do not hand-edit — re-add
128
+ via `pnpm dlx shadcn@latest add <name>` to refresh)
129
+
130
+ routes/ file-based routes (see @tanstack/react-router docs)
131
+ ```
132
+
133
+ ## Adding a shadcn component
134
+
135
+ ```bash
136
+ pnpm dlx shadcn@latest add <name>
137
+ ```
138
+
139
+ Components land in `src/components/ui/`. Knip is configured to treat that
140
+ directory as a vendored component library — unused primitives don't surface
141
+ as noise, so add the full set you expect to use.
142
+
143
+ ## How the admin is shipped
144
+
145
+ Admin build output (`dist/`) is published as the `@plumix/admin` package,
146
+ which `plumix` declares as a dependency. At consumer build time, the plumix
147
+ Vite plugin resolves `@plumix/admin` from `node_modules` and copies its
148
+ `dist/` into the consumer's `dist/_plumix/admin/`, and the active runtime
149
+ adapter serves them (see `packages/core/src/runtime/dispatcher.ts`
150
+ for the runtime-agnostic request pipeline). Plugin-contributed admin
151
+ chunks + the manifest that wires them are planned for a later phase —
152
+ see docs/reference/architecture/09-packages/05-admin.md for the full design.
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{n}from"./dist-BL2bKHuR.js";import{t as r}from"./textarea-BoWLuA0I.js";import{t as i}from"./use-label-CykSHq9A.js";import{D as a,b as o,d as s,h as c,k as l,l as u,p as d,w as f,x as p,y as m}from"./dist-ClOzYsk5.js";import{n as h,o as g}from"./validation-CwFumc7a.js";import{F as _,I as v,L as y,P as b,Pt as x,R as S}from"./index-bWipSZdM.js";import{t as C}from"./input-xYuLUQID.js";import{a as w,f as T,i as E,n as D,o as O,s as k,t as A}from"./form-BhMVtuYF.js";import{n as j,t as M}from"./alert-cwX3fWUu.js";import{t as N}from"./valibot-BKzEbLVK.js";import{t as P}from"./meta-box-CjxoPlkT.js";var F=e(t(),1),I={slugFormat:{id:`termForm.slug.format`},rootOption:{id:`termForm.parent.rootOption`}},L=`__root__`,R=c({name:m(f(),a(),s(1),u(200)),slug:m(f(),a(),u(200),p(/^[a-z0-9-]*$/,g(I.slugFormat))),description:m(f(),a(),u(2e3)),parentId:d(h),meta:o(f(),l())});function z({initialValues:e,isHierarchical:t,parentOptions:a,isSubmitting:o,serverError:s,submitLabel:c,metaBoxes:l,onSubmit:u,onCancel:d}){let f=i(),p=T({resolver:N(R),defaultValues:e}),m=p.handleSubmit(e=>{u(e)});return(0,F.jsx)(A,{...p,children:(0,F.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:m,children:[(0,F.jsx)(E,{control:p.control,name:`name`,render:({field:e})=>(0,F.jsxs)(w,{children:[(0,F.jsx)(O,{children:(0,F.jsx)(n,{id:`termForm.name`,message:`Name`})}),(0,F.jsx)(D,{children:(0,F.jsx)(C,{type:`text`,required:!0,disabled:o,"data-testid":`term-form-name-input`,...e})}),(0,F.jsx)(k,{})]})}),(0,F.jsx)(E,{control:p.control,name:`slug`,render:({field:e})=>(0,F.jsxs)(w,{children:[(0,F.jsx)(O,{children:(0,F.jsx)(n,{id:`termForm.slug`,message:`Slug`})}),(0,F.jsx)(D,{children:(0,F.jsx)(C,{type:`text`,autoComplete:`off`,disabled:o,"data-testid":`term-form-slug-input`,...e})}),(0,F.jsx)(k,{})]})}),(0,F.jsx)(E,{control:p.control,name:`description`,render:({field:e})=>(0,F.jsxs)(w,{children:[(0,F.jsx)(O,{children:(0,F.jsx)(n,{id:`termForm.description`,message:`Description`})}),(0,F.jsx)(D,{children:(0,F.jsx)(r,{...e,disabled:o,rows:3,"data-testid":`term-form-description-input`,className:`min-h-20`})}),(0,F.jsx)(k,{})]})}),t?(0,F.jsx)(E,{control:p.control,name:`parentId`,render:({field:e})=>(0,F.jsxs)(w,{children:[(0,F.jsx)(O,{children:(0,F.jsx)(n,{id:`termForm.parent`,message:`Parent`})}),(0,F.jsxs)(b,{value:e.value==null?L:String(e.value),onValueChange:t=>{e.onChange(t===L?null:Number(t))},disabled:o,children:[(0,F.jsx)(D,{children:(0,F.jsx)(y,{className:`w-full`,onBlur:e.onBlur,"data-testid":`term-form-parent-select`,children:(0,F.jsx)(S,{})})}),(0,F.jsxs)(_,{children:[(0,F.jsx)(v,{value:L,"data-testid":`term-form-parent-select-option-root`,children:f(I.rootOption)}),a.map(e=>(0,F.jsx)(v,{value:String(e.id),"data-testid":`term-form-parent-select-option-${e.id}`,children:e.label},e.id))]})]}),(0,F.jsx)(k,{})]})}):null,l.map(e=>(0,F.jsx)(P,{box:e,basePath:`meta`,disabled:o},e.id)),s?(0,F.jsx)(M,{variant:`destructive`,"data-testid":`term-form-server-error`,children:(0,F.jsx)(j,{children:f(s)})}):null,(0,F.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,F.jsx)(x,{type:`button`,variant:`outline`,onClick:d,disabled:o,children:(0,F.jsx)(n,{id:`termForm.cancel`,message:`Cancel`})}),(0,F.jsx)(x,{type:`submit`,disabled:o,"data-testid":`term-form-submit`,children:o?(0,F.jsx)(n,{id:`termForm.submitting`,message:`Saving…`}):f(c)})]})]})})}var B={slug_taken:{id:`terms.error.slugTaken`},parent_mismatch:{id:`terms.error.parentMismatch`},parent_self_or_cycle:{id:`terms.error.parentSelfOrCycle`}};function V(){let e=i();return(t,n)=>{let r=H(t);return r===`slug_taken`?e(B.slug_taken):r===`parent_mismatch`?e(B.parent_mismatch):r===`parent_is_self`||r===`parent_cycle`?e(B.parent_self_or_cycle):t instanceof Error?t.message:n}}function H(e){if(e&&typeof e==`object`&&`data`in e)return e.data?.reason}export{z as n,V as t};
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{i as n}from"./dist-BL2bKHuR.js";import{o as r}from"./orpc-DURDArDu.js";import{F as i,I as a,L as o,P as s,R as c}from"./index-bWipSZdM.js";function l(e,t){return t===``?e:e===`/`?t:`${t}${e}`}var u=`plumix_locale`,d=`/_plumix/`,f=31536e3;function p(e,t,n=``){let r=[`${u}=${e}`,`Path=${l(d,n)}`,`Max-Age=${f}`,`SameSite=Lax`];return t&&r.push(`Secure`),r.join(`; `)}var m=e(t(),1);function h({currentCode:e,manifest:t,onSelect:r}){let{i18n:l}=n(),u=t.i18n?.locales??[];return u.length<=1?null:(0,m.jsxs)(s,{value:e,onValueChange:r,children:[(0,m.jsx)(o,{"data-testid":`login-locale-switcher-trigger`,"aria-label":l._(`login.locale.aria`,void 0,{message:`Language`}),children:(0,m.jsx)(c,{})}),(0,m.jsx)(i,{children:u.map(e=>(0,m.jsx)(a,{value:e.code,"data-testid":`login-locale-switcher-option-${e.code}`,children:e.label},e.code))})]})}function g(e,t){let{lang:n,...r}=e;return{...r,lang:t}}function _(e,t){let n=g(e,t),r=new URLSearchParams;for(let[e,t]of Object.entries(n))typeof t==`string`?r.set(e,t):typeof t==`number`&&r.set(e,String(t));return`${window.location.pathname}?${r.toString()}`}function v(e,t={}){let n=t.secure??(typeof location<`u`&&location.protocol===`https:`);document.cookie=p(e,n,r())}export{v as n,h as r,_ as t};
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{t as n}from"./react-DbyrFoBd.js";import{i as r,n as i}from"./dist-BL2bKHuR.js";import{t as a}from"./use-label-CykSHq9A.js";import{E as o,d as s,w as c}from"./index-bWipSZdM.js";import{t as l}from"./plugin-error-boundary-3Oze9sdd.js";var u=e(n()),d=e(t()),f={loadingAria:{id:`pluginPage.loading.aria`}};function p(){let{navItem:e}=c.useRouteContext(),{i18n:t}=r(),n=a()(e.label),i=e.to.replace(/^\/pages/,``),p=s(i);return p?(0,d.jsx)(l,{kind:`page`,pluginLabel:n,children:(0,d.jsx)(u.Suspense,{fallback:(0,d.jsx)(o,{ariaLabel:t._(f.loadingAria.id,{label:n},{message:f.loadingAria.message}),testId:`plugin-page__loading__${i}`}),children:(0,d.jsx)(p,{})})}):(0,d.jsx)(m,{path:i})}function m({path:e}){return(0,d.jsxs)(`div`,{className:`mx-auto max-w-2xl py-12`,"data-testid":`plugin-page__not-loaded__${e}`,children:[(0,d.jsx)(`h1`,{className:`text-2xl font-semibold`,children:(0,d.jsx)(i,{id:`pluginPage.notLoaded.title`,message:`Plugin not loaded`})}),(0,d.jsx)(`p`,{className:`text-muted-foreground mt-2 text-sm`,children:(0,d.jsx)(i,{id:`pluginPage.notLoaded.body`,message:`The admin manifest declares a page at <code>{path}</code> but no React component has been registered for it.`,values:{path:e},components:{code:(0,d.jsx)(`code`,{className:`font-mono`})},comment:`path: the manifest-declared admin-route path (e.g. '/audit-log'); pass through verbatim`})})]})}export{p as component};
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{a as n}from"./esm-DfD3iRfG.js";var r=e(t());function i(){return(0,r.jsx)(`main`,{className:`bg-background flex min-h-screen items-center justify-center p-8`,children:(0,r.jsx)(`div`,{className:`w-full max-w-md`,children:(0,r.jsx)(n,{})})})}export{i as component};
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{t as n}from"./react-DbyrFoBd.js";import{i as r,n as i}from"./dist-BL2bKHuR.js";import{f as a,s as o,t as ee,u as s}from"./orpc-DURDArDu.js";import{a as c,d as l,l as u,n as d,u as f}from"./esm-DfD3iRfG.js";import{t as p}from"./createLucideIcon-C0O-yxZG.js";import{A as m,B as h,C as g,D as _,E as v,H as y,I as b,L as x,M as te,N as ne,O as re,P as ie,R as S,S as ae,T as C,V as w,a as T,b as oe,d as se,f as E,g as ce,h as le,i as ue,j as de,k as fe,l as pe,m as me,n as he,o as D,p as O,r as k,s as A,t as j,u as M,v as N,w as P,x as F,y as I,z as L}from"./breadcrumb-TUgLmtOo.js";import{t as R}from"./chevrons-up-down-DmmG8bmI.js";import{n as z,t as B}from"./puzzle-CkL6fcG1.js";import{t as V}from"./settings-K6TF73jB.js";import{t as H}from"./use-label-CykSHq9A.js";import{Q as U,St as ge,X as _e,Y as ve,n as ye,q as be,st as W,t as xe}from"./index-bWipSZdM.js";import{i as Se}from"./passkey-C_CqNV1S.js";import{t as G}from"./separator-DCQAFSsS.js";import{r as Ce}from"./tooltip-Pch4JgRX.js";var we=p(`panels-top-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M9 21V9`,key:`1oto5p`}]]),Te=p(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),Ee=p(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),De=p(`key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),Oe=p(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),ke=p(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),Ae=p(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),je=p(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),Me=p(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),Ne=p(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),K=e(t(),1),Pe={dashboard:Oe,content:z,"file-text":z,layout:we,image:ge,calendar:Te,tag:je,folder:Ee,users:Ne,settings:V,puzzle:B,mail:Ae,key:De};function q({name:e}){return(0,K.jsx)(e?Pe[e]:B,{})}function Fe({user:e}){let{isMobile:t}=y(),n=l(),r=s({mutationFn:Se,onSettled:async e=>{if(await n.invalidate(),n.options.context.queryClient.removeQueries({queryKey:ve}),e?.redirectTo){window.location.assign(e.redirectTo);return}await n.navigate({to:`/login`})}}),a=e.name??e.email,o=a.slice(0,2).toUpperCase();return(0,K.jsxs)(oe,{children:[(0,K.jsx)(v,{asChild:!0,children:(0,K.jsxs)(S,{size:`lg`,"data-testid":`user-menu-trigger`,className:`data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground`,children:[(0,K.jsx)(_,{className:`size-8`,children:(0,K.jsx)(re,{className:`bg-sidebar-accent text-sidebar-accent-foreground text-xs font-semibold`,children:o})}),(0,K.jsxs)(`div`,{className:`grid flex-1 text-start text-sm leading-tight`,children:[(0,K.jsx)(`span`,{className:`truncate font-medium`,children:a}),(0,K.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:e.email})]}),(0,K.jsx)(R,{className:`ms-auto size-4`})]})}),(0,K.jsxs)(F,{className:`w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg`,side:t?`bottom`:`right`,align:`end`,sideOffset:4,children:[(0,K.jsx)(P,{className:`p-0 font-normal`,children:(0,K.jsxs)(`div`,{className:`flex items-center gap-2 px-1 py-1.5 text-start text-sm`,children:[(0,K.jsx)(`div`,{"aria-hidden":!0,className:`bg-sidebar-accent text-sidebar-accent-foreground flex size-8 items-center justify-center rounded-md text-xs font-semibold`,children:o}),(0,K.jsxs)(`div`,{className:`grid flex-1 text-start text-sm leading-tight`,children:[(0,K.jsx)(`span`,{className:`truncate font-medium`,children:a}),(0,K.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:e.email})]})]})}),(0,K.jsx)(C,{}),(0,K.jsxs)(ae,{children:[(0,K.jsx)(g,{asChild:!0,children:(0,K.jsxs)(u,{to:`/profile`,"data-testid":`user-menu-profile-link`,children:[(0,K.jsx)(Me,{className:`size-4`}),(0,K.jsx)(i,{id:`menu.profile`,message:`Profile`})]})}),(0,K.jsxs)(g,{disabled:!0,children:[(0,K.jsx)(V,{className:`size-4`}),(0,K.jsx)(i,{id:`menu.settings`,message:`Settings`})]})]}),(0,K.jsx)(C,{}),(0,K.jsxs)(g,{onSelect:()=>r.mutate(),disabled:r.isPending,"data-testid":`user-menu-sign-out`,children:[(0,K.jsx)(ke,{className:`size-4`}),r.isPending?(0,K.jsx)(i,{id:`menu.signOut.pending`,message:`Signing out…`}):(0,K.jsx)(i,{id:`menu.signOut`,message:`Sign out`})]})]})]})}function Ie({user:e,capabilities:t}){let n=W(t),r=H();return(0,K.jsxs)(fe,{collapsible:`icon`,variant:`inset`,children:[(0,K.jsx)(m,{children:n.map(e=>(0,K.jsxs)(te,{children:[(0,K.jsx)(ie,{children:r(e.label)}),(0,K.jsx)(ne,{children:(0,K.jsx)(x,{children:e.items.map(e=>(0,K.jsx)(L,{children:(0,K.jsx)(S,{asChild:!0,tooltip:r(e.label),children:(0,K.jsxs)(u,{to:e.to,activeProps:{"data-active":`true`},activeOptions:{exact:e.exact??!1},children:[(0,K.jsx)(q,{name:e.coreIcon}),(0,K.jsx)(`span`,{children:r(e.label)})]})})},e.to))})})]},e.id))}),(0,K.jsx)(de,{children:(0,K.jsx)(x,{children:(0,K.jsx)(L,{children:(0,K.jsx)(Fe,{user:e})})})})]})}var J=e(n(),1);function Le(e,t){return W(e,t).flatMap(e=>e.items.map(e=>({to:e.to,label:e.label,...e.coreIcon?{coreIcon:e.coreIcon}:{},...e.keywords?{keywords:e.keywords}:{}})))}function Re(e,t,n){let r=t.trim().toLowerCase();return r.length===0?e:e.filter(e=>[e.label,...e.keywords??[]].map(n).join(` `).toLowerCase().includes(r))}function Y(e){let t=e.indexOf(`:`);return t===-1?{domain:e,name:``}:{domain:e.slice(0,t),name:e.slice(t+1)}}function ze(e,t,n){let{domain:r,name:i}=Y(e),a=encodeURIComponent(t);switch(r){case`entry`:return`${o}/entries/${encodeURIComponent(n(i))}/${a}/edit`;case`term`:return`${o}/terms/${encodeURIComponent(i)}/${a}/edit`;case`users`:return`${o}/users/${a}/edit`;default:return null}}function Be(e){return e.metaKey||e.ctrlKey}var X=`plumix.v2.palette.recent`,Ve=8;function He(e){try{let t=[e,...Z().filter(t=>t!==e)].slice(0,Ve);localStorage.setItem(X,JSON.stringify(t))}catch{}}function Z(){try{let e=localStorage.getItem(X);if(e===null)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>typeof e==`string`):[]}catch{return[]}}function Ue(e,t,n){let r=new Map(e.map(e=>[e.to,e])),i=[];for(let e of t){let t=r.get(e);if(t&&i.push(t),i.length>=n)break}return i}var Q=2,We=250,Ge=5,$={title:{id:`palette.title`},description:{id:`palette.description`},placeholder:{id:`palette.placeholder`},empty:{id:`palette.empty`},navigation:{id:`palette.group.navigation`},recent:{id:`palette.group.recent`},commands:{id:`palette.group.commands`},loading:{id:`palette.loading`},hintNavigate:{id:`palette.hint.navigate`},hintSelect:{id:`palette.hint.select`},hintClose:{id:`palette.hint.close`}},Ke=[{id:`core:profile`,title:{id:`palette.command.profile`},coreIcon:`users`,run:({navigate:e})=>void e({to:`/profile`})},{id:`core:settings`,title:{id:`palette.command.settings`},coreIcon:`settings`,capability:`settings:manage`,run:({navigate:e})=>void e({to:`/settings`})}];function qe(e,t){let[n,r]=(0,J.useState)(e);return(0,J.useEffect)(()=>{let n=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}function Je({capabilities:e}){let[t,n]=(0,J.useState)(!1),[r,i]=(0,J.useState)(``),o=f(),s=H(),c=(0,J.useRef)(!1);(0,J.useEffect)(()=>{function e(e){e.key===`k`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),n(e=>!e))}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[]);let l=r.trim(),u=qe(l,We),d=a(ee.search.query.queryOptions({input:{query:u},enabled:t&&u.length>=Q})),p=ye([...Ke,...xe()],e,l,s),m=Re(Le(e),l,s),h=t&&l.length===0?Ue(m,Z(),Ge):[],g=l.length>=Q?d.data??[]:[],_=l.length>=Q&&(l!==u||d.isFetching);function v(){n(!1),i(``)}function y(e){He(e),v(),o({to:e})}function b(e,t){let n=c.current;if(c.current=!1,v(),n){let n=ze(e,t,e=>U(e)?.adminSlug??e);n&&window.open(n,`_blank`,`noopener,noreferrer`);return}let{domain:r,name:i}=Y(e);switch(r){case`entry`:o({to:`/entries/$slug/$id/edit`,params:{slug:U(i)?.adminSlug??i,id:Number(t)}});return;case`term`:o({to:`/terms/$name/$id/edit`,params:{name:i,id:Number(t)}});return;case`users`:o({to:`/users/$id/edit`,params:{id:Number(t)}});return}}function x(e){c.current=Be(e)}return(0,K.jsxs)(me,{open:t,onOpenChange:e=>{n(e),e||i(``)},children:[(0,K.jsxs)(N,{className:`sr-only`,children:[(0,K.jsx)(I,{children:s($.title)}),(0,K.jsx)(ce,{children:s($.description)})]}),(0,K.jsx)(le,{className:`overflow-hidden p-0`,children:(0,K.jsxs)(A,{shouldFilter:!1,onClickCapture:x,onKeyDown:e=>{e.key===`Enter`&&x(e)},children:[(0,K.jsx)(se,{value:r,onValueChange:i,"data-testid":`command-palette-input`,placeholder:s($.placeholder)}),(0,K.jsxs)(O,{children:[_?(0,K.jsx)(`div`,{"data-testid":`command-palette-loading`,className:`text-muted-foreground px-3 py-2 text-sm`,children:s($.loading)}):(0,K.jsx)(pe,{children:s($.empty)}),h.length>0?(0,K.jsx)(M,{heading:s($.recent),children:h.map(e=>(0,K.jsxs)(E,{value:`recent:${e.to}`,"data-testid":`command-palette-recent-${e.to}`,onSelect:()=>{y(e.to)},children:[(0,K.jsx)(q,{name:e.coreIcon}),(0,K.jsx)(`span`,{children:s(e.label)})]},`recent:${e.to}`))}):null,p.length>0?(0,K.jsx)(M,{heading:s($.commands),children:p.map(e=>(0,K.jsxs)(E,{value:e.id,"data-testid":`command-palette-command-${e.id}`,onSelect:()=>{v(),e.run({navigate:o})},children:[e.coreIcon?(0,K.jsx)(q,{name:e.coreIcon}):null,(0,K.jsx)(`span`,{children:s(e.title)})]},e.id))}):null,m.length>0?(0,K.jsx)(M,{heading:s($.navigation),children:m.map(e=>(0,K.jsxs)(E,{value:e.to,"data-testid":`command-palette-nav-${e.to}`,onSelect:()=>{y(e.to)},children:[(0,K.jsx)(q,{name:e.coreIcon}),(0,K.jsx)(`span`,{children:s(e.label)})]},e.to))}):null,g.map(e=>(0,K.jsx)(M,{heading:s(e.label),children:e.items.map(t=>(0,K.jsx)(E,{value:`${e.key}:${t.id}`,"data-testid":`command-palette-result-${e.key}:${t.id}`,onSelect:()=>{b(e.key,t.id)},children:(0,K.jsx)(`span`,{children:t.title})},`${e.key}:${t.id}`))},e.key))]}),(0,K.jsxs)(`div`,{"data-testid":`command-palette-footer`,className:`text-muted-foreground flex items-center gap-4 border-t px-3 py-2 text-xs`,children:[(0,K.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,K.jsx)(D,{children:`↑↓`}),s($.hintNavigate)]}),(0,K.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,K.jsx)(D,{children:`↵`}),s($.hintSelect)]}),(0,K.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,K.jsx)(D,{children:`⎋`}),s($.hintClose)]})]})]})})]})}function Ye(){return _e(d({select:e=>e.location.pathname}))}function Xe(){let e=Ye(),{i18n:t}=r(),n=e=>typeof e.label==`string`?e.label:t._(e.label.id,e.values,{message:e.label.message});return(0,K.jsxs)(`header`,{className:`flex h-14 shrink-0 items-center gap-2 border-b px-4`,children:[(0,K.jsx)(w,{className:`-ms-1`}),(0,K.jsx)(G,{orientation:`vertical`,className:`me-2 h-4`}),(0,K.jsx)(j,{children:(0,K.jsx)(k,{children:e.map((t,r)=>{let i=r===e.length-1,a=n(t);return(0,K.jsxs)(J.Fragment,{children:[r>0?(0,K.jsx)(T,{}):null,(0,K.jsx)(he,{children:i?(0,K.jsx)(ue,{children:a}):t.to===void 0?(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:a}):(0,K.jsx)(u,{to:t.to,className:`text-muted-foreground hover:text-foreground transition-colors`,children:a})})]},`${String(r)}-${a}`)})})})]})}function Ze(){let{user:e}=be.useRouteContext();return(0,K.jsx)(Ce,{delayDuration:100,children:(0,K.jsxs)(h,{children:[(0,K.jsx)(Je,{capabilities:e.capabilities}),(0,K.jsx)(Ie,{user:e,capabilities:e.capabilities}),(0,K.jsxs)(b,{children:[(0,K.jsx)(Xe,{}),(0,K.jsx)(`main`,{className:`flex-1 overflow-y-auto p-6`,children:(0,K.jsx)(c,{})})]})]})})}export{Ze as component};
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{t as n}from"./react-DbyrFoBd.js";import{i as r,n as i}from"./dist-BL2bKHuR.js";import{f as a,t as o}from"./orpc-DURDArDu.js";import{l as s}from"./esm-DfD3iRfG.js";import{t as c}from"./createLucideIcon-C0O-yxZG.js";import{n as l,t as u}from"./puzzle-CkL6fcG1.js";import{t as d}from"./use-label-CykSHq9A.js";import{t as f}from"./use-formatters-BlYPsMo8.js";import{a as p,i as m,n as h,r as g,t as _}from"./card-L2-kK5VK.js";import{t as v}from"./skeleton-BnBM1862.js";import{At as y,K as b,Mt as x,Nt as S,Ot as C,Pt as w,ct as T,jt as E,l as D,lt as O}from"./index-bWipSZdM.js";import{t as k}from"./dates-CSmOj6E-.js";import{t as A}from"./entries-MizUUcD8.js";import{t as j}from"./plugin-error-boundary-3Oze9sdd.js";var M=c(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),N=e(n(),1),P=e(t(),1);function F({widgets:e}){let t=d(),n=e.flatMap(e=>{let t=D(e.id);return t?[{widget:e,Component:t}]:[]});return n.length===0?null:(0,P.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2`,"data-testid":`dashboard-widgets`,children:n.map(({widget:e,Component:n})=>(0,P.jsxs)(_,{"data-testid":`dashboard-widget-${e.id}`,children:[(0,P.jsx)(m,{children:(0,P.jsx)(p,{children:t(e.title)})}),(0,P.jsx)(h,{children:(0,P.jsx)(j,{kind:`widget`,pluginLabel:t(e.title),children:(0,P.jsx)(N.Suspense,{fallback:(0,P.jsx)(v,{className:`h-16 w-full`}),children:(0,P.jsx)(n,{})})})})]},e.id))})}var I={countPublished:{id:`dashboard.count.published`},countDraft:{id:`dashboard.count.draft`}};function L(){let{user:e}=b.useRouteContext(),t=e.name??e.email,n=O(e.capabilities),c=d(),{i18n:v}=r(),{formatRelative:D}=f(),j=a(o.entry.stats.queryOptions({input:{}})),L=a(o.entry.recentActivity.queryOptions({input:{limit:8}})),R=(0,N.useMemo)(()=>{let e={};for(let t of j.data??[])(e[t.type]??={})[t.status]=t.count;return e},[j.data]);return(0,P.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h1`,{"data-testid":`dashboard-welcome-heading`,className:`text-2xl font-semibold`,children:(0,P.jsx)(i,{id:`dashboard.welcome`,message:`Welcome, {greeting}`,values:{greeting:(0,P.jsx)(`bdi`,{children:t})},comment:`greeting: the user's display name or email`})}),(0,P.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:(0,P.jsx)(i,{id:`dashboard.tagline`,message:`What would you like to work on today?`})})]}),n.length>0?(0,P.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2 lg:grid-cols-3`,children:n.map(e=>{let t=c(e.labels?.plural??e.label),n=R[e.name]??{};return(0,P.jsxs)(_,{"data-testid":`dashboard-tile-${e.name}`,children:[(0,P.jsxs)(m,{children:[(0,P.jsx)(`div`,{className:`bg-primary/10 text-primary mb-2 flex size-10 items-center justify-center rounded-md`,children:(0,P.jsx)(l,{className:`size-5`,"aria-hidden":!0})}),(0,P.jsx)(p,{children:t}),(0,P.jsxs)(g,{"data-testid":`dashboard-tile-${e.name}-counts`,children:[v._(I.countPublished.id,{count:n.published??0},{message:I.countPublished.message}),` · `,v._(I.countDraft.id,{count:n.draft??0},{message:I.countDraft.message})]})]}),(0,P.jsx)(h,{children:(0,P.jsx)(w,{asChild:!0,variant:`outline`,className:`w-full`,children:(0,P.jsxs)(s,{to:`/entries/$slug`,params:{slug:e.adminSlug},search:A,"data-testid":`dashboard-tile-${e.name}-link`,children:[(0,P.jsx)(i,{id:`dashboard.tile.browse.generic`,message:`Browse`}),(0,P.jsx)(M,{className:`rtl:rotate-180`})]})})})]},e.name)})}):(0,P.jsx)(_,{className:`max-w-xl`,"data-testid":`dashboard-empty-state`,children:(0,P.jsx)(C,{children:(0,P.jsxs)(E,{children:[(0,P.jsx)(x,{variant:`icon`,children:(0,P.jsx)(u,{})}),(0,P.jsx)(S,{children:(0,P.jsx)(i,{id:`dashboard.empty.title`,message:`No content types yet`})}),(0,P.jsx)(y,{children:(0,P.jsx)(i,{id:`dashboard.empty.description`,message:`Add a plugin that registers a post type (e.g. <0>@plumix/plugin-blog</0>) to see it here.`,components:{0:(0,P.jsx)(`code`,{})}})})]})})}),n.length>0?(0,P.jsxs)(_,{"data-testid":`dashboard-recent-activity`,children:[(0,P.jsx)(m,{children:(0,P.jsx)(p,{children:(0,P.jsx)(i,{id:`dashboard.recent.title`,message:`Recent activity`})})}),(0,P.jsx)(h,{children:(L.data??[]).length===0?(0,P.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:(0,P.jsx)(i,{id:`dashboard.recent.empty`,message:`Nothing yet.`})}):(0,P.jsx)(`ul`,{className:`flex flex-col divide-y`,children:(L.data??[]).map(e=>{let t=n.find(t=>t.name===e.type),r=(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`span`,{className:`truncate`,children:e.title}),(0,P.jsx)(`span`,{className:`text-muted-foreground ms-auto shrink-0 text-xs`,children:D(k(e.updatedAt))})]});return(0,P.jsx)(`li`,{"data-testid":`dashboard-recent-${e.id}`,children:t?(0,P.jsx)(s,{to:`/entries/$slug/$id/edit`,params:{slug:t.adminSlug,id:e.id},className:`hover:text-primary flex items-center gap-2 py-2 text-sm`,children:r}):(0,P.jsx)(`div`,{className:`flex items-center gap-2 py-2 text-sm`,children:r})},e.id)})})})]}):null,(0,P.jsx)(F,{widgets:T(e.capabilities)})]})}export{L as component};
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{a as n}from"./esm-DfD3iRfG.js";import{r}from"./tooltip-Pch4JgRX.js";var i=e(t());function a(){return(0,i.jsx)(r,{delayDuration:100,children:(0,i.jsx)(`div`,{className:`flex h-dvh flex-col`,children:(0,i.jsx)(n,{})})})}export{a as component};
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{t as n}from"./react-DbyrFoBd.js";import{n as r}from"./dist-BL2bKHuR.js";import{f as i,t as a}from"./orpc-DURDArDu.js";import{l as o}from"./esm-DfD3iRfG.js";import{n as s,r as c,t as l}from"./search-input-BpOKuC8D.js";import{X as u}from"./utils-BBTvNyQG.js";import{t as d}from"./use-label-CykSHq9A.js";import{n as f}from"./type-labels-DEpt0nSb.js";import{At as p,Nt as m,Ot as h,Pt as g,V as _,jt as v,kt as y,x as b}from"./index-bWipSZdM.js";import{n as x,t as S}from"./alert-cwX3fWUu.js";import{r as C,t as w}from"./tree-BUpunTXw.js";var T=e(n()),E=e(t()),D={columnName:{id:`terms.list.column.name`},columnDescription:{id:`terms.list.column.description`}},O=50,k=200;function A(e,t,n){return!t||n?e.map(e=>({term:e,displayDepth:0})):C(w(e)).map(e=>({term:e.term,displayDepth:e.depth}))}function j(){let e=b.useNavigate();return{setPage:(0,T.useCallback)(t=>{e({search:e=>({...e,page:t})})},[e]),setSearch:(0,T.useCallback)(t=>{e({search:e=>({...e,q:t,page:1})})},[e])}}function M(){let e=b.useSearch(),{user:t,taxonomy:n}=b.useRouteContext(),r=d(),p=n.isHierarchical===!0,m=p?k:O,h=i(a.term.list.queryOptions({input:{taxonomy:n.name,limit:m,offset:(e.page-1)*m,...e.q?{search:e.q}:{}}})),{setPage:v,setSearch:y}=j(),C=h.data,w=(0,T.useMemo)(()=>A(C??[],p,!!e.q),[C,p,e.q]),M=e.page>1,P=(C?.length??0)===m,F=_(t.capabilities,`term:${n.name}:edit`),I=(0,T.useMemo)(()=>[{accessorKey:`name`,header:r(D.columnName),cell:({row:e})=>{let t=e.original.term,r=e.original.displayDepth;return(0,E.jsxs)(o,{to:`/terms/$name/$id/edit`,params:{name:n.name,id:t.id},"data-testid":`taxonomy-list-row-${String(t.id)}`,"aria-level":r+1,className:`hover:text-primary flex min-w-0 flex-col transition-colors`,children:[(0,E.jsxs)(`span`,{className:`font-medium`,children:[r>0?(0,E.jsx)(`span`,{"aria-hidden":!0,className:`text-muted-foreground/60 me-1 font-normal select-none`,children:`— `.repeat(r)}):null,t.name]}),(0,E.jsx)(`span`,{className:`text-muted-foreground font-mono text-xs`,children:t.slug})]})}},{accessorKey:`description`,header:r(D.columnDescription),cell:({row:e})=>{let t=e.original.term.description;return t===null||t.length===0?(0,E.jsx)(`span`,{"aria-hidden":!0,className:`text-muted-foreground/50`,children:`—`}):(0,E.jsx)(`span`,{className:`text-muted-foreground line-clamp-1 text-sm`,children:t})}}],[n.name,r]);return(0,E.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,E.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h1`,{"data-testid":`taxonomy-list-heading`,className:`text-2xl font-semibold capitalize`,children:r(n.label)}),n.description?(0,E.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:n.description}):null]}),F?(0,E.jsx)(g,{asChild:!0,children:(0,E.jsxs)(o,{to:`/terms/$name/create`,params:{name:n.name},"data-testid":`taxonomy-list-new-button`,children:[(0,E.jsx)(u,{}),r(f(n,`addNewItem`))]})}):null]}),(0,E.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:(0,E.jsx)(`div`,{className:`ms-auto`,children:(0,E.jsx)(l,{initialValue:e.q??``,placeholder:r(f(n,`searchItems`)),testId:`taxonomy-list-search-input`,onCommit:y},e.q??``)})}),h.isError?(0,E.jsx)(S,{variant:`destructive`,children:(0,E.jsx)(x,{children:h.error instanceof Error?h.error.message:r(f(n,`loadErrorItems`))})}):(0,E.jsx)(c,{columns:I,data:w,isLoading:h.isPending,loadingLabel:r(f(n,`loadingItems`)),emptyState:(0,E.jsx)(N,{taxonomy:n,canCreate:F})}),(0,E.jsx)(s,{page:e.page,canPrev:M,canNext:P,isLoading:h.isPending,onPageChange:v})]})}function N({taxonomy:e,canCreate:t}){let n=d(),i=n(f(e,`addNewItem`));return(0,E.jsxs)(h,{"data-testid":`taxonomy-list-empty-state`,className:`border`,children:[(0,E.jsxs)(v,{children:[(0,E.jsx)(m,{children:n(f(e,`notFound`))}),(0,E.jsx)(p,{children:(0,E.jsx)(r,{id:`terms.list.empty.description`,message:`Create one to see it here.`})})]}),(0,E.jsx)(y,{children:t?(0,E.jsx)(g,{asChild:!0,children:(0,E.jsxs)(o,{to:`/terms/$name/create`,params:{name:e.name},children:[(0,E.jsx)(u,{}),i]})}):(0,E.jsxs)(g,{disabled:!0,children:[(0,E.jsx)(u,{}),i]})})]})}export{M as component};
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{i as n,n as r}from"./dist-BL2bKHuR.js";import{D as i,gt as a}from"./index-bWipSZdM.js";var o=e(t());function s(){return(0,o.jsx)(c,{message:i.loadFailed})}function c({message:e}){let{i18n:t}=n();return(0,o.jsx)(a,{title:(0,o.jsx)(r,{id:`settings.page.notFound.title`,message:`Not found`}),description:t._(e.id,void 0,{message:e.message})})}export{s as errorComponent};
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{t as n}from"./react-DbyrFoBd.js";import{i as r,n as i}from"./dist-BL2bKHuR.js";import{d as a,h as o,t as s,u as c}from"./orpc-DURDArDu.js";import{t as l}from"./use-label-CykSHq9A.js";import{a as u,i as d,n as f,r as p,t as m}from"./card-L2-kK5VK.js";import{At as h,D as g,Nt as _,Ot as v,Pt as y,T as b,it as x,jt as S,pt as C}from"./index-bWipSZdM.js";import{f as w,t as T}from"./form-BhMVtuYF.js";import{n as E,t as D}from"./alert-cwX3fWUu.js";import{t as O}from"./meta-box-field-Cgn0DXDv.js";import{t as k}from"./meta-box-grid-DJBtTRhe.js";var A=e(n()),j=e(t()),M=`ctx.registerSettingsPage(name, { groups: [...] })`;function N(){let{page:e}=b.useRouteContext(),t=x(e),n=l();return(0,j.jsxs)(`div`,{className:`mx-auto flex w-full max-w-2xl flex-col gap-6`,children:[(0,j.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(`h1`,{className:`text-2xl font-semibold`,"data-testid":`settings-page-heading`,children:n(e.label)}),e.description?(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:n(e.description)}):null]}),t.length===0?(0,j.jsx)(F,{}):t.map(e=>(0,j.jsx)(P,{group:e},e.name))]})}function P({group:e}){let{i18n:t}=r(),n=l(),h=o(),[_,v]=(0,A.useState)(null),[b,x]=(0,A.useState)(null),{data:S}=a(s.settings.get.queryOptions({input:{group:e.name}})),M=w({defaultValues:C([e],S)}),N=c({mutationFn:t=>s.settings.upsert.call({group:e.name,values:t}),onMutate:()=>{v(null),x(null)},onSuccess:async t=>{M.reset(C([e],t)),await h.invalidateQueries({queryKey:s.settings.get.queryOptions({input:{group:e.name}}).queryKey}),x(g.saved)},onError:e=>{v(e instanceof Error?e.message:g.saveFailed)}}),P=M.handleSubmit(e=>{N.mutate(e)});return(0,j.jsx)(m,{className:`@container`,"data-testid":`settings-group-card-${e.name}`,children:(0,j.jsx)(T,{...M,children:(0,j.jsxs)(`form`,{onSubmit:P,children:[(0,j.jsxs)(d,{children:[(0,j.jsx)(u,{children:(0,j.jsx)(`h2`,{className:`text-lg font-semibold`,"data-testid":`settings-group-heading-${e.name}`,children:n(e.label)})}),e.description?(0,j.jsx)(p,{children:n(e.description)}):null]}),(0,j.jsxs)(f,{className:`flex flex-col gap-4`,children:[(0,j.jsx)(`div`,{className:`grid grid-cols-12 gap-4`,children:e.fields.map(e=>(0,j.jsx)(O,{field:e,name:e.key,disabled:N.isPending,className:k(e.span)},e.key))}),_?(0,j.jsx)(D,{variant:`destructive`,role:`alert`,"data-testid":`settings-server-error-${e.name}`,children:(0,j.jsx)(E,{children:typeof _==`string`?_:t._(_.id,void 0,{message:_.message})})}):null,b?(0,j.jsx)(D,{role:`status`,"aria-live":`polite`,"data-testid":`settings-save-notice-${e.name}`,children:(0,j.jsx)(E,{children:t._(b.id,void 0,{message:b.message})})}):null]}),(0,j.jsx)(`div`,{className:`flex justify-end px-6 pb-6`,children:(0,j.jsx)(y,{type:`submit`,disabled:N.isPending,"data-testid":`settings-submit-${e.name}`,children:N.isPending?(0,j.jsx)(i,{id:`settings.page.submit.pending`,message:`Saving…`}):(0,j.jsx)(i,{id:`settings.page.submit.idle`,message:`Save changes`})})})]})})})}function F(){return(0,j.jsx)(m,{children:(0,j.jsx)(v,{children:(0,j.jsxs)(S,{children:[(0,j.jsx)(_,{children:(0,j.jsx)(i,{id:`settings.page.empty.title`,message:`No groups on this page`})}),(0,j.jsxs)(h,{children:[(0,j.jsx)(i,{id:`settings.page.empty.description`,message:`This settings page doesn't reference any registered groups yet. Plugins compose pages with the registerSettingsPage helper:`}),` `,(0,j.jsx)(`code`,{className:`font-mono text-xs`,children:M})]})]})})})}export{N as component};
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{t as n}from"./react-DbyrFoBd.js";import{i as r,n as i}from"./dist-BL2bKHuR.js";import{f as a,h as o,t as s,u as c}from"./orpc-DURDArDu.js";import{l}from"./esm-DfD3iRfG.js";import{t as u}from"./utils-DKOQrNEG.js";import{t as d}from"./createLucideIcon-C0O-yxZG.js";import{a as f,i as p,n as m,o as h,s as g,t as _}from"./toast-CQk_AYCo.js";import{n as v,r as y,t as ee}from"./search-input-BpOKuC8D.js";import{B as b,F as x,I as S,L as C,M as w,N as T,P as E,R as D,V as O,X as k,n as A,t as te,z as j}from"./utils-BBTvNyQG.js";import{t as M}from"./use-label-CykSHq9A.js";import{t as N}from"./use-formatters-BlYPsMo8.js";import{r as P,t as F}from"./type-labels-DEpt0nSb.js";import{At as I,F as L,Ft as R,I as z,L as B,Nt as V,Ot as H,P as ne,Pt as U,R as re,V as ie,b as ae,et as oe,jt as W,kt as se}from"./index-bWipSZdM.js";import{n as ce,t as le}from"./alert-cwX3fWUu.js";import{t as G}from"./dates-CSmOj6E-.js";var K=d(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),q=e(n(),1),J=e(t(),1),Y={selected:{id:`entries.list.bulk.selected`},trash:{id:`entries.list.bulk.trash`},restore:{id:`entries.list.bulk.restore`},delete:{id:`entries.list.bulk.delete`},trashTitle:{id:`entries.list.bulk.trashTitle`},deleteTitle:{id:`entries.list.bulk.deleteTitle`},deleteBody:{id:`entries.list.bulk.deleteBody`},confirm:{id:`entries.list.bulk.confirm`},cancel:{id:`entries.list.bulk.cancel`}};function ue({count:e,view:t,busy:n,onTrash:i,onRestore:a,onDeletePermanent:o}){let{i18n:s}=r(),[c,l]=(0,q.useState)(null),u=t=>s._(t.id,{count:e},{message:t.message});return(0,J.jsxs)(`div`,{"data-testid":`content-list-bulk-bar`,className:`bg-muted/40 flex items-center gap-3 rounded-md border px-4 py-2`,children:[(0,J.jsx)(`span`,{"data-testid":`content-list-bulk-count`,className:`text-sm font-medium`,children:u(Y.selected)}),(0,J.jsx)(`div`,{className:`ms-auto flex items-center gap-2`,children:t===`trash`?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(U,{variant:`outline`,size:`sm`,disabled:n,onClick:a,"data-testid":`content-list-bulk-restore`,children:s._(Y.restore.id,{},{message:Y.restore.message})}),(0,J.jsx)(U,{variant:`destructive`,size:`sm`,disabled:n,onClick:()=>{l(`delete`)},"data-testid":`content-list-bulk-delete`,children:s._(Y.delete.id,{},{message:Y.delete.message})})]}):(0,J.jsx)(U,{variant:`outline`,size:`sm`,disabled:n,onClick:()=>{l(`trash`)},"data-testid":`content-list-bulk-trash`,children:s._(Y.trash.id,{},{message:Y.trash.message})})}),(0,J.jsx)(E,{open:c!==null,onOpenChange:e=>{e||l(null)},children:(0,J.jsxs)(C,{children:[(0,J.jsxs)(b,{children:[(0,J.jsx)(O,{children:u(c===`delete`?Y.deleteTitle:Y.trashTitle)}),c===`delete`?(0,J.jsx)(D,{children:s._(Y.deleteBody.id,{},{message:Y.deleteBody.message})}):null]}),(0,J.jsxs)(j,{children:[(0,J.jsx)(S,{disabled:n,children:s._(Y.cancel.id,{},{message:Y.cancel.message})}),(0,J.jsx)(x,{"data-testid":`content-list-bulk-confirm`,className:R({variant:`destructive`}),disabled:n,onClick:e=>{e.preventDefault();let t=c;l(null),t===`delete`?o():t===`trash`&&i()},children:s._(Y.confirm.id,{},{message:Y.confirm.message})})]})]})})]})}var de=20,X={published:`default`,draft:`secondary`,scheduled:`outline`,trash:`destructive`},Z={columnTitle:{id:`entries.list.column.title`},columnStatus:{id:`entries.list.column.status`},columnUpdated:{id:`entries.list.column.updated`},statusAll:{id:`entries.list.statusFilter.all`},statusPublished:{id:`entries.list.statusFilter.published`},statusDraft:{id:`entries.list.statusFilter.draft`},statusScheduled:{id:`entries.list.statusFilter.scheduled`},statusTrash:{id:`entries.list.statusFilter.trash`},authorAll:{id:`entries.list.authorFilter.all`},authorMine:{id:`entries.list.authorFilter.mine`},filterStatusAria:{id:`entries.list.filterStatusAria`},filterAuthorAria:{id:`entries.list.filterAuthorAria`},sortAria:{id:`entries.list.sortAria`},noTitle:{id:`entries.list.noTitle`},rowEdit:{id:`entries.list.row.edit`},rowTrash:{id:`entries.list.row.trash`},rowTrashing:{id:`entries.list.row.trashing`},trashingMove:{id:`entries.list.trashDialog.moving`},trashingConfirm:{id:`entries.list.trashDialog.confirm`},rowRestore:{id:`entries.list.row.restore`},rowRestoring:{id:`entries.list.row.restoring`},rowDelete:{id:`entries.list.row.deletePermanently`},deleteDialogTitle:{id:`entries.list.deleteDialog.title`},deleteDialogDeleting:{id:`entries.list.deleteDialog.deleting`},deleteDialogConfirm:{id:`entries.list.deleteDialog.confirm`},toastTrashed:{id:`entries.list.toast.trashed`},toastRestored:{id:`entries.list.toast.restored`},toastDeleted:{id:`entries.list.toast.deleted`},toastFailed:{id:`entries.list.toast.failed`},toastDuplicated:{id:`entries.list.toast.duplicated`},rowDuplicate:{id:`entries.list.row.duplicate`},rowDuplicating:{id:`entries.list.row.duplicating`},selectAllAria:{id:`entries.list.selectAllAria`},selectRowAria:{id:`entries.list.selectRowAria`},bulkFailed:{id:`entries.list.bulk.toastFailed`},bulkTrashed:{id:`entries.list.bulk.toastTrashed`},bulkRestored:{id:`entries.list.bulk.toastRestored`},bulkDeleted:{id:`entries.list.bulk.toastDeleted`}},fe=[{value:`all`,label:Z.statusAll},{value:`published`,label:Z.statusPublished},{value:`draft`,label:Z.statusDraft},{value:`scheduled`,label:Z.statusScheduled},{value:`trash`,label:Z.statusTrash}];function pe({activeOrderBy:e,activeOrder:t,onSort:n,adminSlug:r,canDelete:i,canCreate:a,onTrash:o,trashingId:s,onDuplicate:c,duplicatingId:l,onRestore:u,restoringId:d,onDeletePermanent:f,showSelect:p,selectAllLabel:m,selectRowLabel:h,renderLabel:g,editLabel:_,formatDate:v}){return[...p?[{id:`select`,meta:{className:`w-8`},header:({table:e})=>{let t=e.getIsAllPageRowsSelected(),n=e.getIsSomePageRowsSelected();return(0,J.jsx)(w,{checked:t?!0:n?`indeterminate`:!1,onCheckedChange:t=>{e.toggleAllPageRowsSelected(t===!0)},"aria-label":m,"data-testid":`content-list-select-all`})},cell:({row:e})=>(0,J.jsx)(w,{checked:e.getIsSelected(),disabled:!e.getCanSelect(),onCheckedChange:t=>{e.toggleSelected(t===!0)},"aria-label":h,"data-testid":`content-list-select-${String(e.original.id)}`})}]:[],{accessorKey:`title`,header:()=>(0,J.jsx)(ve,{label:g(Z.columnTitle),column:`title`,defaultDirection:`asc`,activeOrderBy:e,activeOrder:t,onSort:n}),cell:({row:e})=>(0,J.jsx)(ye,{entry:e.original,adminSlug:r,canDelete:i,canCreate:a,onTrash:o,isTrashing:s===e.original.id,onDuplicate:c,isDuplicating:l===e.original.id,onRestore:u,isRestoring:d===e.original.id,onDeletePermanent:f,editLabel:_})},{accessorKey:`status`,header:g(Z.columnStatus),cell:({row:e})=>(0,J.jsx)(T,{variant:X[e.original.status],className:`capitalize`,children:e.original.status})},{accessorKey:`updatedAt`,meta:{className:`text-end`},header:()=>(0,J.jsx)(ve,{label:g(Z.columnUpdated),column:`updated_at`,defaultDirection:`desc`,activeOrderBy:e,activeOrder:t,onSort:n,align:`right`}),cell:({row:e})=>(0,J.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:v(G(e.original.updatedAt),{dateStyle:`medium`,timeStyle:`short`})})}]}function me(e,t){let n={};for(let r of t){let t=e[r];if(typeof t!=`string`||t.length===0)continue;let i=t.split(`,`).map(e=>e.trim()).filter(e=>e.length>0);i.length>0&&(n[r]=i)}return n}function he(){let e=ae.useNavigate();return{setStatus:(0,q.useCallback)(t=>{e({search:e=>({...e,status:t,page:1})})},[e]),setPage:(0,q.useCallback)(t=>{e({search:e=>({...e,page:t})})},[e]),setSearch:(0,q.useCallback)(t=>{e({search:e=>({...e,q:t,page:1})})},[e]),setAuthor:(0,q.useCallback)(t=>{e({search:e=>({...e,author:t,page:1})})},[e]),setTermFilter:(0,q.useCallback)((t,n)=>{e({search:e=>{let r={...e,page:1};return n.length>0?r[t]=n.join(`,`):delete r[t],r}})},[e]),setSort:(0,q.useCallback)((t,n)=>{e({search:e=>({...e,orderBy:t,order:Q(e.orderBy===t,e.order,n),page:1})})},[e])}}function ge({entryType:e,rows:t,canDelete:n,renderLabel:i}){let a=o(),l=(0,q.useCallback)(()=>a.invalidateQueries({queryKey:s.entry.list.key({input:{type:e.name}})}),[a,e.name]),[u,d]=(0,q.useState)(null),f=(0,q.useCallback)(()=>{_(i(Z.toastFailed))},[i]),p=(0,q.useCallback)(e=>()=>(m(i(e)),l()),[i,l]),h=c({mutationFn:e=>s.entry.trash.call({id:e}),onSuccess:p(Z.toastTrashed),onError:f,onSettled:()=>{d(null)}}),g=(0,q.useCallback)(e=>{d(e)},[d]),v=h.isPending&&typeof h.variables==`number`?h.variables:null,y=c({mutationFn:e=>s.entry.duplicate.call({id:e}),onSuccess:p(Z.toastDuplicated),onError:f}),ee=(0,q.useCallback)(e=>{y.mutate(e)},[y]),b=y.isPending&&typeof y.variables==`number`?y.variables:null,x=c({mutationFn:e=>s.entry.restore.call({id:e}),onSuccess:p(Z.toastRestored),onError:f}),S=(0,q.useCallback)(e=>{x.mutate(e)},[x]),C=x.isPending&&typeof x.variables==`number`?x.variables:null,[w,T]=(0,q.useState)(null),E=c({mutationFn:e=>s.entry.deletePermanent.call({id:e}),onSuccess:p(Z.toastDeleted),onError:f,onSettled:()=>{T(null)}}),D=(0,q.useCallback)(e=>{T(e)},[T]),{i18n:O}=r(),[k,A]=(0,q.useState)({}),te=(0,q.useMemo)(()=>{let e=new Set(t.map(e=>e.id));return Object.keys(k).map(Number).filter(t=>k[String(t)]&&e.has(t))},[k,t]),j=n&&t.length>0,M=(0,q.useCallback)((e,t)=>{m(O._(e.id,{count:t},{message:e.message}))},[O]),N=(0,q.useCallback)(e=>t=>(M(e,t.ids.length),A({}),l()),[M,l]),P=c({mutationFn:e=>s.entry.trashMany.call({ids:e}),onSuccess:N(Z.bulkTrashed),onError:f}),F=c({mutationFn:e=>s.entry.restoreMany.call({ids:e}),onSuccess:N(Z.bulkRestored),onError:f}),I=c({mutationFn:e=>s.entry.deletePermanentMany.call({ids:e}),onSuccess:N(Z.bulkDeleted),onError:f});return{onTrash:g,trashingId:v,onDuplicate:ee,duplicatingId:b,onRestore:S,restoringId:C,onDeletePermanent:D,pendingTrashId:u,setPendingTrashId:d,trash:h,pendingDeleteId:w,setPendingDeleteId:T,deletePermanent:E,rowSelection:k,setRowSelection:A,selectedIds:te,showSelect:j,bulkBusy:P.isPending||F.isPending||I.isPending,trashMany:P,restoreMany:F,deletePermanentMany:I}}function _e(){let e=ae.useSearch(),{user:t,entryType:n}=ae.useRouteContext(),r=n.termTaxonomies??Se,o=(0,q.useMemo)(()=>me(e,r),[e,r]),c=a(s.entry.list.queryOptions({input:{type:n.name,limit:de,offset:(e.page-1)*de,orderBy:e.orderBy,order:e.order,...e.status===`all`?{}:{status:e.status},...e.q?{search:e.q}:{},...e.author===`mine`?{authorId:t.id}:{},...Object.keys(o).length>0?{termTaxonomies:o}:{}}})),{setStatus:u,setPage:d,setSearch:f,setAuthor:p,setTermFilter:m,setSort:h}=he(),g=(0,q.useMemo)(()=>c.data??[],[c.data]),_=e.page>1,w=g.length===de,T=M(),A=T(n.labels?.plural??n.label),te=`entry:${n.capabilityType??n.name}:create`,P=ie(t.capabilities,te),I=`entry:${n.capabilityType??n.name}:delete`,L=ie(t.capabilities,I),{onTrash:z,trashingId:B,onDuplicate:V,duplicatingId:H,onRestore:ne,restoringId:re,onDeletePermanent:oe,pendingTrashId:W,setPendingTrashId:se,trash:G,pendingDeleteId:K,setPendingDeleteId:Y,deletePermanent:X,rowSelection:fe,setRowSelection:_e,selectedIds:Q,showSelect:$,bulkBusy:ve,trashMany:ye,restoreMany:xe,deletePermanentMany:Ce}=ge({entryType:n,rows:g,canDelete:L,renderLabel:T}),De=e.status===`trash`,Oe=T(F(n,`editItem`)),{formatDate:ke}=N(),Ae=(0,q.useMemo)(()=>pe({activeOrderBy:e.orderBy,activeOrder:e.order,onSort:h,adminSlug:n.adminSlug,canDelete:L,canCreate:P,onTrash:z,trashingId:B,onDuplicate:V,duplicatingId:H,onRestore:ne,restoringId:re,onDeletePermanent:oe,showSelect:$,selectAllLabel:T(Z.selectAllAria),selectRowLabel:T(Z.selectRowAria),renderLabel:T,editLabel:Oe,formatDate:ke}),[e.orderBy,e.order,h,n.adminSlug,L,P,z,B,V,H,ne,re,oe,$,T,Oe,ke]);return(0,J.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,J.jsx)(`div`,{children:(0,J.jsx)(`h1`,{"data-testid":`content-list-heading`,className:`text-2xl font-semibold`,children:A})}),P?(0,J.jsx)(U,{asChild:!0,children:(0,J.jsxs)(l,{to:`/entries/$slug/create`,params:{slug:n.adminSlug},"data-testid":`content-list-new-button`,children:[(0,J.jsx)(k,{}),T(F(n,`addNewItem`))]})}):null]}),(0,J.jsx)(be,{value:e.status,onChange:u}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(we,{value:e.author,onChange:p}),r.map(e=>(0,J.jsx)(Te,{taxonomyName:e,value:o[e]??Se,onChange:t=>{m(e,t)}},e)),(0,J.jsx)(`div`,{className:`ms-auto`,children:(0,J.jsx)(ee,{initialValue:e.q??``,placeholder:T(F(n,`searchItems`)),testId:`content-list-search-input`,onCommit:f},e.q??``)})]}),$&&Q.length>0?(0,J.jsx)(ue,{count:Q.length,view:De?`trash`:`active`,busy:ve,onTrash:()=>{ye.mutate(Q)},onRestore:()=>{xe.mutate(Q)},onDeletePermanent:()=>{Ce.mutate(Q)}}):null,c.isError?(0,J.jsx)(le,{variant:`destructive`,"data-testid":`content-list-load-error`,children:(0,J.jsx)(ce,{children:c.error instanceof Error?c.error.message:T(F(n,`loadErrorItems`))})}):(0,J.jsx)(y,{columns:Ae,data:g,isLoading:c.isPending,loadingLabel:T(F(n,`loadingItems`)),...$?{rowSelection:fe,onRowSelectionChange:_e,getRowId:e=>String(e.id)}:{},emptyState:(0,J.jsx)(Ee,{entryType:n,canCreate:P,entryTypeSlug:n.adminSlug})}),(0,J.jsx)(v,{page:e.page,canPrev:_,canNext:w,isLoading:c.isPending,onPageChange:d}),(0,J.jsx)(E,{open:W!==null,onOpenChange:e=>{e||se(null)},children:(0,J.jsxs)(C,{children:[(0,J.jsxs)(b,{children:[(0,J.jsx)(O,{children:T(F(n,`moveToTrash`))}),(0,J.jsx)(D,{children:(0,J.jsx)(i,{id:`entries.list.trashDialog.description`,message:`You can restore it from the Trash view later.`})})]}),(0,J.jsxs)(j,{children:[(0,J.jsx)(S,{disabled:G.isPending,children:(0,J.jsx)(i,{id:`entries.list.trashDialog.cancel`,message:`Cancel`})}),(0,J.jsx)(x,{"data-testid":`content-list-trash-confirm`,className:R({variant:`destructive`}),disabled:G.isPending,onClick:e=>{e.preventDefault(),W!==null&&G.mutate(W)},children:G.isPending?T(Z.trashingMove):T(Z.trashingConfirm)})]})]})}),(0,J.jsx)(E,{open:K!==null,onOpenChange:e=>{e||Y(null)},children:(0,J.jsxs)(C,{children:[(0,J.jsxs)(b,{children:[(0,J.jsx)(O,{children:T(Z.deleteDialogTitle)}),(0,J.jsx)(D,{children:(0,J.jsx)(i,{id:`entries.list.deleteDialog.description`,message:`This permanently deletes the entry and its revisions. It cannot be undone.`})})]}),(0,J.jsxs)(j,{children:[(0,J.jsx)(S,{disabled:X.isPending,children:(0,J.jsx)(i,{id:`entries.list.deleteDialog.cancel`,message:`Cancel`})}),(0,J.jsx)(x,{"data-testid":`content-list-delete-confirm`,className:R({variant:`destructive`}),disabled:X.isPending,onClick:e=>{e.preventDefault(),K!==null&&X.mutate(K)},children:X.isPending?T(Z.deleteDialogDeleting):T(Z.deleteDialogConfirm)})]})]})})]})}function Q(e,t,n){return e?t===`asc`?`desc`:`asc`:n}function $({isActive:e,order:t}){return e?t===`asc`?(0,J.jsx)(h,{"aria-hidden":!0,className:`size-3.5`}):(0,J.jsx)(g,{"aria-hidden":!0,className:`size-3.5`}):(0,J.jsx)(K,{"aria-hidden":!0,className:`size-3.5`})}function ve({label:e,column:t,defaultDirection:n,activeOrderBy:i,activeOrder:a,onSort:o,align:s=`left`}){let{i18n:c}=r(),l=i===t,d=Q(l,a,n);return(0,J.jsxs)(`button`,{type:`button`,onClick:()=>{o(t,n)},"data-testid":`content-list-sort-${t}`,className:u(`hover:text-foreground inline-flex items-center gap-1 rounded px-2 py-1 font-medium transition-colors`,s===`right`?`-me-2 text-end`:`-ms-2 text-start`),"aria-label":c._(Z.sortAria.id,{label:e,direction:d},{message:Z.sortAria.message}),"aria-pressed":l,children:[e,(0,J.jsx)($,{isActive:l,order:a})]})}function ye({entry:e,adminSlug:t,canDelete:n,canCreate:r,onTrash:a,isTrashing:o,onDuplicate:s,isDuplicating:c,onRestore:d,isRestoring:f,onDeletePermanent:p,editLabel:m}){let h=M(),g=e.status===`trash`,_=n&&!g,v=r&&!g,y=n&&g;return(0,J.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,J.jsx)(l,{to:`/entries/$slug/$id/edit`,params:{slug:t,id:e.id},"data-testid":`content-list-row-${String(e.id)}`,className:`hover:text-primary font-medium transition-colors`,children:e.title||(0,J.jsx)(`span`,{className:`text-muted-foreground italic`,children:(0,J.jsx)(i,{id:`entries.list.noTitle`,message:`(no title)`})})}),(0,J.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:e.slug}),(0,J.jsxs)(`div`,{className:u(`flex h-4 items-center gap-2 text-xs transition-opacity`,`invisible group-hover/row:visible focus-within:visible`),"data-testid":`content-list-row-actions-${String(e.id)}`,children:[(0,J.jsx)(l,{to:`/entries/$slug/$id/edit`,params:{slug:t,id:e.id},className:`text-muted-foreground hover:text-foreground`,children:m}),_?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{"aria-hidden":!0,className:`text-muted-foreground/50`,children:`|`}),(0,J.jsx)(`button`,{type:`button`,disabled:o,onClick:()=>{a(e.id)},className:`text-muted-foreground hover:text-destructive disabled:opacity-50`,"data-testid":`content-list-row-trash-${String(e.id)}`,children:h(o?Z.rowTrashing:Z.rowTrash)})]}):null,v?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{"aria-hidden":!0,className:`text-muted-foreground/50`,children:`|`}),(0,J.jsx)(`button`,{type:`button`,disabled:c,onClick:()=>{s(e.id)},className:`text-muted-foreground hover:text-foreground disabled:opacity-50`,"data-testid":`content-list-row-duplicate-${String(e.id)}`,children:h(c?Z.rowDuplicating:Z.rowDuplicate)})]}):null,y?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{"aria-hidden":!0,className:`text-muted-foreground/50`,children:`|`}),(0,J.jsx)(`button`,{type:`button`,disabled:f,onClick:()=>{d(e.id)},className:`text-muted-foreground hover:text-foreground disabled:opacity-50`,"data-testid":`content-list-row-restore-${String(e.id)}`,children:h(f?Z.rowRestoring:Z.rowRestore)}),(0,J.jsx)(`span`,{"aria-hidden":!0,className:`text-muted-foreground/50`,children:`|`}),(0,J.jsx)(`button`,{type:`button`,onClick:()=>{p(e.id)},className:`text-muted-foreground hover:text-destructive`,"data-testid":`content-list-row-delete-${String(e.id)}`,children:h(Z.rowDelete)})]}):null]})]})}function be({value:e,onChange:t}){let n=M();return(0,J.jsx)(te,{type:`single`,variant:`outline`,value:e,onValueChange:e=>{t(e||`all`)},"aria-label":n(Z.filterStatusAria),children:fe.map(e=>(0,J.jsx)(A,{value:e.value,"data-testid":`status-view-${e.value}`,children:n(e.label)},e.value))})}var xe=[],Se=[],Ce=[{value:`all`,label:Z.authorAll},{value:`mine`,label:Z.authorMine}];function we({value:e,onChange:t}){let n=M();return(0,J.jsxs)(ne,{value:e,onValueChange:e=>{t(e)},children:[(0,J.jsx)(B,{size:`sm`,"aria-label":n(Z.filterAuthorAria),"data-testid":`author-filter`,children:(0,J.jsx)(re,{})}),(0,J.jsx)(L,{children:Ce.map(e=>(0,J.jsx)(z,{value:e.value,"data-testid":`author-filter-${e.value}`,children:n(e.label)},e.value))})]})}function Te({taxonomyName:e,value:t,onChange:n}){let r=M(),i=oe(e),o=a(s.term.list.queryOptions({input:{taxonomy:e,limit:200}})),c=i?.isHierarchical===!0;return(0,J.jsx)(f,{options:(0,q.useMemo)(()=>p(o.data??xe,c),[o.data,c]),value:t,onChange:n,placeholder:r(P(i,`allItems`)),searchPlaceholder:r(P(i,`searchItems`)),emptyText:r(P(i,`noMatch`)),"aria-label":r(P(i,`filterByItem`)),testId:`taxonomy-filter-${e}`})}function Ee({entryType:e,canCreate:t,entryTypeSlug:n}){let r=M(),a=r(F(e,`addNewItem`));return(0,J.jsxs)(H,{"data-testid":`content-list-empty-state`,className:`border`,children:[(0,J.jsxs)(W,{children:[(0,J.jsx)(V,{children:r(F(e,`notFound`))}),(0,J.jsx)(I,{children:(0,J.jsx)(i,{id:`entries.list.empty.description`,message:`Create one to see it here.`})})]}),(0,J.jsx)(se,{children:t?(0,J.jsx)(U,{asChild:!0,children:(0,J.jsxs)(l,{to:`/entries/$slug/create`,params:{slug:n},children:[(0,J.jsx)(k,{}),a]})}):(0,J.jsxs)(U,{disabled:!0,children:[(0,J.jsx)(k,{}),a]})})]})}export{_e as component};
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{t as n}from"./react-DbyrFoBd.js";import{i as r,n as i}from"./dist-BL2bKHuR.js";import{u as a}from"./orpc-DURDArDu.js";import{d as o}from"./esm-DfD3iRfG.js";import{n as s,r as c,t as l}from"./-locale-param-R7YAVhAm.js";import{a as u,i as d,n as f,r as p,t as m}from"./card-L2-kK5VK.js";import{Pt as h,S as g,Y as _,at as v}from"./index-bWipSZdM.js";import{t as y}from"./input-xYuLUQID.js";import{a as b,o as x,t as S}from"./passkey-C_CqNV1S.js";import{a as C,f as w,i as T,n as E,o as D,s as O,t as k}from"./form-BhMVtuYF.js";import{n as A,t as j}from"./alert-cwX3fWUu.js";var M=e(n()),N=e(t());function P(){let e=x(),{token:t}=g.useParams(),n=g.useSearch(),P=v(),{i18n:F}=r(),I=o(),[L,R]=(0,M.useState)(null),z=e=>{s(e),window.location.assign(l(n,e))},B=a({mutationFn:e=>S({token:t,...e.name?{name:e.name}:{}}),onMutate:()=>{R(null)},onSuccess:async()=>{await I.options.context.queryClient.invalidateQueries({queryKey:_}),await I.navigate({to:`/`})},onError:e=>{R(e instanceof b?e.code:`unknown`)}}),V=w({defaultValues:{name:``}}),H=V.handleSubmit(e=>{B.mutate({name:e.name||void 0})});return(0,N.jsxs)(m,{children:[(0,N.jsxs)(d,{children:[(0,N.jsx)(u,{children:(0,N.jsx)(`h1`,{"data-testid":`accept-invite-heading`,children:(0,N.jsx)(i,{id:`auth.acceptInvite.title`,message:`Accept your invite`})})}),(0,N.jsx)(p,{children:(0,N.jsx)(i,{id:`auth.acceptInvite.description`,message:`Set up a passkey to finish creating your account. Your browser or device will guide you through the prompt.`})})]}),(0,N.jsxs)(f,{children:[(0,N.jsx)(k,{...V,children:(0,N.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:H,children:[(0,N.jsx)(T,{control:V.control,name:`name`,render:({field:e})=>(0,N.jsxs)(C,{children:[(0,N.jsx)(D,{children:(0,N.jsx)(i,{id:`auth.acceptInvite.name`,message:`Name`})}),(0,N.jsx)(E,{children:(0,N.jsx)(y,{type:`text`,autoComplete:`name`,disabled:B.isPending,"data-testid":`accept-invite-name-input`,...e})}),(0,N.jsx)(O,{})]})}),L?(0,N.jsx)(j,{variant:`destructive`,"data-testid":`accept-invite-error`,children:(0,N.jsx)(A,{children:e(L)})}):null,(0,N.jsx)(h,{type:`submit`,disabled:B.isPending,"data-testid":`accept-invite-submit`,children:B.isPending?(0,N.jsx)(i,{id:`auth.acceptInvite.submit.pending`,message:`Setting up…`}):(0,N.jsx)(i,{id:`auth.acceptInvite.submit.idle`,message:`Create passkey`})})]})}),(0,N.jsx)(c,{currentCode:F.locale,manifest:P,onSelect:z})]})]})}export{P as component};
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{t as n}from"./utils-DKOQrNEG.js";var r=e(t(),1),i={default:`bg-card text-card-foreground`,destructive:`border-destructive/50 text-destructive bg-destructive/5 [&>svg]:text-destructive`};function a({className:e,variant:t=`default`,role:a=`alert`,...o}){return(0,r.jsx)(`div`,{"data-slot":`alert`,role:a,className:n(`relative w-full rounded-lg border px-4 py-3 text-sm`,i[t],e),...o})}function o({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`alert-description`,className:n(`text-sm [&_p]:leading-relaxed`,e),...t})}export{o as n,a as t};
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{t as n}from"./react-DbyrFoBd.js";import{i as r,n as i}from"./dist-BL2bKHuR.js";import{f as a,h as o,t as s,u as c}from"./orpc-DURDArDu.js";import{t as l}from"./trash-2-Bn-rv3EX.js";import{t as u}from"./use-label-CykSHq9A.js";import{D as d,T as f,h as p,v as m,w as h,x as g,y as _}from"./dist-ClOzYsk5.js";import{o as v}from"./validation-CwFumc7a.js";import{a as y,i as b,n as x,r as S,t as C}from"./card-L2-kK5VK.js";import{F as w,I as T,L as E,P as D,Pt as O,R as k,z as A}from"./index-bWipSZdM.js";import{t as j}from"./input-xYuLUQID.js";import{t as M}from"./toggle-Bfw56q6s.js";import{a as N,f as P,i as F,n as I,o as L,s as R,t as z}from"./form-BhMVtuYF.js";import{n as B,t as V}from"./alert-cwX3fWUu.js";import{t as H}from"./valibot-BKzEbLVK.js";var U=e(n()),W=e(t()),G=[`subscriber`,`contributor`,`author`,`editor`,`admin`],K={domainPlaceholder:{id:`allowedDomains.add.placeholder`},deleteAria:{id:`allowedDomains.row.deleteAria`},errDomainExists:{id:`allowedDomains.error.domainExists`},errFallback:{id:`allowedDomains.error.fallback`}},q=p({domain:_(h(),d(),f(),g(/^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/,v({id:`allowedDomains.add.domain.invalid`}))),defaultRole:m(G)});function J(){let e=u(),t=o(),[n,r]=(0,U.useState)(null),l=a(s.auth.allowedDomains.list.queryOptions({input:{}})),d=()=>t.invalidateQueries({queryKey:s.auth.allowedDomains.list.key()}),f=c({mutationFn:e=>s.auth.allowedDomains.create.call(e),onMutate:()=>r(null),onSuccess:async()=>{await d(),h.reset({domain:``,defaultRole:`subscriber`})},onError:e=>r(X(e))}),p=c({mutationFn:e=>s.auth.allowedDomains.update.call(e),onSuccess:()=>d()}),m=c({mutationFn:e=>s.auth.allowedDomains.delete.call(e),onSuccess:()=>d()}),h=P({resolver:H(q),defaultValues:{domain:``,defaultRole:`subscriber`},mode:`onBlur`}),g=h.handleSubmit(e=>{f.mutate({domain:e.domain,defaultRole:e.defaultRole})});return(0,W.jsxs)(`div`,{className:`mx-auto flex w-full max-w-3xl flex-col gap-4`,children:[(0,W.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`h1`,{className:`text-2xl font-semibold`,"data-testid":`allowed-domains-heading`,children:(0,W.jsx)(i,{id:`allowedDomains.title`,message:`Allowed domains`})}),(0,W.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:(0,W.jsx)(i,{id:`allowedDomains.description`,message:`Email domains permitted to sign up via OAuth. New OAuth accounts are created with the role set here. Disabled rows reject signup but preserve their role mapping.`})})]}),(0,W.jsxs)(C,{children:[(0,W.jsxs)(b,{children:[(0,W.jsx)(y,{children:(0,W.jsx)(`h2`,{className:`text-base font-semibold`,children:(0,W.jsx)(i,{id:`allowedDomains.add.title`,message:`Add domain`})})}),(0,W.jsx)(S,{children:(0,W.jsx)(i,{id:`allowedDomains.add.description`,message:`Use the bare domain — no protocol, no path.`})})]}),(0,W.jsxs)(x,{children:[(0,W.jsx)(z,{...h,children:(0,W.jsxs)(`form`,{className:`flex flex-col gap-4 sm:flex-row sm:items-end`,onSubmit:g,children:[(0,W.jsx)(F,{control:h.control,name:`domain`,render:({field:t})=>(0,W.jsxs)(N,{className:`flex-1`,children:[(0,W.jsx)(L,{children:(0,W.jsx)(i,{id:`allowedDomains.add.domain.label`,message:`Domain`})}),(0,W.jsx)(I,{children:(0,W.jsx)(j,{type:`text`,placeholder:e(K.domainPlaceholder),autoComplete:`off`,spellCheck:!1,"data-testid":`allowed-domains-domain-input`,disabled:f.isPending,...t})}),(0,W.jsx)(R,{})]})}),(0,W.jsx)(F,{control:h.control,name:`defaultRole`,render:({field:t})=>(0,W.jsxs)(N,{className:`sm:w-48`,children:[(0,W.jsx)(L,{children:(0,W.jsx)(i,{id:`allowedDomains.add.defaultRole.label`,message:`Default role`})}),(0,W.jsxs)(D,{value:t.value,onValueChange:t.onChange,disabled:f.isPending,children:[(0,W.jsx)(I,{children:(0,W.jsx)(E,{"data-testid":`allowed-domains-role-select`,children:(0,W.jsx)(k,{})})}),(0,W.jsx)(w,{children:G.map(t=>(0,W.jsx)(T,{value:t,children:e(A[t])},t))})]}),(0,W.jsx)(R,{})]})}),(0,W.jsx)(O,{type:`submit`,disabled:f.isPending,"data-testid":`allowed-domains-add-button`,children:f.isPending?(0,W.jsx)(i,{id:`allowedDomains.add.submit.pending`,message:`Adding…`}):(0,W.jsx)(i,{id:`allowedDomains.add.submit.idle`,message:`Add`})})]})}),n?(0,W.jsx)(V,{variant:`destructive`,className:`mt-4`,"data-testid":`allowed-domains-error`,children:(0,W.jsx)(B,{children:e(n)})}):null]})]}),(0,W.jsxs)(C,{children:[(0,W.jsx)(b,{children:(0,W.jsx)(y,{children:(0,W.jsx)(`h2`,{className:`text-base font-semibold`,children:(0,W.jsx)(i,{id:`allowedDomains.list.title`,message:`Configured domains`})})})}),(0,W.jsx)(x,{children:l.isLoading?(0,W.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`allowed-domains-loading`,children:(0,W.jsx)(i,{id:`allowedDomains.list.loading`,message:`Loading…`})}):(l.data??[]).length===0?(0,W.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`allowed-domains-empty`,children:(0,W.jsx)(i,{id:`allowedDomains.list.empty`,message:`No domains configured. OAuth signup is closed until at least one enabled domain is added.`})}):(0,W.jsx)(`ul`,{className:`flex flex-col gap-2`,"data-testid":`allowed-domains-list`,children:(l.data??[]).map(e=>(0,W.jsx)(Y,{row:e,onToggle:t=>{p.mutate({domain:e.domain,isEnabled:t})},onChangeRole:t=>{p.mutate({domain:e.domain,defaultRole:t})},onDelete:()=>{m.mutate({domain:e.domain})},busy:p.isPending||m.isPending},e.domain))})})]})]})}function Y({row:e,onToggle:t,onChangeRole:n,onDelete:a,busy:o}){let{i18n:s}=r(),c=u(),[d,f]=(0,U.useState)(!1);return(0,W.jsxs)(`li`,{className:`flex flex-col gap-3 rounded-md border p-3 sm:flex-row sm:items-center sm:gap-4`,"data-testid":`allowed-domains-row-${e.domain}`,children:[(0,W.jsx)(`span`,{className:`flex-1 font-mono text-sm`,children:e.domain}),(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsxs)(D,{value:e.defaultRole,onValueChange:e=>n(e),disabled:o,children:[(0,W.jsx)(E,{className:`w-44`,"data-testid":`allowed-domains-row-role-${e.domain}`,children:(0,W.jsx)(k,{})}),(0,W.jsx)(w,{children:G.map(e=>(0,W.jsx)(T,{value:e,children:c(A[e])},e))})]}),(0,W.jsx)(M,{variant:`outline`,size:`sm`,pressed:e.isEnabled,onPressedChange:t,disabled:o,"data-testid":`allowed-domains-row-toggle-${e.domain}`,children:e.isEnabled?(0,W.jsx)(i,{id:`allowedDomains.row.enabled`,message:`Enabled`}):(0,W.jsx)(i,{id:`allowedDomains.row.disabled`,message:`Disabled`})}),d?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(O,{type:`button`,variant:`destructive`,size:`sm`,onClick:()=>{f(!1),a()},disabled:o,"data-testid":`allowed-domains-row-delete-confirm-${e.domain}`,children:(0,W.jsx)(i,{id:`allowedDomains.row.deleteConfirm`,message:`Confirm delete`})}),(0,W.jsx)(O,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>f(!1),disabled:o,"data-testid":`allowed-domains-row-delete-cancel-${e.domain}`,children:(0,W.jsx)(i,{id:`allowedDomains.row.deleteCancel`,message:`Cancel`})})]}):(0,W.jsx)(O,{type:`button`,variant:`ghost`,size:`icon`,onClick:()=>f(!0),disabled:o,"aria-label":s._(K.deleteAria.id,{domain:e.domain},{message:K.deleteAria.message}),"data-testid":`allowed-domains-row-delete-${e.domain}`,children:(0,W.jsx)(l,{className:`size-4`})})]})]})}function X(e){return e&&typeof e==`object`&&`data`in e&&e.data?.reason===`domain_exists`?K.errDomainExists:e instanceof Error?e.message:K.errFallback}export{J as component};
@@ -0,0 +1 @@
1
+ var e=JSON.parse(`{"core.adminNav.appearance":["المظهر"],"plugin.menu.itemEditor.brokenLinkAria":["رابط معطوب"],"plugin.menu.itemEditor.cancelButton":["إلغاء"],"plugin.menu.itemEditor.conflictBanner":["حفظ محرر آخر تغييرات منذ تحميلك لهذه القائمة."],"plugin.menu.itemEditor.conflictReload":["إعادة التحميل لعرض الأحدث"],"plugin.menu.itemEditor.convertButton":["تحويل إلى رابط مخصص"],"plugin.menu.itemEditor.customAddButton":["إضافة إلى القائمة"],"plugin.menu.itemEditor.customReplaceButton":["استبدال الرابط"],"plugin.menu.itemEditor.deleteButton":["حذف القائمة"],"plugin.menu.itemEditor.deleteCancel":["Cancel"],"plugin.menu.itemEditor.deleteConfirm":["حذف هذه القائمة؟"],"plugin.menu.itemEditor.deleteDescription":["This permanently removes the menu and its items. This can't be undone."],"plugin.menu.itemEditor.emptyState":["لا توجد عناصر بعد."],"plugin.menu.itemEditor.maxDepthLabel":["الحد الأقصى للعمق"],"plugin.menu.itemEditor.maxDepthRejected":["لا يمكن التعيين أقل من العنصر الأعمق الحالي."],"plugin.menu.itemEditor.relinkBanner":["اختر بديلاً لـ ",["label"]],"plugin.menu.itemEditor.relinkButton":["إعادة الربط…"],"plugin.menu.itemEditor.removeButton":["إزالة"],"plugin.menu.itemEditor.reorderAria":["إعادة ترتيب ",["title"]],"plugin.menu.itemEditor.reorderFallbackTitle":["عنصر"],"plugin.menu.itemEditor.saveButton":["حفظ القائمة"],"plugin.menu.itemEditor.sourceUnavailable":["This source isn't available yet — add the link via Custom URL."],"plugin.menu.keyword.appearance":["appearance"],"plugin.menu.keyword.footer":["footer"],"plugin.menu.keyword.header":["header"],"plugin.menu.keyword.nav":["nav"],"plugin.menu.keyword.navigation":["navigation"],"plugin.menu.menu.addNew":["إضافة"],"plugin.menu.menu.addNewItem":["إضافة قائمة"],"plugin.menu.menu.allItems":["كل القوائم"],"plugin.menu.menu.backToItems":["→ العودة إلى القوائم"],"plugin.menu.menu.editItem":["تحرير القائمة"],"plugin.menu.menu.newItemName":["اسم القائمة الجديدة"],"plugin.menu.menu.notFound":["لا توجد قوائم بعد"],"plugin.menu.menu.plural":["القوائم"],"plugin.menu.menu.searchItems":["البحث في القوائم…"],"plugin.menu.menu.singular":["قائمة"],"plugin.menu.menu.updateItem":["تحديث القائمة"],"plugin.menu.menu.viewItem":["عرض القائمة"],"plugin.menu.menuItem.addNew":["إضافة"],"plugin.menu.menuItem.addNewItem":["إضافة عنصر قائمة"],"plugin.menu.menuItem.editItem":["تحرير عنصر القائمة"],"plugin.menu.menuItem.newItem":["عنصر قائمة جديد"],"plugin.menu.menuItem.notFound":["لا توجد عناصر قائمة بعد"],"plugin.menu.menuItem.parentItem":["العنصر الأب"],"plugin.menu.menuItem.plural":["عناصر القائمة"],"plugin.menu.menuItem.searchItems":["البحث في عناصر القائمة…"],"plugin.menu.menuItem.singular":["عنصر القائمة"],"plugin.menu.shell.createButton":["+ إنشاء قائمة جديدة"],"plugin.menu.shell.createDescription":["Name your new menu. You can add links to it next."],"plugin.menu.shell.createPrompt":["اسم القائمة"],"plugin.menu.shell.createSubmit":["Create menu"],"plugin.menu.shell.createTitle":["Create menu"],"plugin.menu.shell.editEmpty":["اختر قائمة لبدء التحرير."],"plugin.menu.shell.emptyState":["لا توجد قوائم بعد. أنشئ قائمتك الأولى للبدء."],"plugin.menu.shell.heading":["Menus"],"plugin.menu.shell.tab.edit":["تحرير القوائم"],"plugin.menu.shell.tab.locations":["إدارة المواقع"],"plugin.menu.shell.unassigned":["— غير معيَّن —"]}`);export{e as messages};
@@ -0,0 +1 @@
1
+ var e=JSON.parse(`{"plugin.blog.category.addNewItem":["إضافة تصنيف"],"plugin.blog.category.allItems":["كل التصنيفات"],"plugin.blog.category.backToItems":["→ العودة إلى التصنيفات"],"plugin.blog.category.editItem":["تحرير التصنيف"],"plugin.blog.category.notFound":["لا توجد تصنيفات بعد"],"plugin.blog.category.parentItem":["التصنيف الأب"],"plugin.blog.category.plural":["التصنيفات"],"plugin.blog.category.searchItems":["البحث في التصنيفات…"],"plugin.blog.category.singular":["تصنيف"],"plugin.blog.keyword.articles":["articles"],"plugin.blog.keyword.blog":["blog"],"plugin.blog.keyword.categories":["categories"],"plugin.blog.keyword.news":["news"],"plugin.blog.keyword.tags":["tags"],"plugin.blog.keyword.taxonomy":["taxonomy"],"plugin.blog.keyword.writing":["writing"],"plugin.blog.post.addNewItem":["إضافة منشور"],"plugin.blog.post.allItems":["كل المنشورات"],"plugin.blog.post.editItem":["تحرير المنشور"],"plugin.blog.post.moveToTrash":["نقل المنشور إلى المهملات؟"],"plugin.blog.post.newItem":["منشور جديد"],"plugin.blog.post.noMatch":["لا توجد منشورات مطابقة"],"plugin.blog.post.notFound":["لا توجد منشورات بعد"],"plugin.blog.post.notFoundInTrash":["المهملات فارغة"],"plugin.blog.post.plural":["المنشورات"],"plugin.blog.post.searchItems":["البحث في المنشورات…"],"plugin.blog.post.singular":["منشور"],"plugin.blog.post.untitledItem":["منشور بدون عنوان"],"plugin.blog.post.viewItem":["عرض المنشور"],"plugin.blog.tag.addNewItem":["إضافة وسم"],"plugin.blog.tag.allItems":["كل الوسوم"],"plugin.blog.tag.backToItems":["→ العودة إلى الوسوم"],"plugin.blog.tag.editItem":["تحرير الوسم"],"plugin.blog.tag.notFound":["لا توجد وسوم بعد"],"plugin.blog.tag.plural":["الوسوم"],"plugin.blog.tag.searchItems":["البحث في الوسوم…"],"plugin.blog.tag.singular":["وسم"]}`);export{e as messages};
@@ -0,0 +1 @@
1
+ var e=JSON.parse('{"core.adminNav.library":["المكتبة"],"plugin.media.adminPage.title":["مكتبة الوسائط"],"plugin.media.altEditor.saved":["✓ تم الحفظ"],"plugin.media.banner.dismiss":["إغلاق"],"plugin.media.block.file.description":["Downloadable file with size + MIME label."],"plugin.media.block.file.input.filename.label":["Filename"],"plugin.media.block.file.input.href.label":["Download URL"],"plugin.media.block.file.input.media.label":["File"],"plugin.media.block.file.input.mime.label":["MIME type"],"plugin.media.block.file.input.size.label":["Size (bytes)"],"plugin.media.block.file.keyword.attachment":["attachment"],"plugin.media.block.file.keyword.download":["download"],"plugin.media.block.file.title":["File"],"plugin.media.block.image.description":["Image with alt text, caption, and focal-point cropping."],"plugin.media.block.image.input.alt.label":["Alternative text"],"plugin.media.block.image.input.caption.label":["Caption"],"plugin.media.block.image.input.focalPoint.label":["Focal point"],"plugin.media.block.image.input.media.label":["Image"],"plugin.media.block.image.input.priority.label":["High priority (load eagerly)"],"plugin.media.block.image.input.src.label":["Source URL"],"plugin.media.block.image.keyword.media":["media"],"plugin.media.block.image.keyword.photo":["photo"],"plugin.media.block.image.keyword.picture":["picture"],"plugin.media.block.image.title":["Image"],"plugin.media.detail.altPlaceholderImage":["صف هذه الصورة…"],"plugin.media.detail.altPlaceholderOther":["أضف وصفاً…"],"plugin.media.detail.closeAria":["إغلاق التفاصيل"],"plugin.media.detail.copied":["نُسخ"],"plugin.media.detail.copy":["نسخ"],"plugin.media.detail.delete":["حذف"],"plugin.media.detail.deleteConfirm":["حذف"],"plugin.media.detail.deleteDescription":["سيتم حذف \\"",["title"],"\\" نهائياً. الصفحات أو المنشورات التي تتضمنه ستعرض رابطاً معطوباً."],"plugin.media.detail.deleteTitle":["حذف هذا الملف؟"],"plugin.media.detail.download":["تنزيل"],"plugin.media.detail.field.altText":["النص البديل"],"plugin.media.detail.field.assetType":["نوع الملف"],"plugin.media.detail.field.fileSize":["حجم الملف"],"plugin.media.detail.field.uploaded":["تاريخ الرفع"],"plugin.media.detail.field.url":["الرابط"],"plugin.media.detail.heading":["تفاصيل الملف"],"plugin.media.dialog.cancel":["إلغاء"],"plugin.media.dialog.confirm":["تأكيد"],"plugin.media.dropzone.headline":["مكتبتك فارغة. أضف ملفات لتبدأ."],"plugin.media.dropzone.subline":["اسحب وأفلت أو <0>اختر من الحاسوب</0>"],"plugin.media.error.alreadyConfirmed":["تم تأكيد هذا الرفع بالفعل من علامة تبويب أو جهاز آخر."],"plugin.media.error.contentLengthRequired":["الرفع يفتقد Content-Length — قد يستخدم متصفحك أو الوكيل chunked transfer."],"plugin.media.error.csrfTokenMissing":["تم حظر الطلب بواسطة فحص CSRF. أعد تحميل الصفحة وحاول مجدداً."],"plugin.media.error.mimeMismatch":["البايتات المرفوعة لا تطابق نوع الملف المُعلَن."],"plugin.media.error.objectNotFound":["لم يصل الرفع إلى التخزين — تحقق من قواعد CORS للـ bucket."],"plugin.media.error.payloadTooLarge":["الملف يتجاوز maxUploadSize المُكوَّن."],"plugin.media.error.serverCouldntProcess":["تعذر على الخادم معالجة هذا الرفع. حاول مرة أخرى."],"plugin.media.error.storageNotConfigured":["لم يتم تكوين محوّل التخزين — عيّن `storage:` في plumix.config.ts."],"plugin.media.error.unsupportedMediaType":["نوع الملف هذا غير مسموح به في acceptedTypes لإضافة الوسائط."],"plugin.media.keyword.assets":["assets"],"plugin.media.keyword.files":["files"],"plugin.media.keyword.images":["images"],"plugin.media.keyword.photos":["photos"],"plugin.media.keyword.uploads":["uploads"],"plugin.media.library.failedToLoad":["فشل تحميل الوسائط."],"plugin.media.library.loadingMore":["جارٍ تحميل المزيد…"],"plugin.media.library.noMatches":["لا توجد ملفات مطابقة لبحثك."],"plugin.media.library.openDetailsAria":["فتح تفاصيل ",["title"]],"plugin.media.library.pickItemAria":["اختر ",["title"]],"plugin.media.library.pickerCancel":["إلغاء"],"plugin.media.library.pickerUseSelection":["استخدام التحديد"],"plugin.media.library.searchPlaceholder":["البحث باسم الملف…"],"plugin.media.library.title.library":["مكتبة الوسائط"],"plugin.media.library.title.picker":["اختر وسائط"],"plugin.media.listField.button.addMore":["إضافة المزيد"],"plugin.media.listField.button.select":["اختيار"],"plugin.media.listField.empty":["لم يتم اختيار وسائط"],"plugin.media.listField.modalAria":["إضافة وسائط"],"plugin.media.listField.moveDownAria":["نقل ",["name"]," لأسفل"],"plugin.media.listField.moveUpAria":["نقل ",["name"]," لأعلى"],"plugin.media.listField.pending":["تم الاختيار (المعرف ",["id"],")"],"plugin.media.listField.removeAria":["إزالة ",["name"]],"plugin.media.media.addNew":["رفع"],"plugin.media.media.addNewItem":["رفع وسائط"],"plugin.media.media.allItems":["كل الوسائط"],"plugin.media.media.editItem":["تحرير الوسائط"],"plugin.media.media.moveToTrash":["نقل الوسائط إلى المهملات؟"],"plugin.media.media.newItem":["وسائط جديدة"],"plugin.media.media.notFound":["لا توجد وسائط بعد"],"plugin.media.media.notFoundInTrash":["المهملات فارغة"],"plugin.media.media.plural":["الوسائط"],"plugin.media.media.searchItems":["البحث في الوسائط…"],"plugin.media.media.singular":["ملف"],"plugin.media.media.untitledItem":["وسائط بدون عنوان"],"plugin.media.media.viewItem":["عرض الوسائط"],"plugin.media.pickerField.button.change":["تغيير"],"plugin.media.pickerField.button.select":["اختيار"],"plugin.media.pickerField.clear":["مسح"],"plugin.media.pickerField.empty":["لم يتم اختيار وسائط"],"plugin.media.pickerField.modalAria":["اختر وسائط"],"plugin.media.pickerField.pending":["تم الاختيار (المعرف ",["id"],")"],"plugin.media.upload.button":["رفع"],"plugin.media.upload.progress":["جارٍ الرفع: ",["count","plural",{"zero":["لا ملفات"],"one":["ملف واحد"],"two":["ملفان"],"few":["#"," ملفات"],"many":["#"," ملفاً"],"other":["#"," ملف"]}],"…"]}');export{e as messages};
@@ -0,0 +1 @@
1
+ var e=JSON.parse(`{"block.core.button.input.href.label":["Href"],"block.core.button.input.label.label":["Label"],"block.core.button.input.openInNewTab.label":["Open in new tab"],"block.core.button.title":["Button"],"block.core.code.input.language.label":["Language"],"block.core.code.input.text.label":["Code"],"block.core.code.title":["Code"],"block.core.column.input.content.label":["Content"],"block.core.column.input.width.label":["Width"],"block.core.column.title":["Column"],"block.core.columns.input.columns.label":["Columns"],"block.core.columns.input.reverseWhenStacked.label":["Reverse when stacked"],"block.core.columns.input.stackAt.label":["Stack columns at"],"block.core.columns.input.stackAt.option.mobile":["Mobile"],"block.core.columns.input.stackAt.option.never":["Never"],"block.core.columns.input.stackAt.option.tablet":["Tablet"],"block.core.columns.title":["Columns"],"block.core.details.input.content.label":["Content"],"block.core.details.input.open.label":["Open by default"],"block.core.details.input.summary.label":["Summary"],"block.core.details.title":["Details"],"block.core.embed.description":["Embed a YouTube, Vimeo, Loom, Spotify, or CodePen URL — or any other page in a sandboxed iframe."],"block.core.embed.input.caption.label":["Caption"],"block.core.embed.input.title.label":["Accessible title"],"block.core.embed.input.url.label":["URL"],"block.core.embed.keyword.iframe":["iframe"],"block.core.embed.keyword.media":["media"],"block.core.embed.keyword.video":["video"],"block.core.embed.keyword.vimeo":["vimeo"],"block.core.embed.keyword.youtube":["youtube"],"block.core.embed.title":["Embed"],"block.core.group.input.content.label":["Content"],"block.core.group.title":["Box"],"block.core.html.input.html.label":["HTML"],"block.core.html.title":["HTML"],"block.core.pattern-ref.input.slug.label":["Slug"],"block.core.pattern-ref.title":["Pattern reference"],"block.core.rich-text.input.body.label":["Body"],"block.core.rich-text.keyword.body":["body"],"block.core.rich-text.keyword.paragraph":["paragraph"],"block.core.rich-text.keyword.text":["text"],"block.core.rich-text.title":["Rich text"],"block.core.section.input.content.label":["Content"],"block.core.section.input.maxWidth.label":["Content max width"],"block.core.section.title":["Section"],"block.core.separator.title":["Separator"],"block.core.table-body-row.input.cells.label":["Cells"],"block.core.table-body-row.title":["Body Row"],"block.core.table-cell.input.text.label":["Text"],"block.core.table-cell.title":["Cell"],"block.core.table-header-cell.input.text.label":["Text"],"block.core.table-header-cell.title":["Header Cell"],"block.core.table-header-row.input.cells.label":["Cells"],"block.core.table-header-row.title":["Header Row"],"block.core.table.input.align.label":["Align"],"block.core.table.input.align.option.center":["Center"],"block.core.table.input.align.option.left":["Left"],"block.core.table.input.align.option.right":["Right"],"block.core.table.input.align.placeholder":["Left"],"block.core.table.input.rows.label":["Rows"],"block.core.table.title":["Table"],"block.core.video.description":["HTML <video> with browser controls."],"block.core.video.input.autoplay.label":["Autoplay"],"block.core.video.input.controls.label":["Show controls"],"block.core.video.input.loop.label":["Loop"],"block.core.video.input.muted.label":["Muted"],"block.core.video.input.playsinline.label":["Plays inline (iOS)"],"block.core.video.input.poster.label":["Poster image URL"],"block.core.video.input.src.label":["Source URL"],"block.core.video.keyword.clip":["clip"],"block.core.video.keyword.media":["media"],"block.core.video.keyword.movie":["movie"],"block.core.video.title":["Video"],"editor.canvas.addBlock":["Add a block"],"editor.canvas.cantPlaceHere":["This block can't be placed here."],"editor.canvas.pan":["Drag to move the canvas"],"editor.catalog.noResults":["No blocks match your search."],"editor.catalog.patterns":["Patterns"],"editor.catalog.searchLabel":["Search blocks"],"editor.combobox.none":["No match."],"editor.combobox.placeholder":["Select…"],"editor.combobox.search":["Search…"],"editor.header.back":["Back"],"editor.header.preview":["Preview"],"editor.header.source":["View source"],"editor.header.title":["Title"],"editor.header.untitled":["Untitled"],"editor.header.viewDraft":["View current draft"],"editor.header.viewLive":["View live entry"],"editor.htmlAttrs.add":["Add attribute"],"editor.htmlAttrs.add.create":["Create"],"editor.htmlAttrs.add.key":["attribute"],"editor.htmlAttrs.add.none":["No attribute."],"editor.htmlAttrs.add.search":["Search attribute…"],"editor.htmlAttrs.add.value":["value"],"editor.htmlAttrs.none":["No attributes set."],"editor.htmlAttrs.remove":["Remove"],"editor.htmlAttrs.tagName":["Tag name"],"editor.htmlAttrs.tagName.default":["Default"],"editor.htmlAttrs.title":["HTML attributes"],"editor.inspector.addColumn":["Add column"],"editor.inspector.addRow":["Add row"],"editor.inspector.empty":["Select a block to edit its attributes."],"editor.inspector.refreshData":["Refresh data"],"editor.inspector.removeColumn":["Remove column"],"editor.inspector.removeRow":["Remove row"],"editor.json.block":["Block"],"editor.json.empty":["Select a block to inspect."],"editor.json.page":["Page"],"editor.json.title":["Source"],"editor.layers.actions":["Block actions"],"editor.layers.copy":["Copy"],"editor.layers.delete":["Delete"],"editor.layers.duplicate":["Duplicate"],"editor.layers.empty":["No blocks yet."],"editor.layers.paste":["Paste"],"editor.page.empty":["No document settings."],"editor.richtext.hint":["Formatting applies to the selected text."],"editor.selection.count":[["count"]," selected"],"editor.selection.delete":["Delete"],"editor.selection.drag":["Drag to move"],"editor.selection.duplicate":["Duplicate"],"editor.selection.group":["Group"],"editor.selection.moveDown":["Move down"],"editor.selection.moveUp":["Move up"],"editor.selection.selectParent":["Select parent"],"editor.selection.ungroup":["Ungroup"],"editor.styles.add":["Add style"],"editor.styles.add.create":["Create"],"editor.styles.add.key":["property"],"editor.styles.add.none":["No property."],"editor.styles.add.search":["Search property…"],"editor.styles.add.value":["value"],"editor.styles.advanced":["Advanced"],"editor.styles.align.center":["Align center"],"editor.styles.align.left":["Align left"],"editor.styles.align.right":["Align right"],"editor.styles.all":["All styles"],"editor.styles.background":["Background"],"editor.styles.blockId":["Block ID"],"editor.styles.border":["Border"],"editor.styles.css":["CSS"],"editor.styles.cssClasses":["CSS classes"],"editor.styles.cssClasses.hint":["Added to the block root element."],"editor.styles.cssClasses.placeholder":["my-class other-class"],"editor.styles.cssProperties":["CSS Properties"],"editor.styles.customCss":["Custom CSS"],"editor.styles.effects":["Shadows & Effects"],"editor.styles.empty":["Select a block to style it."],"editor.styles.fillImage":["Fill image"],"editor.styles.hideOnDevice":["Hide on this device"],"editor.styles.layout":["Layout"],"editor.styles.margin":["Margin"],"editor.styles.marginPadding":["Margin & Padding"],"editor.styles.mark.bold":["Bold"],"editor.styles.mark.italic":["Italic"],"editor.styles.mark.strikethrough":["Strikethrough"],"editor.styles.mark.underline":["Underline"],"editor.styles.mode.custom":["Custom"],"editor.styles.mode.token":["Token"],"editor.styles.none":["No styles set for this device."],"editor.styles.opacity":["Opacity"],"editor.styles.padding":["Padding"],"editor.styles.remove":["Remove"],"editor.styles.scope":["Editing"],"editor.styles.size":["Size"],"editor.styles.spacing":["Spacing"],"editor.styles.textAlignment":["Text alignment"],"editor.styles.textFormatting":["Text formatting"],"editor.styles.textShadow":["Text shadow"],"editor.styles.typography":["Typography"],"editor.styles.visibility":["Visibility"],"editor.styles.visibility.desktop":["Hide on desktop"],"editor.styles.visibility.mobile":["Hide on mobile"],"editor.styles.visibility.tablet":["Hide on tablet"],"editor.tab.block":["Block"],"editor.tab.blocks":["Blocks"],"editor.tab.json":["JSON"],"editor.tab.layers":["Layers"],"editor.tab.page":["Page"],"editor.tab.styles":["Styles"],"editor.toolbar.addBlock":["Add Block"],"editor.toolbar.copyPreviewLink":["Copy preview link"],"editor.toolbar.device.desktop":["Desktop"],"editor.toolbar.device.group":["Device"],"editor.toolbar.device.mobile":["Mobile"],"editor.toolbar.device.tablet":["Tablet"],"editor.toolbar.discard":["Discard"],"editor.toolbar.fitWidth":["Fit to width"],"editor.toolbar.publish":["Publish"],"editor.toolbar.rails":["Toggle panels"],"editor.toolbar.redo":["Redo"],"editor.toolbar.saveDraft":["Save draft"],"editor.toolbar.undo":["Undo"],"editor.toolbar.unpublished":["Unpublished changes"],"editor.toolbar.xray":["X-ray: outline all blocks"],"editor.toolbar.zoomIn":["Zoom in"],"editor.toolbar.zoomOut":["Zoom out"]}`);export{e as messages};
@@ -0,0 +1 @@
1
+ var e=JSON.parse(`{"plugin.pages.keyword.page":["page"],"plugin.pages.keyword.static":["static"],"plugin.pages.page.addNew":["إضافة"],"plugin.pages.page.addNewItem":["إضافة صفحة"],"plugin.pages.page.allItems":["كل الصفحات"],"plugin.pages.page.editItem":["تحرير الصفحة"],"plugin.pages.page.moveToTrash":["نقل الصفحة إلى المهملات؟"],"plugin.pages.page.newItem":["صفحة جديدة"],"plugin.pages.page.noMatch":["لا توجد صفحات مطابقة"],"plugin.pages.page.notFound":["لا توجد صفحات بعد"],"plugin.pages.page.notFoundInTrash":["المهملات فارغة"],"plugin.pages.page.parentItem":["الصفحة الأم"],"plugin.pages.page.parentItemColon":["الصفحة الأم:"],"plugin.pages.page.plural":["الصفحات"],"plugin.pages.page.searchItems":["البحث في الصفحات…"],"plugin.pages.page.singular":["صفحة"],"plugin.pages.page.untitledItem":["صفحة بدون عنوان"],"plugin.pages.page.viewItem":["عرض الصفحة"],"plugin.pages.page.viewItems":["عرض الصفحات"]}`);export{e as messages};