payload-intl 0.0.5 → 0.0.7

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/README.md CHANGED
@@ -1,50 +1,257 @@
1
- # Payload Intl Plugin
1
+ # payload-intl
2
2
 
3
- A Payload CMS plugin for internationalization (i18n) message management.
3
+ **payload-intl** moves translations out of your codebase.
4
4
 
5
- ## Features
5
+ 1. Define message keys (and their arguments) in TypeScript.
6
+ 2. Translate them in Payload’s admin panel — no code required.
6
7
 
7
- - Manage translation messages through a user-friendly interface
8
- - Support for multiple locales
9
- - Tree and tab-based message organization
10
- - Import/export functionality
11
- - Copy messages between paths
8
+ **Features**
12
9
 
13
- ## Installation
10
+ - Define message schema in code; edit translations in a rich admin UI
11
+ - Compatible with [next-intl](https://next-intl.dev/) and any ICU consumer
12
+ - Automatic runtime validation of message arguments
13
+ - Autocomplete to quickly insert and configure valid ICU arguments
14
+ - Add optional descriptions to each message so editors understand the context
15
+ - Visual tree & tabbed editor for quick navigation
16
+ - Support for Rich Text messages
17
+ <!-- - Import/export JSON, copy messages between paths -->
18
+
19
+ ## Getting Started
14
20
 
15
21
  ```bash
22
+ # pnpm
23
+ pnpm add payload-intl
24
+ # yarn
25
+ yarn add payload-intl
16
26
  # npm
17
27
  npm install payload-intl
28
+ ```
18
29
 
19
- # pnpm
20
- pnpm add payload-intl
30
+ ### 1) Define messages
31
+
32
+ Organize messages in a hierarchical structure using ICU MessageFormat:
21
33
 
34
+ ```typescript
35
+ // messages.ts
36
+ export default {
37
+ UserProfile: {
38
+ title: "Hello {firstName}",
39
+ description:
40
+ "Welcome back, {firstName}! You have {count, plural, =0 {no messages} one {# message} other {# messages}}.",
41
+ status:
42
+ "Your account is {status, select, active {active} inactive {inactive} pending {pending} other {unknown}}.",
43
+ },
44
+ Navigation: {
45
+ home: "Home",
46
+ about: "About",
47
+ },
48
+ } as const;
22
49
  ```
23
50
 
24
- ## Usage
51
+ You can also use JSON files, but additional steps are required for type-safe arguments with next-intl. See the [next-intl documentation](https://next-intl.dev/docs/workflows/typescript#messages-arguments) for details.
52
+
53
+ ### 2) Configure Payload
54
+
55
+ Add the plugin to your `payload.config.ts`:
25
56
 
26
57
  ```typescript
58
+ import { buildConfig } from "payload";
27
59
  import { intlPlugin } from "payload-intl";
28
60
 
61
+ import messages from "./messages";
62
+
29
63
  export default buildConfig({
64
+ // the plugin reads locales from this config
65
+ localization: {
66
+ locales: ["en", "de", "fr"],
67
+ defaultLocale: "en",
68
+ },
30
69
  plugins: [
70
+ // add the plugin
31
71
  intlPlugin({
32
- schema: {
33
- // Your message schema
72
+ schema: messages,
73
+ }),
74
+ // add the "messages" collection to your storage adapter
75
+ ],
76
+ });
77
+ ```
78
+
79
+ ### 3) Fetch messages in your app
80
+
81
+ **Node.js:**
82
+
83
+ ```typescript
84
+ import config from "@payload-config";
85
+ import { getPayload } from "payload";
86
+ import { fetchMessages } from "payload-intl/requests";
87
+
88
+ const payload = await getPayload({ config });
89
+ const messages = await fetchMessages(payload, "en");
90
+ ```
91
+
92
+ **Edge runtime:**
93
+
94
+ ```typescript
95
+ const response = await fetch(`${process.env.PAYLOAD_API_URL}/intl-plugin/en`);
96
+ const messages = await response.json();
97
+ ```
98
+
99
+ ## Plugin Options
100
+
101
+ The `intlPlugin` accepts the following configuration:
102
+
103
+ | Option | Default | Description |
104
+ | ----------------------- | ------------------------ | ------------------------------------------------------- |
105
+ | `schema` | **Required** | Your messages schema definition |
106
+ | `collectionSlug` | `"messages"` | Custom collection slug |
107
+ | `editorAccess` | Authenticated users only | Access control for editing messages |
108
+ | `hooks` | - | Collection hooks with and additional `afterUpdate` hook |
109
+ | `tabs` | - | Enable tabbed interface |
110
+ | `richTextEditorOptions` | - | Configure rich text editor options |
111
+
112
+ ## Storage Adapter Requirements
113
+
114
+ The plugin creates a "messages" upload collection that stores translations as JSON files.
115
+
116
+ You must ensure that the storage provider returns the direct URL to the uploaded files and read access is guaranteed.
117
+
118
+ ## Message Schema Definition
119
+
120
+ ### Message Descriptions
121
+
122
+ Add context for editors using the syntax `"[Description] message"`:
123
+
124
+ ```typescript
125
+ export default {
126
+ UserProfile: {
127
+ title: "[Greeting shown at the top of user profile page] Hello {firstName}",
128
+ description:
129
+ "[Subtitle with user's name and message count] Welcome back, {firstName}! You have {count} new messages.",
130
+ },
131
+ } as const;
132
+ ```
133
+
134
+ ### Rich Text Messages
135
+
136
+ Use `"$RICH$"` as the message value to enable rich text editing. Note that rich text messages do not support ICU arguments.
137
+
138
+ ```typescript
139
+ export default {
140
+ Content: {
141
+ welcome: "$RICH$", // Rich text editor will be used
142
+ terms: "$RICH$", // Rich text editor will be used
143
+ },
144
+ } as const;
145
+ ```
146
+
147
+ ## Example Usage
148
+
149
+ Here's a complete example showing how to integrate payload-intl using next-intl and S3 storage:
150
+
151
+ ```typescript
152
+ // i18n/messages.ts
153
+ export const messages = {
154
+ UserProfile: {
155
+ title: "Hello {firstName}",
156
+ description:
157
+ "Welcome back, {firstName}! You have {count, plural, =0 {no messages} one {# message} other {# messages}}.",
158
+ },
159
+ Navigation: {
160
+ home: "Home",
161
+ about: "About",
162
+ },
163
+ richText: {
164
+ welcome: "$RICH$",
165
+ },
166
+ } as const;
167
+ ```
168
+
169
+ ```typescript
170
+ // payload.config.ts
171
+ import { s3Storage } from "@payloadcms/storage-s3";
172
+ import { revalidateTag } from "next/cache";
173
+ import { buildConfig } from "payload";
174
+ import { intlPlugin } from "payload-intl";
175
+
176
+ import { messages } from "./i18n/messages";
177
+
178
+ export default buildConfig({
179
+ localization: {
180
+ locales: ["en", "de", "fr"],
181
+ defaultLocale: "en",
182
+ },
183
+ plugins: [
184
+ intlPlugin({
185
+ schema: messages,
186
+ tabs: true,
187
+ hooks: {
188
+ afterUpdate: () => revalidateTag("messages"),
189
+ },
190
+ }),
191
+ s3Storage({
192
+ collections: {
193
+ messages: {
194
+ prefix: "messages",
195
+ },
34
196
  },
35
197
  }),
36
198
  ],
37
199
  });
38
200
  ```
39
201
 
40
- Set up a storage adapter and disable `disablePayloadAccessControl` to ensure the translations are fetched directly from the storage provider.
202
+ ### 3. Set up next-intl type augmentation
203
+
204
+ ```typescript
205
+ // i18n/global.ts
206
+ import type { messages } from "./messages";
207
+
208
+ declare module "next-intl" {
209
+ interface AppConfig {
210
+ Messages: typeof messages;
211
+ }
212
+ }
213
+ ```
214
+
215
+ ### 4. Configure next-intl request handler
216
+
217
+ ```typescript
218
+ // i18n/request.ts
219
+ import { getRequestConfig } from "next-intl/server";
220
+
221
+ import { fetchCachedMessages } from "./server/messages";
222
+
223
+ export default getRequestConfig(async ({ locale }) => {
224
+ const messages = await fetchCachedMessages(locale);
225
+
226
+ return {
227
+ locale,
228
+ messages,
229
+ };
230
+ });
231
+ ```
232
+
233
+ ### 5. Create server-side message fetcher
234
+
235
+ ```typescript
236
+ // server/messages.ts
237
+ "use server";
41
238
 
42
- ## Pain Points
239
+ import config from "@payload-config";
240
+ import { unstable_cache } from "next/cache";
241
+ import { getPayload } from "payload";
242
+ import { fetchMessages } from "payload-intl";
43
243
 
44
- - Messages can have missing/wrong arguments
45
- - User does not know which arguments are required and how to use them
46
- - User does not know the purpose of a field or where it is used
47
- - Changing messages structure causes data loss
244
+ export const fetchCachedMessages = unstable_cache(
245
+ async (locale: string) => {
246
+ const payload = await getPayload({ config });
247
+ return await fetchMessages(payload, locale);
248
+ },
249
+ ["messages"],
250
+ {
251
+ revalidate: false,
252
+ },
253
+ );
254
+ ```
48
255
 
49
256
  ## Development
50
257
 
@@ -3,7 +3,7 @@ import { MessageType } from '../utils/schema';
3
3
  import { MessageValidator } from '../utils/validate';
4
4
  interface MessageControllerProps {
5
5
  type: MessageType;
6
- label: string;
6
+ label?: string;
7
7
  locale: string;
8
8
  name: string;
9
9
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"MessageController.js","sources":["../../src/components/MessageController.tsx"],"sourcesContent":["import type { TemplateVariable } from \"@/types\";\nimport type { MessageType } from \"@/utils/schema\";\nimport type { MessageValidator } from \"@/utils/validate\";\nimport { Controller } from \"react-hook-form\";\n\nimport { useMessagesForm } from \"@/context/messages-form\";\n\nimport { MessageInput } from \"./inputs/MessageInput\";\nimport { RichTextInput } from \"./inputs/RichTextInput\";\n\ninterface MessageControllerProps {\n type: MessageType;\n label: string;\n locale: string;\n name: string;\n className?: string;\n variables: TemplateVariable[];\n validate: MessageValidator;\n}\n\nexport function MessageController({\n type,\n name,\n variables,\n label,\n locale,\n validate,\n className,\n}: MessageControllerProps): React.ReactNode {\n const { control } = useMessagesForm();\n\n if (type === \"rich\") {\n return (\n <Controller\n control={control}\n name={name}\n render={({ field, fieldState }) => (\n <RichTextInput\n className={className}\n error={fieldState.error}\n label={label}\n lang={locale}\n onChange={field.onChange}\n onBlur={field.onBlur}\n value={(field.value as unknown as string) || \"\"}\n />\n )}\n rules={{\n required: true,\n }}\n />\n );\n }\n\n return (\n <Controller\n control={control}\n name={name}\n render={({ field, fieldState }) => (\n <MessageInput\n label={label}\n lang={locale}\n className={className}\n value={(field.value as unknown as string) || \"\"}\n variables={variables}\n error={fieldState.error}\n onChange={field.onChange}\n onBlur={field.onBlur}\n />\n )}\n rules={{\n required: true,\n validate,\n }}\n />\n );\n}\n"],"names":["MessageController","type","name","variables","label","locale","validate","className","control","useMessagesForm","jsx","Controller","field","fieldState","RichTextInput","MessageInput"],"mappings":";;;;;AAoBO,SAASA,EAAkB;AAAA,EAChC,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,GAA4C;AAC1C,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA;AAEpB,SAAIR,MAAS,SAET,gBAAAS;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAH;AAAA,MACA,MAAAN;AAAA,MACA,QAAQ,CAAC,EAAE,OAAAU,GAAO,YAAAC,QAChB,gBAAAH;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,WAAAP;AAAA,UACA,OAAOM,EAAW;AAAA,UAClB,OAAAT;AAAA,UACA,MAAMC;AAAA,UACN,UAAUO,EAAM;AAAA,UAChB,QAAQA,EAAM;AAAA,UACd,OAAQA,EAAM,SAA+B;AAAA,QAAA;AAAA,MAAA;AAAA,MAGjD,OAAO;AAAA,QACL,UAAU;AAAA,MAAA;AAAA,IACZ;AAAA,EAAA,IAMJ,gBAAAF;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAH;AAAA,MACA,MAAAN;AAAA,MACA,QAAQ,CAAC,EAAE,OAAAU,GAAO,YAAAC,QAChB,gBAAAH;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,OAAAX;AAAA,UACA,MAAMC;AAAA,UACN,WAAAE;AAAA,UACA,OAAQK,EAAM,SAA+B;AAAA,UAC7C,WAAAT;AAAA,UACA,OAAOU,EAAW;AAAA,UAClB,UAAUD,EAAM;AAAA,UAChB,QAAQA,EAAM;AAAA,QAAA;AAAA,MAAA;AAAA,MAGlB,OAAO;AAAA,QACL,UAAU;AAAA,QACV,UAAAN;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"MessageController.js","sources":["../../src/components/MessageController.tsx"],"sourcesContent":["import type { TemplateVariable } from \"@/types\";\nimport type { MessageType } from \"@/utils/schema\";\nimport type { MessageValidator } from \"@/utils/validate\";\nimport { Controller } from \"react-hook-form\";\n\nimport { useMessagesForm } from \"@/context/messages-form\";\n\nimport { MessageInput } from \"./inputs/MessageInput\";\nimport { RichTextInput } from \"./inputs/RichTextInput\";\n\ninterface MessageControllerProps {\n type: MessageType;\n label?: string;\n locale: string;\n name: string;\n className?: string;\n variables: TemplateVariable[];\n validate: MessageValidator;\n}\n\nexport function MessageController({\n type,\n name,\n variables,\n label,\n locale,\n validate,\n className,\n}: MessageControllerProps): React.ReactNode {\n const { control } = useMessagesForm();\n\n if (type === \"rich\") {\n return (\n <Controller\n control={control}\n name={name}\n render={({ field, fieldState }) => (\n <RichTextInput\n className={className}\n error={fieldState.error}\n label={label}\n lang={locale}\n onChange={field.onChange}\n onBlur={field.onBlur}\n value={(field.value as unknown as string) || \"\"}\n />\n )}\n rules={{\n required: true,\n }}\n />\n );\n }\n\n return (\n <Controller\n control={control}\n name={name}\n render={({ field, fieldState }) => (\n <MessageInput\n label={label}\n lang={locale}\n className={className}\n value={(field.value as unknown as string) || \"\"}\n variables={variables}\n error={fieldState.error}\n onChange={field.onChange}\n onBlur={field.onBlur}\n />\n )}\n rules={{\n required: true,\n validate,\n }}\n />\n );\n}\n"],"names":["MessageController","type","name","variables","label","locale","validate","className","control","useMessagesForm","jsx","Controller","field","fieldState","RichTextInput","MessageInput"],"mappings":";;;;;AAoBO,SAASA,EAAkB;AAAA,EAChC,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,GAA4C;AAC1C,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA;AAEpB,SAAIR,MAAS,SAET,gBAAAS;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAH;AAAA,MACA,MAAAN;AAAA,MACA,QAAQ,CAAC,EAAE,OAAAU,GAAO,YAAAC,QAChB,gBAAAH;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,WAAAP;AAAA,UACA,OAAOM,EAAW;AAAA,UAClB,OAAAT;AAAA,UACA,MAAMC;AAAA,UACN,UAAUO,EAAM;AAAA,UAChB,QAAQA,EAAM;AAAA,UACd,OAAQA,EAAM,SAA+B;AAAA,QAAA;AAAA,MAAA;AAAA,MAGjD,OAAO;AAAA,QACL,UAAU;AAAA,MAAA;AAAA,IACZ;AAAA,EAAA,IAMJ,gBAAAF;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAH;AAAA,MACA,MAAAN;AAAA,MACA,QAAQ,CAAC,EAAE,OAAAU,GAAO,YAAAC,QAChB,gBAAAH;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,OAAAX;AAAA,UACA,MAAMC;AAAA,UACN,WAAAE;AAAA,UACA,OAAQK,EAAM,SAA+B;AAAA,UAC7C,WAAAT;AAAA,UACA,OAAOU,EAAW;AAAA,UAClB,UAAUD,EAAM;AAAA,UAChB,QAAQA,EAAM;AAAA,QAAA;AAAA,MAAA;AAAA,MAGlB,OAAO;AAAA,QACL,UAAU;AAAA,QACV,UAAAN;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
@@ -73,28 +73,35 @@ function Q({
73
73
  }
74
74
  )
75
75
  ] }),
