payload-intl 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/MessagesForm.js +58 -42
- package/dist/components/MessagesForm.js.map +1 -1
- package/dist/components/inputs/InputWrapper.js +13 -13
- package/dist/components/inputs/InputWrapper.js.map +1 -1
- package/dist/components/inputs/LexicalInput.d.ts +12 -1
- package/dist/components/inputs/LexicalInput.js +75 -45
- package/dist/components/inputs/LexicalInput.js.map +1 -1
- package/dist/components/layout/MessageField.js +21 -18
- package/dist/components/layout/MessageField.js.map +1 -1
- package/dist/exports/view.js +32 -32
- package/dist/exports/view.js.map +1 -1
- package/dist/index.js +18 -14
- package/dist/index.js.map +1 -1
- package/dist/requests/fetchMessages.js +22 -19
- package/dist/requests/fetchMessages.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utils/error-handling.d.ts +1 -0
- package/dist/utils/error-handling.js +13 -0
- package/dist/utils/error-handling.js.map +1 -0
- package/package.json +2 -1
|
@@ -1,51 +1,67 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as s, jsxs as
|
|
2
|
+
import { jsx as s, jsxs as o } from "react/jsx-runtime";
|
|
3
3
|
import { useStepNav as x, Button as M } from "@payloadcms/ui";
|
|
4
|
-
import { isEqual as
|
|
5
|
-
import { useEffect as
|
|
6
|
-
import { useForm as
|
|
7
|
-
import { toast as
|
|
8
|
-
import { MessagesFormProvider as
|
|
9
|
-
import { cn as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
4
|
+
import { isEqual as y } from "lodash-es";
|
|
5
|
+
import { useEffect as j, useState as w } from "react";
|
|
6
|
+
import { useForm as T } from "react-hook-form";
|
|
7
|
+
import { toast as d } from "sonner";
|
|
8
|
+
import { MessagesFormProvider as E } from "../context/messages-form.js";
|
|
9
|
+
import { cn as h } from "../utils/cn.js";
|
|
10
|
+
import { getErrorMessage as F } from "../utils/error-handling.js";
|
|
11
|
+
import { JsonImport as C } from "./actions/JsonImport.js";
|
|
12
|
+
import { MessageField as O } from "./layout/MessageField.js";
|
|
12
13
|
import { MessagesTabs as I } from "./layout/MessagesTabs.js";
|
|
13
14
|
import { MessagesTree as g } from "./layout/MessagesTree.js";
|
|
14
|
-
function
|
|
15
|
+
function Q({
|
|
15
16
|
locales: u,
|
|
16
17
|
schema: a,
|
|
17
|
-
tabs:
|
|
18
|
-
values:
|
|
18
|
+
tabs: m = !1,
|
|
19
|
+
values: l,
|
|
19
20
|
endpointUrl: b
|
|
20
21
|
}) {
|
|
21
|
-
const { setStepNav:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}, [
|
|
25
|
-
const i =
|
|
26
|
-
defaultValues:
|
|
22
|
+
const { setStepNav: f } = x();
|
|
23
|
+
j(() => {
|
|
24
|
+
f([{ label: "Intl Messages", url: "/intl" }]);
|
|
25
|
+
}, [f]);
|
|
26
|
+
const i = T({
|
|
27
|
+
defaultValues: l,
|
|
27
28
|
reValidateMode: "onChange"
|
|
28
|
-
}), [
|
|
29
|
-
const
|
|
30
|
-
...
|
|
31
|
-
[
|
|
29
|
+
}), [c, v] = w(Object.keys(a)[0]), N = async (e) => {
|
|
30
|
+
const r = d.loading("Saving..."), S = Object.entries(e).reduce((t, [n, p]) => y(p, l[n]) ? t : {
|
|
31
|
+
...t,
|
|
32
|
+
[n]: p
|
|
32
33
|
}, {});
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
try {
|
|
35
|
+
const t = await fetch(b, {
|
|
36
|
+
method: "PUT",
|
|
37
|
+
headers: {
|
|
38
|
+
"Content-Type": "application/json"
|
|
39
|
+
},
|
|
40
|
+
body: JSON.stringify(S)
|
|
41
|
+
});
|
|
42
|
+
if (!t.ok) {
|
|
43
|
+
const n = await F(t);
|
|
44
|
+
throw new Error(n);
|
|
45
|
+
}
|
|
46
|
+
i.reset(e), d.success("Saved", { id: r });
|
|
47
|
+
} catch (t) {
|
|
48
|
+
d.error(
|
|
49
|
+
`Failed to save: ${t instanceof Error ? t.message : "Unknown error"}`,
|
|
50
|
+
{ id: r }
|
|
51
|
+
);
|
|
52
|
+
}
|
|
37
53
|
};
|
|
38
|
-
return /* @__PURE__ */ s(
|
|
54
|
+
return /* @__PURE__ */ s(E, { form: i, locales: u, children: /* @__PURE__ */ o(
|
|
39
55
|
"form",
|
|
40
56
|
{
|
|
41
57
|
className: "flex h-[calc(100vh-var(--app-header-height))] flex-col",
|
|
42
58
|
onSubmit: i.handleSubmit(N),
|
|
43
59
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ o("div", { className: "sticky top-0 z-10 bg-background", children: [
|
|
61
|
+
/* @__PURE__ */ o("header", { className: "mb-6 flex items-center justify-between gap-4", children: [
|
|
46
62
|
/* @__PURE__ */ s("h1", { className: "text-4xl", children: "Messages" }),
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */ s(
|
|
63
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
|
|
64
|
+
/* @__PURE__ */ s(C, {}),
|
|
49
65
|
/* @__PURE__ */ s(
|
|
50
66
|
M,
|
|
51
67
|
{
|
|
@@ -57,27 +73,27 @@ function H({
|
|
|
57
73
|
)
|
|
58
74
|
] })
|
|
59
75
|
] }),
|
|
60
|
-
|
|
76
|
+
m && /* @__PURE__ */ s(
|
|
61
77
|
I,
|
|
62
78
|
{
|
|
63
79
|
schema: a,
|
|
64
|
-
activeTab:
|
|
80
|
+
activeTab: c,
|
|
65
81
|
setActiveTab: v
|
|
66
82
|
}
|
|
67
83
|
)
|
|
68
84
|
] }),
|
|
69
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ o(
|
|
70
86
|
"div",
|
|
71
87
|
{
|
|
72
88
|
id: "messages-form-content",
|
|
73
89
|
className: "min-h-0 overflow-y-auto pt-8 pb-16",
|
|
74
90
|
children: [
|
|
75
|
-
!
|
|
76
|
-
|
|
77
|
-
|
|
91
|
+
!m && /* @__PURE__ */ s(g, { path: "", schema: a, nestingLevel: 0 }),
|
|
92
|
+
m && Object.entries(a).map(([e, r]) => typeof r == "string" ? /* @__PURE__ */ s(
|
|
93
|
+
O,
|
|
78
94
|
{
|
|
79
|
-
schema:
|
|
80
|
-
className:
|
|
95
|
+
schema: r,
|
|
96
|
+
className: h({ hidden: c !== e }),
|
|
81
97
|
messageKey: e,
|
|
82
98
|
path: e
|
|
83
99
|
},
|
|
@@ -85,9 +101,9 @@ function H({
|
|
|
85
101
|
) : /* @__PURE__ */ s(
|
|
86
102
|
g,
|
|
87
103
|
{
|
|
88
|
-
className:
|
|
104
|
+
className: h({ hidden: c !== e }),
|
|
89
105
|
path: e,
|
|
90
|
-
schema:
|
|
106
|
+
schema: r,
|
|
91
107
|
nestingLevel: 0
|
|
92
108
|
},
|
|
93
109
|
e
|
|
@@ -100,6 +116,6 @@ function H({
|
|
|
100
116
|
) });
|
|
101
117
|
}
|
|
102
118
|
export {
|
|
103
|
-
|
|
119
|
+
Q as MessagesForm
|
|
104
120
|
};
|
|
105
121
|
//# sourceMappingURL=MessagesForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessagesForm.js","sources":["../../src/components/MessagesForm.tsx"],"sourcesContent":["\"use client\";\n\nimport type { FormValues } from \"@/context/messages-form\";\nimport type {\n DeepPartial,\n Locales,\n Messages,\n MessagesSchema,\n Translations,\n} from \"@/types\";\nimport { Button, useStepNav } from \"@payloadcms/ui\";\nimport { isEqual } from \"lodash-es\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\n\nimport { MessagesFormProvider } from \"@/context/messages-form\";\nimport { cn } from \"@/utils/cn\";\n\nimport { JsonImport } from \"./actions/JsonImport\";\nimport { MessageField } from \"./layout/MessageField\";\nimport { MessagesTabs } from \"./layout/MessagesTabs\";\nimport { MessagesTree } from \"./layout/MessagesTree\";\n\ninterface MessagesFormProps {\n locales: Locales;\n schema: MessagesSchema;\n tabs?: boolean;\n values: Translations<DeepPartial<Messages>>;\n endpointUrl: string;\n}\n\nexport function MessagesForm({\n locales,\n schema,\n tabs = false,\n values,\n endpointUrl,\n}: MessagesFormProps): React.ReactNode {\n const { setStepNav } = useStepNav();\n useEffect(() => {\n setStepNav([{ label: \"Intl Messages\", url: \"/intl\" }]);\n }, [setStepNav]);\n\n const form = useForm<FormValues>({\n defaultValues: values,\n reValidateMode: \"onChange\",\n });\n const [activeTab, setActiveTab] = useState(Object.keys(schema)[0]);\n\n const handleSubmit = async (currentValues: FormValues) => {\n const toastId = toast.loading(\"Saving...\");\n const changes = Object.entries(currentValues).reduce<\n Translations<Messages>\n >((acc, [locale, value]) => {\n const hasChanged = !isEqual(value, values[locale]);\n if (!hasChanged) {\n return acc;\n }\n return {\n ...acc,\n [locale]: value,\n };\n }, {});\n\n await fetch(endpointUrl, {\n
|
|
1
|
+
{"version":3,"file":"MessagesForm.js","sources":["../../src/components/MessagesForm.tsx"],"sourcesContent":["\"use client\";\n\nimport type { FormValues } from \"@/context/messages-form\";\nimport type {\n DeepPartial,\n Locales,\n Messages,\n MessagesSchema,\n Translations,\n} from \"@/types\";\nimport { Button, useStepNav } from \"@payloadcms/ui\";\nimport { isEqual } from \"lodash-es\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\n\nimport { MessagesFormProvider } from \"@/context/messages-form\";\nimport { cn } from \"@/utils/cn\";\nimport { getErrorMessage } from \"@/utils/error-handling\";\n\nimport { JsonImport } from \"./actions/JsonImport\";\nimport { MessageField } from \"./layout/MessageField\";\nimport { MessagesTabs } from \"./layout/MessagesTabs\";\nimport { MessagesTree } from \"./layout/MessagesTree\";\n\ninterface MessagesFormProps {\n locales: Locales;\n schema: MessagesSchema;\n tabs?: boolean;\n values: Translations<DeepPartial<Messages>>;\n endpointUrl: string;\n}\n\nexport function MessagesForm({\n locales,\n schema,\n tabs = false,\n values,\n endpointUrl,\n}: MessagesFormProps): React.ReactNode {\n const { setStepNav } = useStepNav();\n useEffect(() => {\n setStepNav([{ label: \"Intl Messages\", url: \"/intl\" }]);\n }, [setStepNav]);\n\n const form = useForm<FormValues>({\n defaultValues: values,\n reValidateMode: \"onChange\",\n });\n const [activeTab, setActiveTab] = useState(Object.keys(schema)[0]);\n\n const handleSubmit = async (currentValues: FormValues) => {\n const toastId = toast.loading(\"Saving...\");\n const changes = Object.entries(currentValues).reduce<\n Translations<Messages>\n >((acc, [locale, value]) => {\n const hasChanged = !isEqual(value, values[locale]);\n if (!hasChanged) {\n return acc;\n }\n return {\n ...acc,\n [locale]: value,\n };\n }, {});\n\n try {\n const response = await fetch(endpointUrl, {\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(changes),\n });\n\n if (!response.ok) {\n const error = await getErrorMessage(response);\n throw new Error(error);\n }\n\n form.reset(currentValues);\n toast.success(\"Saved\", { id: toastId });\n } catch (error) {\n toast.error(\n `Failed to save: ${error instanceof Error ? error.message : \"Unknown error\"}`,\n { id: toastId },\n );\n }\n };\n\n return (\n <MessagesFormProvider form={form} locales={locales}>\n <form\n className=\"flex h-[calc(100vh-var(--app-header-height))] flex-col\"\n onSubmit={form.handleSubmit(handleSubmit)}\n >\n <div className=\"sticky top-0 z-10 bg-background\">\n <header className=\"mb-6 flex items-center justify-between gap-4\">\n <h1 className=\"text-4xl\">Messages</h1>\n <div className=\"flex items-center gap-2\">\n <JsonImport />\n <Button\n className=\"my-0\"\n type=\"submit\"\n disabled={!form.formState.isDirty}\n >\n Save\n </Button>\n </div>\n </header>\n\n {tabs && (\n <MessagesTabs\n schema={schema}\n activeTab={activeTab}\n setActiveTab={setActiveTab}\n />\n )}\n </div>\n\n <div\n id=\"messages-form-content\"\n className=\"min-h-0 overflow-y-auto pt-8 pb-16\"\n >\n {!tabs && <MessagesTree path=\"\" schema={schema} nestingLevel={0} />}\n {tabs &&\n Object.entries(schema).map(([key, value]) => {\n if (typeof value === \"string\") {\n return (\n <MessageField\n schema={value}\n key={key}\n className={cn({ hidden: activeTab !== key })}\n messageKey={key}\n path={key}\n />\n );\n }\n return (\n <MessagesTree\n className={cn({ hidden: activeTab !== key })}\n key={key}\n path={key}\n schema={value}\n nestingLevel={0}\n />\n );\n })}\n </div>\n </form>\n </MessagesFormProvider>\n );\n}\n"],"names":["MessagesForm","locales","schema","tabs","values","endpointUrl","setStepNav","useStepNav","useEffect","form","useForm","activeTab","setActiveTab","useState","handleSubmit","currentValues","toastId","toast","changes","acc","locale","value","isEqual","response","error","getErrorMessage","jsx","MessagesFormProvider","jsxs","JsonImport","Button","MessagesTabs","MessagesTree","key","MessageField","cn"],"mappings":";;;;;;;;;;;;;;AAiCO,SAASA,EAAa;AAAA,EAC3B,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,QAAAC;AAAA,EACA,aAAAC;AACF,GAAuC;AACrC,QAAM,EAAE,YAAAC,EAAA,IAAeC,EAAA;AACvB,EAAAC,EAAU,MAAM;AACd,IAAAF,EAAW,CAAC,EAAE,OAAO,iBAAiB,KAAK,QAAA,CAAS,CAAC;AAAA,EACvD,GAAG,CAACA,CAAU,CAAC;AAEf,QAAMG,IAAOC,EAAoB;AAAA,IAC/B,eAAeN;AAAA,IACf,gBAAgB;AAAA,EAAA,CACjB,GACK,CAACO,GAAWC,CAAY,IAAIC,EAAS,OAAO,KAAKX,CAAM,EAAE,CAAC,CAAC,GAE3DY,IAAe,OAAOC,MAA8B;AACxD,UAAMC,IAAUC,EAAM,QAAQ,WAAW,GACnCC,IAAU,OAAO,QAAQH,CAAa,EAAE,OAE5C,CAACI,GAAK,CAACC,GAAQC,CAAK,MACAC,EAAQD,GAAOjB,EAAOgB,CAAM,CAAC,IAExCD,IAEF;AAAA,MACL,GAAGA;AAAA,MACH,CAACC,CAAM,GAAGC;AAAA,IAAA,GAEX,CAAA,CAAE;AAEL,QAAI;AACF,YAAME,IAAW,MAAM,MAAMlB,GAAa;AAAA,QACxC,QAAQ;AAAA,QACR,SAAS;AAAA,UACP,gBAAgB;AAAA,QAAA;AAAA,QAElB,MAAM,KAAK,UAAUa,CAAO;AAAA,MAAA,CAC7B;AAED,UAAI,CAACK,EAAS,IAAI;AAChB,cAAMC,IAAQ,MAAMC,EAAgBF,CAAQ;AAC5C,cAAM,IAAI,MAAMC,CAAK;AAAA,MACvB;AAEA,MAAAf,EAAK,MAAMM,CAAa,GACxBE,EAAM,QAAQ,SAAS,EAAE,IAAID,GAAS;AAAA,IACxC,SAASQ,GAAO;AACd,MAAAP,EAAM;AAAA,QACJ,mBAAmBO,aAAiB,QAAQA,EAAM,UAAU,eAAe;AAAA,QAC3E,EAAE,IAAIR,EAAA;AAAA,MAAQ;AAAA,IAElB;AAAA,EACF;AAEA,SACE,gBAAAU,EAACC,GAAA,EAAqB,MAAAlB,GAAY,SAAAR,GAChC,UAAA,gBAAA2B;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,UAAUnB,EAAK,aAAaK,CAAY;AAAA,MAExC,UAAA;AAAA,QAAA,gBAAAc,EAAC,OAAA,EAAI,WAAU,mCACb,UAAA;AAAA,UAAA,gBAAAA,EAAC,UAAA,EAAO,WAAU,gDAChB,UAAA;AAAA,YAAA,gBAAAF,EAAC,MAAA,EAAG,WAAU,YAAW,UAAA,YAAQ;AAAA,YACjC,gBAAAE,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,cAAA,gBAAAF,EAACG,GAAA,EAAW;AAAA,cACZ,gBAAAH;AAAA,gBAACI;AAAA,gBAAA;AAAA,kBACC,WAAU;AAAA,kBACV,MAAK;AAAA,kBACL,UAAU,CAACrB,EAAK,UAAU;AAAA,kBAC3B,UAAA;AAAA,gBAAA;AAAA,cAAA;AAAA,YAED,EAAA,CACF;AAAA,UAAA,GACF;AAAA,UAECN,KACC,gBAAAuB;AAAA,YAACK;AAAA,YAAA;AAAA,cACC,QAAA7B;AAAA,cACA,WAAAS;AAAA,cACA,cAAAC;AAAA,YAAA;AAAA,UAAA;AAAA,QACF,GAEJ;AAAA,QAEA,gBAAAgB;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,IAAG;AAAA,YACH,WAAU;AAAA,YAET,UAAA;AAAA,cAAA,CAACzB,KAAQ,gBAAAuB,EAACM,GAAA,EAAa,MAAK,IAAG,QAAA9B,GAAgB,cAAc,GAAG;AAAA,cAChEC,KACC,OAAO,QAAQD,CAAM,EAAE,IAAI,CAAC,CAAC+B,GAAKZ,CAAK,MACjC,OAAOA,KAAU,WAEjB,gBAAAK;AAAA,gBAACQ;AAAA,gBAAA;AAAA,kBACC,QAAQb;AAAA,kBAER,WAAWc,EAAG,EAAE,QAAQxB,MAAcsB,GAAK;AAAA,kBAC3C,YAAYA;AAAA,kBACZ,MAAMA;AAAA,gBAAA;AAAA,gBAHDA;AAAA,cAAA,IAQT,gBAAAP;AAAA,gBAACM;AAAA,gBAAA;AAAA,kBACC,WAAWG,EAAG,EAAE,QAAQxB,MAAcsB,GAAK;AAAA,kBAE3C,MAAMA;AAAA,kBACN,QAAQZ;AAAA,kBACR,cAAc;AAAA,gBAAA;AAAA,gBAHTY;AAAA,cAAA,CAMV;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACL;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { FieldLabel as
|
|
3
|
-
import { cn as
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { FieldLabel as m } from "@payloadcms/ui";
|
|
3
|
+
import { cn as o } from "../../utils/cn.js";
|
|
4
4
|
function c({
|
|
5
5
|
label: r,
|
|
6
|
-
error:
|
|
7
|
-
className:
|
|
8
|
-
children:
|
|
6
|
+
error: l,
|
|
7
|
+
className: t,
|
|
8
|
+
children: i
|
|
9
9
|
}) {
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ s("div", { className: o("flex flex-col gap-1 h-full min-w-5", t), children: [
|
|
11
|
+
/* @__PURE__ */ s(
|
|
12
12
|
"fieldset",
|
|
13
13
|
{
|
|
14
|
-
className:
|
|
15
|
-
"border-error bg-error":
|
|
14
|
+
className: o("mx-0 rounded-md flex-1 focus-within:border-elevation-400", {
|
|
15
|
+
"border-error bg-error": l
|
|
16
16
|
}),
|
|
17
17
|
children: [
|
|
18
|
-
r && /* @__PURE__ */ e("legend", { className: "-ml-2 px-1.5 text-base", children: /* @__PURE__ */ e(
|
|
19
|
-
|
|
18
|
+
r && /* @__PURE__ */ e("legend", { className: "-ml-2 px-1.5 text-base", children: /* @__PURE__ */ e(m, { label: r }) }),
|
|
19
|
+
i
|
|
20
20
|
]
|
|
21
21
|
}
|
|
22
22
|
),
|
|
23
|
-
/* @__PURE__ */ e("p", { className: "text-base text-error", children:
|
|
23
|
+
/* @__PURE__ */ e("p", { className: "text-base text-error", children: l?.message })
|
|
24
24
|
] });
|
|
25
25
|
}
|
|
26
26
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputWrapper.js","sources":["../../../src/components/inputs/InputWrapper.tsx"],"sourcesContent":["import type { FieldError } from \"react-hook-form\";\nimport { FieldLabel } from \"@payloadcms/ui\";\n\nimport { cn } from \"@/utils/cn\";\n\nexport interface InputWrapperProps {\n label?: string;\n error: FieldError | undefined;\n className?: string;\n}\n\nexport function InputWrapper({\n label,\n error,\n className,\n children,\n}: React.PropsWithChildren<InputWrapperProps>) {\n return (\n <div className={cn(\"flex flex-col gap-1\", className)}>\n <fieldset\n className={cn(\"mx-0 rounded-md focus-within:border-elevation-400\", {\n \"border-error bg-error\": error,\n })}\n >\n {label && (\n <legend className=\"-ml-2 px-1.5 text-base\">\n <FieldLabel label={label} />\n </legend>\n )}\n {children}\n </fieldset>\n <p className=\"text-base text-error\">{error?.message}</p>\n </div>\n );\n}\n"],"names":["InputWrapper","label","error","className","children","cn","jsxs","jsx","FieldLabel"],"mappings":";;;AAWO,SAASA,EAAa;AAAA,EAC3B,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AACF,GAA+C;AAC7C,2BACG,OAAA,EAAI,WAAWC,EAAG,
|
|
1
|
+
{"version":3,"file":"InputWrapper.js","sources":["../../../src/components/inputs/InputWrapper.tsx"],"sourcesContent":["import type { FieldError } from \"react-hook-form\";\nimport { FieldLabel } from \"@payloadcms/ui\";\n\nimport { cn } from \"@/utils/cn\";\n\nexport interface InputWrapperProps {\n label?: string;\n error: FieldError | undefined;\n className?: string;\n}\n\nexport function InputWrapper({\n label,\n error,\n className,\n children,\n}: React.PropsWithChildren<InputWrapperProps>) {\n return (\n <div className={cn(\"flex flex-col gap-1 h-full min-w-5\", className)}>\n <fieldset\n className={cn(\"mx-0 rounded-md flex-1 focus-within:border-elevation-400\", {\n \"border-error bg-error\": error,\n })}\n >\n {label && (\n <legend className=\"-ml-2 px-1.5 text-base\">\n <FieldLabel label={label} />\n </legend>\n )}\n {children}\n </fieldset>\n <p className=\"text-base text-error\">{error?.message}</p>\n </div>\n );\n}\n"],"names":["InputWrapper","label","error","className","children","cn","jsxs","jsx","FieldLabel"],"mappings":";;;AAWO,SAASA,EAAa;AAAA,EAC3B,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AACF,GAA+C;AAC7C,2BACG,OAAA,EAAI,WAAWC,EAAG,sCAAsCF,CAAS,GAChE,UAAA;AAAA,IAAA,gBAAAG;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWD,EAAG,4DAA4D;AAAA,UACxE,yBAAyBH;AAAA,QAAA,CAC1B;AAAA,QAEA,UAAA;AAAA,UAAAD,uBACE,UAAA,EAAO,WAAU,0BAChB,UAAA,gBAAAM,EAACC,GAAA,EAAW,OAAAP,GAAc,EAAA,CAC5B;AAAA,UAEDG;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAEH,gBAAAG,EAAC,KAAA,EAAE,WAAU,wBAAwB,aAAO,QAAA,CAAQ;AAAA,EAAA,GACtD;AAEJ;"}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
+
import { DefaultNodeTypes, TypedEditorState } from '@payloadcms/richtext-lexical';
|
|
2
|
+
import { SerializedEditorState } from '@payloadcms/richtext-lexical/lexical';
|
|
1
3
|
import { InputWrapperProps } from './InputWrapper';
|
|
2
4
|
export interface LexicalInputProps extends InputWrapperProps {
|
|
3
|
-
value: string;
|
|
4
5
|
lang: string;
|
|
6
|
+
value: string;
|
|
5
7
|
onChange: (value: string) => void;
|
|
6
8
|
onBlur: () => void;
|
|
7
9
|
}
|
|
8
10
|
export declare function LexicalInput({ error, label, value, onChange, className, }: LexicalInputProps): React.ReactNode;
|
|
11
|
+
interface UseHtmlLexicalAdapterProps {
|
|
12
|
+
html: string;
|
|
13
|
+
onChange: (html: string) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function useHtmlLexicalAdapter({ html, onChange, }: UseHtmlLexicalAdapterProps): {
|
|
16
|
+
value: TypedEditorState<DefaultNodeTypes>;
|
|
17
|
+
setValue: (serializedState: SerializedEditorState) => void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -1,60 +1,90 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { $generateNodesFromDOM as
|
|
3
|
-
import { defaultEditorFeatures as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
className: l
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { $generateNodesFromDOM as p, $generateHtmlFromNodes as f } from "@lexical/html";
|
|
3
|
+
import { defaultEditorFeatures as g, defaultEditorConfig as E } from "@payloadcms/richtext-lexical";
|
|
4
|
+
import { sanitizeClientEditorConfig as S, RenderLexical as h, getEnabledNodes as x } from "@payloadcms/richtext-lexical/client";
|
|
5
|
+
import { $getRoot as v } from "@payloadcms/richtext-lexical/lexical";
|
|
6
|
+
import { createHeadlessEditor as C } from "@payloadcms/richtext-lexical/lexical/headless";
|
|
7
|
+
import { useRef as F, useCallback as c, useMemo as T } from "react";
|
|
8
|
+
import { InputWrapper as b } from "./InputWrapper.js";
|
|
9
|
+
function A({
|
|
10
|
+
error: r,
|
|
11
|
+
label: o,
|
|
12
|
+
value: n,
|
|
13
|
+
onChange: i,
|
|
14
|
+
className: s
|
|
16
15
|
}) {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
const a = M({
|
|
17
|
+
html: n,
|
|
18
|
+
onChange: i
|
|
19
|
+
});
|
|
20
|
+
return /* @__PURE__ */ l(b, { label: o, error: r, className: s, children: /* @__PURE__ */ l(
|
|
21
|
+
h,
|
|
20
22
|
{
|
|
21
23
|
field: {
|
|
22
24
|
name: "myCustomEditor",
|
|
23
25
|
label: !1,
|
|
24
26
|
type: "richText"
|
|
25
27
|
},
|
|
26
|
-
value:
|
|
27
|
-
setValue: (
|
|
28
|
-
const o = g({ data: n });
|
|
29
|
-
s(o);
|
|
30
|
-
},
|
|
28
|
+
value: a.value,
|
|
29
|
+
setValue: (e) => a.setValue(e),
|
|
31
30
|
schemaPath: "global.intl-plugin.editorTemplate"
|
|
32
31
|
}
|
|
33
32
|
) });
|
|
34
33
|
}
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
const y = {
|
|
35
|
+
root: {
|
|
36
|
+
children: [
|
|
37
|
+
{
|
|
38
|
+
children: [],
|
|
39
|
+
direction: null,
|
|
40
|
+
textFormat: 0,
|
|
41
|
+
format: "left",
|
|
42
|
+
indent: 0,
|
|
43
|
+
type: "paragraph",
|
|
44
|
+
version: 1
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
direction: null,
|
|
48
|
+
format: "",
|
|
49
|
+
indent: 0,
|
|
50
|
+
type: "root",
|
|
51
|
+
version: 1
|
|
52
|
+
}
|
|
53
|
+
}, H = S(
|
|
54
|
+
// @ts-expect-error - it works
|
|
55
|
+
g,
|
|
56
|
+
E
|
|
57
|
+
);
|
|
58
|
+
function M({
|
|
59
|
+
html: r,
|
|
60
|
+
onChange: o
|
|
61
|
+
}) {
|
|
62
|
+
const n = F(
|
|
63
|
+
C({
|
|
64
|
+
nodes: x({
|
|
65
|
+
editorConfig: H
|
|
66
|
+
})
|
|
43
67
|
})
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
() => {
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
68
|
+
), i = c((e) => {
|
|
69
|
+
const t = n.current;
|
|
70
|
+
return t.update(() => {
|
|
71
|
+
const m = new DOMParser().parseFromString(e, "text/html"), u = p(t, m);
|
|
72
|
+
v().clear().append(...u);
|
|
73
|
+
}, { discrete: !0 }), t.getEditorState().toJSON();
|
|
74
|
+
}, []), s = T(() => {
|
|
75
|
+
const e = i(r);
|
|
76
|
+
return e.root.children.length === 0 ? y : e;
|
|
77
|
+
}, [r, i]), a = c((e) => {
|
|
78
|
+
const t = n.current;
|
|
79
|
+
t.setEditorState(t.parseEditorState(e)), t.read(() => {
|
|
80
|
+
const d = f(t);
|
|
81
|
+
d !== r && o(d);
|
|
82
|
+
});
|
|
83
|
+
}, [r, o]);
|
|
84
|
+
return { value: s, setValue: a };
|
|
85
|
+
}
|
|
57
86
|
export {
|
|
58
|
-
|
|
87
|
+
A as LexicalInput,
|
|
88
|
+
M as useHtmlLexicalAdapter
|
|
59
89
|
};
|
|
60
90
|
//# sourceMappingURL=LexicalInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LexicalInput.js","sources":["../../../src/components/inputs/LexicalInput.tsx"],"sourcesContent":["import type {\n DefaultNodeTypes,\n TypedEditorState,\n} from \"@payloadcms/richtext-lexical\";\nimport { $generateNodesFromDOM } from \"@lexical/html\";\nimport {\n defaultEditorConfig,\n defaultEditorFeatures,\n} from \"@payloadcms/richtext-lexical\";\nimport {\n getEnabledNodes,\n RenderLexical,\n sanitizeClientEditorConfig,\n} from \"@payloadcms/richtext-lexical/client\";\nimport {
|
|
1
|
+
{"version":3,"file":"LexicalInput.js","sources":["../../../src/components/inputs/LexicalInput.tsx"],"sourcesContent":["import type {\n DefaultNodeTypes,\n TypedEditorState,\n} from \"@payloadcms/richtext-lexical\";\nimport { $generateHtmlFromNodes, $generateNodesFromDOM } from \"@lexical/html\";\nimport {\n defaultEditorConfig,\n defaultEditorFeatures,\n} from \"@payloadcms/richtext-lexical\";\nimport {\n getEnabledNodes,\n RenderLexical,\n sanitizeClientEditorConfig,\n} from \"@payloadcms/richtext-lexical/client\";\nimport { $getRoot, type SerializedEditorState } from \"@payloadcms/richtext-lexical/lexical\";\nimport { createHeadlessEditor } from \"@payloadcms/richtext-lexical/lexical/headless\";\nimport { useCallback, useMemo, useRef } from \"react\";\n\nimport type { InputWrapperProps } from \"./InputWrapper\";\nimport { InputWrapper } from \"./InputWrapper\";\n\nexport interface LexicalInputProps extends InputWrapperProps {\n lang: string;\n value: string;\n onChange: (value: string) => void;\n onBlur: () => void;\n}\n\nexport function LexicalInput({\n error,\n label,\n value,\n onChange,\n className,\n}: LexicalInputProps): React.ReactNode {\n const editor = useHtmlLexicalAdapter({\n html:value,\n onChange,\n });\n\n return (\n <InputWrapper label={label} error={error} className={className}>\n <RenderLexical\n field={{\n name: \"myCustomEditor\",\n label: false,\n type: \"richText\",\n }}\n value={editor.value}\n setValue={(val) => editor.setValue(val as SerializedEditorState)}\n schemaPath=\"global.intl-plugin.editorTemplate\"\n />\n </InputWrapper>\n );\n}\n\nconst EMPTY_STATE: TypedEditorState<DefaultNodeTypes> = {\n root: {\n children: [\n {\n children: [],\n direction: null,\n textFormat: 0,\n format: \"left\",\n indent: 0,\n type: \"paragraph\",\n version: 1,\n },\n ],\n direction: null,\n format: \"\",\n indent: 0,\n type: \"root\",\n version: 1,\n },\n};\n\n\nconst editorConfig = sanitizeClientEditorConfig(\n // @ts-expect-error - it works\n defaultEditorFeatures,\n defaultEditorConfig,\n);\n\ninterface UseHtmlLexicalAdapterProps {\n html: string;\n onChange: (html: string) => void;\n}\n\n\nexport function useHtmlLexicalAdapter({ \n html, \n onChange, \n}: UseHtmlLexicalAdapterProps) {\n // 1. Maintain a persistent headless editor for conversion\n const headlessEditor = useRef(\n createHeadlessEditor({\n nodes:getEnabledNodes({\n editorConfig,\n }),\n })\n );\n\n // 2. HTML -> SerializedState\n const getSerializedState = useCallback((htmlString: string): SerializedEditorState => {\n const editor = headlessEditor.current;\n editor.update(() => {\n const parser = new DOMParser();\n const dom = parser.parseFromString(htmlString, \"text/html\");\n const nodes = $generateNodesFromDOM(editor, dom);\n \n const root = $getRoot();\n root.clear().append(...nodes);\n }, { discrete: true });\n\n return editor.getEditorState().toJSON();\n }, []);\n\n // 3. Memoize the initial value to prevent unnecessary re-renders\n const value = useMemo(() => {\n\n const serializedState = getSerializedState(html)\n\n if (serializedState.root.children.length === 0) {\n return EMPTY_STATE;\n }\n\n return serializedState;\n\n\n }, [html, getSerializedState]);\n\n // 4. SerializedState -> HTML\n const setValue = useCallback((serializedState: SerializedEditorState) => {\n const editor = headlessEditor.current;\n \n // Update headless editor to match the incoming state\n editor.setEditorState(editor.parseEditorState(serializedState));\n \n // Generate HTML and broadcast if it has changed\n editor.read(() => {\n const newHtml = $generateHtmlFromNodes(editor);\n if (newHtml !== html) {\n onChange(newHtml);\n }\n });\n }, [html, onChange]);\n\n return { value: value as TypedEditorState<DefaultNodeTypes>, setValue };\n}\n\n\n\n"],"names":["LexicalInput","error","label","value","onChange","className","editor","useHtmlLexicalAdapter","jsx","InputWrapper","RenderLexical","val","EMPTY_STATE","editorConfig","sanitizeClientEditorConfig","defaultEditorFeatures","defaultEditorConfig","html","headlessEditor","useRef","createHeadlessEditor","getEnabledNodes","getSerializedState","useCallback","htmlString","dom","nodes","$generateNodesFromDOM","$getRoot","useMemo","serializedState","setValue","newHtml","$generateHtmlFromNodes"],"mappings":";;;;;;;;AA4BO,SAASA,EAAa;AAAA,EAC3B,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,GAAuC;AACrC,QAAMC,IAASC,EAAsB;AAAA,IACnC,MAAKJ;AAAA,IACL,UAAAC;AAAA,EAAA,CACD;AAED,SACE,gBAAAI,EAACC,GAAA,EAAa,OAAAP,GAAc,OAAAD,GAAc,WAAAI,GACxC,UAAA,gBAAAG;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,MAAM;AAAA,QACN,OAAO;AAAA,QACP,MAAM;AAAA,MAAA;AAAA,MAER,OAAOJ,EAAO;AAAA,MACd,UAAU,CAACK,MAAQL,EAAO,SAASK,CAA4B;AAAA,MAC/D,YAAW;AAAA,IAAA;AAAA,EAAA,GAEf;AAEJ;AAEA,MAAMC,IAAkD;AAAA,EACtD,MAAM;AAAA,IACJ,UAAU;AAAA,MACR;AAAA,QACE,UAAU,CAAA;AAAA,QACV,WAAW;AAAA,QACX,YAAY;AAAA,QACZ,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEb,GAGMC,IAAeC;AAAA;AAAA,EAEnBC;AAAA,EACAC;AACF;AAQO,SAAST,EAAsB;AAAA,EACpC,MAAAU;AAAA,EACA,UAAAb;AACF,GAA+B;AAE7B,QAAMc,IAAiBC;AAAA,IACrBC,EAAqB;AAAA,MACnB,OAAMC,EAAgB;AAAA,QACpB,cAAAR;AAAA,MAAA,CACD;AAAA,IAAA,CACF;AAAA,EAAA,GAIGS,IAAqBC,EAAY,CAACC,MAA8C;AACpF,UAAMlB,IAASY,EAAe;AAC9B,WAAAZ,EAAO,OAAO,MAAM;AAElB,YAAMmB,IADS,IAAI,UAAA,EACA,gBAAgBD,GAAY,WAAW,GACpDE,IAAQC,EAAsBrB,GAAQmB,CAAG;AAG/C,MADaG,EAAA,EACR,MAAA,EAAQ,OAAO,GAAGF,CAAK;AAAA,IAC9B,GAAG,EAAE,UAAU,IAAM,GAEdpB,EAAO,eAAA,EAAiB,OAAA;AAAA,EACjC,GAAG,CAAA,CAAE,GAGCH,IAAQ0B,EAAQ,MAAM;AAE1B,UAAMC,IAAkBR,EAAmBL,CAAI;AAE/C,WAAIa,EAAgB,KAAK,SAAS,WAAW,IACpClB,IAGFkB;AAAA,EAGT,GAAG,CAACb,GAAMK,CAAkB,CAAC,GAGvBS,IAAWR,EAAY,CAACO,MAA2C;AACvE,UAAMxB,IAASY,EAAe;AAG9B,IAAAZ,EAAO,eAAeA,EAAO,iBAAiBwB,CAAe,CAAC,GAG9DxB,EAAO,KAAK,MAAM;AAChB,YAAM0B,IAAUC,EAAuB3B,CAAM;AAC7C,MAAI0B,MAAYf,KACdb,EAAS4B,CAAO;AAAA,IAEpB,CAAC;AAAA,EACH,GAAG,CAACf,GAAMb,CAAQ,CAAC;AAEnB,SAAO,EAAE,OAAAD,GAAoD,UAAA4B,EAAA;AAC/D;"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { useMessagesForm as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { parseMessageSchema as
|
|
1
|
+
import { jsxs as f, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as p } from "react";
|
|
3
|
+
import { useMessagesForm as d } from "../../context/messages-form.js";
|
|
4
|
+
import { cn as n } from "../../utils/cn.js";
|
|
5
|
+
import { parseMessageSchema as v } from "../../utils/schema.js";
|
|
6
6
|
import { createValidator as x } from "../../utils/validate.js";
|
|
7
|
-
import { MessageController as
|
|
7
|
+
import { MessageController as c } from "../MessageController.js";
|
|
8
8
|
function w({
|
|
9
|
-
schema:
|
|
9
|
+
schema: o,
|
|
10
10
|
messageKey: s,
|
|
11
11
|
path: t,
|
|
12
12
|
className: l
|
|
13
13
|
}) {
|
|
14
|
-
const { locales: r } =
|
|
14
|
+
const { locales: r } = d(), e = p(() => v(o), [o]), m = p(
|
|
15
15
|
() => x(e.variables),
|
|
16
16
|
[e.variables]
|
|
17
17
|
);
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
e.description && /* @__PURE__ */
|
|
20
|
-
r.length === 1 ? /* @__PURE__ */
|
|
21
|
-
|
|
18
|
+
return /* @__PURE__ */ f("div", { className: n("", l), children: [
|
|
19
|
+
e.description && /* @__PURE__ */ i("p", { children: e.description }),
|
|
20
|
+
r.length === 1 ? /* @__PURE__ */ i(
|
|
21
|
+
c,
|
|
22
22
|
{
|
|
23
23
|
className: l,
|
|
24
24
|
type: e.type,
|
|
@@ -27,18 +27,21 @@ function w({
|
|
|
27
27
|
name: [r[0], t, s].join("."),
|
|
28
28
|
validate: m
|
|
29
29
|
}
|
|
30
|
-
) : /* @__PURE__ */
|
|
31
|
-
|
|
30
|
+
) : /* @__PURE__ */ i("div", { className: n("-mx-3 flex min-w-0 gap-4 px-3", {
|
|
31
|
+
"overflow-x-auto": e.type === "icu",
|
|
32
|
+
"flex-col": e.type === "rich"
|
|
33
|
+
}), children: r.map((a) => /* @__PURE__ */ i(
|
|
34
|
+
c,
|
|
32
35
|
{
|
|
33
36
|
className: "flex-1",
|
|
34
37
|
type: e.type,
|
|
35
|
-
label:
|
|
36
|
-
locale:
|
|
38
|
+
label: a.toUpperCase(),
|
|
39
|
+
locale: a,
|
|
37
40
|
variables: e.variables,
|
|
38
|
-
name: [
|
|
41
|
+
name: [a, t, s].join("."),
|
|
39
42
|
validate: m
|
|
40
43
|
},
|
|
41
|
-
|
|
44
|
+
a
|
|
42
45
|
)) })
|
|
43
46
|
] });
|
|
44
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageField.js","sources":["../../../src/components/layout/MessageField.tsx"],"sourcesContent":["import type { MessageSchema } from \"@/types\";\nimport { useMemo } from \"react\";\n\nimport { useMessagesForm } from \"@/context/messages-form\";\nimport { cn } from \"@/utils/cn\";\nimport { toWords } from \"@/utils/format\";\nimport { parseMessageSchema } from \"@/utils/schema\";\nimport { createValidator } from \"@/utils/validate\";\n\nimport { LexicalInput } from \"../inputs/LexicalInput\";\nimport { MessageController } from \"../MessageController\";\n\ninterface MessageFieldProps {\n schema: MessageSchema;\n messageKey: string;\n path: string;\n className?: string;\n}\n\nexport function MessageField({\n schema,\n messageKey,\n path,\n className,\n}: MessageFieldProps): React.ReactNode {\n const { locales } = useMessagesForm();\n\n const config = useMemo(() => parseMessageSchema(schema), [schema]);\n\n const validator = useMemo(\n () => createValidator(config.variables),\n [config.variables],\n );\n\n return (\n <div className={cn(\"\", className)}>\n {config.description && <p>{config.description}</p>}\n\n {locales.length === 1 ? (\n <MessageController\n className={className}\n type={config.type}\n variables={config.variables}\n locale={locales[0]}\n name={[locales[0], path, messageKey].join(\".\")}\n validate={validator}\n />\n ) : (\n <div className
|
|
1
|
+
{"version":3,"file":"MessageField.js","sources":["../../../src/components/layout/MessageField.tsx"],"sourcesContent":["import type { MessageSchema } from \"@/types\";\nimport { useMemo } from \"react\";\n\nimport { useMessagesForm } from \"@/context/messages-form\";\nimport { cn } from \"@/utils/cn\";\nimport { toWords } from \"@/utils/format\";\nimport { parseMessageSchema } from \"@/utils/schema\";\nimport { createValidator } from \"@/utils/validate\";\n\nimport { LexicalInput } from \"../inputs/LexicalInput\";\nimport { MessageController } from \"../MessageController\";\n\ninterface MessageFieldProps {\n schema: MessageSchema;\n messageKey: string;\n path: string;\n className?: string;\n}\n\nexport function MessageField({\n schema,\n messageKey,\n path,\n className,\n}: MessageFieldProps): React.ReactNode {\n const { locales } = useMessagesForm();\n\n const config = useMemo(() => parseMessageSchema(schema), [schema]);\n\n const validator = useMemo(\n () => createValidator(config.variables),\n [config.variables],\n );\n\n return (\n <div className={cn(\"\", className)}>\n {config.description && <p>{config.description}</p>}\n\n {locales.length === 1 ? (\n <MessageController\n className={className}\n type={config.type}\n variables={config.variables}\n locale={locales[0]}\n name={[locales[0], path, messageKey].join(\".\")}\n validate={validator}\n />\n ) : (\n <div className={cn(\"-mx-3 flex min-w-0 gap-4 px-3\", {\n \"overflow-x-auto\": config.type === \"icu\",\n \"flex-col\": config.type === \"rich\",\n })}>\n {locales.map((locale) => (\n <MessageController\n key={locale}\n className=\"flex-1\"\n type={config.type}\n label={locale.toUpperCase()}\n locale={locale}\n variables={config.variables}\n name={[locale, path, messageKey].join(\".\")}\n validate={validator}\n />\n ))}\n </div>\n )}\n </div>\n );\n}\n"],"names":["MessageField","schema","messageKey","path","className","locales","useMessagesForm","config","useMemo","parseMessageSchema","validator","createValidator","cn","jsx","MessageController","locale"],"mappings":";;;;;;;AAmBO,SAASA,EAAa;AAAA,EAC3B,QAAAC;AAAA,EACA,YAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AACF,GAAuC;AACrC,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEdC,IAASC,EAAQ,MAAMC,EAAmBR,CAAM,GAAG,CAACA,CAAM,CAAC,GAE3DS,IAAYF;AAAA,IAChB,MAAMG,EAAgBJ,EAAO,SAAS;AAAA,IACtC,CAACA,EAAO,SAAS;AAAA,EAAA;AAGnB,2BACG,OAAA,EAAI,WAAWK,EAAG,IAAIR,CAAS,GAC7B,UAAA;AAAA,IAAAG,EAAO,eAAe,gBAAAM,EAAC,KAAA,EAAG,UAAAN,EAAO,aAAY;AAAA,IAE7CF,EAAQ,WAAW,IAClB,gBAAAQ;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,WAAAV;AAAA,QACA,MAAMG,EAAO;AAAA,QACb,WAAWA,EAAO;AAAA,QAClB,QAAQF,EAAQ,CAAC;AAAA,QACjB,MAAM,CAACA,EAAQ,CAAC,GAAGF,GAAMD,CAAU,EAAE,KAAK,GAAG;AAAA,QAC7C,UAAUQ;AAAA,MAAA;AAAA,IAAA,IAGZ,gBAAAG,EAAC,OAAA,EAAI,WAAWD,EAAG,iCAAiC;AAAA,MAClD,mBAAmBL,EAAO,SAAS;AAAA,MACnC,YAAYA,EAAO,SAAS;AAAA,IAAA,CAC7B,GACE,UAAAF,EAAQ,IAAI,CAACU,MACZ,gBAAAF;AAAA,MAACC;AAAA,MAAA;AAAA,QAEC,WAAU;AAAA,QACV,MAAMP,EAAO;AAAA,QACb,OAAOQ,EAAO,YAAA;AAAA,QACd,QAAAA;AAAA,QACA,WAAWR,EAAO;AAAA,QAClB,MAAM,CAACQ,GAAQZ,GAAMD,CAAU,EAAE,KAAK,GAAG;AAAA,QACzC,UAAUQ;AAAA,MAAA;AAAA,MAPLK;AAAA,IAAA,CASR,EAAA,CACH;AAAA,EAAA,GAEJ;AAEJ;"}
|
package/dist/exports/view.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import d from "path";
|
|
1
|
+
import { jsxs as g, jsx as i } from "react/jsx-runtime";
|
|
3
2
|
import { DefaultTemplate as h } from "@payloadcms/next/templates";
|
|
4
|
-
import { Gutter as
|
|
5
|
-
import { redirect as
|
|
6
|
-
import { Toaster as
|
|
7
|
-
import { sanitizeMessages as
|
|
8
|
-
import { MessagesForm as
|
|
9
|
-
import { fetchMessages as
|
|
10
|
-
async function
|
|
11
|
-
access:
|
|
3
|
+
import { Gutter as u } from "@payloadcms/ui";
|
|
4
|
+
import { redirect as v, RedirectType as A } from "next/navigation";
|
|
5
|
+
import { Toaster as M } from "sonner";
|
|
6
|
+
import { sanitizeMessages as q } from "../utils/sanitize.js";
|
|
7
|
+
import { MessagesForm as w } from "../components/MessagesForm.js";
|
|
8
|
+
import { fetchMessages as x } from "../requests/fetchMessages.js";
|
|
9
|
+
async function z({
|
|
10
|
+
access: c,
|
|
12
11
|
initPageResult: e,
|
|
13
|
-
locales:
|
|
12
|
+
locales: t,
|
|
14
13
|
params: p,
|
|
15
|
-
payload:
|
|
16
|
-
schema:
|
|
17
|
-
searchParams:
|
|
18
|
-
tabs:
|
|
14
|
+
payload: r,
|
|
15
|
+
schema: n,
|
|
16
|
+
searchParams: f,
|
|
17
|
+
tabs: a = !1
|
|
19
18
|
}) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
const o = r.getAPIURL(), l = o.endsWith("/") ? `${o}intl-plugin` : `${o}/intl-plugin`;
|
|
20
|
+
await c(e.req) || v(r.getAdminURL(), A.replace);
|
|
21
|
+
const m = {};
|
|
22
|
+
for (const s of t) {
|
|
23
|
+
const d = await x(r, s);
|
|
24
|
+
m[s] = q(n, d);
|
|
25
25
|
}
|
|
26
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ g(
|
|
27
27
|
h,
|
|
28
28
|
{
|
|
29
29
|
i18n: e.req.i18n,
|
|
@@ -31,27 +31,27 @@ async function D({
|
|
|
31
31
|
params: p,
|
|
32
32
|
payload: e.req.payload,
|
|
33
33
|
permissions: e.permissions,
|
|
34
|
-
searchParams:
|
|
34
|
+
searchParams: f,
|
|
35
35
|
user: e.req.user || void 0,
|
|
36
|
-
viewActions:
|
|
36
|
+
viewActions: r.config.admin.components.actions.filter((s) => typeof s != "object" ? !0 : s.exportName !== "MessagesLink"),
|
|
37
37
|
visibleEntities: e.visibleEntities,
|
|
38
38
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
39
|
+
/* @__PURE__ */ i(u, { children: /* @__PURE__ */ i(
|
|
40
|
+
w,
|
|
41
41
|
{
|
|
42
|
-
locales:
|
|
43
|
-
schema:
|
|
44
|
-
tabs:
|
|
45
|
-
values:
|
|
46
|
-
endpointUrl:
|
|
42
|
+
locales: t,
|
|
43
|
+
schema: n,
|
|
44
|
+
tabs: a,
|
|
45
|
+
values: m,
|
|
46
|
+
endpointUrl: l
|
|
47
47
|
}
|
|
48
48
|
) }),
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ i(M, { position: "top-right" })
|
|
50
50
|
]
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
export {
|
|
55
|
-
|
|
55
|
+
z as MessagesView
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=view.js.map
|
package/dist/exports/view.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.js","sources":["../../src/exports/view.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"view.js","sources":["../../src/exports/view.tsx"],"sourcesContent":["import type {\n DeepPartial,\n Locales,\n Messages,\n MessagesGuard,\n Translations,\n} from \"@/types\";\nimport type { AdminViewServerProps } from \"payload\";\nimport { DefaultTemplate } from \"@payloadcms/next/templates\";\nimport { Gutter } from \"@payloadcms/ui\";\nimport { redirect, RedirectType } from \"next/navigation\";\nimport { Toaster } from \"sonner\";\n\nimport { sanitizeMessages } from \"@/utils/sanitize\";\n\nimport { MessagesForm } from \"../components/MessagesForm\";\nimport { fetchMessages } from \"../requests/fetchMessages\";\n\nexport interface MessagesViewProps {\n locales: Locales;\n schema: Messages;\n tabs: boolean | undefined;\n access: MessagesGuard;\n}\n\nexport async function MessagesView({\n access,\n initPageResult,\n locales,\n params,\n payload,\n schema,\n searchParams,\n tabs = false,\n}: AdminViewServerProps & MessagesViewProps) {\n const apiUrl = payload.getAPIURL();\n const endpointUrl = apiUrl.endsWith(\"/\")\n ? `${apiUrl}intl-plugin`\n : `${apiUrl}/intl-plugin`;\n\n const hasAccess = await access(initPageResult.req);\n if (!hasAccess) redirect(payload.getAdminURL(), RedirectType.replace);\n\n const translations: Translations<DeepPartial<Messages>> = {};\n\n for (const locale of locales) {\n const messages = await fetchMessages(payload, locale);\n translations[locale] = sanitizeMessages(schema, messages);\n }\n return (\n <DefaultTemplate\n i18n={initPageResult.req.i18n}\n locale={initPageResult.locale}\n params={params}\n payload={initPageResult.req.payload}\n permissions={initPageResult.permissions}\n searchParams={searchParams}\n user={initPageResult.req.user || undefined}\n viewActions={payload.config.admin.components.actions.filter((action) => {\n if (typeof action !== \"object\") {\n return true;\n }\n return action.exportName !== \"MessagesLink\";\n })}\n visibleEntities={initPageResult.visibleEntities}\n >\n <Gutter>\n <MessagesForm\n locales={locales}\n schema={schema}\n tabs={tabs}\n values={translations}\n endpointUrl={endpointUrl}\n />\n </Gutter>\n <Toaster position=\"top-right\" />\n </DefaultTemplate>\n );\n}\n"],"names":["MessagesView","access","initPageResult","locales","params","payload","schema","searchParams","tabs","apiUrl","endpointUrl","redirect","RedirectType","translations","locale","messages","fetchMessages","sanitizeMessages","jsxs","DefaultTemplate","action","jsx","Gutter","MessagesForm","Toaster"],"mappings":";;;;;;;;AAyBA,eAAsBA,EAAa;AAAA,EACjC,QAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAAC,IAAO;AACT,GAA6C;AAC3C,QAAMC,IAASJ,EAAQ,UAAA,GACjBK,IAAcD,EAAO,SAAS,GAAG,IACnC,GAAGA,CAAM,gBACT,GAAGA,CAAM;AAGb,EADkB,MAAMR,EAAOC,EAAe,GAAG,KACjCS,EAASN,EAAQ,YAAA,GAAeO,EAAa,OAAO;AAEpE,QAAMC,IAAoD,CAAA;AAE1D,aAAWC,KAAUX,GAAS;AAC5B,UAAMY,IAAW,MAAMC,EAAcX,GAASS,CAAM;AACpD,IAAAD,EAAaC,CAAM,IAAIG,EAAiBX,GAAQS,CAAQ;AAAA,EAC1D;AACA,SACE,gBAAAG;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAMjB,EAAe,IAAI;AAAA,MACzB,QAAQA,EAAe;AAAA,MACvB,QAAAE;AAAA,MACA,SAASF,EAAe,IAAI;AAAA,MAC5B,aAAaA,EAAe;AAAA,MAC5B,cAAAK;AAAA,MACA,MAAML,EAAe,IAAI,QAAQ;AAAA,MACjC,aAAaG,EAAQ,OAAO,MAAM,WAAW,QAAQ,OAAO,CAACe,MACvD,OAAOA,KAAW,WACb,KAEFA,EAAO,eAAe,cAC9B;AAAA,MACD,iBAAiBlB,EAAe;AAAA,MAEhC,UAAA;AAAA,QAAA,gBAAAmB,EAACC,GAAA,EACC,UAAA,gBAAAD;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,SAAApB;AAAA,YACA,QAAAG;AAAA,YACA,MAAAE;AAAA,YACA,QAAQK;AAAA,YACR,aAAAH;AAAA,UAAA;AAAA,QAAA,GAEJ;AAAA,QACA,gBAAAW,EAACG,GAAA,EAAQ,UAAS,YAAA,CAAY;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGpC;"}
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
import { lexicalEditor as m } from "@payloadcms/richtext-lexical";
|
|
3
|
-
import { getMessagesEndpoint as
|
|
3
|
+
import { getMessagesEndpoint as o } from "./endpoints/get-messages.js";
|
|
4
4
|
import { setMessagesEndpoint as i } from "./endpoints/set-messages.js";
|
|
5
5
|
import { getSupportedLocales as u, attachPluginContext as c } from "./utils/config.js";
|
|
6
|
-
import { fetchMessages as
|
|
7
|
-
const
|
|
6
|
+
import { fetchMessages as C } from "./requests/fetchMessages.js";
|
|
7
|
+
const M = ({
|
|
8
8
|
schema: s,
|
|
9
9
|
tabs: a,
|
|
10
10
|
collectionSlug: t = "messages",
|
|
11
|
-
hooks:
|
|
12
|
-
editorAccess:
|
|
11
|
+
hooks: r,
|
|
12
|
+
editorAccess: n = (e) => e.user !== null
|
|
13
13
|
}) => (e) => {
|
|
14
14
|
const p = u(e.localization);
|
|
15
|
+
if (!e.serverURL)
|
|
16
|
+
throw new Error(
|
|
17
|
+
"serverURL is required in your payload.config.ts file for payload-intl to work."
|
|
18
|
+
);
|
|
15
19
|
return e.admin ??= {}, e.admin.components ??= {}, e.admin.components.actions ??= [], e.admin.components.actions.push({
|
|
16
20
|
exportName: "MessagesLink",
|
|
17
21
|
path: "payload-intl/rsc#MessagesLink"
|
|
@@ -21,7 +25,7 @@ const w = ({
|
|
|
21
25
|
Component: {
|
|
22
26
|
path: "payload-intl/rsc#MessagesView",
|
|
23
27
|
serverProps: {
|
|
24
|
-
access:
|
|
28
|
+
access: n,
|
|
25
29
|
locales: p,
|
|
26
30
|
schema: s,
|
|
27
31
|
tabs: a
|
|
@@ -53,7 +57,7 @@ const w = ({
|
|
|
53
57
|
access: {
|
|
54
58
|
read: () => !0
|
|
55
59
|
},
|
|
56
|
-
endpoints: [i,
|
|
60
|
+
endpoints: [i, o],
|
|
57
61
|
fields: [
|
|
58
62
|
{
|
|
59
63
|
name: "locale",
|
|
@@ -61,7 +65,7 @@ const w = ({
|
|
|
61
65
|
required: !0
|
|
62
66
|
}
|
|
63
67
|
],
|
|
64
|
-
hooks: h(
|
|
68
|
+
hooks: h(r),
|
|
65
69
|
indexes: [
|
|
66
70
|
{
|
|
67
71
|
fields: ["locale"]
|
|
@@ -70,23 +74,23 @@ const w = ({
|
|
|
70
74
|
upload: {
|
|
71
75
|
mimeTypes: ["application/json"]
|
|
72
76
|
}
|
|
73
|
-
}), e.endpoints ??= [], e.endpoints.push(
|
|
77
|
+
}), e.endpoints ??= [], e.endpoints.push(o), e.endpoints.push(i), e;
|
|
74
78
|
}, h = (s) => {
|
|
75
79
|
if (!s)
|
|
76
80
|
return;
|
|
77
81
|
const { afterUpdate: a, ...t } = s;
|
|
78
82
|
if (!a)
|
|
79
83
|
return t;
|
|
80
|
-
const
|
|
81
|
-
|
|
84
|
+
const r = async ({ operation: n }) => {
|
|
85
|
+
n === "update" && await a();
|
|
82
86
|
};
|
|
83
87
|
return {
|
|
84
88
|
...t,
|
|
85
|
-
afterChange: [...t.afterChange ?? [],
|
|
89
|
+
afterChange: [...t.afterChange ?? [], r]
|
|
86
90
|
};
|
|
87
91
|
};
|
|
88
92
|
export {
|
|
89
|
-
|
|
90
|
-
|
|
93
|
+
C as fetchMessages,
|
|
94
|
+
M as intlPlugin
|
|
91
95
|
};
|
|
92
96
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import \"./styles.css\";\n\nimport type {\n CollectionAfterChangeHook,\n CollectionConfig,\n Plugin,\n} from \"payload\";\nimport { lexicalEditor } from \"@payloadcms/richtext-lexical\";\n\nimport type { MessagesViewProps } from \"./exports/view\";\nimport type { MessagesPluginConfig } from \"./types.ts\";\nimport { getMessagesEndpoint } from \"./endpoints/get-messages\";\nimport { setMessagesEndpoint } from \"./endpoints/set-messages\";\nimport { attachPluginContext, getSupportedLocales } from \"./utils/config\";\n\nexport const intlPlugin =\n ({\n schema,\n tabs,\n collectionSlug = \"messages\",\n hooks,\n editorAccess = (req) => req.user !== null,\n }: MessagesPluginConfig): Plugin =>\n (config) => {\n const locales = getSupportedLocales(config.localization);\n\n config.admin ??= {};\n config.admin.components ??= {};\n config.admin.components.actions ??= [];\n config.admin.components.actions.push({\n exportName: \"MessagesLink\",\n path: \"payload-intl/rsc#MessagesLink\",\n });\n\n config.admin.components.views = {\n ...config.admin.components.views,\n intl: {\n Component: {\n path: \"payload-intl/rsc#MessagesView\",\n serverProps: {\n access: editorAccess,\n locales,\n schema,\n tabs,\n } satisfies MessagesViewProps,\n },\n path: \"/intl\",\n },\n };\n\n attachPluginContext(config, {\n collectionSlug,\n });\n config.globals ??= [];\n config.globals.push({\n slug: \"intl-plugin\",\n fields: [\n {\n name: \"editorTemplate\",\n type: \"richText\",\n editor: lexicalEditor({\n features: ({ defaultFeatures }) =>\n defaultFeatures.filter(\n ({ key }) => ![\"relationship\", \"upload\"].includes(key),\n ),\n }),\n admin: { hidden: true },\n },\n ],\n });\n\n config.collections ??= [];\n config.collections.push({\n slug: collectionSlug,\n admin: {\n hidden: true,\n },\n access: {\n read: () => true,\n },\n endpoints: [setMessagesEndpoint, getMessagesEndpoint],\n fields: [\n {\n name: \"locale\",\n type: \"text\",\n required: true,\n },\n ],\n hooks: createHooks(hooks),\n indexes: [\n {\n fields: [\"locale\"],\n },\n ],\n upload: {\n mimeTypes: [\"application/json\"],\n },\n });\n\n config.endpoints ??= [];\n config.endpoints.push(getMessagesEndpoint);\n config.endpoints.push(setMessagesEndpoint);\n\n return config;\n };\n\nexport { fetchMessages } from \"./requests/fetchMessages\";\n\nexport type {\n MessagesPluginConfig,\n MessagesSchema,\n Messages,\n} from \"./types.ts\";\n\nconst createHooks = (\n hooks: MessagesPluginConfig[\"hooks\"],\n): CollectionConfig[\"hooks\"] => {\n if (!hooks) {\n return undefined;\n }\n const { afterUpdate, ...rest } = hooks;\n if (!afterUpdate) {\n return rest;\n }\n\n const afterUpdateHook: CollectionAfterChangeHook = async ({ operation }) => {\n if (operation === \"update\") {\n await afterUpdate();\n }\n return;\n };\n return {\n ...rest,\n afterChange: [...(rest.afterChange ?? []), afterUpdateHook],\n };\n};\n"],"names":["intlPlugin","schema","tabs","collectionSlug","hooks","editorAccess","req","config","locales","getSupportedLocales","attachPluginContext","lexicalEditor","defaultFeatures","key","setMessagesEndpoint","getMessagesEndpoint","createHooks","afterUpdate","rest","afterUpdateHook","operation"],"mappings":";;;;;;AAeO,MAAMA,IACX,CAAC;AAAA,EACC,QAAAC;AAAA,EACA,MAAAC;AAAA,EACA,gBAAAC,IAAiB;AAAA,EACjB,OAAAC;AAAA,EACA,cAAAC,IAAe,CAACC,MAAQA,EAAI,SAAS;AACvC,MACA,CAACC,MAAW;AACV,QAAMC,IAAUC,EAAoBF,EAAO,YAAY;AAEvD,SAAAA,EAAO,UAAU,CAAA,GACjBA,EAAO,MAAM,eAAe,CAAA,GAC5BA,EAAO,MAAM,WAAW,YAAY,CAAA,GACpCA,EAAO,MAAM,WAAW,QAAQ,KAAK;AAAA,IACnC,YAAY;AAAA,IACZ,MAAM;AAAA,EAAA,CACP,GAEDA,EAAO,MAAM,WAAW,QAAQ;AAAA,IAC9B,GAAGA,EAAO,MAAM,WAAW;AAAA,IAC3B,MAAM;AAAA,MACJ,WAAW;AAAA,QACT,MAAM;AAAA,QACN,aAAa;AAAA,UACX,QAAQF;AAAA,UACR,SAAAG;AAAA,UACA,QAAAP;AAAA,UACA,MAAAC;AAAA,QAAA;AAAA,MACF;AAAA,MAEF,MAAM;AAAA,IAAA;AAAA,EACR,GAGFQ,EAAoBH,GAAQ;AAAA,IAC1B,gBAAAJ;AAAA,EAAA,CACD,GACDI,EAAO,YAAY,CAAA,GACnBA,EAAO,QAAQ,KAAK;AAAA,IAClB,MAAM;AAAA,IACN,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,QAAQI,EAAc;AAAA,UACpB,UAAU,CAAC,EAAE,iBAAAC,EAAA,MACXA,EAAgB;AAAA,YACd,CAAC,EAAE,KAAAC,EAAA,MAAU,CAAC,CAAC,gBAAgB,QAAQ,EAAE,SAASA,CAAG;AAAA,UAAA;AAAA,QACvD,CACH;AAAA,QACD,OAAO,EAAE,QAAQ,GAAA;AAAA,MAAK;AAAA,IACxB;AAAA,EACF,CACD,GAEDN,EAAO,gBAAgB,CAAA,GACvBA,EAAO,YAAY,KAAK;AAAA,IACtB,MAAMJ;AAAA,IACN,OAAO;AAAA,MACL,QAAQ;AAAA,IAAA;AAAA,IAEV,QAAQ;AAAA,MACN,MAAM,MAAM;AAAA,IAAA;AAAA,IAEd,WAAW,CAACW,GAAqBC,CAAmB;AAAA,IACpD,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,UAAU;AAAA,MAAA;AAAA,IACZ;AAAA,IAEF,OAAOC,EAAYZ,CAAK;AAAA,IACxB,SAAS;AAAA,MACP;AAAA,QACE,QAAQ,CAAC,QAAQ;AAAA,MAAA;AAAA,IACnB;AAAA,IAEF,QAAQ;AAAA,MACN,WAAW,CAAC,kBAAkB;AAAA,IAAA;AAAA,EAChC,CACD,GAEDG,EAAO,cAAc,CAAA,GACrBA,EAAO,UAAU,KAAKQ,CAAmB,GACzCR,EAAO,UAAU,KAAKO,CAAmB,GAElCP;AACT,GAUIS,IAAc,CAClBZ,MAC8B;AAC9B,MAAI,CAACA;AACH;AAEF,QAAM,EAAE,aAAAa,GAAa,GAAGC,EAAA,IAASd;AACjC,MAAI,CAACa;AACH,WAAOC;AAGT,QAAMC,IAA6C,OAAO,EAAE,WAAAC,QAAgB;AAC1E,IAAIA,MAAc,YAChB,MAAMH,EAAA;AAAA,EAGV;AACA,SAAO;AAAA,IACL,GAAGC;AAAA,IACH,aAAa,CAAC,GAAIA,EAAK,eAAe,CAAA,GAAKC,CAAe;AAAA,EAAA;AAE9D;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import \"./styles.css\";\n\nimport type {\n CollectionAfterChangeHook,\n CollectionConfig,\n Plugin,\n} from \"payload\";\nimport { lexicalEditor } from \"@payloadcms/richtext-lexical\";\n\nimport type { MessagesViewProps } from \"./exports/view\";\nimport type { MessagesPluginConfig } from \"./types.ts\";\nimport { getMessagesEndpoint } from \"./endpoints/get-messages\";\nimport { setMessagesEndpoint } from \"./endpoints/set-messages\";\nimport { attachPluginContext, getSupportedLocales } from \"./utils/config\";\n\nexport const intlPlugin =\n ({\n schema,\n tabs,\n collectionSlug = \"messages\",\n hooks,\n editorAccess = (req) => req.user !== null,\n }: MessagesPluginConfig): Plugin =>\n (config) => {\n const locales = getSupportedLocales(config.localization);\n\n if (!config.serverURL) {\n throw new Error(\n \"serverURL is required in your payload.config.ts file for payload-intl to work.\",\n );\n }\n\n config.admin ??= {};\n config.admin.components ??= {};\n config.admin.components.actions ??= [];\n config.admin.components.actions.push({\n exportName: \"MessagesLink\",\n path: \"payload-intl/rsc#MessagesLink\",\n });\n\n config.admin.components.views = {\n ...config.admin.components.views,\n intl: {\n Component: {\n path: \"payload-intl/rsc#MessagesView\",\n serverProps: {\n access: editorAccess,\n locales,\n schema,\n tabs,\n } satisfies MessagesViewProps,\n },\n path: \"/intl\",\n },\n };\n\n attachPluginContext(config, {\n collectionSlug,\n });\n config.globals ??= [];\n config.globals.push({\n slug: \"intl-plugin\",\n fields: [\n {\n name: \"editorTemplate\",\n type: \"richText\",\n editor: lexicalEditor({\n features: ({ defaultFeatures }) =>\n defaultFeatures.filter(\n ({ key }) => ![\"relationship\", \"upload\"].includes(key),\n ),\n }),\n admin: { hidden: true },\n },\n ],\n });\n\n config.collections ??= [];\n config.collections.push({\n slug: collectionSlug,\n admin: {\n hidden: true,\n },\n access: {\n read: () => true,\n },\n endpoints: [setMessagesEndpoint, getMessagesEndpoint],\n fields: [\n {\n name: \"locale\",\n type: \"text\",\n required: true,\n },\n ],\n hooks: createHooks(hooks),\n indexes: [\n {\n fields: [\"locale\"],\n },\n ],\n upload: {\n mimeTypes: [\"application/json\"],\n },\n });\n\n config.endpoints ??= [];\n config.endpoints.push(getMessagesEndpoint);\n config.endpoints.push(setMessagesEndpoint);\n\n return config;\n };\n\nexport { fetchMessages } from \"./requests/fetchMessages\";\n\nexport type {\n MessagesPluginConfig,\n MessagesSchema,\n Messages,\n} from \"./types.ts\";\n\nconst createHooks = (\n hooks: MessagesPluginConfig[\"hooks\"],\n): CollectionConfig[\"hooks\"] => {\n if (!hooks) {\n return undefined;\n }\n const { afterUpdate, ...rest } = hooks;\n if (!afterUpdate) {\n return rest;\n }\n\n const afterUpdateHook: CollectionAfterChangeHook = async ({ operation }) => {\n if (operation === \"update\") {\n await afterUpdate();\n }\n return;\n };\n return {\n ...rest,\n afterChange: [...(rest.afterChange ?? []), afterUpdateHook],\n };\n};\n"],"names":["intlPlugin","schema","tabs","collectionSlug","hooks","editorAccess","req","config","locales","getSupportedLocales","attachPluginContext","lexicalEditor","defaultFeatures","key","setMessagesEndpoint","getMessagesEndpoint","createHooks","afterUpdate","rest","afterUpdateHook","operation"],"mappings":";;;;;;AAeO,MAAMA,IACX,CAAC;AAAA,EACC,QAAAC;AAAA,EACA,MAAAC;AAAA,EACA,gBAAAC,IAAiB;AAAA,EACjB,OAAAC;AAAA,EACA,cAAAC,IAAe,CAACC,MAAQA,EAAI,SAAS;AACvC,MACA,CAACC,MAAW;AACV,QAAMC,IAAUC,EAAoBF,EAAO,YAAY;AAEvD,MAAI,CAACA,EAAO;AACV,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAIJ,SAAAA,EAAO,UAAU,CAAA,GACjBA,EAAO,MAAM,eAAe,CAAA,GAC5BA,EAAO,MAAM,WAAW,YAAY,CAAA,GACpCA,EAAO,MAAM,WAAW,QAAQ,KAAK;AAAA,IACnC,YAAY;AAAA,IACZ,MAAM;AAAA,EAAA,CACP,GAEDA,EAAO,MAAM,WAAW,QAAQ;AAAA,IAC9B,GAAGA,EAAO,MAAM,WAAW;AAAA,IAC3B,MAAM;AAAA,MACJ,WAAW;AAAA,QACT,MAAM;AAAA,QACN,aAAa;AAAA,UACX,QAAQF;AAAA,UACR,SAAAG;AAAA,UACA,QAAAP;AAAA,UACA,MAAAC;AAAA,QAAA;AAAA,MACF;AAAA,MAEF,MAAM;AAAA,IAAA;AAAA,EACR,GAGFQ,EAAoBH,GAAQ;AAAA,IAC1B,gBAAAJ;AAAA,EAAA,CACD,GACDI,EAAO,YAAY,CAAA,GACnBA,EAAO,QAAQ,KAAK;AAAA,IAClB,MAAM;AAAA,IACN,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,QAAQI,EAAc;AAAA,UACpB,UAAU,CAAC,EAAE,iBAAAC,EAAA,MACXA,EAAgB;AAAA,YACd,CAAC,EAAE,KAAAC,EAAA,MAAU,CAAC,CAAC,gBAAgB,QAAQ,EAAE,SAASA,CAAG;AAAA,UAAA;AAAA,QACvD,CACH;AAAA,QACD,OAAO,EAAE,QAAQ,GAAA;AAAA,MAAK;AAAA,IACxB;AAAA,EACF,CACD,GAEDN,EAAO,gBAAgB,CAAA,GACvBA,EAAO,YAAY,KAAK;AAAA,IACtB,MAAMJ;AAAA,IACN,OAAO;AAAA,MACL,QAAQ;AAAA,IAAA;AAAA,IAEV,QAAQ;AAAA,MACN,MAAM,MAAM;AAAA,IAAA;AAAA,IAEd,WAAW,CAACW,GAAqBC,CAAmB;AAAA,IACpD,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,UAAU;AAAA,MAAA;AAAA,IACZ;AAAA,IAEF,OAAOC,EAAYZ,CAAK;AAAA,IACxB,SAAS;AAAA,MACP;AAAA,QACE,QAAQ,CAAC,QAAQ;AAAA,MAAA;AAAA,IACnB;AAAA,IAEF,QAAQ;AAAA,MACN,WAAW,CAAC,kBAAkB;AAAA,IAAA;AAAA,EAChC,CACD,GAEDG,EAAO,cAAc,CAAA,GACrBA,EAAO,UAAU,KAAKQ,CAAmB,GACzCR,EAAO,UAAU,KAAKO,CAAmB,GAElCP;AACT,GAUIS,IAAc,CAClBZ,MAC8B;AAC9B,MAAI,CAACA;AACH;AAEF,QAAM,EAAE,aAAAa,GAAa,GAAGC,EAAA,IAASd;AACjC,MAAI,CAACa;AACH,WAAOC;AAGT,QAAMC,IAA6C,OAAO,EAAE,WAAAC,QAAgB;AAC1E,IAAIA,MAAc,YAChB,MAAMH,EAAA;AAAA,EAGV;AACA,SAAO;AAAA,IACL,GAAGC;AAAA,IACH,aAAa,CAAC,GAAIA,EAAK,eAAe,CAAA,GAAKC,CAAe;AAAA,EAAA;AAE9D;"}
|
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
import { getPluginContext as
|
|
2
|
-
|
|
1
|
+
import { getPluginContext as i } from "../utils/config.js";
|
|
2
|
+
import { getErrorMessage as c } from "../utils/error-handling.js";
|
|
3
|
+
async function l(r, o) {
|
|
4
|
+
if (!r.config.serverURL)
|
|
5
|
+
throw new Error(
|
|
6
|
+
"serverURL is required in your payload.config.ts file for payload-intl to work."
|
|
7
|
+
);
|
|
3
8
|
const {
|
|
4
|
-
docs: [
|
|
5
|
-
} = await
|
|
6
|
-
collection:
|
|
7
|
-
where: { locale: { equals:
|
|
9
|
+
docs: [t]
|
|
10
|
+
} = await r.find({
|
|
11
|
+
collection: i(r.config).collectionSlug,
|
|
12
|
+
where: { locale: { equals: o } }
|
|
8
13
|
});
|
|
9
|
-
if (!
|
|
10
|
-
return console.warn(`No messages found for locale ${
|
|
11
|
-
const { url:
|
|
12
|
-
if (!
|
|
14
|
+
if (!t)
|
|
15
|
+
return console.warn(`No messages found for locale ${o}`), {};
|
|
16
|
+
const { url: n } = t, e = await fetch(n);
|
|
17
|
+
if (!e.ok) {
|
|
18
|
+
const s = await c(e);
|
|
13
19
|
throw new Error(
|
|
14
|
-
`Could not fetch messages for locale "${
|
|
15
|
-
|
|
16
|
-
${o}`
|
|
20
|
+
`Could not fetch messages for locale "${o}": ${s}`
|
|
17
21
|
);
|
|
18
|
-
|
|
22
|
+
}
|
|
23
|
+
if (e.headers.get("content-type") !== "application/json")
|
|
19
24
|
throw new Error(
|
|
20
|
-
`Could not fetch messages for locale "${
|
|
21
|
-
|
|
22
|
-
${o}`
|
|
25
|
+
`Could not fetch messages for locale "${o}": The page did not return a JSON file.`
|
|
23
26
|
);
|
|
24
|
-
return await
|
|
27
|
+
return await e.json();
|
|
25
28
|
}
|
|
26
29
|
export {
|
|
27
|
-
|
|
30
|
+
l as fetchMessages
|
|
28
31
|
};
|
|
29
32
|
//# sourceMappingURL=fetchMessages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchMessages.js","sources":["../../src/requests/fetchMessages.ts"],"sourcesContent":["import type { BasePayload } from \"payload\";\nimport {
|
|
1
|
+
{"version":3,"file":"fetchMessages.js","sources":["../../src/requests/fetchMessages.ts"],"sourcesContent":["import type { BasePayload } from \"payload\";\n\nimport { getPluginContext } from \"@/utils/config\";\nimport { getErrorMessage } from \"@/utils/error-handling\";\n\nimport type { Messages } from \"../types\";\n\nexport async function fetchMessages(\n payload: BasePayload,\n locale: string,\n): Promise<Messages> {\n if (!payload.config.serverURL) {\n throw new Error(\n \"serverURL is required in your payload.config.ts file for payload-intl to work.\",\n );\n }\n\n const {\n docs: [doc],\n } = await payload.find({\n collection: getPluginContext(payload.config).collectionSlug,\n where: { locale: { equals: locale } },\n });\n\n if (!doc) {\n console.warn(`No messages found for locale ${locale}`);\n return {};\n }\n\n const { url } = doc as unknown as { url: string };\n\n const response = await fetch(url);\n\n if (!response.ok) {\n const error = await getErrorMessage(response);\n throw new Error(\n `Could not fetch messages for locale \"${locale}\": ${error}`,\n );\n }\n\n if (response.headers.get(\"content-type\") !== \"application/json\") {\n throw new Error(\n `Could not fetch messages for locale \"${locale}\": The page did not return a JSON file.`,\n );\n }\n\n return await response.json();\n}\n\n/*\ntry {\n const response = await fetch(endpointUrl, {\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(changes),\n });\n\n if (!response.ok) {\n const error = await response.json().catch(() => ({}));\n throw new Error(\n \"message\" in error ? error.message : \"Unknown error\"\n );\n }\n\n form.reset(currentValues);\n toast.success(\"Saved\", { id: toastId });\n } catch (error) {\n toast.error(\n `Failed to save: ${error instanceof Error ? error.message : \"Unknown error\"}`,\n { id: toastId },\n );\n }\n };\n\n*/\n"],"names":["fetchMessages","payload","locale","doc","getPluginContext","url","response","error","getErrorMessage"],"mappings":";;AAOA,eAAsBA,EACpBC,GACAC,GACmB;AACnB,MAAI,CAACD,EAAQ,OAAO;AAClB,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAIJ,QAAM;AAAA,IACJ,MAAM,CAACE,CAAG;AAAA,EAAA,IACR,MAAMF,EAAQ,KAAK;AAAA,IACrB,YAAYG,EAAiBH,EAAQ,MAAM,EAAE;AAAA,IAC7C,OAAO,EAAE,QAAQ,EAAE,QAAQC,IAAO;AAAA,EAAE,CACrC;AAED,MAAI,CAACC;AACH,mBAAQ,KAAK,gCAAgCD,CAAM,EAAE,GAC9C,CAAA;AAGT,QAAM,EAAE,KAAAG,MAAQF,GAEVG,IAAW,MAAM,MAAMD,CAAG;AAEhC,MAAI,CAACC,EAAS,IAAI;AAChB,UAAMC,IAAQ,MAAMC,EAAgBF,CAAQ;AAC5C,UAAM,IAAI;AAAA,MACR,wCAAwCJ,CAAM,MAAMK,CAAK;AAAA,IAAA;AAAA,EAE7D;AAEA,MAAID,EAAS,QAAQ,IAAI,cAAc,MAAM;AAC3C,UAAM,IAAI;AAAA,MACR,wCAAwCJ,CAAM;AAAA,IAAA;AAIlD,SAAO,MAAMI,EAAS,KAAA;AACxB;"}
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-medium:500;--radius-sm:var(--style-radius-s);--radius-md:var(--style-radius-m);--color-border:var(--theme-border-color);--color-background:var(--theme-bg);--color-elevation-0:var(--theme-elevation-0);--color-elevation-50:var(--theme-elevation-50);--color-elevation-100:var(--theme-elevation-100);--color-elevation-250:var(--theme-elevation-250);--color-elevation-400:var(--theme-elevation-400);--color-elevation-800:var(--theme-elevation-800)}}@layer base,components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-0{top:calc(var(--spacing)*0)}.z-10{z-index:10}.z-50{z-index:50}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-mx-3{margin-inline:calc(var(--spacing)*-3)}.mx-0{margin-inline:calc(var(--spacing)*0)}.my-0{margin-block:calc(var(--spacing)*0)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.-ml-2{margin-left:calc(var(--spacing)*-2)}.ml-auto{margin-left:auto}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.h-\[calc\(100vh-var\(--app-header-height\)\)\]{height:calc(100vh - var(--app-header-height))}.max-h-\(--radix-dropdown-menu-content-available-height\){max-height:var(--radix-dropdown-menu-content-available-height)}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-8{min-height:calc(var(--spacing)*8)}.w-8{width:calc(var(--spacing)*8)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\[8rem\]{min-width:8rem}.flex-1{flex:1}.origin-\(--radix-dropdown-menu-content-transform-origin\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\(--radix-hover-card-content-transform-origin\){transform-origin:var(--radix-hover-card-content-transform-origin)}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[3rem_8rem_1\.5rem\]{grid-template-columns:3rem 8rem 1.5rem}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-y-2{row-gap:calc(var(--spacing)*2)}.overflow-clip{overflow:clip}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-x-none{overscroll-behavior-x:none}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.border-error{border-style:var(--tw-border-style);border-width:1px;border-color:var(--theme-error-400)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-none{--tw-border-style:none;border-style:none}.border-border{border-color:var(--color-border)}.border-transparent{border-color:#0000}.bg-background{background-color:var(--color-background)}.bg-elevation-50{background-color:var(--color-elevation-50)}.bg-elevation-100{background-color:var(--color-elevation-100)}.bg-elevation-250{background-color:var(--color-elevation-250)}.bg-elevation-800{background-color:var(--color-elevation-800)}.bg-error{background-color:var(--theme-error-100)}.bg-transparent{background-color:#0000}.p-0{padding:calc(var(--spacing)*0)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.pt-8{padding-top:calc(var(--spacing)*8)}.pr-0{padding-right:calc(var(--spacing)*0)}.pb-16{padding-bottom:calc(var(--spacing)*16)}.pl-2{padding-left:calc(var(--spacing)*2)}.text-center{text-align:center}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-nowrap{text-wrap:nowrap}.text-elevation-0{color:var(--color-elevation-0)}.text-error{color:var(--theme-error-400)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.running{animation-play-state:running}.empty\:hidden:empty{display:none}.focus-within\:border-elevation-400:focus-within{border-color:var(--color-elevation-400)}@media (hover:hover){.hover\:bg-elevation-250:hover{background-color:var(--color-elevation-250)}.hover\:bg-elevation-400:hover{background-color:var(--color-elevation-400)}.hover\:text-error:hover{color:var(--theme-error-400)}}.focus\:border-border:focus{border-color:var(--color-border)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=off\]\:cursor-pointer[data-state=off]{cursor:pointer}.data-\[state\=off\]\:opacity-50[data-state=off]{opacity:.5}@media (hover:hover){.data-\[state\=off\]\:hover\:opacity-100[data-state=off]:hover{opacity:1}}.data-\[state\=on\]\:bg-elevation-800[data-state=on]{background-color:var(--color-elevation-800)}.data-\[state\=on\]\:text-elevation-0[data-state=on]{color:var(--color-elevation-0)}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}.tiptap-editor{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.tiptap-editor>.ProseMirror{color:var(--tw-prose-body);max-width:65ch}.tiptap-editor>.ProseMirror :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);margin-top:1.2em;margin-bottom:1.2em;font-size:1.25em;line-height:1.6}.tiptap-editor>.ProseMirror :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.tiptap-editor>.ProseMirror :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.tiptap-editor>.ProseMirror :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.tiptap-editor>.ProseMirror :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:decimal}.tiptap-editor>.ProseMirror :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.tiptap-editor>.ProseMirror :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.tiptap-editor>.ProseMirror :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.tiptap-editor>.ProseMirror :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.tiptap-editor>.ProseMirror :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.tiptap-editor>.ProseMirror :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.tiptap-editor>.ProseMirror :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.tiptap-editor>.ProseMirror :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.tiptap-editor>.ProseMirror :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.tiptap-editor>.ProseMirror :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:disc}.tiptap-editor>.ProseMirror :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-counters);font-weight:400}.tiptap-editor>.ProseMirror :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.tiptap-editor>.ProseMirror :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.25em;font-weight:600}.tiptap-editor>.ProseMirror :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.tiptap-editor>.ProseMirror :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em;font-style:italic;font-weight:500}.tiptap-editor>.ProseMirror :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.tiptap-editor>.ProseMirror :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.tiptap-editor>.ProseMirror :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:0;margin-bottom:.888889em;font-size:2.25em;font-weight:800;line-height:1.11111}.tiptap-editor>.ProseMirror :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.tiptap-editor>.ProseMirror :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:2em;margin-bottom:1em;font-size:1.5em;font-weight:700;line-height:1.33333}.tiptap-editor>.ProseMirror :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.tiptap-editor>.ProseMirror :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.6em;margin-bottom:.6em;font-size:1.25em;font-weight:600;line-height:1.6}.tiptap-editor>.ProseMirror :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.tiptap-editor>.ProseMirror :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.5em;margin-bottom:.5em;font-weight:600;line-height:1.5}.tiptap-editor>.ProseMirror :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.tiptap-editor>.ProseMirror :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em;display:block}.tiptap-editor>.ProseMirror :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows)/10%),0 3px rgb(var(--tw-prose-kbd-shadows)/10%);padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;border-radius:.3125rem;padding-inline-start:.375em;font-family:inherit;font-size:.875em;font-weight:500}.tiptap-editor>.ProseMirror :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.tiptap-editor>.ProseMirror :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.tiptap-editor>.ProseMirror :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.tiptap-editor>.ProseMirror :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.tiptap-editor>.ProseMirror :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.tiptap-editor>.ProseMirror :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.tiptap-editor>.ProseMirror :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.tiptap-editor>.ProseMirror :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);padding-top:.857143em;padding-inline-end:1.14286em;padding-bottom:.857143em;border-radius:.375rem;margin-top:1.71429em;margin-bottom:1.71429em;padding-inline-start:1.14286em;font-size:.875em;font-weight:400;line-height:1.71429;overflow-x:auto}.tiptap-editor>.ProseMirror :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;background-color:#0000;border-width:0;border-radius:0;padding:0}.tiptap-editor>.ProseMirror :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.tiptap-editor>.ProseMirror :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.tiptap-editor>.ProseMirror :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){table-layout:auto;width:100%;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.71429}.tiptap-editor>.ProseMirror :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.tiptap-editor>.ProseMirror :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);vertical-align:bottom;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em;font-weight:600}.tiptap-editor>.ProseMirror :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.tiptap-editor>.ProseMirror :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.tiptap-editor>.ProseMirror :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.tiptap-editor>.ProseMirror :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.tiptap-editor>.ProseMirror :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.tiptap-editor>.ProseMirror :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.tiptap-editor>.ProseMirror :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);margin-top:.857143em;font-size:.875em;line-height:1.42857}.tiptap-editor>.ProseMirror{--tw-prose-body:oklch(37.3% .034 259.733);--tw-prose-headings:oklch(21% .034 264.665);--tw-prose-lead:oklch(44.6% .03 256.802);--tw-prose-links:oklch(21% .034 264.665);--tw-prose-bold:oklch(21% .034 264.665);--tw-prose-counters:oklch(55.1% .027 264.364);--tw-prose-bullets:oklch(87.2% .01 258.338);--tw-prose-hr:oklch(92.8% .006 264.531);--tw-prose-quotes:oklch(21% .034 264.665);--tw-prose-quote-borders:oklch(92.8% .006 264.531);--tw-prose-captions:oklch(55.1% .027 264.364);--tw-prose-kbd:oklch(21% .034 264.665);--tw-prose-kbd-shadows:NaN NaN NaN;--tw-prose-code:oklch(21% .034 264.665);--tw-prose-pre-code:oklch(92.8% .006 264.531);--tw-prose-pre-bg:oklch(27.8% .033 256.848);--tw-prose-th-borders:oklch(87.2% .01 258.338);--tw-prose-td-borders:oklch(92.8% .006 264.531);--tw-prose-invert-body:oklch(87.2% .01 258.338);--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:oklch(70.7% .022 261.325);--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:oklch(70.7% .022 261.325);--tw-prose-invert-bullets:oklch(44.6% .03 256.802);--tw-prose-invert-hr:oklch(37.3% .034 259.733);--tw-prose-invert-quotes:oklch(96.7% .003 264.542);--tw-prose-invert-quote-borders:oklch(37.3% .034 259.733);--tw-prose-invert-captions:oklch(70.7% .022 261.325);--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:255 255 255;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:oklch(87.2% .01 258.338);--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:oklch(44.6% .03 256.802);--tw-prose-invert-td-borders:oklch(37.3% .034 259.733);font-size:1rem;line-height:1.75}.tiptap-editor>.ProseMirror :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.tiptap-editor>.ProseMirror :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.tiptap-editor>.ProseMirror :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.tiptap-editor>.ProseMirror :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.tiptap-editor>.ProseMirror :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.tiptap-editor>.ProseMirror :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.tiptap-editor>.ProseMirror :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.tiptap-editor>.ProseMirror{font-size:1.125rem;line-height:1.77778}.tiptap-editor>.ProseMirror :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em;margin-bottom:1.33333em}.tiptap-editor>.ProseMirror :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.09091em;margin-bottom:1.09091em;font-size:1.22222em;line-height:1.45455}.tiptap-editor>.ProseMirror :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.66667em;margin-bottom:1.66667em;padding-inline-start:1em}.tiptap-editor>.ProseMirror :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:.833333em;font-size:2.66667em;line-height:1}.tiptap-editor>.ProseMirror :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.86667em;margin-bottom:1.06667em;font-size:1.66667em;line-height:1.33333}.tiptap-editor>.ProseMirror :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.66667em;margin-bottom:.666667em;font-size:1.33333em;line-height:1.5}.tiptap-editor>.ProseMirror :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.77778em;margin-bottom:.444444em;line-height:1.55556}.tiptap-editor>.ProseMirror :where(img):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.77778em;margin-bottom:1.77778em}.tiptap-editor>.ProseMirror :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.tiptap-editor>.ProseMirror :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.77778em;margin-bottom:1.77778em}.tiptap-editor>.ProseMirror :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.222222em;padding-inline-end:.444444em;padding-bottom:.222222em;border-radius:.3125rem;padding-inline-start:.444444em;font-size:.888889em}.tiptap-editor>.ProseMirror :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.888889em}.tiptap-editor>.ProseMirror :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.866667em}.tiptap-editor>.ProseMirror :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em}.tiptap-editor>.ProseMirror :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:1em;padding-inline-end:1.5em;padding-bottom:1em;border-radius:.375rem;margin-top:2em;margin-bottom:2em;padding-inline-start:1.5em;font-size:.888889em;line-height:1.75}.tiptap-editor>.ProseMirror :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em;margin-bottom:1.33333em;padding-inline-start:1.55556em}.tiptap-editor>.ProseMirror :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.666667em;margin-bottom:.666667em}.tiptap-editor>.ProseMirror :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.444444em}.tiptap-editor>.ProseMirror :where(.prose-lg>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.888889em;margin-bottom:.888889em}.tiptap-editor>.ProseMirror :where(.prose-lg>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em}.tiptap-editor>.ProseMirror :where(.prose-lg>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.33333em}.tiptap-editor>.ProseMirror :where(.prose-lg>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em}.tiptap-editor>.ProseMirror :where(.prose-lg>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.33333em}.tiptap-editor>.ProseMirror :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.888889em;margin-bottom:.888889em}.tiptap-editor>.ProseMirror :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em;margin-bottom:1.33333em}.tiptap-editor>.ProseMirror :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em}.tiptap-editor>.ProseMirror :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.666667em;padding-inline-start:1.55556em}.tiptap-editor>.ProseMirror :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:3.11111em;margin-bottom:3.11111em}.tiptap-editor>.ProseMirror :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.tiptap-editor>.ProseMirror :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.888889em;line-height:1.5}.tiptap-editor>.ProseMirror :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.75em;padding-bottom:.75em;padding-inline-start:.75em}.tiptap-editor>.ProseMirror :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.tiptap-editor>.ProseMirror :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.tiptap-editor>.ProseMirror :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.75em;padding-inline-end:.75em;padding-bottom:.75em;padding-inline-start:.75em}.tiptap-editor>.ProseMirror :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.tiptap-editor>.ProseMirror :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.tiptap-editor>.ProseMirror :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.77778em;margin-bottom:1.77778em}.tiptap-editor>.ProseMirror :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.tiptap-editor>.ProseMirror :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1em;font-size:.888889em;line-height:1.5}.tiptap-editor>.ProseMirror :where(.prose-lg>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.tiptap-editor>.ProseMirror :where(.prose-lg>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.tiptap-editor>.ProseMirror:focus{--tw-outline-style:none;outline-style:none}.tiptap-editor>.ProseMirror:where([data-theme=dark],[data-theme=dark] *){--tw-prose-body:var(--tw-prose-invert-body);--tw-prose-headings:var(--tw-prose-invert-headings);--tw-prose-lead:var(--tw-prose-invert-lead);--tw-prose-links:var(--tw-prose-invert-links);--tw-prose-bold:var(--tw-prose-invert-bold);--tw-prose-counters:var(--tw-prose-invert-counters);--tw-prose-bullets:var(--tw-prose-invert-bullets);--tw-prose-hr:var(--tw-prose-invert-hr);--tw-prose-quotes:var(--tw-prose-invert-quotes);--tw-prose-quote-borders:var(--tw-prose-invert-quote-borders);--tw-prose-captions:var(--tw-prose-invert-captions);--tw-prose-kbd:var(--tw-prose-invert-kbd);--tw-prose-kbd-shadows:var(--tw-prose-invert-kbd-shadows);--tw-prose-code:var(--tw-prose-invert-code);--tw-prose-pre-code:var(--tw-prose-invert-pre-code);--tw-prose-pre-bg:var(--tw-prose-invert-pre-bg);--tw-prose-th-borders:var(--tw-prose-invert-th-borders);--tw-prose-td-borders:var(--tw-prose-invert-td-borders)}.tiptap-editor>.ProseMirror:focus{outline:none}.tiptap-editor>.ProseMirror>:first-child{margin-top:calc(var(--spacing)*0)}.tiptap-editor>.ProseMirror>:last-child{margin-bottom:calc(var(--spacing)*0)}@media (hover:hover){.messages-tree-collapsible:hover{border-color:var(--color-border)}}.messages-tree-collapsible>.collapsible__toggle-wrap{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-border);top:calc(var(--nesting-level)*40px - 26px);z-index:calc(9 - var(--nesting-level));position:sticky}.messages-tree-collapsible .collapsible__content{padding:calc(var(--spacing)*3)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0))}}
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-medium:500;--radius-sm:var(--style-radius-s);--radius-md:var(--style-radius-m);--color-border:var(--theme-border-color);--color-background:var(--theme-bg);--color-elevation-0:var(--theme-elevation-0);--color-elevation-50:var(--theme-elevation-50);--color-elevation-100:var(--theme-elevation-100);--color-elevation-250:var(--theme-elevation-250);--color-elevation-400:var(--theme-elevation-400);--color-elevation-800:var(--theme-elevation-800)}}@layer base,components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-0{top:calc(var(--spacing)*0)}.z-10{z-index:10}.z-50{z-index:50}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-mx-3{margin-inline:calc(var(--spacing)*-3)}.mx-0{margin-inline:calc(var(--spacing)*0)}.my-0{margin-block:calc(var(--spacing)*0)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.-ml-2{margin-left:calc(var(--spacing)*-2)}.ml-auto{margin-left:auto}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.h-\[calc\(100vh-var\(--app-header-height\)\)\]{height:calc(100vh - var(--app-header-height))}.h-full{height:100%}.max-h-\(--radix-dropdown-menu-content-available-height\){max-height:var(--radix-dropdown-menu-content-available-height)}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-8{min-height:calc(var(--spacing)*8)}.w-8{width:calc(var(--spacing)*8)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-5{min-width:calc(var(--spacing)*5)}.min-w-\[8rem\]{min-width:8rem}.flex-1{flex:1}.origin-\(--radix-dropdown-menu-content-transform-origin\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\(--radix-hover-card-content-transform-origin\){transform-origin:var(--radix-hover-card-content-transform-origin)}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[3rem_8rem_1\.5rem\]{grid-template-columns:3rem 8rem 1.5rem}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-y-2{row-gap:calc(var(--spacing)*2)}.overflow-clip{overflow:clip}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.border-error{border-style:var(--tw-border-style);border-width:1px;border-color:var(--theme-error-400)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-none{--tw-border-style:none;border-style:none}.border-border{border-color:var(--color-border)}.border-transparent{border-color:#0000}.bg-background{background-color:var(--color-background)}.bg-elevation-50{background-color:var(--color-elevation-50)}.bg-elevation-100{background-color:var(--color-elevation-100)}.bg-elevation-250{background-color:var(--color-elevation-250)}.bg-elevation-800{background-color:var(--color-elevation-800)}.bg-error{background-color:var(--theme-error-100)}.bg-transparent{background-color:#0000}.p-0{padding:calc(var(--spacing)*0)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.pt-8{padding-top:calc(var(--spacing)*8)}.pr-0{padding-right:calc(var(--spacing)*0)}.pb-16{padding-bottom:calc(var(--spacing)*16)}.pl-2{padding-left:calc(var(--spacing)*2)}.text-center{text-align:center}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-nowrap{text-wrap:nowrap}.text-elevation-0{color:var(--color-elevation-0)}.text-error{color:var(--theme-error-400)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.running{animation-play-state:running}.empty\:hidden:empty{display:none}.focus-within\:border-elevation-400:focus-within{border-color:var(--color-elevation-400)}@media (hover:hover){.hover\:bg-elevation-250:hover{background-color:var(--color-elevation-250)}.hover\:bg-elevation-400:hover{background-color:var(--color-elevation-400)}.hover\:text-error:hover{color:var(--theme-error-400)}}.focus\:border-border:focus{border-color:var(--color-border)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=off\]\:cursor-pointer[data-state=off]{cursor:pointer}.data-\[state\=off\]\:opacity-50[data-state=off]{opacity:.5}@media (hover:hover){.data-\[state\=off\]\:hover\:opacity-100[data-state=off]:hover{opacity:1}}.data-\[state\=on\]\:bg-elevation-800[data-state=on]{background-color:var(--color-elevation-800)}.data-\[state\=on\]\:text-elevation-0[data-state=on]{color:var(--color-elevation-0)}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}.tiptap-editor{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.tiptap-editor>.ProseMirror{color:var(--tw-prose-body);max-width:65ch}.tiptap-editor>.ProseMirror :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);margin-top:1.2em;margin-bottom:1.2em;font-size:1.25em;line-height:1.6}.tiptap-editor>.ProseMirror :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.tiptap-editor>.ProseMirror :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.tiptap-editor>.ProseMirror :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.tiptap-editor>.ProseMirror :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:decimal}.tiptap-editor>.ProseMirror :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.tiptap-editor>.ProseMirror :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.tiptap-editor>.ProseMirror :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.tiptap-editor>.ProseMirror :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.tiptap-editor>.ProseMirror :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.tiptap-editor>.ProseMirror :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.tiptap-editor>.ProseMirror :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.tiptap-editor>.ProseMirror :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.tiptap-editor>.ProseMirror :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.tiptap-editor>.ProseMirror :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:disc}.tiptap-editor>.ProseMirror :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-counters);font-weight:400}.tiptap-editor>.ProseMirror :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.tiptap-editor>.ProseMirror :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.25em;font-weight:600}.tiptap-editor>.ProseMirror :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.tiptap-editor>.ProseMirror :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em;font-style:italic;font-weight:500}.tiptap-editor>.ProseMirror :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.tiptap-editor>.ProseMirror :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.tiptap-editor>.ProseMirror :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:0;margin-bottom:.888889em;font-size:2.25em;font-weight:800;line-height:1.11111}.tiptap-editor>.ProseMirror :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.tiptap-editor>.ProseMirror :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:2em;margin-bottom:1em;font-size:1.5em;font-weight:700;line-height:1.33333}.tiptap-editor>.ProseMirror :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.tiptap-editor>.ProseMirror :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.6em;margin-bottom:.6em;font-size:1.25em;font-weight:600;line-height:1.6}.tiptap-editor>.ProseMirror :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.tiptap-editor>.ProseMirror :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.5em;margin-bottom:.5em;font-weight:600;line-height:1.5}.tiptap-editor>.ProseMirror :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.tiptap-editor>.ProseMirror :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em;display:block}.tiptap-editor>.ProseMirror :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows)/10%),0 3px rgb(var(--tw-prose-kbd-shadows)/10%);padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;border-radius:.3125rem;padding-inline-start:.375em;font-family:inherit;font-size:.875em;font-weight:500}.tiptap-editor>.ProseMirror :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.tiptap-editor>.ProseMirror :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.tiptap-editor>.ProseMirror :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.tiptap-editor>.ProseMirror :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.tiptap-editor>.ProseMirror :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.tiptap-editor>.ProseMirror :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.tiptap-editor>.ProseMirror :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.tiptap-editor>.ProseMirror :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);padding-top:.857143em;padding-inline-end:1.14286em;padding-bottom:.857143em;border-radius:.375rem;margin-top:1.71429em;margin-bottom:1.71429em;padding-inline-start:1.14286em;font-size:.875em;font-weight:400;line-height:1.71429;overflow-x:auto}.tiptap-editor>.ProseMirror :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;background-color:#0000;border-width:0;border-radius:0;padding:0}.tiptap-editor>.ProseMirror :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.tiptap-editor>.ProseMirror :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.tiptap-editor>.ProseMirror :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){table-layout:auto;width:100%;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.71429}.tiptap-editor>.ProseMirror :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.tiptap-editor>.ProseMirror :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);vertical-align:bottom;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em;font-weight:600}.tiptap-editor>.ProseMirror :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.tiptap-editor>.ProseMirror :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.tiptap-editor>.ProseMirror :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.tiptap-editor>.ProseMirror :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.tiptap-editor>.ProseMirror :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.tiptap-editor>.ProseMirror :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.tiptap-editor>.ProseMirror :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);margin-top:.857143em;font-size:.875em;line-height:1.42857}.tiptap-editor>.ProseMirror{--tw-prose-body:oklch(37.3% .034 259.733);--tw-prose-headings:oklch(21% .034 264.665);--tw-prose-lead:oklch(44.6% .03 256.802);--tw-prose-links:oklch(21% .034 264.665);--tw-prose-bold:oklch(21% .034 264.665);--tw-prose-counters:oklch(55.1% .027 264.364);--tw-prose-bullets:oklch(87.2% .01 258.338);--tw-prose-hr:oklch(92.8% .006 264.531);--tw-prose-quotes:oklch(21% .034 264.665);--tw-prose-quote-borders:oklch(92.8% .006 264.531);--tw-prose-captions:oklch(55.1% .027 264.364);--tw-prose-kbd:oklch(21% .034 264.665);--tw-prose-kbd-shadows:NaN NaN NaN;--tw-prose-code:oklch(21% .034 264.665);--tw-prose-pre-code:oklch(92.8% .006 264.531);--tw-prose-pre-bg:oklch(27.8% .033 256.848);--tw-prose-th-borders:oklch(87.2% .01 258.338);--tw-prose-td-borders:oklch(92.8% .006 264.531);--tw-prose-invert-body:oklch(87.2% .01 258.338);--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:oklch(70.7% .022 261.325);--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:oklch(70.7% .022 261.325);--tw-prose-invert-bullets:oklch(44.6% .03 256.802);--tw-prose-invert-hr:oklch(37.3% .034 259.733);--tw-prose-invert-quotes:oklch(96.7% .003 264.542);--tw-prose-invert-quote-borders:oklch(37.3% .034 259.733);--tw-prose-invert-captions:oklch(70.7% .022 261.325);--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:255 255 255;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:oklch(87.2% .01 258.338);--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:oklch(44.6% .03 256.802);--tw-prose-invert-td-borders:oklch(37.3% .034 259.733);font-size:1rem;line-height:1.75}.tiptap-editor>.ProseMirror :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.tiptap-editor>.ProseMirror :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.tiptap-editor>.ProseMirror :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.tiptap-editor>.ProseMirror :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.tiptap-editor>.ProseMirror :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.tiptap-editor>.ProseMirror :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.tiptap-editor>.ProseMirror :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.tiptap-editor>.ProseMirror{font-size:1.125rem;line-height:1.77778}.tiptap-editor>.ProseMirror :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em;margin-bottom:1.33333em}.tiptap-editor>.ProseMirror :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.09091em;margin-bottom:1.09091em;font-size:1.22222em;line-height:1.45455}.tiptap-editor>.ProseMirror :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.66667em;margin-bottom:1.66667em;padding-inline-start:1em}.tiptap-editor>.ProseMirror :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:.833333em;font-size:2.66667em;line-height:1}.tiptap-editor>.ProseMirror :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.86667em;margin-bottom:1.06667em;font-size:1.66667em;line-height:1.33333}.tiptap-editor>.ProseMirror :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.66667em;margin-bottom:.666667em;font-size:1.33333em;line-height:1.5}.tiptap-editor>.ProseMirror :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.77778em;margin-bottom:.444444em;line-height:1.55556}.tiptap-editor>.ProseMirror :where(img):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.77778em;margin-bottom:1.77778em}.tiptap-editor>.ProseMirror :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.tiptap-editor>.ProseMirror :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.77778em;margin-bottom:1.77778em}.tiptap-editor>.ProseMirror :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.222222em;padding-inline-end:.444444em;padding-bottom:.222222em;border-radius:.3125rem;padding-inline-start:.444444em;font-size:.888889em}.tiptap-editor>.ProseMirror :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.888889em}.tiptap-editor>.ProseMirror :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.866667em}.tiptap-editor>.ProseMirror :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em}.tiptap-editor>.ProseMirror :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:1em;padding-inline-end:1.5em;padding-bottom:1em;border-radius:.375rem;margin-top:2em;margin-bottom:2em;padding-inline-start:1.5em;font-size:.888889em;line-height:1.75}.tiptap-editor>.ProseMirror :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em;margin-bottom:1.33333em;padding-inline-start:1.55556em}.tiptap-editor>.ProseMirror :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.666667em;margin-bottom:.666667em}.tiptap-editor>.ProseMirror :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.444444em}.tiptap-editor>.ProseMirror :where(.prose-lg>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.888889em;margin-bottom:.888889em}.tiptap-editor>.ProseMirror :where(.prose-lg>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em}.tiptap-editor>.ProseMirror :where(.prose-lg>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.33333em}.tiptap-editor>.ProseMirror :where(.prose-lg>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em}.tiptap-editor>.ProseMirror :where(.prose-lg>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.33333em}.tiptap-editor>.ProseMirror :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.888889em;margin-bottom:.888889em}.tiptap-editor>.ProseMirror :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em;margin-bottom:1.33333em}.tiptap-editor>.ProseMirror :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em}.tiptap-editor>.ProseMirror :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.666667em;padding-inline-start:1.55556em}.tiptap-editor>.ProseMirror :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:3.11111em;margin-bottom:3.11111em}.tiptap-editor>.ProseMirror :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.tiptap-editor>.ProseMirror :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.tiptap-editor>.ProseMirror :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.888889em;line-height:1.5}.tiptap-editor>.ProseMirror :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.75em;padding-bottom:.75em;padding-inline-start:.75em}.tiptap-editor>.ProseMirror :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.tiptap-editor>.ProseMirror :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.tiptap-editor>.ProseMirror :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.75em;padding-inline-end:.75em;padding-bottom:.75em;padding-inline-start:.75em}.tiptap-editor>.ProseMirror :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.tiptap-editor>.ProseMirror :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.tiptap-editor>.ProseMirror :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.77778em;margin-bottom:1.77778em}.tiptap-editor>.ProseMirror :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.tiptap-editor>.ProseMirror :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1em;font-size:.888889em;line-height:1.5}.tiptap-editor>.ProseMirror :where(.prose-lg>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.tiptap-editor>.ProseMirror :where(.prose-lg>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.tiptap-editor>.ProseMirror:focus{--tw-outline-style:none;outline-style:none}.tiptap-editor>.ProseMirror:where([data-theme=dark],[data-theme=dark] *){--tw-prose-body:var(--tw-prose-invert-body);--tw-prose-headings:var(--tw-prose-invert-headings);--tw-prose-lead:var(--tw-prose-invert-lead);--tw-prose-links:var(--tw-prose-invert-links);--tw-prose-bold:var(--tw-prose-invert-bold);--tw-prose-counters:var(--tw-prose-invert-counters);--tw-prose-bullets:var(--tw-prose-invert-bullets);--tw-prose-hr:var(--tw-prose-invert-hr);--tw-prose-quotes:var(--tw-prose-invert-quotes);--tw-prose-quote-borders:var(--tw-prose-invert-quote-borders);--tw-prose-captions:var(--tw-prose-invert-captions);--tw-prose-kbd:var(--tw-prose-invert-kbd);--tw-prose-kbd-shadows:var(--tw-prose-invert-kbd-shadows);--tw-prose-code:var(--tw-prose-invert-code);--tw-prose-pre-code:var(--tw-prose-invert-pre-code);--tw-prose-pre-bg:var(--tw-prose-invert-pre-bg);--tw-prose-th-borders:var(--tw-prose-invert-th-borders);--tw-prose-td-borders:var(--tw-prose-invert-td-borders)}.tiptap-editor>.ProseMirror:focus{outline:none}.tiptap-editor>.ProseMirror>:first-child{margin-top:calc(var(--spacing)*0)}.tiptap-editor>.ProseMirror>:last-child{margin-bottom:calc(var(--spacing)*0)}@media (hover:hover){.messages-tree-collapsible:hover{border-color:var(--color-border)}}.messages-tree-collapsible>.collapsible__toggle-wrap{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-border);top:calc(var(--nesting-level)*40px - 26px);z-index:calc(9 - var(--nesting-level));position:sticky}.messages-tree-collapsible .collapsible__content{padding:calc(var(--spacing)*3)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0))}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getErrorMessage(response: Response): Promise<string>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z as t } from "zod/v4-mini";
|
|
2
|
+
async function o(s) {
|
|
3
|
+
try {
|
|
4
|
+
const e = await s.json(), r = t.object({ message: t.string() }).safeParse(e);
|
|
5
|
+
return r.success ? r.data.message : `${s.status} Error`;
|
|
6
|
+
} catch {
|
|
7
|
+
return "Unknown error";
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
o as getErrorMessage
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=error-handling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-handling.js","sources":["../../src/utils/error-handling.ts"],"sourcesContent":["import { z } from \"zod/v4-mini\";\n\nexport async function getErrorMessage(response: Response) {\n try {\n const json = await response.json();\n const schema = z.object({ message: z.string() });\n const result = schema.safeParse(json);\n\n return result.success ? result.data.message : `${response.status} Error`;\n } catch {\n return \"Unknown error\";\n }\n}\n"],"names":["getErrorMessage","response","json","result","z"],"mappings":";AAEA,eAAsBA,EAAgBC,GAAoB;AACxD,MAAI;AACF,UAAMC,IAAO,MAAMD,EAAS,KAAA,GAEtBE,IADSC,EAAE,OAAO,EAAE,SAASA,EAAE,OAAA,GAAU,EACzB,UAAUF,CAAI;AAEpC,WAAOC,EAAO,UAAUA,EAAO,KAAK,UAAU,GAAGF,EAAS,MAAM;AAAA,EAClE,QAAQ;AACN,WAAO;AAAA,EACT;AACF;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payload-intl",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Payload Plugin for I18N using ICU Messages",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Michael Zeltner",
|
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"@floating-ui/dom": "^1.7.3",
|
|
94
94
|
"@formatjs/icu-messageformat-parser": "^2.11.2",
|
|
95
|
+
"@payloadcms/storage-vercel-blob": "^3.72.0",
|
|
95
96
|
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
96
97
|
"@radix-ui/react-hover-card": "^1.1.14",
|
|
97
98
|
"@radix-ui/react-popover": "^1.1.14",
|