76
- /* @__PURE__ */ r("div", { id: "messages-form-content", className: "overflow-y-auto pt-8 pb-16", children: [
77
- !o && /* @__PURE__ */ s(g, { path: "", schema: a, nestingLevel: 0 }),
78
- o && Object.entries(a).map(([e, t]) => typeof t == "string" ? /* @__PURE__ */ s(
79
- I,
80
- {
81
- schema: t,
82
- className: p({ hidden: n !== e }),
83
- messageKey: e,
84
- path: e
85
- },
86
- e
87
- ) : /* @__PURE__ */ s(
88
- g,
89
- {
90
- className: p({ hidden: n !== e }),
91
- path: e,
92
- schema: t,
93
- nestingLevel: 0
94
- },
95
- e
96
- ))
97
- ] })
76
+ /* @__PURE__ */ r(
77
+ "div",
78
+ {
79
+ id: "messages-form-content",
80
+ className: "min-h-0 overflow-y-auto pt-8 pb-16",
81
+ children: [
82
+ !o && /* @__PURE__ */ s(g, { path: "", schema: a, nestingLevel: 0 }),
83
+ o && Object.entries(a).map(([e, t]) => typeof t == "string" ? /* @__PURE__ */ s(
84
+ I,
85
+ {
86
+ schema: t,
87
+ className: p({ hidden: n !== e }),
88
+ messageKey: e,
89
+ path: e
90
+ },
91
+ e
92
+ ) : /* @__PURE__ */ s(
93
+ g,
94
+ {
95
+ className: p({ hidden: n !== e }),
96
+ path: e,
97
+ schema: t,
98
+ nestingLevel: 0
99
+ },
100
+ e
101
+ ))
102
+ ]
103
+ }
104
+ )
98
105
  ]
99
106
  }
100
107
  )
@@ -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 RichTextEditorOptions,\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 richTextEditorOptions?: RichTextEditorOptions;\n}\n\nexport function MessagesForm({\n locales,\n schema,\n tabs = false,\n values,\n endpointUrl,\n richTextEditorOptions,\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 method: \"PUT\",\n body: JSON.stringify(changes),\n });\n\n form.reset(currentValues);\n toast.success(\"Saved\", { id: toastId });\n };\n\n return (\n <MessagesFormProvider\n form={form}\n locales={locales}\n richTextEditorOptions={richTextEditorOptions}\n >\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 {tabs && (\n <MessagesTabs\n schema={schema}\n activeTab={activeTab}\n setActiveTab={setActiveTab}\n />\n )}\n </div>\n\n <div id=\"messages-form-content\" className=\"overflow-y-auto pt-8 pb-16\">\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","richTextEditorOptions","setStepNav","useStepNav","useEffect","form","useForm","activeTab","setActiveTab","useState","handleSubmit","currentValues","toastId","toast","changes","acc","locale","value","isEqual","jsx","MessagesFormProvider","jsxs","JsonImport","Button","MessagesTabs","MessagesTree","key","MessageField","cn"],"mappings":";;;;;;;;;;;;;AAkCO,SAASA,EAAa;AAAA,EAC3B,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,uBAAAC;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,eAAeP;AAAA,IACf,gBAAgB;AAAA,EAAA,CACjB,GACK,CAACQ,GAAWC,CAAY,IAAIC,EAAS,OAAO,KAAKZ,CAAM,EAAE,CAAC,CAAC,GAE3Da,IAAe,OAAOC,MAA8B;AACxD,UAAMC,IAAUC,EAAM,QAAQ,WAAW,GACnCC,IAAU,OAAO,QAAQH,CAAa,EAAE,OAE5C,CAACI,GAAK,CAACC,GAAQC,CAAK,MACAC,EAAQD,GAAOlB,EAAOiB,CAAM,CAAC,IAExCD,IAEF;AAAA,MACL,GAAGA;AAAA,MACH,CAACC,CAAM,GAAGC;AAAA,IAAA,GAEX,CAAA,CAAE;AAEL,UAAM,MAAMjB,GAAa;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,KAAK,UAAUc,CAAO;AAAA,IAAA,CAC7B,GAEDT,EAAK,MAAMM,CAAa,GACxBE,EAAM,QAAQ,SAAS,EAAE,IAAID,GAAS;AAAA,EACxC;AAEA,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAf;AAAA,MACA,SAAAT;AAAA,MACA,uBAAAK;AAAA,MAEA,UAAA,gBAAAoB;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,UAAUhB,EAAK,aAAaK,CAAY;AAAA,UAExC,UAAA;AAAA,YAAA,gBAAAW,EAAC,OAAA,EAAI,WAAU,mCACb,UAAA;AAAA,cAAA,gBAAAA,EAAC,UAAA,EAAO,WAAU,gDAChB,UAAA;AAAA,gBAAA,gBAAAF,EAAC,MAAA,EAAG,WAAU,YAAW,UAAA,YAAQ;AAAA,gBACjC,gBAAAE,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,kBAAA,gBAAAF,EAACG,GAAA,EAAW;AAAA,kBACZ,gBAAAH;AAAA,oBAACI;AAAA,oBAAA;AAAA,sBACC,WAAU;AAAA,sBACV,MAAK;AAAA,sBACL,UAAU,CAAClB,EAAK,UAAU;AAAA,sBAC3B,UAAA;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAED,EAAA,CACF;AAAA,cAAA,GACF;AAAA,cACCP,KACC,gBAAAqB;AAAA,gBAACK;AAAA,gBAAA;AAAA,kBACC,QAAA3B;AAAA,kBACA,WAAAU;AAAA,kBACA,cAAAC;AAAA,gBAAA;AAAA,cAAA;AAAA,YACF,GAEJ;AAAA,YAEA,gBAAAa,EAAC,OAAA,EAAI,IAAG,yBAAwB,WAAU,8BACvC,UAAA;AAAA,cAAA,CAACvB,KAAQ,gBAAAqB,EAACM,GAAA,EAAa,MAAK,IAAG,QAAA5B,GAAgB,cAAc,GAAG;AAAA,cAChEC,KACC,OAAO,QAAQD,CAAM,EAAE,IAAI,CAAC,CAAC6B,GAAKT,CAAK,MACjC,OAAOA,KAAU,WAEjB,gBAAAE;AAAA,gBAACQ;AAAA,gBAAA;AAAA,kBACC,QAAQV;AAAA,kBAER,WAAWW,EAAG,EAAE,QAAQrB,MAAcmB,GAAK;AAAA,kBAC3C,YAAYA;AAAA,kBACZ,MAAMA;AAAA,gBAAA;AAAA,gBAHDA;AAAA,cAAA,IAQT,gBAAAP;AAAA,gBAACM;AAAA,gBAAA;AAAA,kBACC,WAAWG,EAAG,EAAE,QAAQrB,MAAcmB,GAAK;AAAA,kBAE3C,MAAMA;AAAA,kBACN,QAAQT;AAAA,kBACR,cAAc;AAAA,gBAAA;AAAA,gBAHTS;AAAA,cAAA,CAMV;AAAA,YAAA,EAAA,CACL;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
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 RichTextEditorOptions,\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 richTextEditorOptions?: RichTextEditorOptions;\n}\n\nexport function MessagesForm({\n locales,\n schema,\n tabs = false,\n values,\n endpointUrl,\n richTextEditorOptions,\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 method: \"PUT\",\n body: JSON.stringify(changes),\n });\n\n form.reset(currentValues);\n toast.success(\"Saved\", { id: toastId });\n };\n\n return (\n <MessagesFormProvider\n form={form}\n locales={locales}\n richTextEditorOptions={richTextEditorOptions}\n >\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 {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","richTextEditorOptions","setStepNav","useStepNav","useEffect","form","useForm","activeTab","setActiveTab","useState","handleSubmit","currentValues","toastId","toast","changes","acc","locale","value","isEqual","jsx","MessagesFormProvider","jsxs","JsonImport","Button","MessagesTabs","MessagesTree","key","MessageField","cn"],"mappings":";;;;;;;;;;;;;AAkCO,SAASA,EAAa;AAAA,EAC3B,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,uBAAAC;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,eAAeP;AAAA,IACf,gBAAgB;AAAA,EAAA,CACjB,GACK,CAACQ,GAAWC,CAAY,IAAIC,EAAS,OAAO,KAAKZ,CAAM,EAAE,CAAC,CAAC,GAE3Da,IAAe,OAAOC,MAA8B;AACxD,UAAMC,IAAUC,EAAM,QAAQ,WAAW,GACnCC,IAAU,OAAO,QAAQH,CAAa,EAAE,OAE5C,CAACI,GAAK,CAACC,GAAQC,CAAK,MACAC,EAAQD,GAAOlB,EAAOiB,CAAM,CAAC,IAExCD,IAEF;AAAA,MACL,GAAGA;AAAA,MACH,CAACC,CAAM,GAAGC;AAAA,IAAA,GAEX,CAAA,CAAE;AAEL,UAAM,MAAMjB,GAAa;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,KAAK,UAAUc,CAAO;AAAA,IAAA,CAC7B,GAEDT,EAAK,MAAMM,CAAa,GACxBE,EAAM,QAAQ,SAAS,EAAE,IAAID,GAAS;AAAA,EACxC;AAEA,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAf;AAAA,MACA,SAAAT;AAAA,MACA,uBAAAK;AAAA,MAEA,UAAA,gBAAAoB;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,UAAUhB,EAAK,aAAaK,CAAY;AAAA,UAExC,UAAA;AAAA,YAAA,gBAAAW,EAAC,OAAA,EAAI,WAAU,mCACb,UAAA;AAAA,cAAA,gBAAAA,EAAC,UAAA,EAAO,WAAU,gDAChB,UAAA;AAAA,gBAAA,gBAAAF,EAAC,MAAA,EAAG,WAAU,YAAW,UAAA,YAAQ;AAAA,gBACjC,gBAAAE,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,kBAAA,gBAAAF,EAACG,GAAA,EAAW;AAAA,kBACZ,gBAAAH;AAAA,oBAACI;AAAA,oBAAA;AAAA,sBACC,WAAU;AAAA,sBACV,MAAK;AAAA,sBACL,UAAU,CAAClB,EAAK,UAAU;AAAA,sBAC3B,UAAA;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAED,EAAA,CACF;AAAA,cAAA,GACF;AAAA,cACCP,KACC,gBAAAqB;AAAA,gBAACK;AAAA,gBAAA;AAAA,kBACC,QAAA3B;AAAA,kBACA,WAAAU;AAAA,kBACA,cAAAC;AAAA,gBAAA;AAAA,cAAA;AAAA,YACF,GAEJ;AAAA,YAEA,gBAAAa;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,WAAU;AAAA,gBAET,UAAA;AAAA,kBAAA,CAACvB,KAAQ,gBAAAqB,EAACM,GAAA,EAAa,MAAK,IAAG,QAAA5B,GAAgB,cAAc,GAAG;AAAA,kBAChEC,KACC,OAAO,QAAQD,CAAM,EAAE,IAAI,CAAC,CAAC6B,GAAKT,CAAK,MACjC,OAAOA,KAAU,WAEjB,gBAAAE;AAAA,oBAACQ;AAAA,oBAAA;AAAA,sBACC,QAAQV;AAAA,sBAER,WAAWW,EAAG,EAAE,QAAQrB,MAAcmB,GAAK;AAAA,sBAC3C,YAAYA;AAAA,sBACZ,MAAMA;AAAA,oBAAA;AAAA,oBAHDA;AAAA,kBAAA,IAQT,gBAAAP;AAAA,oBAACM;AAAA,oBAAA;AAAA,sBACC,WAAWG,EAAG,EAAE,QAAQrB,MAAcmB,GAAK;AAAA,sBAE3C,MAAMA;AAAA,sBACN,QAAQT;AAAA,sBACR,cAAc;AAAA,oBAAA;AAAA,oBAHTS;AAAA,kBAAA,CAMV;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UACL;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
@@ -1,6 +1,6 @@
1
1
  import { FieldError } from 'react-hook-form';
2
2
  export interface InputWrapperProps {
3
- label: string;
3
+ label?: string;
4
4
  error: FieldError | undefined;
5
5
  className?: string;
6
6
  }
@@ -1,26 +1,26 @@
1
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
2
  import { FieldLabel as i } from "@payloadcms/ui";
3
- import { cn as s } from "../../utils/cn.js";
3
+ import { cn as t } from "../../utils/cn.js";
4
4
  function c({
5
- label: o,
6
- error: r,
7
- className: t,
5
+ label: r,
6
+ error: s,
7
+ className: l,
8
8
  children: a
9
9
  }) {
10
- return /* @__PURE__ */ l("div", { className: s("flex flex-col gap-1", t), children: [
11
- /* @__PURE__ */ l(
10
+ return /* @__PURE__ */ o("div", { className: t("flex flex-col gap-1", l), children: [
11
+ /* @__PURE__ */ o(
12
12
  "fieldset",
13
13
  {
14
- className: s("mx-0 rounded-md focus-within:border-elevation-400", {
15
- "border-error bg-error": r
14
+ className: t("mx-0 rounded-md focus-within:border-elevation-400", {
15
+ "border-error bg-error": s
16
16
  }),
17
17
  children: [
18
- /* @__PURE__ */ e("legend", { className: "-ml-2 px-1.5 text-base", children: /* @__PURE__ */ e(i, { label: o }) }),
18
+ r && /* @__PURE__ */ e("legend", { className: "-ml-2 px-1.5 text-base", children: /* @__PURE__ */ e(i, { label: r }) }),
19
19
  a
20
20
  ]
21
21
  }
22
22
  ),
23
- /* @__PURE__ */ e("p", { className: "text-base text-error", children: r?.message })
23
+ /* @__PURE__ */ e("p", { className: "text-base text-error", children: s?.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 <legend className=\"-ml-2 px-1.5 text-base\">\n <FieldLabel label={label} />\n </legend>\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,uBAAuBF,CAAS,GACjD,UAAA;AAAA,IAAA,gBAAAG;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWD,EAAG,qDAAqD;AAAA,UACjE,yBAAyBH;AAAA,QAAA,CAC1B;AAAA,QAED,UAAA;AAAA,UAAA,gBAAAK,EAAC,YAAO,WAAU,0BAChB,UAAA,gBAAAA,EAACC,GAAA,EAAW,OAAAP,GAAc,GAC5B;AAAA,UACCG;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAEH,gBAAAG,EAAC,KAAA,EAAE,WAAU,wBAAwB,aAAO,QAAA,CAAQ;AAAA,EAAA,GACtD;AAEJ;"}
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,uBAAuBF,CAAS,GACjD,UAAA;AAAA,IAAA,gBAAAG;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWD,EAAG,qDAAqD;AAAA,UACjE,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 +1 @@
1
- {"version":3,"file":"VariableChip.js","sources":["../../../../src/components/inputs/variables/VariableChip.tsx"],"sourcesContent":["import type { VariableMentionNodeAttrs } from \"@/types\";\nimport type { ReactNodeViewProps } from \"@tiptap/react\";\nimport { NodeViewWrapper } from \"@tiptap/react\";\nimport { Popover } from \"radix-ui\";\nimport { useMemo } from \"react\";\n\nimport { cn } from \"@/utils/cn\";\nimport {\n isArgumentElement,\n isNumericElement,\n isSelectElement,\n isTagElement,\n isTemporalElement,\n} from \"@/utils/guards\";\nimport { parseICUMessage } from \"@/utils/icu-tranform\";\n\nimport { SelectVariableEditor } from \"./editors/SelectVariableEditor\";\nimport { TagVariableEditor } from \"./editors/TagVariableEditor\";\nimport { NumericVariablePicker } from \"./pickers/NumericVariablePicker\";\nimport { TemporalElementEditor } from \"./pickers/TemporalElementEditor\";\n\nconst TEMPORAL_ELEMENTS_FLAG = false;\n\n// TODO replace popover with portal below input field\n\nexport function VariableChip({\n node,\n updateAttributes,\n}: ReactNodeViewProps<HTMLElement>) {\n const attrs = node.attrs as VariableMentionNodeAttrs;\n const handleUpdate = (value: string) =>\n updateAttributes({\n icu: value,\n });\n\n const element = useMemo(() => {\n try {\n const [part] = parseICUMessage(attrs.icu);\n if (!part) throw new Error(\"No part found\");\n return part;\n } catch (error) {\n console.error(error);\n throw new Error(`Invalid ICU: ${attrs.icu}`, { cause: error });\n }\n }, [attrs.icu]);\n\n return (\n <Popover.Root>\n <Popover.Trigger asChild>\n <NodeViewWrapper\n as=\"span\"\n className={cn(\n \"inline-flex cursor-pointer items-center rounded-md bg-elevation-250 px-1 hover:bg-elevation-400\",\n {\n \"pointer-events-none\":\n isArgumentElement(element) ||\n (isTemporalElement(element) && !TEMPORAL_ELEMENTS_FLAG),\n },\n )}\n contentEditable={false}\n data-variable={attrs.name}\n data-icu={attrs.icu}\n role=\"button\"\n tabIndex={0}\n >\n {attrs.label}\n </NodeViewWrapper>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n side=\"bottom\"\n sideOffset={5}\n align=\"start\"\n className=\"z-50 grid origin-(--radix-hover-card-content-transform-origin) overflow-clip rounded-md border border-border bg-elevation-50 shadow-md outline-hidden empty:hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\"\n >\n {isNumericElement(element) && (\n <NumericVariablePicker element={element} onUpdate={handleUpdate} />\n )}\n {isSelectElement(element) && (\n <SelectVariableEditor element={element} onUpdate={handleUpdate} />\n )}\n {TEMPORAL_ELEMENTS_FLAG && isTemporalElement(element) && (\n <TemporalElementEditor element={element} onUpdate={handleUpdate} />\n )}\n\n {isTagElement(element) && (\n <TagVariableEditor element={element} onUpdate={handleUpdate} />\n )}\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n}\n"],"names":["TEMPORAL_ELEMENTS_FLAG","VariableChip","node","updateAttributes","attrs","handleUpdate","value","element","useMemo","part","parseICUMessage","error","jsxs","Popover","jsx","NodeViewWrapper","cn","isArgumentElement","isTemporalElement","isNumericElement","NumericVariablePicker","isSelectElement","SelectVariableEditor","isTagElement","TagVariableEditor"],"mappings":";;;;;;;;;;;AAqBA,MAAMA,IAAyB;AAIxB,SAASC,EAAa;AAAA,EAC3B,MAAAC;AAAA,EACA,kBAAAC;AACF,GAAoC;AAClC,QAAMC,IAAQF,EAAK,OACbG,IAAe,CAACC,MACpBH,EAAiB;AAAA,IACf,KAAKG;AAAA,EAAA,CACN,GAEGC,IAAUC,EAAQ,MAAM;AAC5B,QAAI;AACF,YAAM,CAACC,CAAI,IAAIC,EAAgBN,EAAM,GAAG;AACxC,UAAI,CAACK,EAAM,OAAM,IAAI,MAAM,eAAe;AAC1C,aAAOA;AAAA,IACT,SAASE,GAAO;AACd,oBAAQ,MAAMA,CAAK,GACb,IAAI,MAAM,gBAAgBP,EAAM,GAAG,IAAI,EAAE,OAAOO,GAAO;AAAA,IAC/D;AAAA,EACF,GAAG,CAACP,EAAM,GAAG,CAAC;AAEd,SACE,gBAAAQ,EAACC,EAAQ,MAAR,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACD,EAAQ,SAAR,EAAgB,SAAO,IACtB,UAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH,WAAWC;AAAA,UACT;AAAA,UACA;AAAA,YACE,uBACEC,EAAkBV,CAAO,KACxBW,EAAkBX,CAAO,KAAK,CAACP;AAAA,UAAA;AAAA,QACpC;AAAA,QAEF,iBAAiB;AAAA,QACjB,iBAAeI,EAAM;AAAA,QACrB,YAAUA,EAAM;AAAA,QAChB,MAAK;AAAA,QACL,UAAU;AAAA,QAET,UAAAA,EAAM;AAAA,MAAA;AAAA,IAAA,GAEX;AAAA,IACA,gBAAAU,EAACD,EAAQ,QAAR,EACC,UAAA,gBAAAD;AAAA,MAACC,EAAQ;AAAA,MAAR;AAAA,QACC,MAAK;AAAA,QACL,YAAY;AAAA,QACZ,OAAM;AAAA,QACN,WAAU;AAAA,QAET,UAAA;AAAA,UAAAM,EAAiBZ,CAAO,KACvB,gBAAAO,EAACM,GAAA,EAAsB,SAAAb,GAAkB,UAAUF,GAAc;AAAA,UAElEgB,EAAgBd,CAAO,uBACrBe,GAAA,EAAqB,SAAAf,GAAkB,UAAUF,GAAc;AAAA,UAEjEL;AAAA,UAIAuB,EAAahB,CAAO,uBAClBiB,GAAA,EAAkB,SAAAjB,GAAkB,UAAUF,EAAA,CAAc;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,EAEjE,CACF;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"VariableChip.js","sources":["../../../../src/components/inputs/variables/VariableChip.tsx"],"sourcesContent":["import type { VariableMentionNodeAttrs } from \"@/types\";\nimport type { ReactNodeViewProps } from \"@tiptap/react\";\nimport { NodeViewWrapper } from \"@tiptap/react\";\nimport { Popover } from \"radix-ui\";\nimport { useMemo } from \"react\";\n\nimport { cn } from \"@/utils/cn\";\nimport {\n isArgumentElement,\n isNumericElement,\n isSelectElement,\n isTagElement,\n isTemporalElement,\n} from \"@/utils/guards\";\nimport { parseICUMessage } from \"@/utils/icu-tranform\";\n\nimport { SelectVariableEditor } from \"./editors/SelectVariableEditor\";\nimport { TagVariableEditor } from \"./editors/TagVariableEditor\";\nimport { NumericVariablePicker } from \"./pickers/NumericVariablePicker\";\nimport { TemporalElementEditor } from \"./pickers/TemporalElementEditor\";\nimport { VariableIcon } from \"./VariableIcon\";\n\nconst TEMPORAL_ELEMENTS_FLAG = false;\n\n// TODO replace popover with portal below input field\n\nexport function VariableChip({\n node,\n updateAttributes,\n}: ReactNodeViewProps<HTMLElement>) {\n const attrs = node.attrs as VariableMentionNodeAttrs;\n const handleUpdate = (value: string) =>\n updateAttributes({\n icu: value,\n });\n\n const element = useMemo(() => {\n try {\n const [part] = parseICUMessage(attrs.icu);\n if (!part) throw new Error(\"No part found\");\n return part;\n } catch (error) {\n console.error(error);\n throw new Error(`Invalid ICU: ${attrs.icu}`, { cause: error });\n }\n }, [attrs.icu]);\n\n return (\n <Popover.Root>\n <Popover.Trigger asChild>\n <NodeViewWrapper\n as=\"span\"\n className={cn(\n \"inline-flex cursor-pointer items-center rounded-md bg-elevation-250 px-1 hover:bg-elevation-400\",\n {\n \"pointer-events-none\":\n isArgumentElement(element) ||\n (isTemporalElement(element) && !TEMPORAL_ELEMENTS_FLAG),\n },\n )}\n contentEditable={false}\n data-variable={attrs.name}\n data-icu={attrs.icu}\n role=\"button\"\n tabIndex={0}\n >\n {/* <VariableIcon type={element.type} className=\"size-4\" /> */}\n {attrs.label}\n </NodeViewWrapper>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n side=\"bottom\"\n sideOffset={5}\n align=\"start\"\n className=\"z-50 grid origin-(--radix-hover-card-content-transform-origin) overflow-clip rounded-md border border-border bg-elevation-50 shadow-md outline-hidden empty:hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\"\n >\n {isNumericElement(element) && (\n <NumericVariablePicker element={element} onUpdate={handleUpdate} />\n )}\n {isSelectElement(element) && (\n <SelectVariableEditor element={element} onUpdate={handleUpdate} />\n )}\n {TEMPORAL_ELEMENTS_FLAG && isTemporalElement(element) && (\n <TemporalElementEditor element={element} onUpdate={handleUpdate} />\n )}\n\n {isTagElement(element) && (\n <TagVariableEditor element={element} onUpdate={handleUpdate} />\n )}\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n}\n"],"names":["TEMPORAL_ELEMENTS_FLAG","VariableChip","node","updateAttributes","attrs","handleUpdate","value","element","useMemo","part","parseICUMessage","error","jsxs","Popover","jsx","NodeViewWrapper","cn","isArgumentElement","isTemporalElement","isNumericElement","NumericVariablePicker","isSelectElement","SelectVariableEditor","isTagElement","TagVariableEditor"],"mappings":";;;;;;;;;;;AAsBA,MAAMA,IAAyB;AAIxB,SAASC,EAAa;AAAA,EAC3B,MAAAC;AAAA,EACA,kBAAAC;AACF,GAAoC;AAClC,QAAMC,IAAQF,EAAK,OACbG,IAAe,CAACC,MACpBH,EAAiB;AAAA,IACf,KAAKG;AAAA,EAAA,CACN,GAEGC,IAAUC,EAAQ,MAAM;AAC5B,QAAI;AACF,YAAM,CAACC,CAAI,IAAIC,EAAgBN,EAAM,GAAG;AACxC,UAAI,CAACK,EAAM,OAAM,IAAI,MAAM,eAAe;AAC1C,aAAOA;AAAA,IACT,SAASE,GAAO;AACd,oBAAQ,MAAMA,CAAK,GACb,IAAI,MAAM,gBAAgBP,EAAM,GAAG,IAAI,EAAE,OAAOO,GAAO;AAAA,IAC/D;AAAA,EACF,GAAG,CAACP,EAAM,GAAG,CAAC;AAEd,SACE,gBAAAQ,EAACC,EAAQ,MAAR,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACD,EAAQ,SAAR,EAAgB,SAAO,IACtB,UAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH,WAAWC;AAAA,UACT;AAAA,UACA;AAAA,YACE,uBACEC,EAAkBV,CAAO,KACxBW,EAAkBX,CAAO,KAAK,CAACP;AAAA,UAAA;AAAA,QACpC;AAAA,QAEF,iBAAiB;AAAA,QACjB,iBAAeI,EAAM;AAAA,QACrB,YAAUA,EAAM;AAAA,QAChB,MAAK;AAAA,QACL,UAAU;AAAA,QAGT,UAAAA,EAAM;AAAA,MAAA;AAAA,IAAA,GAEX;AAAA,IACA,gBAAAU,EAACD,EAAQ,QAAR,EACC,UAAA,gBAAAD;AAAA,MAACC,EAAQ;AAAA,MAAR;AAAA,QACC,MAAK;AAAA,QACL,YAAY;AAAA,QACZ,OAAM;AAAA,QACN,WAAU;AAAA,QAET,UAAA;AAAA,UAAAM,EAAiBZ,CAAO,KACvB,gBAAAO,EAACM,GAAA,EAAsB,SAAAb,GAAkB,UAAUF,GAAc;AAAA,UAElEgB,EAAgBd,CAAO,uBACrBe,GAAA,EAAqB,SAAAf,GAAkB,UAAUF,GAAc;AAAA,UAEjEL;AAAA,UAIAuB,EAAahB,CAAO,uBAClBiB,GAAA,EAAkB,SAAAjB,GAAkB,UAAUF,EAAA,CAAc;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,EAEjE,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -0,0 +1,6 @@
1
+ import { IconProps } from '@tabler/icons-react';
2
+ import { TYPE } from '@formatjs/icu-messageformat-parser';
3
+ export interface VariableIconProps extends Omit<IconProps, "type"> {
4
+ type: TYPE;
5
+ }
6
+ export declare function VariableIcon({ type, ...props }: VariableIconProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,41 +1,41 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { useState as p, useEffect as f, useImperativeHandle as g } from "react";
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { useState as i, useEffect as f, useImperativeHandle as g } from "react";
3
3
  import { cn as b } from "../../../utils/cn.js";
4
- function w({
5
- items: e,
4
+ function x({
5
+ items: n,
6
6
  command: c,
7
7
  ref: u
8
8
  }) {
9
- const [n, o] = p(0), a = (t) => {
10
- const r = e[t];
11
- r && c(r);
12
- }, s = () => {
13
- o((n + e.length - 1) % e.length);
9
+ const [r, o] = i(0), l = (e) => {
10
+ const t = n[e];
11
+ t && c(t);
14
12
  }, d = () => {
15
- o((n + 1) % e.length);
16
- }, i = () => {
17
- a(n);
13
+ o((r + n.length - 1) % n.length);
14
+ }, p = () => {
15
+ o((r + 1) % n.length);
16
+ }, s = () => {
17
+ l(r);
18
18
  };
19
- return f(() => o(0), [e]), g(u, () => ({
20
- onKeyDown: ({ event: t }) => t.key === "ArrowUp" ? (s(), !0) : t.key === "ArrowDown" ? (d(), !0) : t.key === "Enter" ? (i(), !0) : !1
21
- })), /* @__PURE__ */ l("div", { className: "flex flex-col overflow-clip rounded-md bg-elevation-100", children: e.length ? e.map((t, r) => /* @__PURE__ */ l(
19
+ return f(() => o(0), [n]), g(u, () => ({
20
+ onKeyDown: ({ event: e }) => e.key === "ArrowUp" ? (d(), !0) : e.key === "ArrowDown" ? (p(), !0) : e.key === "Enter" ? (s(), !0) : !1
21
+ })), /* @__PURE__ */ a("div", { className: "flex flex-col overflow-clip rounded-md bg-elevation-100 empty:hidden", children: n.map((e, t) => /* @__PURE__ */ a(
22
22
  "button",
23
23
  {
24
24
  type: "button",
25
25
  className: b(
26
26
  "cursor-pointer rounded-none border-none bg-transparent px-3 py-1 text-lg text-nowrap",
27
27
  {
28
- "bg-elevation-800 text-elevation-0": r === n,
29
- "hover:bg-elevation-250": r !== n
28
+ "bg-elevation-800 text-elevation-0": t === r,
29
+ "hover:bg-elevation-250": t !== r
30
30
  }
31
31
  ),
32
- onClick: () => a(r),
33
- children: t.label
32
+ onClick: () => l(t),
33
+ children: e.label
34
34
  },
35
- r
36
- )) : /* @__PURE__ */ l("div", { className: "item", children: "No result" }) });
35
+ t
36
+ )) });
37
37
  }
38
38
  export {
39
- w as VariableSuggestion
39
+ x as VariableSuggestion
40
40
  };
41
41
  //# sourceMappingURL=VariableSuggestion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VariableSuggestion.js","sources":["../../../../src/components/inputs/variables/VariableSuggestion.tsx"],"sourcesContent":["import type { VariableMentionNodeAttrs } from \"@/types\";\nimport type {\n SuggestionKeyDownProps,\n SuggestionProps,\n} from \"@tiptap/suggestion\";\nimport { useEffect, useImperativeHandle, useState } from \"react\";\n\nimport { cn } from \"@/utils/cn\";\n\nexport interface VariableSuggestionProps\n extends SuggestionProps<VariableMentionNodeAttrs, VariableMentionNodeAttrs> {\n ref: React.RefObject<{\n onKeyDown: (props: SuggestionKeyDownProps) => boolean;\n }>;\n}\n\nexport function VariableSuggestion({\n items,\n command,\n ref,\n}: VariableSuggestionProps) {\n const [selectedIndex, setSelectedIndex] = useState(0);\n\n const selectItem = (index: number) => {\n const item = items[index];\n\n if (item) command(item);\n };\n\n const upHandler = () => {\n setSelectedIndex((selectedIndex + items.length - 1) % items.length);\n };\n\n const downHandler = () => {\n setSelectedIndex((selectedIndex + 1) % items.length);\n };\n\n const enterHandler = () => {\n selectItem(selectedIndex);\n };\n\n useEffect(() => setSelectedIndex(0), [items]);\n\n useImperativeHandle(ref, () => ({\n onKeyDown: ({ event }) => {\n if (event.key === \"ArrowUp\") {\n upHandler();\n return true;\n }\n\n if (event.key === \"ArrowDown\") {\n downHandler();\n return true;\n }\n\n if (event.key === \"Enter\") {\n enterHandler();\n return true;\n }\n\n return false;\n },\n }));\n\n return (\n <div className=\"flex flex-col overflow-clip rounded-md bg-elevation-100\">\n {items.length ? (\n items.map((item, index) => (\n <button\n key={index}\n type=\"button\"\n className={cn(\n \"cursor-pointer rounded-none border-none bg-transparent px-3 py-1 text-lg text-nowrap\",\n {\n \"bg-elevation-800 text-elevation-0\": index === selectedIndex,\n \"hover:bg-elevation-250\": index !== selectedIndex,\n },\n )}\n onClick={() => selectItem(index)}\n >\n {item.label}\n </button>\n ))\n ) : (\n <div className=\"item\">No result</div>\n )}\n </div>\n );\n}\n"],"names":["VariableSuggestion","items","command","ref","selectedIndex","setSelectedIndex","useState","selectItem","index","item","upHandler","downHandler","enterHandler","useEffect","useImperativeHandle","event","jsx","cn"],"mappings":";;;AAgBO,SAASA,EAAmB;AAAA,EACjC,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,KAAAC;AACF,GAA4B;AAC1B,QAAM,CAACC,GAAeC,CAAgB,IAAIC,EAAS,CAAC,GAE9CC,IAAa,CAACC,MAAkB;AACpC,UAAMC,IAAOR,EAAMO,CAAK;AAExB,IAAIC,OAAcA,CAAI;AAAA,EACxB,GAEMC,IAAY,MAAM;AACtB,IAAAL,GAAkBD,IAAgBH,EAAM,SAAS,KAAKA,EAAM,MAAM;AAAA,EACpE,GAEMU,IAAc,MAAM;AACxB,IAAAN,GAAkBD,IAAgB,KAAKH,EAAM,MAAM;AAAA,EACrD,GAEMW,IAAe,MAAM;AACzB,IAAAL,EAAWH,CAAa;AAAA,EAC1B;AAEA,SAAAS,EAAU,MAAMR,EAAiB,CAAC,GAAG,CAACJ,CAAK,CAAC,GAE5Ca,EAAoBX,GAAK,OAAO;AAAA,IAC9B,WAAW,CAAC,EAAE,OAAAY,QACRA,EAAM,QAAQ,aAChBL,EAAA,GACO,MAGLK,EAAM,QAAQ,eAChBJ,EAAA,GACO,MAGLI,EAAM,QAAQ,WAChBH,EAAA,GACO,MAGF;AAAA,EACT,EACA,GAGA,gBAAAI,EAAC,OAAA,EAAI,WAAU,2DACZ,UAAAf,EAAM,SACLA,EAAM,IAAI,CAACQ,GAAMD,MACf,gBAAAQ;AAAA,IAAC;AAAA,IAAA;AAAA,MAEC,MAAK;AAAA,MACL,WAAWC;AAAA,QACT;AAAA,QACA;AAAA,UACE,qCAAqCT,MAAUJ;AAAA,UAC/C,0BAA0BI,MAAUJ;AAAA,QAAA;AAAA,MACtC;AAAA,MAEF,SAAS,MAAMG,EAAWC,CAAK;AAAA,MAE9B,UAAAC,EAAK;AAAA,IAAA;AAAA,IAXDD;AAAA,EAAA,CAaR,IAED,gBAAAQ,EAAC,SAAI,WAAU,QAAO,uBAAS,GAEnC;AAEJ;"}
1
+ {"version":3,"file":"VariableSuggestion.js","sources":["../../../../src/components/inputs/variables/VariableSuggestion.tsx"],"sourcesContent":["import type { VariableMentionNodeAttrs } from \"@/types\";\nimport type {\n SuggestionKeyDownProps,\n SuggestionProps,\n} from \"@tiptap/suggestion\";\nimport { useEffect, useImperativeHandle, useState } from \"react\";\n\nimport { cn } from \"@/utils/cn\";\n\nexport interface VariableSuggestionProps\n extends SuggestionProps<VariableMentionNodeAttrs, VariableMentionNodeAttrs> {\n ref: React.RefObject<{\n onKeyDown: (props: SuggestionKeyDownProps) => boolean;\n }>;\n}\n\nexport function VariableSuggestion({\n items,\n command,\n ref,\n}: VariableSuggestionProps) {\n const [selectedIndex, setSelectedIndex] = useState(0);\n\n const selectItem = (index: number) => {\n const item = items[index];\n\n if (item) command(item);\n };\n\n const upHandler = () => {\n setSelectedIndex((selectedIndex + items.length - 1) % items.length);\n };\n\n const downHandler = () => {\n setSelectedIndex((selectedIndex + 1) % items.length);\n };\n\n const enterHandler = () => {\n selectItem(selectedIndex);\n };\n\n useEffect(() => setSelectedIndex(0), [items]);\n\n useImperativeHandle(ref, () => ({\n onKeyDown: ({ event }) => {\n if (event.key === \"ArrowUp\") {\n upHandler();\n return true;\n }\n\n if (event.key === \"ArrowDown\") {\n downHandler();\n return true;\n }\n\n if (event.key === \"Enter\") {\n enterHandler();\n return true;\n }\n\n return false;\n },\n }));\n\n return (\n <div className=\"flex flex-col overflow-clip rounded-md bg-elevation-100 empty:hidden\">\n {items.map((item, index) => (\n <button\n key={index}\n type=\"button\"\n className={cn(\n \"cursor-pointer rounded-none border-none bg-transparent px-3 py-1 text-lg text-nowrap\",\n {\n \"bg-elevation-800 text-elevation-0\": index === selectedIndex,\n \"hover:bg-elevation-250\": index !== selectedIndex,\n },\n )}\n onClick={() => selectItem(index)}\n >\n {item.label}\n </button>\n ))}\n </div>\n );\n}\n"],"names":["VariableSuggestion","items","command","ref","selectedIndex","setSelectedIndex","useState","selectItem","index","item","upHandler","downHandler","enterHandler","useEffect","useImperativeHandle","event","jsx","cn"],"mappings":";;;AAgBO,SAASA,EAAmB;AAAA,EACjC,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,KAAAC;AACF,GAA4B;AAC1B,QAAM,CAACC,GAAeC,CAAgB,IAAIC,EAAS,CAAC,GAE9CC,IAAa,CAACC,MAAkB;AACpC,UAAMC,IAAOR,EAAMO,CAAK;AAExB,IAAIC,OAAcA,CAAI;AAAA,EACxB,GAEMC,IAAY,MAAM;AACtB,IAAAL,GAAkBD,IAAgBH,EAAM,SAAS,KAAKA,EAAM,MAAM;AAAA,EACpE,GAEMU,IAAc,MAAM;AACxB,IAAAN,GAAkBD,IAAgB,KAAKH,EAAM,MAAM;AAAA,EACrD,GAEMW,IAAe,MAAM;AACzB,IAAAL,EAAWH,CAAa;AAAA,EAC1B;AAEA,SAAAS,EAAU,MAAMR,EAAiB,CAAC,GAAG,CAACJ,CAAK,CAAC,GAE5Ca,EAAoBX,GAAK,OAAO;AAAA,IAC9B,WAAW,CAAC,EAAE,OAAAY,QACRA,EAAM,QAAQ,aAChBL,EAAA,GACO,MAGLK,EAAM,QAAQ,eAChBJ,EAAA,GACO,MAGLI,EAAM,QAAQ,WAChBH,EAAA,GACO,MAGF;AAAA,EACT,EACA,GAGA,gBAAAI,EAAC,SAAI,WAAU,wEACZ,YAAM,IAAI,CAACP,GAAMD,MAChB,gBAAAQ;AAAA,IAAC;AAAA,IAAA;AAAA,MAEC,MAAK;AAAA,MACL,WAAWC;AAAA,QACT;AAAA,QACA;AAAA,UACE,qCAAqCT,MAAUJ;AAAA,UAC/C,0BAA0BI,MAAUJ;AAAA,QAAA;AAAA,MACtC;AAAA,MAEF,SAAS,MAAMG,EAAWC,CAAK;AAAA,MAE9B,UAAAC,EAAK;AAAA,IAAA;AAAA,IAXDD;AAAA,EAAA,CAaR,GACH;AAEJ;"}
@@ -1,22 +1,21 @@
1
1
  import { jsxs as c, jsx as a } from "react/jsx-runtime";
2
2
  import { useMemo as n } from "react";
3
- import { useMessagesForm as d } from "../../context/messages-form.js";
4
- import { cn as f } from "../../utils/cn.js";
5
- import { toWords as v } from "../../utils/format.js";
6
- import { parseMessageSchema as x } from "../../utils/schema.js";
7
- import { createValidator as b } from "../../utils/validate.js";
3
+ import { useMessagesForm as v } from "../../context/messages-form.js";
4
+ import { cn as d } from "../../utils/cn.js";
5
+ import { parseMessageSchema as f } from "../../utils/schema.js";
6
+ import { createValidator as x } from "../../utils/validate.js";
8
7
  import { MessageController as p } from "../MessageController.js";
9
- function F({
10
- schema: s,
11
- messageKey: i,
8
+ function w({
9
+ schema: i,
10
+ messageKey: s,
12
11
  path: t,
13
12
  className: l
14
13
  }) {
15
- const { locales: r } = d(), e = n(() => x(s), [s]), m = n(
16
- () => b(e.variables),
14
+ const { locales: r } = v(), e = n(() => f(i), [i]), m = n(
15
+ () => x(e.variables),
17
16
  [e.variables]
18
17
  );
19
- return /* @__PURE__ */ c("div", { className: f("", l), children: [
18
+ return /* @__PURE__ */ c("div", { className: d("", l), children: [
20
19
  e.description && /* @__PURE__ */ a("p", { children: e.description }),
21
20
  r.length === 1 ? /* @__PURE__ */ a(
22
21
  p,
@@ -24,9 +23,8 @@ function F({
24
23
  className: l,
25
24
  type: e.type,
26
25
  variables: e.variables,
27
- label: v(i),
28
26
  locale: r[0],
29
- name: [r[0], t, i].join("."),
27
+ name: [r[0], t, s].join("."),
30
28
  validate: m
31
29
  }
32
30
  ) : /* @__PURE__ */ a("div", { className: "-mx-3 flex min-w-0 gap-4 overflow-x-auto overscroll-x-none px-3", children: r.map((o) => /* @__PURE__ */ a(
@@ -37,7 +35,7 @@ function F({
37
35
  label: o.toUpperCase(),
38
36
  locale: o,
39
37
  variables: e.variables,
40
- name: [o, t, i].join("."),
38
+ name: [o, t, s].join("."),
41
39
  validate: m
42
40
  },
43
41
  o
@@ -45,6 +43,6 @@ function F({
45
43
  ] });
46
44
  }
47
45
  export {
48
- F as MessageField
46
+ w as MessageField
49
47
  };
50
48
  //# sourceMappingURL=MessageField.js.map
@@ -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 { 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 label={toWords(messageKey)}\n locale={locales[0]}\n name={[locales[0], path, messageKey].join(\".\")}\n validate={validator}\n />\n ) : (\n <div className=\"-mx-3 flex min-w-0 gap-4 overflow-x-auto overscroll-x-none px-3\">\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","toWords","locale"],"mappings":";;;;;;;;AAkBO,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,OAAOQ,EAAQb,CAAU;AAAA,QACzB,QAAQG,EAAQ,CAAC;AAAA,QACjB,MAAM,CAACA,EAAQ,CAAC,GAAGF,GAAMD,CAAU,EAAE,KAAK,GAAG;AAAA,QAC7C,UAAUQ;AAAA,MAAA;AAAA,IAAA,sBAGX,OAAA,EAAI,WAAU,mEACZ,UAAAL,EAAQ,IAAI,CAACW,MACZ,gBAAAH;AAAA,MAACC;AAAA,MAAA;AAAA,QAEC,WAAU;AAAA,QACV,MAAMP,EAAO;AAAA,QACb,OAAOS,EAAO,YAAA;AAAA,QACd,QAAAA;AAAA,QACA,WAAWT,EAAO;AAAA,QAClB,MAAM,CAACS,GAAQb,GAAMD,CAAU,EAAE,KAAK,GAAG;AAAA,QACzC,UAAUQ;AAAA,MAAA;AAAA,MAPLM;AAAA,IAAA,CASR,EAAA,CACH;AAAA,EAAA,GAEJ;AAEJ;"}
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 { 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=\"-mx-3 flex min-w-0 gap-4 overflow-x-auto overscroll-x-none px-3\">\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":";;;;;;;AAkBO,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,sBAGX,OAAA,EAAI,WAAU,mEACZ,UAAAL,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;"}
@@ -1 +1 @@
1
- {"version":3,"file":"MessagesTree.js","sources":["../../../src/components/layout/MessagesTree.tsx"],"sourcesContent":["import type { Messages } from \"@/types\";\nimport { Collapsible } from \"@payloadcms/ui\";\nimport { get } from \"lodash-es\";\nimport { useCallback } from \"react\";\nimport { useFormState } from \"react-hook-form\";\n\nimport { useMessagesForm } from \"@/context/messages-form\";\nimport { cn } from \"@/utils/cn\";\nimport { toWords } from \"@/utils/format\";\n\nimport { MessageField } from \"./MessageField\";\n\ninterface MessagesTreeProps {\n path: string;\n nestingLevel: number;\n schema: Messages;\n className?: string;\n}\n\nexport function MessagesTree({\n path,\n schema,\n nestingLevel = 0,\n className,\n}: MessagesTreeProps): React.ReactNode {\n const { control, locales } = useMessagesForm();\n const { errors } = useFormState({ control });\n\n const hasErrors = useCallback(\n (key: string) => {\n return locales.some(\n (locale) => get(errors, [locale, path, key].join(\".\")) !== undefined,\n );\n },\n [errors, locales, path],\n );\n\n return (\n <div className={cn(\"grid gap-6\", className)}>\n {Object.entries(schema).map(([key, value]) => (\n <div\n key={key}\n className=\"grid min-w-0\"\n style={\n {\n [\"--nesting-level\"]: nestingLevel,\n } as React.CSSProperties\n }\n >\n <Collapsible\n className=\"messages-tree-collapsible min-w-0\"\n header={\n <span\n className={cn(\"text-xl\", {\n \"text-error\": hasErrors(key),\n })}\n >\n {toWords(key)}\n </span>\n }\n >\n {typeof value === \"string\" ? (\n <MessageField\n className=\"min-w-0\"\n schema={value}\n key={key}\n messageKey={key}\n path={path}\n />\n ) : (\n <MessagesTree\n nestingLevel={nestingLevel + 1}\n path={[path, key].join(\".\")}\n schema={value}\n />\n )}\n </Collapsible>\n </div>\n ))}\n </div>\n );\n}\n"],"names":["MessagesTree","path","schema","nestingLevel","className","control","locales","useMessagesForm","errors","useFormState","hasErrors","useCallback","key","locale","get","cn","value","jsx","Collapsible","MessageField"],"mappings":";;;;;;;;;AAmBO,SAASA,EAAa;AAAA,EAC3B,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,WAAAC;AACF,GAAuC;AACrC,QAAM,EAAE,SAAAC,GAAS,SAAAC,EAAA,IAAYC,EAAA,GACvB,EAAE,QAAAC,EAAA,IAAWC,EAAa,EAAE,SAAAJ,GAAS,GAErCK,IAAYC;AAAA,IAChB,CAACC,MACQN,EAAQ;AAAA,MACb,CAACO,MAAWC,EAAIN,GAAQ,CAACK,GAAQZ,GAAMW,CAAG,EAAE,KAAK,GAAG,CAAC,MAAM;AAAA,IAAA;AAAA,IAG/D,CAACJ,GAAQF,GAASL,CAAI;AAAA,EAAA;AAGxB,2BACG,OAAA,EAAI,WAAWc,EAAG,cAAcX,CAAS,GACvC,UAAA,OAAO,QAAQF,CAAM,EAAE,IAAI,CAAC,CAACU,GAAKI,CAAK,MACtC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MAEC,WAAU;AAAA,MACV,OACE;AAAA,QACG,mBAAoBd;AAAA,MAAA;AAAA,MAIzB,UAAA,gBAAAc;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,QACE,gBAAAD;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWF,EAAG,WAAW;AAAA,gBACvB,cAAcL,EAAUE,CAAG;AAAA,cAAA,CAC5B;AAAA,cAEA,YAAQA,CAAG;AAAA,YAAA;AAAA,UAAA;AAAA,UAIf,UAAA,OAAOI,KAAU,WAChB,gBAAAC;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,QAAQH;AAAA,cAER,YAAYJ;AAAA,cACZ,MAAAX;AAAA,YAAA;AAAA,YAFKW;AAAA,UAAA,IAKP,gBAAAK;AAAA,YAACjB;AAAA,YAAA;AAAA,cACC,cAAcG,IAAe;AAAA,cAC7B,MAAM,CAACF,GAAMW,CAAG,EAAE,KAAK,GAAG;AAAA,cAC1B,QAAQI;AAAA,YAAA;AAAA,UAAA;AAAA,QACV;AAAA,MAAA;AAAA,IAEJ;AAAA,IAnCKJ;AAAA,EAAA,CAqCR,GACH;AAEJ;"}
1
+ {"version":3,"file":"MessagesTree.js","sources":["../../../src/components/layout/MessagesTree.tsx"],"sourcesContent":["import type { Messages } from \"@/types\";\nimport { Collapsible } from \"@payloadcms/ui\";\nimport { get } from \"lodash-es\";\nimport { useCallback } from \"react\";\nimport { useFormState } from \"react-hook-form\";\n\nimport { useMessagesForm } from \"@/context/messages-form\";\nimport { cn } from \"@/utils/cn\";\nimport { toWords } from \"@/utils/format\";\n\nimport { MessageField } from \"./MessageField\";\n\ninterface MessagesTreeProps {\n path: string;\n nestingLevel: number;\n schema: Messages;\n className?: string;\n}\n\n// TODO fix sticky position on single locale form\n\nexport function MessagesTree({\n path,\n schema,\n nestingLevel = 0,\n className,\n}: MessagesTreeProps): React.ReactNode {\n const { control, locales } = useMessagesForm();\n const { errors } = useFormState({ control });\n\n const hasErrors = useCallback(\n (key: string) => {\n return locales.some(\n (locale) => get(errors, [locale, path, key].join(\".\")) !== undefined,\n );\n },\n [errors, locales, path],\n );\n\n return (\n <div className={cn(\"grid gap-6\", className)}>\n {Object.entries(schema).map(([key, value]) => (\n <div\n key={key}\n className=\"grid min-w-0\"\n style={\n {\n [\"--nesting-level\"]: nestingLevel,\n } as React.CSSProperties\n }\n >\n <Collapsible\n className=\"messages-tree-collapsible min-w-0\"\n header={\n <span\n className={cn(\"text-xl\", {\n \"text-error\": hasErrors(key),\n })}\n >\n {toWords(key)}\n </span>\n }\n >\n {typeof value === \"string\" ? (\n <MessageField\n className=\"min-w-0\"\n schema={value}\n key={key}\n messageKey={key}\n path={path}\n />\n ) : (\n <MessagesTree\n nestingLevel={nestingLevel + 1}\n path={[path, key].join(\".\")}\n schema={value}\n />\n )}\n </Collapsible>\n </div>\n ))}\n </div>\n );\n}\n"],"names":["MessagesTree","path","schema","nestingLevel","className","control","locales","useMessagesForm","errors","useFormState","hasErrors","useCallback","key","locale","get","cn","value","jsx","Collapsible","MessageField"],"mappings":";;;;;;;;;AAqBO,SAASA,EAAa;AAAA,EAC3B,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,WAAAC;AACF,GAAuC;AACrC,QAAM,EAAE,SAAAC,GAAS,SAAAC,EAAA,IAAYC,EAAA,GACvB,EAAE,QAAAC,EAAA,IAAWC,EAAa,EAAE,SAAAJ,GAAS,GAErCK,IAAYC;AAAA,IAChB,CAACC,MACQN,EAAQ;AAAA,MACb,CAACO,MAAWC,EAAIN,GAAQ,CAACK,GAAQZ,GAAMW,CAAG,EAAE,KAAK,GAAG,CAAC,MAAM;AAAA,IAAA;AAAA,IAG/D,CAACJ,GAAQF,GAASL,CAAI;AAAA,EAAA;AAGxB,2BACG,OAAA,EAAI,WAAWc,EAAG,cAAcX,CAAS,GACvC,UAAA,OAAO,QAAQF,CAAM,EAAE,IAAI,CAAC,CAACU,GAAKI,CAAK,MACtC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MAEC,WAAU;AAAA,MACV,OACE;AAAA,QACG,mBAAoBd;AAAA,MAAA;AAAA,MAIzB,UAAA,gBAAAc;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,QACE,gBAAAD;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWF,EAAG,WAAW;AAAA,gBACvB,cAAcL,EAAUE,CAAG;AAAA,cAAA,CAC5B;AAAA,cAEA,YAAQA,CAAG;AAAA,YAAA;AAAA,UAAA;AAAA,UAIf,UAAA,OAAOI,KAAU,WAChB,gBAAAC;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,QAAQH;AAAA,cAER,YAAYJ;AAAA,cACZ,MAAAX;AAAA,YAAA;AAAA,YAFKW;AAAA,UAAA,IAKP,gBAAAK;AAAA,YAACjB;AAAA,YAAA;AAAA,cACC,cAAcG,IAAe;AAAA,cAC7B,MAAM,CAACF,GAAMW,CAAG,EAAE,KAAK,GAAG;AAAA,cAC1B,QAAQI;AAAA,YAAA;AAAA,UAAA;AAAA,QACV;AAAA,MAAA;AAAA,IAEJ;AAAA,IAnCKJ;AAAA,EAAA,CAqCR,GACH;AAEJ;"}
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  /* empty css */
2
- import { getMessagesEndpoint as p } from "./endpoints/get-messages.js";
3
- import { setMessagesEndpoint as r } from "./endpoints/set-messages.js";
2
+ import { getMessagesEndpoint as r } from "./endpoints/get-messages.js";
3
+ import { setMessagesEndpoint as p } from "./endpoints/set-messages.js";
4
4
  import { getSupportedLocales as l, attachPluginContext as m } from "./utils/config.js";
5
5
  import { fetchMessages as w } from "./requests/fetchMessages.js";
6
6
  const y = ({
7
7
  schema: s,
8
- tabs: n,
8
+ tabs: a,
9
9
  collectionSlug: t = "messages",
10
- hooks: a,
10
+ hooks: n,
11
11
  editorAccess: o = (e) => e.user !== null,
12
12
  richTextEditorOptions: i
13
13
  }) => (e) => {
@@ -24,7 +24,7 @@ const y = ({
24
24
  access: o,
25
25
  locales: d,
26
26
  schema: s,
27
- tabs: n,
27
+ tabs: a,
28
28
  richTextEditorOptions: i
29
29
  }
30
30
  },
@@ -37,7 +37,10 @@ const y = ({
37
37
  admin: {
38
38
  hidden: !0
39
39
  },
40
- endpoints: [r, p],
40
+ access: {
41
+ read: () => !0
42
+ },
43
+ endpoints: [p, r],
41
44
  fields: [
42
45
  {
43
46
  name: "locale",
@@ -45,7 +48,7 @@ const y = ({
45
48
  required: !0
46
49
  }
47
50
  ],
48
- hooks: u(a),
51
+ hooks: u(n),
49
52
  indexes: [
50
53
  {
51
54
  fields: ["locale"]
@@ -54,19 +57,19 @@ const y = ({
54
57
  upload: {
55
58
  mimeTypes: ["application/json"]
56
59
  }
57
- }), e.endpoints ??= [], e.endpoints.push(p), e.endpoints.push(r), e;
60
+ }), e.endpoints ??= [], e.endpoints.push(r), e.endpoints.push(p), e;
58
61
  }, u = (s) => {
59
62
  if (!s)
60
63
  return;
61
- const { afterUpdate: n, ...t } = s;
62
- if (!n)
64
+ const { afterUpdate: a, ...t } = s;
65
+ if (!a)
63
66
  return t;
64
- const a = async ({ operation: o }) => {
65
- o === "update" && await n();
67
+ const n = async ({ operation: o }) => {
68
+ o === "update" && await a();
66
69
  };
67
70
  return {
68
71
  ...t,
69
- afterChange: [...t.afterChange ?? [], a]
72
+ afterChange: [...t.afterChange ?? [], n]
70
73
  };
71
74
  };
72
75
  export {
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 LocalizationConfig,\n Plugin,\n} from \"payload\";\n\nimport type { MessagesViewProps } from \"./exports/view\";\nimport type { Locales, 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 richTextEditorOptions,\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 richTextEditorOptions,\n } satisfies MessagesViewProps,\n },\n path: \"/intl\",\n },\n };\n\n attachPluginContext(config, {\n collectionSlug,\n });\n\n config.collections ??= [];\n config.collections.push({\n slug: collectionSlug,\n admin: {\n hidden: 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","richTextEditorOptions","config","locales","getSupportedLocales","attachPluginContext","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;AAAA,EACrC,uBAAAC;AACF,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,QAAQH;AAAA,UACR,SAAAI;AAAA,UACA,QAAAR;AAAA,UACA,MAAAC;AAAA,UACA,uBAAAK;AAAA,QAAA;AAAA,MACF;AAAA,MAEF,MAAM;AAAA,IAAA;AAAA,EACR,GAGFI,EAAoBH,GAAQ;AAAA,IAC1B,gBAAAL;AAAA,EAAA,CACD,GAEDK,EAAO,gBAAgB,CAAA,GACvBA,EAAO,YAAY,KAAK;AAAA,IACtB,MAAML;AAAA,IACN,OAAO;AAAA,MACL,QAAQ;AAAA,IAAA;AAAA,IAEV,WAAW,CAACS,GAAqBC,CAAmB;AAAA,IACpD,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,UAAU;AAAA,MAAA;AAAA,IACZ;AAAA,IAEF,OAAOC,EAAYV,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,GAEDI,EAAO,cAAc,CAAA,GACrBA,EAAO,UAAU,KAAKK,CAAmB,GACzCL,EAAO,UAAU,KAAKI,CAAmB,GAElCJ;AACT,GAUIM,IAAc,CAClBV,MAC8B;AAC9B,MAAI,CAACA;AACH;AAEF,QAAM,EAAE,aAAAW,GAAa,GAAGC,EAAA,IAASZ;AACjC,MAAI,CAACW;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 LocalizationConfig,\n Plugin,\n} from \"payload\";\n\nimport type { MessagesViewProps } from \"./exports/view\";\nimport type { Locales, 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 richTextEditorOptions,\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 richTextEditorOptions,\n } satisfies MessagesViewProps,\n },\n path: \"/intl\",\n },\n };\n\n attachPluginContext(config, {\n collectionSlug,\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","richTextEditorOptions","config","locales","getSupportedLocales","attachPluginContext","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;AAAA,EACrC,uBAAAC;AACF,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,QAAQH;AAAA,UACR,SAAAI;AAAA,UACA,QAAAR;AAAA,UACA,MAAAC;AAAA,UACA,uBAAAK;AAAA,QAAA;AAAA,MACF;AAAA,MAEF,MAAM;AAAA,IAAA;AAAA,EACR,GAGFI,EAAoBH,GAAQ;AAAA,IAC1B,gBAAAL;AAAA,EAAA,CACD,GAEDK,EAAO,gBAAgB,CAAA,GACvBA,EAAO,YAAY,KAAK;AAAA,IACtB,MAAML;AAAA,IACN,OAAO;AAAA,MACL,QAAQ;AAAA,IAAA;AAAA,IAEV,QAAQ;AAAA,MACN,MAAM,MAAM;AAAA,IAAA;AAAA,IAEd,WAAW,CAACS,GAAqBC,CAAmB;AAAA,IACpD,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,UAAU;AAAA,MAAA;AAAA,IACZ;AAAA,IAEF,OAAOC,EAAYV,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,GAEDI,EAAO,cAAc,CAAA,GACrBA,EAAO,UAAU,KAAKK,CAAmB,GACzCL,EAAO,UAAU,KAAKI,CAAmB,GAElCJ;AACT,GAUIM,IAAc,CAClBV,MAC8B;AAC9B,MAAI,CAACA;AACH;AAEF,QAAM,EAAE,aAAAW,GAAa,GAAGC,EAAA,IAASZ;AACjC,MAAI,CAACW;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,27 +1,29 @@
1
1
  import { getPluginContext as s } from "../utils/config.js";
2
- async function a(n, e) {
2
+ async function a(t, e) {
3
3
  const {
4
4
  docs: [r]
5
- } = await n.find({
6
- collection: s(n.config).collectionSlug,
5
+ } = await t.find({
6
+ collection: s(t.config).collectionSlug,
7
7
  where: { locale: { equals: e } }
8
8
  });
9
9
  if (!r)
10
10
  return console.warn(`No messages found for locale ${e}`), {};
11
- const { url: o } = r, t = await fetch(o);
12
- if (!t.ok)
11
+ const { url: o } = r, n = await fetch(o, {
12
+ credentials: "include"
13
+ });
14
+ if (!n.ok)
13
15
  throw new Error(
14
16
  `Could not fetch messages for locale "${e}": The page returned an error.
15
17
 
16
18
  ${o}`
17
19
  );
18
- if (t.headers.get("content-type") !== "application/json")
20
+ if (n.headers.get("content-type") !== "application/json")
19
21
  throw new Error(
20
22
  `Could not fetch messages for locale "${e}": The page did not return a JSON file.
21
23
 
22
24
  ${o}`
23
25
  );
24
- return await t.json();
26
+ return await n.json();
25
27
  }
26
28
  export {
27
29
  a as fetchMessages
@@ -1 +1 @@
1
- {"version":3,"file":"fetchMessages.js","sources":["../../src/requests/fetchMessages.ts"],"sourcesContent":["import type { BasePayload } from \"payload\";\n\nimport { getPluginContext } from \"@/utils/config\";\n\nimport type { Messages } from \"../types\";\n\nexport async function fetchMessages(\n payload: BasePayload,\n locale: string,\n): Promise<Messages> {\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 throw new Error(\n `Could not fetch messages for locale \"${locale}\": The page returned an error.\\n\\n${url}`,\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${url}`,\n );\n }\n\n return await response.json();\n}\n"],"names":["fetchMessages","payload","locale","doc","getPluginContext","url","response"],"mappings":";AAMA,eAAsBA,EACpBC,GACAC,GACmB;AACnB,QAAM;AAAA,IACJ,MAAM,CAACC,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;AACZ,UAAM,IAAI;AAAA,MACR,wCAAwCJ,CAAM;AAAA;AAAA,EAAqCG,CAAG;AAAA,IAAA;AAI1F,MAAIC,EAAS,QAAQ,IAAI,cAAc,MAAM;AAC3C,UAAM,IAAI;AAAA,MACR,wCAAwCJ,CAAM;AAAA;AAAA,EAA8CG,CAAG;AAAA,IAAA;AAInG,SAAO,MAAMC,EAAS,KAAA;AACxB;"}
1
+ {"version":3,"file":"fetchMessages.js","sources":["../../src/requests/fetchMessages.ts"],"sourcesContent":["import type { BasePayload } from \"payload\";\n\nimport { getPluginContext } from \"@/utils/config\";\n\nimport type { Messages } from \"../types\";\n\nexport async function fetchMessages(\n payload: BasePayload,\n locale: string,\n): Promise<Messages> {\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 credentials: \"include\",\n });\n\n if (!response.ok) {\n throw new Error(\n `Could not fetch messages for locale \"${locale}\": The page returned an error.\\n\\n${url}`,\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${url}`,\n );\n }\n\n return await response.json();\n}\n"],"names":["fetchMessages","payload","locale","doc","getPluginContext","url","response"],"mappings":";AAMA,eAAsBA,EACpBC,GACAC,GACmB;AACnB,QAAM;AAAA,IACJ,MAAM,CAACC,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,GAAK;AAAA,IAChC,aAAa;AAAA,EAAA,CACd;AAED,MAAI,CAACC,EAAS;AACZ,UAAM,IAAI;AAAA,MACR,wCAAwCJ,CAAM;AAAA;AAAA,EAAqCG,CAAG;AAAA,IAAA;AAI1F,MAAIC,EAAS,QAAQ,IAAI,cAAc,MAAM;AAC3C,UAAM,IAAI;AAAA,MACR,wCAAwCJ,CAAM;AAAA;AAAA,EAA8CG,CAAG;AAAA,IAAA;AAInG,SAAO,MAAMC,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-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-border-style:solid;--tw-leading:initial;--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-outline-style:solid;--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-input:var(--theme-input-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-600:var(--theme-elevation-600);--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)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-2{margin-inline:calc(var(--spacing)*2)}.my-0{margin-block:calc(var(--spacing)*0)}.my-1{margin-block:calc(var(--spacing)*1)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.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)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.h-7{height:calc(var(--spacing)*7)}.h-10{height:calc(var(--spacing)*10)}.h-\[calc\(100vh-var\(--app-header-height\)\)\]{height:calc(100vh - var(--app-header-height))}.h-px{height:1px}.max-h-\(--radix-dropdown-menu-content-available-height\){max-height:var(--radix-dropdown-menu-content-available-height)}.min-h-8{min-height:calc(var(--spacing)*8)}.w-8{width:calc(var(--spacing)*8)}.w-34{width:calc(var(--spacing)*34)}.w-40{width:calc(var(--spacing)*40)}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\[8rem\]{min-width:8rem}.min-w-max{min-width:max-content}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.flex-grow-0{flex-grow:0}.basis-auto{flex-basis:auto}.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)}.translate-y-2{--tw-translate-y:calc(var(--spacing)*2);translate:var(--tw-translate-x)var(--tw-translate-y)}.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-0\.5{gap:calc(var(--spacing)*.5)}.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-hidden{overflow:hidden}.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-none{border-radius:0!important}.rounded{border-radius:.25rem}.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-border{background-color:var(--color-border)}.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-600{background-color:var(--color-elevation-600)}.bg-elevation-800{background-color:var(--color-elevation-800)}.bg-error{background-color:var(--theme-error-100)}.bg-input{background-color:var(--color-input)}.bg-transparent{background-color:#0000}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.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))}.leading-none{--tw-leading:1;line-height:1}.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)}.italic{font-style:italic}.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,)}.underline{text-decoration-line:underline}.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}.slide-in-from-top-2{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.empty\:hidden:empty{display:none}.focus-within\:border-elevation-400:focus-within{border-color:var(--color-elevation-400)}.focus-within\:border-elevation-600:focus-within{border-color:var(--color-elevation-600)}@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\:bg-elevation-600:hover{background-color:var(--color-elevation-600)}.hover\:text-error:hover{color:var(--theme-error-400)}.hover\:outline-none:hover{--tw-outline-style:none;outline-style:none}}.focus\:relative:focus{position:relative}.focus\:border-border:focus{border-color:var(--color-border)}.focus\:outline:focus{outline-style:var(--tw-outline-style);outline-width:1px}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:bg-transparent:disabled{background-color:#0000}.disabled\:text-elevation-250:disabled{color:var(--color-elevation-250)}.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\=checked\]\:pointer-events-none[data-state=checked]{pointer-events:none}.data-\[state\=checked\]\:bg-elevation-800[data-state=checked]{background-color:var(--color-elevation-800)}.data-\[state\=checked\]\:text-elevation-0[data-state=checked]{color:var(--color-elevation-0)}.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-600[data-state=on]{background-color:var(--color-elevation-600)}.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)}.messages-tree-collapsible{overflow:clip}.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-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@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}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@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-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-border-style:solid;--tw-leading:initial;--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-outline-style:solid;--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-input:var(--theme-input-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-600:var(--theme-elevation-600);--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)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-2{margin-inline:calc(var(--spacing)*2)}.my-0{margin-block:calc(var(--spacing)*0)}.my-1{margin-block:calc(var(--spacing)*1)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.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)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.h-7{height:calc(var(--spacing)*7)}.h-10{height:calc(var(--spacing)*10)}.h-\[calc\(100vh-var\(--app-header-height\)\)\]{height:calc(100vh - var(--app-header-height))}.h-px{height:1px}.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)}.w-34{width:calc(var(--spacing)*34)}.w-40{width:calc(var(--spacing)*40)}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\[8rem\]{min-width:8rem}.min-w-max{min-width:max-content}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.flex-grow-0{flex-grow:0}.basis-auto{flex-basis:auto}.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)}.translate-y-2{--tw-translate-y:calc(var(--spacing)*2);translate:var(--tw-translate-x)var(--tw-translate-y)}.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-0\.5{gap:calc(var(--spacing)*.5)}.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-hidden{overflow:hidden}.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-none{border-radius:0!important}.rounded{border-radius:.25rem}.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-border{background-color:var(--color-border)}.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-600{background-color:var(--color-elevation-600)}.bg-elevation-800{background-color:var(--color-elevation-800)}.bg-error{background-color:var(--theme-error-100)}.bg-input{background-color:var(--color-input)}.bg-transparent{background-color:#0000}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.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))}.leading-none{--tw-leading:1;line-height:1}.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)}.italic{font-style:italic}.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,)}.underline{text-decoration-line:underline}.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}.slide-in-from-top-2{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.empty\:hidden:empty{display:none}.focus-within\:border-elevation-400:focus-within{border-color:var(--color-elevation-400)}.focus-within\:border-elevation-600:focus-within{border-color:var(--color-elevation-600)}@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\:bg-elevation-600:hover{background-color:var(--color-elevation-600)}.hover\:text-error:hover{color:var(--theme-error-400)}.hover\:outline-none:hover{--tw-outline-style:none;outline-style:none}}.focus\:relative:focus{position:relative}.focus\:border-border:focus{border-color:var(--color-border)}.focus\:outline:focus{outline-style:var(--tw-outline-style);outline-width:1px}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:bg-transparent:disabled{background-color:#0000}.disabled\:text-elevation-250:disabled{color:var(--color-elevation-250)}.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\=checked\]\:pointer-events-none[data-state=checked]{pointer-events:none}.data-\[state\=checked\]\:bg-elevation-800[data-state=checked]{background-color:var(--color-elevation-800)}.data-\[state\=checked\]\:text-elevation-0[data-state=checked]{color:var(--color-elevation-0)}.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-600[data-state=on]{background-color:var(--color-elevation-600)}.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)}.messages-tree-collapsible{overflow:clip}@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));border-radius:0;position:sticky}.messages-tree-collapsible .collapsible__content{padding:calc(var(--spacing)*3)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@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}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@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))}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload-intl",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "Payload Plugin for I18N using ICU Messages",
5
5
  "license": "MIT",
6
6
  "type": "module",